Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove deprecate-early-static deprecation #1269

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/deprecation-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import setupDeprecationWorkflow from 'ember-cli-deprecation-workflow';

setupDeprecationWorkflow({
workflow: [
{ handler: 'silence', matchId: 'ember-data:deprecate-early-static' },
{ handler: 'silence', matchId: 'ensure-safe-component.string' },
{ handler: 'silence', matchId: 'routing.transition-methods' },
{ handler: 'silence', matchId: 'ember-data:deprecate-promise-many-array-behaviors' },
Expand Down
2 changes: 1 addition & 1 deletion mirage/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function (config) {

let finalConfig = {
...config,
models: { ...discoverEmberDataModels(), ...config.models },
models: { ...discoverEmberDataModels(config.store), ...config.models },
serializers: {
application: JSONAPISerializer.extend({
keyForAttribute: (attr) => (attr ? camelize(attr) : null),
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions mirage/models/schema.js

This file was deleted.

12 changes: 8 additions & 4 deletions mirage/routes/schemas.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
// import { metaDataSchemas } from 'pass-ui/mirage/custom-fixtures/schemas';
import metaDataSchemas from '../custom-fixtures/schemas';

export default function (server) {
server.get('/schema', (schema, request) => {
server.get('/schema', (_schema, request) => {
// if there are more than one repositories in the request body return the
// the schema that includes PMC, otherwise return the schema without PMC
let metaDataSchema;

if (request.queryParams.entityIds.split(',').length > 1) {
metaDataSchema = schema.schemas.all().models[0];
metaDataSchema = metaDataSchemas[0];
} else {
metaDataSchema = schema.schemas.all().models[1];
metaDataSchema = metaDataSchemas[1];
}

return [metaDataSchema.attrs];
return [metaDataSchema];
});
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"ember-cli-htmlbars": "^6.1.1",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-inline-content": "^0.4.1",
"ember-cli-mirage": "^2.4.0",
"ember-cli-mirage": "^3.0.3",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-composable-helpers": "^5.0.0",
Expand Down Expand Up @@ -102,6 +102,7 @@
"lint-to-the-future-eslint": "^2.0.1",
"loader.js": "^4.7.0",
"merge": ">=1.2.1",
"miragejs": "^0.1.48",
"popper.js": "^1.14.5",
"prettier": "^2.8.7",
"qunit": "^2.19.2",
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/services/policies-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import EmberObject from '@ember/object';
import { setupTest } from 'ember-qunit';
import { setupMirage } from 'ember-cli-mirage/test-support';
import { module, test } from 'qunit';
import { Response } from 'ember-cli-mirage';
import { Response } from 'miragejs';

module('Unit | Service | policies', (hooks) => {
setupTest(hooks);
Expand Down
1,954 changes: 277 additions & 1,677 deletions yarn.lock

Large diffs are not rendered by default.

Loading