Skip to content

Commit

Permalink
Merge pull request miragejs#2495 from miragejs/ember-cli-update
Browse files Browse the repository at this point in the history
run `npx ember-cli-update --to=4.11.0` to align with blueprint
  • Loading branch information
SergeAstapov authored Sep 12, 2023
2 parents d38c9c4 + 8e03226 commit 2701d5f
Show file tree
Hide file tree
Showing 14 changed files with 106 additions and 114 deletions.
8 changes: 7 additions & 1 deletion packages/ember-cli-mirage/.ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
"disableAnalytics": false,

/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
*/
"isTypeScriptProject": false
}
3 changes: 1 addition & 2 deletions packages/ember-cli-mirage/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
extends: ['plugin:n/recommended'],
},
{
// test files
Expand Down
3 changes: 3 additions & 0 deletions packages/ember-cli-mirage/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/
9 changes: 8 additions & 1 deletion packages/ember-cli-mirage/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
'use strict';

module.exports = {
singleQuote: true,
overrides: [
{
files: '*.{js,ts}',
options: {
singleQuote: true,
},
},
],
};
31 changes: 0 additions & 31 deletions packages/ember-cli-mirage/config/environment.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/ember-cli-mirage/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function (defaults) {
let app = new EmberAddon(defaults, {
const app = new EmberAddon(defaults, {
'ember-cli-babel': {
includePolyfill: true,
},
Expand Down
64 changes: 32 additions & 32 deletions packages/ember-cli-mirage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,85 +25,85 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "npm-run-all lint test:*",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each",
"test:types": "tsc --project types-tests"
},
"dependencies": {
"@embroider/macros": "^1.0.0",
"@embroider/macros": "^1.10.0",
"broccoli-file-creator": "^2.1.1",
"broccoli-funnel": "^3.0.3",
"broccoli-merge-trees": "^4.2.0",
"ember-auto-import": "^2.3.0",
"ember-auto-import": "^2.6.1",
"ember-cli-babel": "^7.26.11",
"ember-destroyable-polyfill": "^2.0.3",
"ember-get-config": ">=0.2.4",
"ember-inflector": ">=2.0.0",
"ember-get-config": "0.2.4 - 0.5.0 || ^1.0.0 || ^2.1.1",
"ember-inflector": "^2.0.0 || ^3.0.0 || ^4.0.2",
"lodash-es": "^4.17.11",
"miragejs": "^0.1.43"
"miragejs": "^0.1.47"
},
"devDependencies": {
"@babel/core": "^7.22.10",
"@ember/jquery": "^2.0.0",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^2.7.0",
"@embroider/test-setup": "^1.6.0",
"@ember/test-helpers": "^2.9.3",
"@embroider/test-setup": "^2.1.1",
"@faker-js/faker": "^6.3.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@types/qunit": "^2.11.3",
"@types/qunit": "^2.19.4",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "~4.1.0",
"concurrently": "^8.0.1",
"ember-cli": "~4.11.0",
"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-fastboot": "^3.3.0",
"ember-cli-fastboot": "^4.1.0",
"ember-cli-favicon": "^3.0.0",
"ember-cli-htmlbars": "^6.0.1",
"ember-cli-htmlbars": "^6.2.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-moment-shim": "^3.8.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-data": "~4.1.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-fetch": "^8.1.1",
"ember-data": "~4.11.3",
"ember-fetch": "^8.1.2",
"ember-load-initializers": "^2.1.2",
"ember-moment": "^9.0.1",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.3",
"ember-source": "~4.1.0",
"ember-page-title": "^8.0.0",
"ember-qunit": "^6.2.0",
"ember-resolver": "^10.0.0",
"ember-source": "~4.11.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^4.5.0",
"ember-template-lint": "^5.11.2",
"ember-try": "^2.0.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.8",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^7.2.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-ember": "^11.4.9",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-qunit": "^7.3.4",
"fastboot": "^3.3.0",
"js-yaml": "^4.0.0",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"qunit": "^2.17.2",
"prettier": "^2.8.7",
"qunit": "^2.19.4",
"qunit-dom": "^2.0.0",
"typescript": "^4.5.5",
"webpack": "^5.66.0"
"webpack": "^5.75.0"
},
"peerDependencies": {
"@ember/test-helpers": "*",
"ember-data": "*",
"ember-qunit": "*"
"ember-qunit": "*",
"ember-source": "^3.28.0 || ^4.0.0 || ^5.0.0"
},
"peerDependenciesMeta": {
"@ember/test-helpers": {
Expand Down
1 change: 0 additions & 1 deletion packages/ember-cli-mirage/tests/dummy/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Dummy</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "4.1.1",
"version": "4.11.0",
"blueprints": [
{
"name": "addon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,35 @@ module.exports = async function () {
usePnpm: true,
scenarios: [
{
name: 'ember-lts-3.12',
npm: {
devDependencies: {
'ember-cli': '~3.12.1',
'ember-data': '~3.12.6',
'ember-source': '~3.12.4',
},
},
},
{
name: 'ember-lts-3.16',
name: 'ember-lts-3.28',
npm: {
devDependencies: {
'ember-cli': '~3.16.2',
'ember-source': '~3.16.10',
'ember-data': '~3.28.0',
'ember-source': '~3.28.8',
},
},
},
{
name: 'ember-lts-3.20',
name: 'ember-lts-4.4',
npm: {
devDependencies: {
'ember-cli': '~3.20.2',
'ember-source': '~3.20.5',
'ember-source': '~4.4.0',
},
},
},
{
name: 'ember-lts-3.24',
name: 'ember-lts-4.8',
npm: {
devDependencies: {
'ember-source': '~3.24.3',
'ember-source': '~4.8.0',
},
},
},
{
name: 'ember-lts-3.28',
name: 'ember-lts-4.12',
npm: {
devDependencies: {
'ember-source': '~3.28.8',
'ember-source': '~4.12.0',
},
},
},
Expand Down Expand Up @@ -78,24 +67,6 @@ module.exports = async function () {
},
},
},
{
name: 'ember-classic',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'application-template-wrapper': true,
'default-async-observers': false,
'template-only-glimmer-components': false,
}),
},
npm: {
devDependencies: {
'ember-source': '~3.28.8',
},
ember: {
edition: 'classic',
},
},
},
// embroiderSafe(),
// embroiderOptimized(),
],
Expand Down
7 changes: 2 additions & 5 deletions packages/ember-cli-mirage/tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
'use strict';

module.exports = function (environment) {
let ENV = {
const ENV = {
modulePrefix: 'dummy',
podModulePrefix: 'dummy/pods',
environment,
rootURL: '/',
locationType: 'history',
EmberENV: {
EXTEND_PROTOTYPES: false,
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false,
},
},

APP: {
Expand Down
Empty file.
42 changes: 42 additions & 0 deletions packages/ember-cli-mirage/tests/helpers/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import {
setupApplicationTest as upstreamSetupApplicationTest,
setupRenderingTest as upstreamSetupRenderingTest,
setupTest as upstreamSetupTest,
} from 'ember-qunit';

// This file exists to provide wrappers around ember-qunit's / ember-mocha's
// test setup functions. This way, you can easily extend the setup that is
// needed per test type.

function setupApplicationTest(hooks, options) {
upstreamSetupApplicationTest(hooks, options);

// Additional setup for application tests can be done here.
//
// For example, if you need an authenticated session for each
// application test, you could do:
//
// hooks.beforeEach(async function () {
// await authenticateSession(); // ember-simple-auth
// });
//
// This is also a good place to call test setup functions coming
// from other addons:
//
// setupIntl(hooks); // ember-intl
// setupMirage(hooks); // ember-cli-mirage
}

function setupRenderingTest(hooks, options) {
upstreamSetupRenderingTest(hooks, options);

// Additional setup for rendering tests can be done here.
}

function setupTest(hooks, options) {
upstreamSetupTest(hooks, options);

// Additional setup for unit tests can be done here.
}

export { setupApplicationTest, setupRenderingTest, setupTest };
1 change: 0 additions & 1 deletion packages/ember-cli-mirage/tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Dummy Tests</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down

0 comments on commit 2701d5f

Please sign in to comment.