chore: 🤖 update ember-cli-mirage (#2458)
* chore: 🤖 update ember-cli-mirage * chore: 🤖 move ember-cli-mirage to dependencies * chore: 🤖 remove duplicate dependency
This commit is contained in:
1 parent
bea791b2e6
commit
af9b832d38
6 files changed
+1176
-263
No files matched your search
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* SPDX-License-Identifier: BUSL-1.1
|
||||
*/
|
||||
|
||||
import { registerDeprecationHandler } from '@ember/debug';
|
||||
|
||||
const deprecationList = ['ember-data:deprecate-early-static'];
|
||||
|
||||
export function initialize() {
|
||||
registerDeprecationHandler((message, options, next) => {
|
||||
// TODO: Remove deprecation handling for `deprecate-early-static` warning
|
||||
// once we upgrade to ember-cli-mirage v3.0.0 which fixes this issue.
|
||||
// More info about this issue here: https://github.com/miragejs/ember-cli-mirage/issues/2441
|
||||
if (options?.id && deprecationList.includes(options.id)) {
|
||||
return;
|
||||
}
|
||||
if (options?.url) {
|
||||
message += options.url;
|
||||
}
|
||||
next(message, options);
|
||||
});
|
||||
}
|
||||
|
||||
export default {
|
||||
initialize,
|
||||
};
|
||||
@@ -1,6 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* SPDX-License-Identifier: BUSL-1.1
|
||||
*/
|
||||
|
||||
export { default, initialize } from 'api/initializers/deprecations';
|
||||
@@ -25,7 +25,10 @@ const isTesting = environmentConfig.environment === 'test';
|
||||
export default function (mirageConfig) {
|
||||
let finalConfig = {
|
||||
...mirageConfig,
|
||||
models: { ...discoverEmberDataModels(), ...mirageConfig.models },
|
||||
models: {
|
||||
...discoverEmberDataModels(mirageConfig.store),
|
||||
...mirageConfig.models,
|
||||
},
|
||||
serializers: applyEmberDataSerializers(mirageConfig.serializers),
|
||||
routes,
|
||||
};
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
"ember-can": "^4.2.0",
|
||||
"ember-cli-babel": "^7.26.10",
|
||||
"ember-cli-htmlbars": "^6.2.0",
|
||||
"ember-cli-mirage": "^2.4.0",
|
||||
"ember-cli-mirage": "^3.0.3",
|
||||
"miragejs": "^0.1.48",
|
||||
"ember-data": "~4.12.0",
|
||||
"ember-fetch": "^8.1.1",
|
||||
"tracked-built-ins": "^3.1.1"
|
||||
@@ -41,6 +42,7 @@
|
||||
"@ember/string": "^3.0.1",
|
||||
"@ember/test-helpers": "^2.9.3",
|
||||
"@embroider/test-setup": "^2.1.1",
|
||||
"@faker-js/faker": "^8.0.2",
|
||||
"@glimmer/component": "^1.1.2",
|
||||
"@glimmer/tracking": "^1.1.2",
|
||||
"broccoli-asset-rev": "^3.0.0",
|
||||
@@ -64,7 +66,6 @@
|
||||
"eslint-plugin-ember": "^11.11.1",
|
||||
"eslint-plugin-n": "^16.3.1",
|
||||
"eslint-plugin-qunit": "^8.0.1",
|
||||
"@faker-js/faker": "^8.0.2",
|
||||
"js-bexpr": "hashicorp/js-bexpr#9b4a4b54d85eba67fdfc0990133d1518d890b1e1",
|
||||
"loader.js": "^4.7.0",
|
||||
"prettier": "^3.0.0",
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* SPDX-License-Identifier: BUSL-1.1
|
||||
*/
|
||||
|
||||
import Application from '@ember/application';
|
||||
|
||||
import config from 'dummy/config/environment';
|
||||
import { initialize } from 'dummy/initializers/deprecations';
|
||||
import { module, test } from 'qunit';
|
||||
import Resolver from 'ember-resolver';
|
||||
import { run } from '@ember/runloop';
|
||||
|
||||
module('Unit | Initializer | deprecations', function (hooks) {
|
||||
hooks.beforeEach(function () {
|
||||
this.TestApplication = class TestApplication extends Application {
|
||||
modulePrefix = config.modulePrefix;
|
||||
podModulePrefix = config.podModulePrefix;
|
||||
Resolver = Resolver;
|
||||
};
|
||||
|
||||
this.TestApplication.initializer({
|
||||
name: 'initializer under test',
|
||||
initialize,
|
||||
});
|
||||
|
||||
this.application = this.TestApplication.create({
|
||||
autoboot: false,
|
||||
});
|
||||
});
|
||||
|
||||
hooks.afterEach(function () {
|
||||
run(this.application, 'destroy');
|
||||
});
|
||||
|
||||
// TODO: Replace this with your real tests.
|
||||
test('it works', async function (assert) {
|
||||
await this.application.boot();
|
||||
|
||||
assert.ok(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user