ember-cli 4.5.0 → 4.6.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,7 +27,7 @@ jobs:
27
27
  - uses: actions/checkout@v3
28
28
  - uses: actions/setup-node@v3
29
29
  with:
30
- node-version: 12.x
30
+ node-version: 14.x
31
31
  cache: 'yarn'
32
32
 
33
33
  - run: yarn install --frozen-lockfile --non-interactive
@@ -45,7 +45,7 @@ jobs:
45
45
  - uses: actions/checkout@v3
46
46
  - uses: actions/setup-node@v3
47
47
  with:
48
- node-version: 12.x
48
+ node-version: 14.x
49
49
  cache: 'yarn'
50
50
 
51
51
  - run: yarn install --frozen-lockfile --non-interactive
@@ -60,7 +60,7 @@ jobs:
60
60
  strategy:
61
61
  fail-fast: false
62
62
  matrix:
63
- node-version: [12.x, 14.x, 16.x]
63
+ node-version: [14.x, 16.x, 18.x]
64
64
  os: [ubuntu, windows]
65
65
 
66
66
  steps:
@@ -92,7 +92,7 @@ jobs:
92
92
  - uses: actions/checkout@v3
93
93
  - uses: actions/setup-node@v3
94
94
  with:
95
- node-version: 12.x
95
+ node-version: 14.x
96
96
  cache: 'yarn'
97
97
 
98
98
  - run: yarn install --frozen-lockfile --non-interactive
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # ember-cli Changelog
2
2
 
3
+ ## v4.6.0-beta.1
4
+
5
+ #### Blueprint Changes
6
+
7
+ - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v4.5.0...v4.6.0-beta.1)
8
+ - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v4.5.0...v4.6.0-beta.1)
9
+
10
+ #### Changelog
11
+
12
+ - [#9890](https://github.com/ember-cli/ember-cli/pull/9890) Make sure addons are discovered only once [@wagenet](https://github.com/wagenet)
13
+ - [#9770](https://github.com/ember-cli/ember-cli/pull/9770) Include the addon’s name in the warning when a core command is overridden [@davecombs](https://github.com/davecombs)
14
+ - [#9863](https://github.com/ember-cli/ember-cli/pull/9863) [INTERNAL] Add `.prettierignore` file to Ember CLI repo [@bertdeblock](https://github.com/bertdeblock)
15
+ - [#9872](https://github.com/ember-cli/ember-cli/pull/9872) [INTERNAL] Use native classes for tasks in test suite [@bertdeblock](https://github.com/bertdeblock)
16
+ - [#9885](https://github.com/ember-cli/ember-cli/pull/9885) [CLEANUP] Remove `ie 11` from default targets [@bertdeblock](https://github.com/bertdeblock)
17
+ - [#9898](https://github.com/ember-cli/ember-cli/pull/9898) Remove deprecated `addonJsFiles` method on `addon` model [@bertdeblock](https://github.com/bertdeblock)
18
+ - [#9899](https://github.com/ember-cli/ember-cli/pull/9899) Remove deprecated internal `silent` error [@bertdeblock](https://github.com/bertdeblock)
19
+ - [#9900](https://github.com/ember-cli/ember-cli/pull/9900) Remove unused CLI error class [@bertdeblock](https://github.com/bertdeblock)
20
+ - [#9902](https://github.com/ember-cli/ember-cli/pull/9902) Remove support for `ember-cli-inject-live-reload` < v1.10.0 [@bertdeblock](https://github.com/bertdeblock)
21
+ - [#9903](https://github.com/ember-cli/ember-cli/pull/9903) Deprecate `vendor-shim` blueprint [@bertdeblock](https://github.com/bertdeblock)
22
+ - [#9904](https://github.com/ember-cli/ember-cli/pull/9904) Update Node compatibility warning [@bertdeblock](https://github.com/bertdeblock)
23
+ - [#9906](https://github.com/ember-cli/ember-cli/pull/9906) Drop support for Node v12 [@bertdeblock](https://github.com/bertdeblock)
24
+ - [#9907](https://github.com/ember-cli/ember-cli/pull/9907) Remove ESLint config file from `server` blueprint [@bertdeblock](https://github.com/bertdeblock)
25
+ - [#9908](https://github.com/ember-cli/ember-cli/pull/9908) Remove support for finding an addon by its unscoped name [@bertdeblock](https://github.com/bertdeblock)
26
+ - [#9909](https://github.com/ember-cli/ember-cli/pull/9909) Deprecate support for `ember-cli-jshint` [@bertdeblock](https://github.com/bertdeblock)
27
+ - [#9917](https://github.com/ember-cli/ember-cli/pull/9917) update beta deps [@kellyselden](https://github.com/kellyselden)
28
+ - [#9919](https://github.com/ember-cli/ember-cli/pull/9919) Clean up `ember-addon` object in package file when destroying an in-repo addon [@bertdeblock](https://github.com/bertdeblock)
29
+ - [#9935](https://github.com/ember-cli/ember-cli/pull/9935) Update dev changelog script [@kellyselden](https://github.com/kellyselden)
30
+ - [#9938](https://github.com/ember-cli/ember-cli/pull/9938) [INTERNAL] Fix internal `sequence` util [@bertdeblock](https://github.com/bertdeblock)
31
+ - [#9939](https://github.com/ember-cli/ember-cli/pull/9939) Update `fs-extra` to v10 [@bertdeblock](https://github.com/bertdeblock)
32
+ - [#9937](https://github.com/ember-cli/ember-cli/pull/9937) [INTERNAL] Remove old `deprecate` utility [@bertdeblock](https://github.com/bertdeblock)
33
+ - [#9941](https://github.com/ember-cli/ember-cli/pull/9941) Update `filesize` to v9 [@bertdeblock](https://github.com/bertdeblock)
34
+ - [#9942](https://github.com/ember-cli/ember-cli/pull/9942) Update `isbinaryfile` to v5 [@bertdeblock](https://github.com/bertdeblock)
35
+ - [#9944](https://github.com/ember-cli/ember-cli/pull/9944) Add support for Node v18 [@ddzz](https://github.com/ddzz)
36
+ - [#9947](https://github.com/ember-cli/ember-cli/pull/9947) [DOC] Update EOL date for Node v16 in `Node Support` doc [@bertdeblock](https://github.com/bertdeblock)
37
+ - [#9953](https://github.com/ember-cli/ember-cli/pull/9953) Update `resolve-package-path` to v4 [@bertdeblock](https://github.com/bertdeblock)
38
+ - [#9954](https://github.com/ember-cli/ember-cli/pull/9954) Update `jsdom` to v20 [@bertdeblock](https://github.com/bertdeblock)
39
+ - [#9969](https://github.com/ember-cli/ember-cli/pull/9969) update ember source beta [@kellyselden](https://github.com/kellyselden)
40
+
41
+ Thank you to all who took the time to contribute!
42
+
3
43
  ## v4.5.0
4
44
 
5
45
  #### Blueprint Changes
@@ -22,7 +22,7 @@ jobs:
22
22
  - name: Install Node
23
23
  uses: actions/setup-node@v3
24
24
  with:
25
- node-version: 12.x
25
+ node-version: 14.x
26
26
  cache: <%= yarn ? 'yarn' : 'npm' %>
27
27
  - name: Install Dependencies
28
28
  run: <%= yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %>
@@ -40,7 +40,7 @@ jobs:
40
40
  - uses: actions/checkout@v3
41
41
  - uses: actions/setup-node@v3
42
42
  with:
43
- node-version: 12.x
43
+ node-version: 14.x
44
44
  cache: <%= yarn ? 'yarn' : 'npm' %>
45
45
  - name: Install Dependencies
46
46
  run: <%= yarn ? 'yarn install --no-lockfile' : 'npm install --no-shrinkwrap' %>
@@ -71,7 +71,7 @@ jobs:
71
71
  - name: Install Node
72
72
  uses: actions/setup-node@v3
73
73
  with:
74
- node-version: 12.x
74
+ node-version: 14.x
75
75
  cache: <%= yarn ? 'yarn' : 'npm' %>
76
76
  - name: Install Dependencies
77
77
  run: <%= yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %>
@@ -3,7 +3,7 @@ language: node_js
3
3
  node_js:
4
4
  # we recommend testing addons with the same minimum supported node version as Ember CLI
5
5
  # so that your addon works for all apps
6
- - "12"
6
+ - "14"
7
7
 
8
8
  dist: xenial
9
9
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  * Ember.js v3.24 or above
9
9
  * Ember CLI v3.24 or above
10
- * Node.js v12 or above
10
+ * Node.js v14 or above
11
11
 
12
12
 
13
13
  ## Installation
@@ -22,7 +22,7 @@ jobs:
22
22
  - name: Install Node
23
23
  uses: actions/setup-node@v3
24
24
  with:
25
- node-version: 12.x
25
+ node-version: 14.x
26
26
  cache: <%= yarn ? 'yarn' : 'npm' %>
27
27
  - name: Install Dependencies
28
28
  run: <%= yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %>
@@ -39,7 +39,7 @@ jobs:
39
39
  - name: Install Node
40
40
  uses: actions/setup-node@v3
41
41
  with:
42
- node-version: 12.x
42
+ node-version: 14.x
43
43
  cache: <%= yarn ? 'yarn' : 'npm' %>
44
44
  - name: Install Dependencies
45
45
  run: <%= yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  language: node_js
3
3
  node_js:
4
- - "12"
4
+ - "14"
5
5
 
6
6
  dist: xenial
7
7
 
@@ -47,7 +47,7 @@
47
47
  "ember-page-title": "^7.0.0",
48
48
  "ember-qunit": "^5.1.5",
49
49
  "ember-resolver": "^8.0.3",
50
- "ember-source": "~4.5.0",
50
+ "ember-source": "~4.6.0-beta.2",
51
51
  "ember-template-lint": "^4.10.0<% if (welcome) { %>",
52
52
  "ember-welcome-page": "^6.2.0<% } %>",
53
53
  "eslint": "^7.32.0",
@@ -64,7 +64,7 @@
64
64
  "webpack": "^5.73.0"
65
65
  },
66
66
  "engines": {
67
- "node": "12.* || 14.* || >= 16"
67
+ "node": "14.* || >= 16"
68
68
  },
69
69
  "ember": {
70
70
  "edition": "octane"
@@ -2,20 +2,4 @@
2
2
 
3
3
  module.exports = {
4
4
  description: 'Generates a blueprint and definition.',
5
-
6
- files() {
7
- let files = this._super.files.apply(this, arguments);
8
-
9
- if (!this.hasJSHint()) {
10
- files = files.filter((file) => file !== 'blueprints/.jshintrc');
11
- }
12
-
13
- return files;
14
- },
15
-
16
- hasJSHint() {
17
- if (this.project) {
18
- return 'ember-cli-jshint' in this.project.dependencies();
19
- }
20
- },
21
5
  };
@@ -69,9 +69,12 @@ module.exports = {
69
69
  let newPathIndex = paths.indexOf(newPath);
70
70
  if (newPathIndex > -1) {
71
71
  paths.splice(newPathIndex, 1);
72
- if (paths.length === 0) {
73
- delete contents['ember-addon']['paths'];
74
- }
72
+ }
73
+ if (paths.length === 0) {
74
+ delete contents['ember-addon']['paths'];
75
+ }
76
+ if (Object.keys(contents['ember-addon']).length === 0) {
77
+ delete contents['ember-addon'];
75
78
  }
76
79
  }
77
80
 
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const isPackageMissing = require('ember-cli-is-package-missing');
4
+ const { deprecate } = require('../../lib/debug');
4
5
 
5
6
  module.exports = {
6
7
  description: 'Generates a server directory for mocks and proxies.',
@@ -28,12 +29,28 @@ module.exports = {
28
29
  },
29
30
 
30
31
  files() {
31
- return ['server/index.js', this.hasJSHint() ? 'server/.jshintrc' : 'server/.eslintrc.js'];
32
+ let files = ['server/index.js'];
33
+
34
+ if (this.hasJSHint()) {
35
+ files.push('server/.jshintrc');
36
+ }
37
+
38
+ return files;
32
39
  },
33
40
 
34
41
  hasJSHint() {
35
- if (this.project) {
36
- return 'ember-cli-jshint' in this.project.dependencies();
37
- }
42
+ let hasJSHint = Boolean(this.project) && 'ember-cli-jshint' in this.project.dependencies();
43
+
44
+ deprecate('Support for `ember-cli-jshint` is deprecated. We recommend using `eslint` instead.', !hasJSHint, {
45
+ for: 'ember-cli',
46
+ id: 'ember-cli.ember-cli-jshint-support',
47
+ since: {
48
+ available: '4.6.0',
49
+ enabled: '4.6.0',
50
+ },
51
+ until: '5.0.0',
52
+ });
53
+
54
+ return hasJSHint;
38
55
  },
39
56
  };
@@ -1,10 +1,23 @@
1
1
  'use strict';
2
2
 
3
3
  const stringUtil = require('ember-cli-string-utils');
4
+ const { deprecate } = require('../../lib/debug');
4
5
 
5
6
  module.exports = {
6
7
  description: 'Generates an ES6 module shim for global libraries.',
7
8
 
9
+ beforeInstall() {
10
+ deprecate('The `vendor-shim` blueprint is deprecated. Please use `ember-auto-import` instead.', false, {
11
+ for: 'ember-cli',
12
+ id: 'ember-cli.vendor-shim-blueprint',
13
+ since: {
14
+ available: '4.6.0',
15
+ enabled: '4.6.0',
16
+ },
17
+ until: '5.0.0',
18
+ });
19
+ },
20
+
8
21
  locals(options) {
9
22
  let entity = options.entity;
10
23
  let rawName = entity.name;
@@ -3,7 +3,7 @@
3
3
  "logo": "https://ember-cli.com/assets/images/ember-cli-logo-small-dark.png",
4
4
  "name": "ember-cli",
5
5
  "description": "Command line tool for developing ambitious ember.js apps",
6
- "version": "4.5.0-release-d5a4e0b0c2"
6
+ "version": "4.6.0-beta.1-beta-79f8547eb8"
7
7
  },
8
8
  "files": {
9
9
  "lib/broccoli/default-packager.js": {
@@ -1554,7 +1554,7 @@
1554
1554
  },
1555
1555
  {
1556
1556
  "file": "lib/cli/cli.js",
1557
- "line": 262,
1557
+ "line": 264,
1558
1558
  "access": "private",
1559
1559
  "tagname": "",
1560
1560
  "itemtype": "method",
@@ -1574,7 +1574,7 @@
1574
1574
  },
1575
1575
  {
1576
1576
  "file": "lib/cli/cli.js",
1577
- "line": 303,
1577
+ "line": 305,
1578
1578
  "access": "private",
1579
1579
  "tagname": "",
1580
1580
  "itemtype": "method",
@@ -3213,22 +3213,6 @@
3213
3213
  {
3214
3214
  "file": "lib/models/addon.js",
3215
3215
  "line": 1272,
3216
- "description": "Returns a tree containing the addon's js files",
3217
- "access": "private",
3218
- "tagname": "",
3219
- "deprecated": true,
3220
- "itemtype": "method",
3221
- "name": "addonJsFiles",
3222
- "return": {
3223
- "description": "The filtered addon js files",
3224
- "type": "Tree"
3225
- },
3226
- "class": "Addon",
3227
- "module": "ember-cli"
3228
- },
3229
- {
3230
- "file": "lib/models/addon.js",
3231
- "line": 1289,
3232
3216
  "description": "Preprocesses a javascript tree.",
3233
3217
  "access": "private",
3234
3218
  "tagname": "",
@@ -3243,7 +3227,7 @@
3243
3227
  },
3244
3228
  {
3245
3229
  "file": "lib/models/addon.js",
3246
- "line": 1300,
3230
+ "line": 1283,
3247
3231
  "description": "Returns a tree with all javascript for this addon.",
3248
3232
  "access": "private",
3249
3233
  "tagname": "",
@@ -3265,7 +3249,7 @@
3265
3249
  },
3266
3250
  {
3267
3251
  "file": "lib/models/addon.js",
3268
- "line": 1336,
3252
+ "line": 1319,
3269
3253
  "description": "Returns the module name for this addon.",
3270
3254
  "access": "public",
3271
3255
  "tagname": "",
@@ -3280,7 +3264,7 @@
3280
3264
  },
3281
3265
  {
3282
3266
  "file": "lib/models/addon.js",
3283
- "line": 1351,
3267
+ "line": 1334,
3284
3268
  "description": "Returns the path for addon blueprints.",
3285
3269
  "access": "public",
3286
3270
  "tagname": "",
@@ -3298,7 +3282,7 @@
3298
3282
  },
3299
3283
  {
3300
3284
  "file": "lib/models/addon.js",
3301
- "line": 1369,
3285
+ "line": 1352,
3302
3286
  "description": "Augments the application's configuration settings.\n\nObject returned from this hook is merged with the application's configuration object.\n\nApplication's configuration always take precedence.\n\n#### Uses:\n\n- Modifying configuration options (see list of defaults [here](https://github.com/ember-cli/ember-cli/blob/v2.4.3/lib/broccoli/ember-app.js#L163))\n - For example\n - `minifyJS`\n - `storeConfigInMeta`\n - et, al",
3303
3287
  "access": "public",
3304
3288
  "tagname": "",
@@ -3328,7 +3312,7 @@
3328
3312
  },
3329
3313
  {
3330
3314
  "file": "lib/models/addon.js",
3331
- "line": 1409,
3315
+ "line": 1392,
3332
3316
  "access": "public",
3333
3317
  "tagname": "",
3334
3318
  "itemtype": "method",
@@ -3342,7 +3326,7 @@
3342
3326
  },
3343
3327
  {
3344
3328
  "file": "lib/models/addon.js",
3345
- "line": 1419,
3329
+ "line": 1402,
3346
3330
  "access": "public",
3347
3331
  "tagname": "",
3348
3332
  "itemtype": "method",
@@ -3356,7 +3340,7 @@
3356
3340
  },
3357
3341
  {
3358
3342
  "file": "lib/models/addon.js",
3359
- "line": 1428,
3343
+ "line": 1411,
3360
3344
  "description": "Can be used to exclude addons from being added as a child addon.\n\n#### Uses:\n\n- Abstract away multiple addons while only including one into the built assets",
3361
3345
  "access": "public",
3362
3346
  "tagname": "",
@@ -3381,7 +3365,7 @@
3381
3365
  },
3382
3366
  {
3383
3367
  "file": "lib/models/addon.js",
3384
- "line": 1460,
3368
+ "line": 1443,
3385
3369
  "description": "Allows the specification of custom addon commands.\nExpects you to return an object whose key is the name of the command and value is the command instance..\n\nThis function is not implemented by default\n\n#### Uses:\n\n- Include custom commands into consuming application",
3386
3370
  "access": "public",
3387
3371
  "tagname": "",
@@ -3399,7 +3383,7 @@
3399
3383
  },
3400
3384
  {
3401
3385
  "file": "lib/models/addon.js",
3402
- "line": 1484,
3386
+ "line": 1467,
3403
3387
  "description": "Allows addons to define a custom transform function that other addons and app can use when using `app.import`.\n\nThis function is not implemented by default\n\n#### Uses:\n\n- An app or addons want to transform a dependency that is being imported using `app.import`.",
3404
3388
  "access": "public",
3405
3389
  "tagname": "",
@@ -3418,7 +3402,7 @@
3418
3402
  },
3419
3403
  {
3420
3404
  "file": "lib/models/addon.js",
3421
- "line": 1528,
3405
+ "line": 1511,
3422
3406
  "description": "Pre-process a tree\n\n#### Uses:\n\n- removing / adding files from the build.",
3423
3407
  "access": "public",
3424
3408
  "tagname": "",
@@ -3445,7 +3429,7 @@
3445
3429
  },
3446
3430
  {
3447
3431
  "file": "lib/models/addon.js",
3448
- "line": 1542,
3432
+ "line": 1525,
3449
3433
  "description": "Post-process a tree",
3450
3434
  "access": "public",
3451
3435
  "tagname": "",
@@ -3475,7 +3459,7 @@
3475
3459
  },
3476
3460
  {
3477
3461
  "file": "lib/models/addon.js",
3478
- "line": 1555,
3462
+ "line": 1538,
3479
3463
  "description": "This hook allows you to make changes to the express server run by ember-cli.\n\nIt's passed a `startOptions` object which contains:\n- `app` Express server instance\n- `options` A hash with:\n - `project` Current {{#crossLink \"Project\"}}project{{/crossLink}}\n - `watcher`\n - `environment`\n\nThis function is not implemented by default\n\n#### Uses:\n\n- Tacking on headers to each request\n- Modifying the request object\n\n*Note:* that this should only be used in development, and if you need the same behavior in production you'll\nneed to configure your server.",
3480
3464
  "access": "public",
3481
3465
  "tagname": "",
@@ -3496,7 +3480,7 @@
3496
3480
  },
3497
3481
  {
3498
3482
  "file": "lib/models/addon.js",
3499
- "line": 1594,
3483
+ "line": 1577,
3500
3484
  "description": "This hook allows you to make changes to the express server run by testem.\n\nThis function is not implemented by default\n\n#### Uses:\n\n- Adding custom test-specific endpoints\n- Manipulating HTTP requests in tests",
3501
3485
  "access": "public",
3502
3486
  "tagname": "",
@@ -3514,7 +3498,7 @@
3514
3498
  },
3515
3499
  {
3516
3500
  "file": "lib/models/addon.js",
3517
- "line": 1609,
3501
+ "line": 1592,
3518
3502
  "description": "This hook is called before a build takes place.",
3519
3503
  "access": "public",
3520
3504
  "tagname": "",
@@ -3532,7 +3516,7 @@
3532
3516
  },
3533
3517
  {
3534
3518
  "file": "lib/models/addon.js",
3535
- "line": 1617,
3519
+ "line": 1600,
3536
3520
  "description": "This hook is called after a build is complete.\n\nIt's passed a `result` object which contains:\n- `directory` Path to build output\n\n#### Uses:\n\n- Slow tree listing\n- May be used to manipulate your project after build has happened",
3537
3521
  "access": "public",
3538
3522
  "tagname": "",
@@ -3550,7 +3534,7 @@
3550
3534
  },
3551
3535
  {
3552
3536
  "file": "lib/models/addon.js",
3553
- "line": 1633,
3537
+ "line": 1616,
3554
3538
  "description": "This hook is called after the build has been processed and the build files have been copied to the output directory\n\nIt's passed a `result` object which contains:\n- `directory` Path to build output",
3555
3539
  "access": "public",
3556
3540
  "tagname": "",
@@ -3571,7 +3555,7 @@
3571
3555
  },
3572
3556
  {
3573
3557
  "file": "lib/models/addon.js",
3574
- "line": 1650,
3558
+ "line": 1633,
3575
3559
  "description": "This hook is called when an error occurs during the preBuild, postBuild or outputReady hooks\nfor addons, or when the build fails\n\n#### Uses:\n\n- Custom error handling during build process",
3576
3560
  "access": "public",
3577
3561
  "tagname": "",
@@ -3592,7 +3576,7 @@
3592
3576
  },
3593
3577
  {
3594
3578
  "file": "lib/models/addon.js",
3595
- "line": 1666,
3579
+ "line": 1649,
3596
3580
  "description": "Used to add preprocessors to the preprocessor registry. This is often used by addons like [ember-cli-htmlbars](https://github.com/ember-cli/ember-cli-htmlbars)\nand [ember-cli-coffeescript](https://github.com/kimroen/ember-cli-coffeescript) to add a `template` or `js` preprocessor to the registry.\n\n**Uses:**\n\n- Adding preprocessors to the registry.",
3597
3581
  "access": "public",
3598
3582
  "tagname": "",
@@ -3617,7 +3601,7 @@
3617
3601
  },
3618
3602
  {
3619
3603
  "file": "lib/models/addon.js",
3620
- "line": 1708,
3604
+ "line": 1691,
3621
3605
  "description": "Return value is merged into the **tests** tree. This lets you inject\nlinter output as test results.\n\n**Uses:**\n\n- JSHint\n- any other form of automated test generation that turns code into tests",
3622
3606
  "access": "public",
3623
3607
  "tagname": "",
@@ -3643,7 +3627,7 @@
3643
3627
  },
3644
3628
  {
3645
3629
  "file": "lib/models/addon.js",
3646
- "line": 1727,
3630
+ "line": 1710,
3647
3631
  "description": "Allow addons to implement contentFor method to add string output into the associated `{{content-for 'foo'}}` section in `index.html`\n\n**Uses:**\n\n- For instance, to inject analytics code into `index.html`",
3648
3632
  "access": "public",
3649
3633
  "tagname": "",
package/lib/cli/cli.js CHANGED
@@ -151,20 +151,22 @@ class CLI {
151
151
 
152
152
  let platformCheckerToken = heimdall.start('platform-checker');
153
153
 
154
+ const emberCLIVersion = require('../../package.json').version;
154
155
  const PlatformChecker = require('../utilities/platform-checker');
155
156
  let platform = new PlatformChecker(process.version);
156
157
  let recommendation =
157
- ' We recommend that you use the most-recent "Active LTS" version of Node.js.' +
158
- ' See https://github.com/ember-cli/ember-cli/blob/master/docs/node-support.md for details.';
158
+ ' See "https://github.com/ember-cli/ember-cli/blob/master/docs/node-support.md" to find out which version of Node is best to use.';
159
159
 
160
160
  if (!this.testing) {
161
161
  if (platform.isDeprecated) {
162
- this.ui.writeDeprecateLine(`Node ${process.version} is no longer supported by Ember CLI.${recommendation}`);
162
+ this.ui.writeDeprecateLine(
163
+ `Node ${process.version} is no longer supported by Ember CLI v${emberCLIVersion}.${recommendation}`
164
+ );
163
165
  }
164
166
 
165
167
  if (!platform.isTested) {
166
168
  this.ui.writeWarnLine(
167
- `Node ${process.version} is not tested against Ember CLI on your platform.${recommendation}`
169
+ `Ember CLI v${emberCLIVersion} is not tested against Node ${process.version}.${recommendation}`
168
170
  );
169
171
  }
170
172
  }
@@ -27,11 +27,15 @@ module.exports = function (commands, commandName, commandArgs, optionHash) {
27
27
  // Attempt to find command in ember-cli core commands
28
28
  let command = findCommand(commands, commandName);
29
29
 
30
+ let addonWithCommand;
30
31
  let addonCommand;
31
32
  // Attempt to find command within addons
32
33
  if (project && project.eachAddonCommand) {
33
34
  project.eachAddonCommand((addonName, commands) => {
34
35
  addonCommand = findCommand(commands, commandName);
36
+ if (addonCommand) {
37
+ addonWithCommand = addonName;
38
+ }
35
39
  return !addonCommand;
36
40
  });
37
41
  }
@@ -39,7 +43,7 @@ module.exports = function (commands, commandName, commandArgs, optionHash) {
39
43
  if (command && addonCommand) {
40
44
  if (addonCommand.overrideCore) {
41
45
  ui.writeWarnLine(
42
- `An ember-addon has attempted to override the core command "${command.prototype.name}". ` +
46
+ `An ember-addon (${addonWithCommand}) has attempted to override the core command "${command.prototype.name}". ` +
43
47
  `The addon command will be used as the overridding was explicit.`
44
48
  );
45
49
 
@@ -47,7 +51,7 @@ module.exports = function (commands, commandName, commandArgs, optionHash) {
47
51
  }
48
52
 
49
53
  ui.writeWarnLine(
50
- `An ember-addon has attempted to override the core command "${command.prototype.name}". ` +
54
+ `An ember-addon (${addonWithCommand}) has attempted to override the core command "${command.prototype.name}". ` +
51
55
  `The core command will be used.`
52
56
  );
53
57
  return command;
@@ -1269,23 +1269,6 @@ let addonProto = {
1269
1269
  });
1270
1270
  },
1271
1271
 
1272
- /**
1273
- Returns a tree containing the addon's js files
1274
-
1275
- @private
1276
- @deprecated
1277
- @method addonJsFiles
1278
- @return {Tree} The filtered addon js files
1279
- */
1280
- addonJsFiles(tree) {
1281
- this._warn(`Addon.prototype.addonJsFiles is deprecated`);
1282
-
1283
- return new Funnel(tree, {
1284
- destDir: this.moduleName(),
1285
- annotation: 'Funnel: Addon JS',
1286
- });
1287
- },
1288
-
1289
1272
  /**
1290
1273
  Preprocesses a javascript tree.
1291
1274
 
@@ -311,7 +311,7 @@ class Project {
311
311
  if (fs.existsSync(`${targetsPath}.js`)) {
312
312
  this._targets = this.require(targetsPath);
313
313
  } else {
314
- this._targets = require('../utilities/default-targets');
314
+ this._targets = require('../../blueprints/app/files/config/targets');
315
315
  }
316
316
  return this._targets;
317
317
  }
@@ -474,9 +474,9 @@ class Project {
474
474
  */
475
475
  discoverAddons() {
476
476
  if (this._didDiscoverAddons) {
477
- this._didDiscoverAddons = true;
478
477
  return;
479
478
  }
479
+ this._didDiscoverAddons = true;
480
480
 
481
481
  let addonPackageList = this._packageInfo.discoverProjectAddons();
482
482
  this.addonPackages = this._packageInfo.generateAddonPackages(addonPackageList);
@@ -1,34 +1,14 @@
1
1
  'use strict';
2
2
 
3
- function unscope(name) {
4
- if (name[0] !== '@') {
5
- return name;
6
- }
7
-
8
- return name.slice(name.indexOf('/') + 1);
9
- }
10
-
11
3
  let HAS_FOUND_ADDON_BY_NAME = Object.create(null);
12
- let HAS_FOUND_ADDON_BY_UNSCOPED_NAME = Object.create(null);
13
- /*
14
- Finds an addon given a specific name. Due to older versions of ember-cli
15
- not properly supporting scoped packages it was (at one point) common practice
16
- to have `package.json` include a scoped name but `index.js` having an unscoped
17
- name.
18
-
19
- Changes to the blueprints and addon model (in ~ 3.4+) have made it much clearer
20
- that both `package.json` and `index.js` `name`'s should match. At some point
21
- this will be "forced" and no longer optional.
22
4
 
23
- This function is attempting to prioritize matching across all of the combinations
24
- (in this priority order):
5
+ /*
6
+ Finds an addon given a specific name.
25
7
 
26
- - package.json name matches requested name exactly
27
- - index.js name matches requested name exactly
28
- - unscoped (leaf portion) index.js name matches unscoped requested name
8
+ The `name` value in an addon's `package.json` file takes priority over the
9
+ `name` value in an addon's `index.js` file.
29
10
  */
30
11
  module.exports = function findAddonByName(addons, name) {
31
- let unscopedName = unscope(name);
32
12
  let exactMatchFromPkg = addons.find((addon) => addon.pkg && addon.pkg.name === name);
33
13
 
34
14
  if (exactMatchFromPkg) {
@@ -51,22 +31,9 @@ module.exports = function findAddonByName(addons, name) {
51
31
  return exactMatchFromIndex;
52
32
  }
53
33
 
54
- let unscopedMatchFromIndex = addons.find((addon) => addon.name && unscope(addon.name) === unscopedName);
55
- if (unscopedMatchFromIndex) {
56
- if (HAS_FOUND_ADDON_BY_UNSCOPED_NAME[name] !== true) {
57
- HAS_FOUND_ADDON_BY_UNSCOPED_NAME[name] = true;
58
- console.trace(
59
- `Finding a scoped addon via its unscoped name is deprecated. You searched for \`${name}\` which we found as \`${unscopedMatchFromIndex.name}\` in '${unscopedMatchFromIndex.root}'`
60
- );
61
- }
62
-
63
- return unscopedMatchFromIndex;
64
- }
65
-
66
34
  return null;
67
35
  };
68
36
 
69
37
  module.exports._clearCaches = function () {
70
38
  HAS_FOUND_ADDON_BY_NAME = Object.create(null);
71
- HAS_FOUND_ADDON_BY_UNSCOPED_NAME = Object.create(null);
72
39
  };
@@ -1,17 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const cleanBaseUrl = require('clean-base-url');
4
- const deprecate = require('./deprecate');
5
4
 
6
5
  module.exports = function isLiveReloadRequest(url, liveReloadPrefix) {
7
- let regex = /\/livereload$/gi;
8
- if (url === `${cleanBaseUrl(liveReloadPrefix)}livereload`) {
9
- return true;
10
- } else if (regex.test(url)) {
11
- //version needs to be updated according to the this PR (https://github.com/ember-cli/ember-cli-inject-live-reload/pull/55)
12
- //in master of ember-cli-inject-live-reload.
13
- deprecate(`Upgrade ember-cli-inject-live-reload version to 1.10.0 or above`, true);
14
- return true;
15
- }
16
- return false;
6
+ return url === `${cleanBaseUrl(liveReloadPrefix)}livereload`;
17
7
  };
@@ -27,14 +27,16 @@
27
27
  * @return Promise<Array>
28
28
  *
29
29
  */
30
- module.exports = function sequence(tasks) {
30
+ module.exports = async function sequence(tasks) {
31
31
  let length = tasks.length;
32
- let current = Promise.resolve();
33
- let results = new Array(length);
32
+ let results = [];
34
33
 
35
34
  for (let i = 0; i < length; ++i) {
36
- current = results[i] = current.then(tasks[i]);
35
+ let task = tasks[i];
36
+ let prevResult = results[i - 1];
37
+
38
+ results.push(typeof task === 'function' ? await task(prevResult) : await task);
37
39
  }
38
40
 
39
- return Promise.all(results);
41
+ return results;
40
42
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-cli",
3
- "version": "4.5.0",
3
+ "version": "4.6.0-beta.1",
4
4
  "description": "Command line tool for developing ambitious ember.js apps",
5
5
  "keywords": [
6
6
  "app",
@@ -37,8 +37,8 @@
37
37
  "test:slow": "node --unhandled-rejections=strict tests/runner slow"
38
38
  },
39
39
  "dependencies": {
40
- "@babel/core": "^7.17.10",
41
- "@babel/plugin-transform-modules-amd": "^7.16.7",
40
+ "@babel/core": "^7.18.6",
41
+ "@babel/plugin-transform-modules-amd": "^7.18.6",
42
42
  "amd-name-resolver": "^1.3.1",
43
43
  "babel-plugin-module-resolver": "^4.1.0",
44
44
  "bower-config": "^1.4.3",
@@ -61,14 +61,14 @@
61
61
  "calculate-cache-key-for-tree": "^2.0.0",
62
62
  "capture-exit": "^2.0.0",
63
63
  "chalk": "^4.1.2",
64
- "ci-info": "^3.3.0",
64
+ "ci-info": "^3.3.1",
65
65
  "clean-base-url": "^1.0.0",
66
66
  "compression": "^1.7.4",
67
67
  "configstore": "^5.0.1",
68
68
  "console-ui": "^3.1.2",
69
69
  "core-object": "^3.1.5",
70
70
  "dag-map": "^2.0.2",
71
- "diff": "^5.0.0",
71
+ "diff": "^5.1.0",
72
72
  "ember-cli-is-package-missing": "^1.0.0",
73
73
  "ember-cli-lodash-subset": "^2.0.1",
74
74
  "ember-cli-normalize-entity-name": "^1.0.0",
@@ -79,11 +79,11 @@
79
79
  "execa": "^5.1.1",
80
80
  "exit": "^0.1.2",
81
81
  "express": "^4.18.1",
82
- "filesize": "^8.0.6",
82
+ "filesize": "^9.0.11",
83
83
  "find-up": "^5.0.0",
84
84
  "find-yarn-workspace-root": "^2.0.0",
85
85
  "fixturify-project": "^2.1.1",
86
- "fs-extra": "^9.1.0",
86
+ "fs-extra": "^10.1.0",
87
87
  "fs-tree-diff": "^2.0.1",
88
88
  "get-caller-file": "^2.0.5",
89
89
  "git-repo-info": "^2.1.1",
@@ -96,13 +96,13 @@
96
96
  "inflection": "^1.13.1",
97
97
  "is-git-url": "^1.0.0",
98
98
  "is-language-code": "^3.1.0",
99
- "isbinaryfile": "^4.0.8",
99
+ "isbinaryfile": "^5.0.0",
100
100
  "js-yaml": "^3.14.0",
101
101
  "leek": "0.0.24",
102
102
  "lodash.template": "^4.5.0",
103
103
  "markdown-it": "^13.0.1",
104
104
  "markdown-it-terminal": "0.2.1",
105
- "minimatch": "^5.0.1",
105
+ "minimatch": "^5.1.0",
106
106
  "morgan": "^1.10.0",
107
107
  "nopt": "^3.0.6",
108
108
  "npm-package-arg": "^9.0.2",
@@ -112,22 +112,22 @@
112
112
  "promise.hash.helper": "^1.0.8",
113
113
  "quick-temp": "^0.1.8",
114
114
  "remove-types": "^1.0.0",
115
- "resolve": "^1.20.0",
116
- "resolve-package-path": "^3.1.0",
115
+ "resolve": "^1.22.1",
116
+ "resolve-package-path": "^4.0.3",
117
117
  "safe-stable-stringify": "^2.3.1",
118
118
  "sane": "^5.0.1",
119
119
  "semver": "^7.3.5",
120
120
  "silent-error": "^1.1.1",
121
- "sort-package-json": "^1.55.0",
121
+ "sort-package-json": "^1.57.0",
122
122
  "symlink-or-copy": "^1.3.1",
123
123
  "temp": "0.9.4",
124
- "testem": "^3.6.0",
124
+ "testem": "^3.7.0",
125
125
  "tiny-lr": "^2.0.0",
126
126
  "tree-sync": "^2.1.0",
127
127
  "uuid": "^8.3.2",
128
128
  "walk-sync": "^2.2.0",
129
129
  "watch-detector": "^1.0.1",
130
- "workerpool": "^6.2.0",
130
+ "workerpool": "^6.2.1",
131
131
  "yam": "^1.0.0"
132
132
  },
133
133
  "devDependencies": {
@@ -144,21 +144,21 @@
144
144
  "eslint": "^8.10.0",
145
145
  "eslint-config-prettier": "^8.5.0",
146
146
  "eslint-plugin-chai-expect": "^3.0.0",
147
- "eslint-plugin-mocha": "^9.0.0",
147
+ "eslint-plugin-mocha": "^10.0.5",
148
148
  "eslint-plugin-node": "^11.1.0",
149
- "eslint-plugin-prettier": "^4.0.0",
149
+ "eslint-plugin-prettier": "^4.2.1",
150
150
  "fixturify": "^2.1.0",
151
- "jsdom": "^19.0.0",
151
+ "jsdom": "^20.0.0",
152
152
  "latest-version": "^5.1.0",
153
- "mocha": "^9.2.2",
154
- "nock": "^13.2.2",
153
+ "mocha": "^10.0.0",
154
+ "nock": "^13.2.8",
155
155
  "nyc": "^15.1.0",
156
156
  "prettier": "2.6.2",
157
- "release-it": "^14.14.0",
157
+ "release-it": "^15.1.1",
158
158
  "rimraf": "^3.0.2",
159
159
  "strip-ansi": "^6.0.0",
160
- "supertest": "^6.1.6",
161
- "testdouble": "^3.16.4",
160
+ "supertest": "^6.2.3",
161
+ "testdouble": "^3.16.5",
162
162
  "tmp": "^0.2.1",
163
163
  "websocket": "^1.0.32",
164
164
  "which": "2.0.2",
@@ -166,7 +166,7 @@
166
166
  "yuidocjs": "0.10.2"
167
167
  },
168
168
  "engines": {
169
- "node": ">= 12"
169
+ "node": ">= 14"
170
170
  },
171
171
  "publishConfig": {
172
172
  "registry": "https://registry.npmjs.org"
@@ -6,5 +6,8 @@ const path = require('path');
6
6
  let rootPath = process.cwd();
7
7
 
8
8
  module.exports = function copyFixtureFiles(sourceDir) {
9
- return fs.copy(path.join(rootPath, 'tests', 'fixtures', sourceDir), '.', { overwrite: true });
9
+ return fs.copy(path.join(rootPath, 'tests', 'fixtures', sourceDir), '.', {
10
+ dereference: true,
11
+ overwrite: true,
12
+ });
10
13
  };
@@ -1,5 +0,0 @@
1
- module.exports = {
2
- env: {
3
- node: true
4
- }
5
- };
package/lib/errors/cli.js DELETED
@@ -1,3 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = class BuildError extends Error {};
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- const SilentError = require('silent-error');
4
- const deprecate = require('../utilities/deprecate');
5
-
6
- Object.defineProperty(module, 'exports', {
7
- get() {
8
- // Get the call stack so we can let the user know what module is using the deprecated function.
9
- let stack = new Error().stack;
10
- stack = stack.split('\n')[5];
11
- stack = stack.replace(' at ', ' ');
12
-
13
- deprecate(
14
- `\`ember-cli/lib/errors/silent.js\` is deprecated, use \`silent-error\` instead. Required here: \n${stack.toString()}`,
15
- true
16
- );
17
- return SilentError;
18
- },
19
- });
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- browsers: ['ie 11', 'last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'],
5
- };
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- const chalk = require('chalk');
4
-
5
- module.exports = function (message, test) {
6
- if (test) {
7
- console.log(chalk.yellow(`DEPRECATION: ${message}`));
8
- }
9
- };