ember-cli 5.2.1 → 5.3.0-beta.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # ember-cli Changelog
2
2
 
3
+ ## v5.3.0-beta.2
4
+
5
+ #### Blueprint Changes
6
+
7
+ - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v5.3.0-beta.1...v5.3.0-beta.2)
8
+ - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v5.3.0-beta.1...v5.3.0-beta.2)
9
+
10
+ #### Changelog
11
+
12
+ - [#10346](https://github.com/ember-cli/ember-cli/pull/10346) [BUGFIX release] App blueprint may not have explicit-any in ember-data types [@NullVoxPopuli](https://github.com/NullVoxPopuli)
13
+ - [#10349](https://github.com/ember-cli/ember-cli/pull/10349) [BUGFIX release] Add `@babel/core` to `app` and `addon` blueprints [@bertdeblock](https://github.com/bertdeblock)
14
+
15
+ Thank you to all who took the time to contribute!
16
+
17
+ ## v5.3.0-beta.1
18
+
19
+ #### Blueprint Changes
20
+
21
+ - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v5.2.0...v5.3.0-beta.1)
22
+ - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v5.2.0...v5.3.0-beta.1)
23
+
24
+ #### Changelog
25
+
26
+ - [#10162](https://github.com/ember-cli/ember-cli/pull/10162) [ENHANCEMENT] Deprecate `outputPaths` build option [@bertdeblock](https://github.com/bertdeblock)
27
+ - [#10187](https://github.com/ember-cli/ember-cli/pull/10187) [ENHANCEMENT] Remove Node version checking [@bertdeblock](https://github.com/bertdeblock)
28
+ - [#10249](https://github.com/ember-cli/ember-cli/pull/10249) Serve app on root url without trailing slash [@mmun](https://github.com/mmun)
29
+ - [#10311](https://github.com/ember-cli/ember-cli/pull/10311) [ENHANCEMENT] Add v4.12 LTS scenario to `addon` blueprint [@bertdeblock](https://github.com/bertdeblock)
30
+ - [#10316](https://github.com/ember-cli/ember-cli/pull/10316) [BUGFIX] Remove `auto` as a possible value for `locationType` in `config` declaration [@bertdeblock](https://github.com/bertdeblock)
31
+ - [#10319](https://github.com/ember-cli/ember-cli/pull/10319) Use pnpm-action from org [@NullVoxPopuli](https://github.com/NullVoxPopuli)
32
+ - [#10331](https://github.com/ember-cli/ember-cli/pull/10331) [ENHANCEMENT] Exclude `@ember/string` from `addon` blueprint [@bertdeblock](https://github.com/bertdeblock)
33
+ - [#10335](https://github.com/ember-cli/ember-cli/pull/10335) Update ci.yml to trigger on merge queue [@locks](https://github.com/locks)
34
+ - [#10337](https://github.com/ember-cli/ember-cli/pull/10337) remove EMBER_CLI_PNPM [@NullVoxPopuli](https://github.com/NullVoxPopuli)
35
+ - [#10338](https://github.com/ember-cli/ember-cli/pull/10338) [INTERNAL] Remove `PNPM` experiment from CI matrix [@bertdeblock](https://github.com/bertdeblock)
36
+ - [#10341](https://github.com/ember-cli/ember-cli/pull/10341) [ENHANCEMENT] Remove reference to `ember-mocha` in `app` blueprint [@bertdeblock](https://github.com/bertdeblock)
37
+ - [#8578](https://github.com/ember-cli/ember-cli/pull/8578) By default make ember test to pick ports automatically [@SparshithNR](https://github.com/SparshithNR)
38
+
39
+ Thank you to all who took the time to contribute!
40
+
3
41
  ## v5.2.1
4
42
 
5
43
  #### Blueprint Changes
@@ -19,7 +19,7 @@ jobs:
19
19
 
20
20
  steps:
21
21
  - uses: actions/checkout@v3<% if (pnpm) { %>
22
- - uses: NullVoxPopuli/action-setup-pnpm@v2
22
+ - uses: wyvox/action-setup-pnpm@v2
23
23
  with:
24
24
  node-version: 16<% } else { %>
25
25
  - name: Install Node
@@ -41,7 +41,7 @@ jobs:
41
41
 
42
42
  steps:
43
43
  - uses: actions/checkout@v3<% if (pnpm) { %>
44
- - uses: NullVoxPopuli/action-setup-pnpm@v2
44
+ - uses: wyvox/action-setup-pnpm@v2
45
45
  with:
46
46
  node-version: 16
47
47
  no-lockfile: true<% } else { %>
@@ -66,6 +66,7 @@ jobs:
66
66
  try-scenario:
67
67
  - ember-lts-4.4
68
68
  - ember-lts-4.8
69
+ - ember-lts-4.12
69
70
  - ember-release
70
71
  - ember-beta
71
72
  - ember-canary
@@ -74,7 +75,7 @@ jobs:
74
75
 
75
76
  steps:
76
77
  - uses: actions/checkout@v3<% if (pnpm) { %>
77
- - uses: NullVoxPopuli/action-setup-pnpm@v2
78
+ - uses: wyvox/action-setup-pnpm@v2
78
79
  with:
79
80
  node-version: 16<% } else { %>
80
81
  - name: Install Node
@@ -53,6 +53,7 @@ jobs:
53
53
  # as well as latest stable release (bonus points to beta/canary)
54
54
  - env: EMBER_TRY_SCENARIO=ember-lts-4.4
55
55
  - env: EMBER_TRY_SCENARIO=ember-lts-4.8
56
+ - env: EMBER_TRY_SCENARIO=ember-lts-4.12
56
57
  - env: EMBER_TRY_SCENARIO=ember-release
57
58
  - env: EMBER_TRY_SCENARIO=ember-beta
58
59
  - env: EMBER_TRY_SCENARIO=ember-canary
@@ -24,6 +24,14 @@ module.exports = async function () {
24
24
  },
25
25
  },
26
26
  },
27
+ {
28
+ name: 'ember-lts-4.12',
29
+ npm: {
30
+ devDependencies: {
31
+ 'ember-source': '~4.12.0',
32
+ },
33
+ },
34
+ },
27
35
  {
28
36
  name: 'ember-release',
29
37
  npm: {
@@ -77,6 +77,9 @@ module.exports = {
77
77
  delete contents.devDependencies['@types/ember-data__store'];
78
78
  delete contents.devDependencies['ember-fetch'];
79
79
 
80
+ // `@ember/string` is a peer dependency of `ember-data`.
81
+ delete contents.devDependencies['@ember/string'];
82
+
80
83
  // Per RFC #811, addons should not have this dependency.
81
84
  // @see https://github.com/emberjs/rfcs/blob/master/text/0811-element-modifiers.md#detailed-design
82
85
  delete contents.devDependencies['ember-modifier'];
@@ -19,7 +19,7 @@ jobs:
19
19
 
20
20
  steps:
21
21
  - uses: actions/checkout@v3<% if (pnpm) { %>
22
- - uses: NullVoxPopuli/action-setup-pnpm@v2<% } else { %>
22
+ - uses: wyvox/action-setup-pnpm@v2<% } else { %>
23
23
  - name: Install Node
24
24
  uses: actions/setup-node@v3
25
25
  with:
@@ -37,7 +37,7 @@ jobs:
37
37
 
38
38
  steps:
39
39
  - uses: actions/checkout@v3<% if (pnpm) { %>
40
- - uses: NullVoxPopuli/action-setup-pnpm@v2<% } else { %>
40
+ - uses: wyvox/action-setup-pnpm@v2<% } else { %>
41
41
  - name: Install Node
42
42
  uses: actions/setup-node@v3
43
43
  with:
@@ -6,7 +6,7 @@ declare const config: {
6
6
  environment: string;
7
7
  modulePrefix: string;
8
8
  podModulePrefix: string;
9
- locationType: 'history' | 'hash' | 'none' | 'auto';
9
+ locationType: 'history' | 'hash' | 'none';
10
10
  rootURL: string;
11
11
  APP: Record<string, unknown>;
12
12
  };
@@ -82,14 +82,14 @@
82
82
  "ember-cli-inject-live-reload": "^2.1.0<% if (!embroider) { %>",
83
83
  "ember-cli-sri": "^2.1.1",
84
84
  "ember-cli-terser": "^4.0.2<% } %>",
85
- "ember-data": "~5.2.0",
85
+ "ember-data": "~5.3.0-beta.0",
86
86
  "ember-fetch": "^8.1.2",
87
87
  "ember-load-initializers": "^2.1.2",
88
88
  "ember-modifier": "^4.1.0",
89
89
  "ember-page-title": "^8.0.0",
90
90
  "ember-qunit": "^7.0.0",
91
91
  "ember-resolver": "^11.0.1",
92
- "ember-source": "~5.2.0",
92
+ "ember-source": "~5.3.0-beta.1",
93
93
  "ember-template-lint": "^5.11.2<% if (welcome) { %>",
94
94
  "ember-welcome-page": "^7.0.2<% } %>",
95
95
  "eslint": "^8.47.0",
@@ -5,7 +5,7 @@ import {
5
5
  SetupTestOptions,
6
6
  } from 'ember-qunit';
7
7
 
8
- // This file exists to provide wrappers around ember-qunit's / ember-mocha's
8
+ // This file exists to provide wrappers around ember-qunit's
9
9
  // test setup functions. This way, you can easily extend the setup that is
10
10
  // needed per test type.
11
11
 
@@ -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": "5.2.1-release-1af65a4074"
6
+ "version": "5.3.0-beta.2-beta-41f1abc292"
7
7
  },
8
8
  "files": {
9
9
  "lib/broccoli/default-packager.js": {
@@ -906,7 +906,7 @@
906
906
  },
907
907
  {
908
908
  "file": "lib/broccoli/ember-app.js",
909
- "line": 320,
909
+ "line": 334,
910
910
  "description": "Resolves a path relative to the project's root",
911
911
  "access": "private",
912
912
  "tagname": "",
@@ -917,7 +917,7 @@
917
917
  },
918
918
  {
919
919
  "file": "lib/broccoli/ember-app.js",
920
- "line": 330,
920
+ "line": 344,
921
921
  "access": "private",
922
922
  "tagname": "",
923
923
  "itemtype": "method",
@@ -927,7 +927,7 @@
927
927
  },
928
928
  {
929
929
  "file": "lib/broccoli/ember-app.js",
930
- "line": 357,
930
+ "line": 371,
931
931
  "description": "Returns the environment name",
932
932
  "access": "public",
933
933
  "tagname": "",
@@ -943,7 +943,7 @@
943
943
  },
944
944
  {
945
945
  "file": "lib/broccoli/ember-app.js",
946
- "line": 369,
946
+ "line": 383,
947
947
  "description": "Delegates to `broccoli-concat` with the `sourceMapConfig` option set to `options.sourcemaps`.",
948
948
  "access": "private",
949
949
  "tagname": "",
@@ -967,7 +967,7 @@
967
967
  },
968
968
  {
969
969
  "file": "lib/broccoli/ember-app.js",
970
- "line": 384,
970
+ "line": 398,
971
971
  "description": "Checks the result of `addon.isEnabled()` if it exists, defaults to `true` otherwise.",
972
972
  "access": "private",
973
973
  "tagname": "",
@@ -989,7 +989,7 @@
989
989
  },
990
990
  {
991
991
  "file": "lib/broccoli/ember-app.js",
992
- "line": 396,
992
+ "line": 410,
993
993
  "access": "private",
994
994
  "tagname": "",
995
995
  "itemtype": "method",
@@ -1010,7 +1010,7 @@
1010
1010
  },
1011
1011
  {
1012
1012
  "file": "lib/broccoli/ember-app.js",
1013
- "line": 407,
1013
+ "line": 421,
1014
1014
  "access": "private",
1015
1015
  "tagname": "",
1016
1016
  "itemtype": "method",
@@ -1031,7 +1031,7 @@
1031
1031
  },
1032
1032
  {
1033
1033
  "file": "lib/broccoli/ember-app.js",
1034
- "line": 418,
1034
+ "line": 432,
1035
1035
  "description": "Returns whether an addon should be added to the project",
1036
1036
  "access": "private",
1037
1037
  "tagname": "",
@@ -1053,7 +1053,7 @@
1053
1053
  },
1054
1054
  {
1055
1055
  "file": "lib/broccoli/ember-app.js",
1056
- "line": 434,
1056
+ "line": 448,
1057
1057
  "description": "Calls the included hook on addons.",
1058
1058
  "access": "private",
1059
1059
  "tagname": "",
@@ -1064,7 +1064,7 @@
1064
1064
  },
1065
1065
  {
1066
1066
  "file": "lib/broccoli/ember-app.js",
1067
- "line": 470,
1067
+ "line": 484,
1068
1068
  "description": "Calls the importTransforms hook on addons.",
1069
1069
  "access": "private",
1070
1070
  "tagname": "",
@@ -1075,7 +1075,7 @@
1075
1075
  },
1076
1076
  {
1077
1077
  "file": "lib/broccoli/ember-app.js",
1078
- "line": 519,
1078
+ "line": 533,
1079
1079
  "description": "Loads and initializes addons for this project.\nCalls initializeAddons on the Project.",
1080
1080
  "access": "private",
1081
1081
  "tagname": "",
@@ -1086,7 +1086,7 @@
1086
1086
  },
1087
1087
  {
1088
1088
  "file": "lib/broccoli/ember-app.js",
1089
- "line": 546,
1089
+ "line": 560,
1090
1090
  "description": "Returns a list of trees for a given type, returned by all addons.",
1091
1091
  "access": "private",
1092
1092
  "tagname": "",
@@ -1108,7 +1108,7 @@
1108
1108
  },
1109
1109
  {
1110
1110
  "file": "lib/broccoli/ember-app.js",
1111
- "line": 558,
1111
+ "line": 572,
1112
1112
  "description": "Runs addon post-processing on a given tree and returns the processed tree.\n\nThis enables addons to do process immediately **after** the preprocessor for a\ngiven type is run, but before concatenation occurs. If an addon wishes to\napply a transform before the preprocessors run, they can instead implement the\npreprocessTree hook.\n\nTo utilize this addons implement `postprocessTree` hook.\n\nAn example, would be to apply some broccoli transform on all JS files, but\nonly after the existing pre-processors have run.\n\n```js\nmodule.exports = {\n name: 'my-cool-addon',\n postprocessTree(type, tree) {\n if (type === 'js') {\n return someBroccoliTransform(tree);\n }\n\n return tree;\n }\n}\n\n```",
1113
1113
  "access": "private",
1114
1114
  "tagname": "",
@@ -1135,7 +1135,7 @@
1135
1135
  },
1136
1136
  {
1137
1137
  "file": "lib/broccoli/ember-app.js",
1138
- "line": 595,
1138
+ "line": 609,
1139
1139
  "description": "Runs addon pre-processing on a given tree and returns the processed tree.\n\nThis enables addons to do process immediately **before** the preprocessor for a\ngiven type is run. If an addon wishes to apply a transform after the\npreprocessors run, they can instead implement the postprocessTree hook.\n\nTo utilize this addons implement `preprocessTree` hook.\n\nAn example, would be to remove some set of files before the preprocessors run.\n\n```js\nvar stew = require('broccoli-stew');\n\nmodule.exports = {\n name: 'my-cool-addon',\n preprocessTree(type, tree) {\n if (type === 'js' && type === 'template') {\n return stew.rm(tree, someGlobPattern);\n }\n\n return tree;\n }\n}\n```",
1140
1140
  "access": "private",
1141
1141
  "tagname": "",
@@ -1162,7 +1162,7 @@
1162
1162
  },
1163
1163
  {
1164
1164
  "file": "lib/broccoli/ember-app.js",
1165
- "line": 631,
1165
+ "line": 645,
1166
1166
  "description": "Runs addon lintTree hooks and returns a single tree containing all\ntheir output.",
1167
1167
  "access": "private",
1168
1168
  "tagname": "",
@@ -1189,7 +1189,7 @@
1189
1189
  },
1190
1190
  {
1191
1191
  "file": "lib/broccoli/ember-app.js",
1192
- "line": 650,
1192
+ "line": 664,
1193
1193
  "description": "Imports legacy imports in this.vendorFiles",
1194
1194
  "access": "private",
1195
1195
  "tagname": "",
@@ -1200,7 +1200,7 @@
1200
1200
  },
1201
1201
  {
1202
1202
  "file": "lib/broccoli/ember-app.js",
1203
- "line": 827,
1203
+ "line": 841,
1204
1204
  "access": "private",
1205
1205
  "tagname": "",
1206
1206
  "itemtype": "method",
@@ -1214,7 +1214,7 @@
1214
1214
  },
1215
1215
  {
1216
1216
  "file": "lib/broccoli/ember-app.js",
1217
- "line": 1034,
1217
+ "line": 1048,
1218
1218
  "description": "Runs the `app`, `tests` and `templates` trees through the chain of addons that produces lint trees.\n\nThose lint trees are afterwards funneled into the `tests` folder, babel-ified and returned as an array.",
1219
1219
  "access": "private",
1220
1220
  "tagname": "",
@@ -1229,7 +1229,7 @@
1229
1229
  },
1230
1230
  {
1231
1231
  "file": "lib/broccoli/ember-app.js",
1232
- "line": 1074,
1232
+ "line": 1088,
1233
1233
  "access": "public",
1234
1234
  "tagname": "",
1235
1235
  "itemtype": "method",
@@ -1243,7 +1243,7 @@
1243
1243
  },
1244
1244
  {
1245
1245
  "file": "lib/broccoli/ember-app.js",
1246
- "line": 1083,
1246
+ "line": 1097,
1247
1247
  "description": "Imports an asset into the application.",
1248
1248
  "access": "public",
1249
1249
  "tagname": "",
@@ -1301,7 +1301,7 @@
1301
1301
  },
1302
1302
  {
1303
1303
  "file": "lib/broccoli/ember-app.js",
1304
- "line": 1129,
1304
+ "line": 1143,
1305
1305
  "access": "private",
1306
1306
  "tagname": "",
1307
1307
  "itemtype": "method",
@@ -1338,7 +1338,7 @@
1338
1338
  },
1339
1339
  {
1340
1340
  "file": "lib/broccoli/ember-app.js",
1341
- "line": 1214,
1341
+ "line": 1228,
1342
1342
  "access": "private",
1343
1343
  "tagname": "",
1344
1344
  "itemtype": "method",
@@ -1359,7 +1359,7 @@
1359
1359
  },
1360
1360
  {
1361
1361
  "file": "lib/broccoli/ember-app.js",
1362
- "line": 1255,
1362
+ "line": 1269,
1363
1363
  "description": "Returns an array of trees for this application",
1364
1364
  "access": "private",
1365
1365
  "tagname": "",
@@ -1374,7 +1374,7 @@
1374
1374
  },
1375
1375
  {
1376
1376
  "file": "lib/broccoli/ember-app.js",
1377
- "line": 1292,
1377
+ "line": 1306,
1378
1378
  "description": "Returns the merged tree for this application",
1379
1379
  "access": "public",
1380
1380
  "tagname": "",
@@ -1525,7 +1525,7 @@
1525
1525
  },
1526
1526
  {
1527
1527
  "file": "lib/cli/cli.js",
1528
- "line": 255,
1528
+ "line": 231,
1529
1529
  "access": "private",
1530
1530
  "tagname": "",
1531
1531
  "itemtype": "method",
@@ -1545,7 +1545,7 @@
1545
1545
  },
1546
1546
  {
1547
1547
  "file": "lib/cli/cli.js",
1548
- "line": 296,
1548
+ "line": 272,
1549
1549
  "access": "private",
1550
1550
  "tagname": "",
1551
1551
  "itemtype": "method",
@@ -6164,7 +6164,7 @@
6164
6164
  {
6165
6165
  "file": "lib/models/project.js",
6166
6166
  "line": 595,
6167
- "description": "Generate test file contents.\n\nThis method is supposed to be overwritten by test framework addons\nlike `ember-qunit` and `ember-mocha`.",
6167
+ "description": "Generate test file contents.\n\nThis method is supposed to be overwritten by test framework addons\nlike `ember-qunit`.",
6168
6168
  "access": "public",
6169
6169
  "tagname": "",
6170
6170
  "itemtype": "method",
@@ -9,7 +9,7 @@ const p = require('ember-cli-preprocess-registry/preprocessors');
9
9
  const chalk = require('chalk');
10
10
  const resolve = require('resolve');
11
11
 
12
- const assert = require('../debug/assert');
12
+ const { assert, deprecate } = require('../debug');
13
13
  const Project = require('../models/project');
14
14
 
15
15
  const concat = require('broccoli-concat');
@@ -223,6 +223,20 @@ class EmberApp {
223
223
  @param {Object} options
224
224
  */
225
225
  _initOptions(options) {
226
+ deprecate(
227
+ 'Using the `outputPaths` build option is deprecated, as output paths will no longer be predetermined under Embroider.',
228
+ typeof options.outputPaths === 'undefined',
229
+ {
230
+ for: 'ember-cli',
231
+ id: 'ember-cli.outputPaths-build-option',
232
+ since: {
233
+ available: '5.3.0',
234
+ enabled: '5.3.0',
235
+ },
236
+ until: '6.0.0',
237
+ }
238
+ );
239
+
226
240
  let resolvePathFor = (defaultPath, specified) => {
227
241
  let path = defaultPath;
228
242
  if (specified && typeof specified === 'string') {
package/lib/cli/cli.js CHANGED
@@ -149,30 +149,6 @@ class CLI {
149
149
  process.env[`EMBER_VERBOSE_${arg.toUpperCase()}`] = 'true';
150
150
  });
151
151
 
152
- let platformCheckerToken = heimdall.start('platform-checker');
153
-
154
- const emberCLIVersion = require('../../package.json').version;
155
- const PlatformChecker = require('../utilities/platform-checker');
156
- let platform = new PlatformChecker(process.version);
157
- let recommendation =
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
-
160
- if (!this.testing) {
161
- if (platform.isDeprecated) {
162
- this.ui.writeDeprecateLine(
163
- `Node ${process.version} is no longer supported by Ember CLI v${emberCLIVersion}.${recommendation}`
164
- );
165
- }
166
-
167
- if (!platform.isTested) {
168
- this.ui.writeWarnLine(
169
- `Ember CLI v${emberCLIVersion} is not tested against Node ${process.version}.${recommendation}`
170
- );
171
- }
172
- }
173
-
174
- platformCheckerToken.stop();
175
-
176
152
  logger.info('command: %s', commandName);
177
153
 
178
154
  let instrumentation = this.instrumentation;
@@ -9,7 +9,6 @@ const normalizeBlueprint = require('../utilities/normalize-blueprint-option');
9
9
  const mergeBlueprintOptions = require('../utilities/merge-blueprint-options');
10
10
  const isYarnProject = require('../utilities/is-yarn-project');
11
11
  const getLangArg = require('../../lib/utilities/get-lang-arg');
12
- const { isExperimentEnabled } = require('../experiments');
13
12
  const { getPackageManagerFromFlags } = require('../utilities/get-package-manager-from-flags');
14
13
 
15
14
  module.exports = Command.extend({
@@ -101,10 +100,6 @@ module.exports = Command.extend({
101
100
 
102
101
  await this.runTask('InstallBlueprint', blueprintOpts);
103
102
 
104
- if (commandOptions.pnpm && !isExperimentEnabled('PNPM')) {
105
- throw new Error(`--pnpm support is not enabled by default. Please prefix your command with EMBER_CLI_PNPM=true`);
106
- }
107
-
108
103
  let packageManager = getPackageManagerFromFlags(commandOptions);
109
104
 
110
105
  if (!commandOptions.skipNpm) {
@@ -7,7 +7,6 @@ const SilentError = require('silent-error');
7
7
  const isValidProjectName = require('../utilities/valid-project-name');
8
8
  const normalizeBlueprint = require('../utilities/normalize-blueprint-option');
9
9
  const mergeBlueprintOptions = require('../utilities/merge-blueprint-options');
10
- const { isExperimentEnabled } = require('../experiments');
11
10
 
12
11
  module.exports = Command.extend({
13
12
  name: 'new',
@@ -92,10 +91,6 @@ module.exports = Command.extend({
92
91
  commandOptions.skipGit = true;
93
92
  }
94
93
 
95
- if (commandOptions.pnpm && !isExperimentEnabled('PNPM')) {
96
- throw new Error(`--pnpm support is not enabled by default. Please prefix your command with EMBER_CLI_PNPM=true`);
97
- }
98
-
99
94
  if (projectName === '.') {
100
95
  let blueprintName = commandOptions.blueprint === 'app' ? 'application' : commandOptions.blueprint;
101
96
  message = `Trying to generate an ${blueprintName} structure in this directory? Use \`ember init\` instead.`;
@@ -8,6 +8,10 @@ const path = require('path');
8
8
  const Win = require('../utilities/windows-admin');
9
9
  const fs = require('fs');
10
10
  const temp = require('temp');
11
+ const util = require('util');
12
+ const PortFinder = require('portfinder');
13
+ let getPort = util.promisify(PortFinder.getPort);
14
+
11
15
  temp.track();
12
16
 
13
17
  let defaultPort = 7357;
@@ -118,14 +122,25 @@ module.exports = Command.extend({
118
122
  return config;
119
123
  },
120
124
 
121
- _generateTestPortNumber(options) {
122
- if ((options.port && options.testPort !== defaultPort) || (!isNaN(parseInt(options.testPort)) && !options.port)) {
123
- return options.testPort;
125
+ async _generateTestPortNumber(options, ui) {
126
+ if (options.testPort === defaultPort && !options.port) {
127
+ let foundPort = await getPort({ port: options.testPort });
128
+
129
+ if (options.testPort !== foundPort) {
130
+ ui.writeInfoLine(`Default port ${options.testPort} is already in use. Using alternate port ${foundPort}`);
131
+ }
132
+
133
+ return foundPort;
124
134
  }
125
135
 
126
- if (options.port) {
127
- return parseInt(options.port, 10) + 1;
136
+ let port = parseInt(options.testPort, 10);
137
+ if ((options.port && options.testPort !== defaultPort) || (!isNaN(parseInt(options.testPort)) && !options.port)) {
138
+ port = parseInt(options.testPort, 10);
139
+ } else if (options.port) {
140
+ port = parseInt(options.port, 10) + 1;
128
141
  }
142
+
143
+ return port;
129
144
  },
130
145
 
131
146
  buildTestPageQueryString(options) {
@@ -171,7 +186,7 @@ module.exports = Command.extend({
171
186
  ui: this.ui,
172
187
  outputPath,
173
188
  project: this.project,
174
- port: this._generateTestPortNumber(commandOptions),
189
+ port: await this._generateTestPortNumber(commandOptions, this.ui),
175
190
  },
176
191
  this._generateCustomConfigs(commandOptions)
177
192
  );
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const chalk = require('chalk');
4
- const availableExperiments = Object.freeze(['EMBROIDER', 'CLASSIC', 'PNPM']);
4
+ const availableExperiments = Object.freeze(['EMBROIDER', 'CLASSIC']);
5
5
 
6
6
  const deprecatedExperiments = Object.freeze([]);
7
7
  const enabledExperiments = Object.freeze([]);
@@ -596,7 +596,7 @@ class Project {
596
596
  Generate test file contents.
597
597
 
598
598
  This method is supposed to be overwritten by test framework addons
599
- like `ember-qunit` and `ember-mocha`.
599
+ like `ember-qunit`.
600
600
 
601
601
  @public
602
602
  @method generateTestFile
@@ -87,8 +87,14 @@ class HistorySupportAddon {
87
87
  return false;
88
88
  }
89
89
  let rootURL = options.rootURL === '' ? '/' : cleanBaseURL(options.rootURL);
90
- let rootURLRegexp = new RegExp(`^${rootURL}`);
91
- return rootURLRegexp.test(req.path);
90
+ if (req.path.startsWith(rootURL)) {
91
+ return true;
92
+ }
93
+ // exactly match the rootURL without a trailing slash
94
+ if (req.path === rootURL.slice(0, -1)) {
95
+ return true;
96
+ }
97
+ return false;
92
98
  }
93
99
  }
94
100
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-cli",
3
- "version": "5.2.1",
3
+ "version": "5.3.0-beta.2",
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.21.4",
41
- "@pnpm/find-workspace-dir": "^6.0.1",
40
+ "@babel/core": "^7.22.10",
41
+ "@pnpm/find-workspace-dir": "^6.0.2",
42
42
  "broccoli": "^3.5.2",
43
43
  "broccoli-builder": "^0.18.14",
44
44
  "broccoli-concat": "^4.2.5",
@@ -55,7 +55,7 @@
55
55
  "calculate-cache-key-for-tree": "^2.0.0",
56
56
  "capture-exit": "^2.0.0",
57
57
  "chalk": "^4.1.2",
58
- "ci-info": "^3.7.0",
58
+ "ci-info": "^3.8.0",
59
59
  "clean-base-url": "^1.0.0",
60
60
  "compression": "^1.7.4",
61
61
  "configstore": "^5.0.1",
@@ -72,7 +72,7 @@
72
72
  "execa": "^5.1.1",
73
73
  "exit": "^0.1.2",
74
74
  "express": "^4.18.1",
75
- "filesize": "^10.0.7",
75
+ "filesize": "^10.0.8",
76
76
  "find-up": "^5.0.0",
77
77
  "find-yarn-workspace-root": "^2.0.0",
78
78
  "fixturify-project": "^2.1.1",
@@ -91,7 +91,6 @@
91
91
  "is-git-url": "^1.0.0",
92
92
  "is-language-code": "^3.1.0",
93
93
  "isbinaryfile": "^5.0.0",
94
- "js-yaml": "^4.1.0",
95
94
  "leek": "0.0.24",
96
95
  "lodash.template": "^4.5.0",
97
96
  "markdown-it": "^13.0.1",
@@ -136,10 +135,10 @@
136
135
  "ember-cli-blueprint-test-helpers": "^0.19.2",
137
136
  "ember-cli-internal-test-helpers": "^0.9.1",
138
137
  "eslint": "^8.44.0",
139
- "eslint-config-prettier": "^8.6.0",
138
+ "eslint-config-prettier": "^8.9.0",
140
139
  "eslint-plugin-chai-expect": "^3.0.0",
141
140
  "eslint-plugin-mocha": "^10.1.0",
142
- "eslint-plugin-n": "^15.7.0",
141
+ "eslint-plugin-n": "^16.0.1",
143
142
  "eslint-plugin-prettier": "^4.2.1",
144
143
  "fixturify": "^3.0.0",
145
144
  "jsdom": "^21.1.1",
@@ -155,7 +154,7 @@
155
154
  "testdouble": "^3.18.0",
156
155
  "tmp": "^0.2.1",
157
156
  "websocket": "^1.0.32",
158
- "which": "3.0.0",
157
+ "which": "3.0.1",
159
158
  "yuidoc-ember-cli-theme": "^1.0.4",
160
159
  "yuidocjs": "0.10.2"
161
160
  },
@@ -1,101 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- - beta
8
- - release
9
- - next
10
- - 'v*'
11
- - 'release-*'
12
- - 'lts-*'
13
- pull_request:
14
- schedule:
15
- - cron: '0 3 * * *' # daily, at 3am
16
-
17
- concurrency:
18
- group: ci-${{ github.head_ref || github.ref }}
19
- cancel-in-progress: true
20
-
21
- jobs:
22
- linting:
23
- name: Linting
24
- runs-on: ubuntu-latest
25
-
26
- steps:
27
- - uses: actions/checkout@v3
28
- - uses: actions/setup-node@v3
29
- with:
30
- node-version: 16
31
- cache: 'yarn'
32
-
33
- - run: yarn install --frozen-lockfile --non-interactive
34
- - run: yarn lint
35
-
36
- basic-tests:
37
- name: "Basic Tests - ${{ matrix.os }}"
38
- runs-on: "${{ matrix.os }}-latest"
39
-
40
- strategy:
41
- matrix:
42
- os: [ubuntu, macOS, windows]
43
-
44
- steps:
45
- - uses: actions/checkout@v3
46
- - uses: actions/setup-node@v3
47
- with:
48
- node-version: 16
49
- cache: 'yarn'
50
-
51
- - run: yarn install --frozen-lockfile --non-interactive
52
- - run: yarn test
53
-
54
- tests:
55
- name: "Node ${{ matrix.node-version }} - ${{ matrix.os }} "
56
- runs-on: "${{ matrix.os }}-latest"
57
-
58
- needs: [linting, basic-tests]
59
-
60
- strategy:
61
- fail-fast: false
62
- matrix:
63
- node-version: [16, 18]
64
- os: [ubuntu, windows]
65
-
66
- steps:
67
- - uses: actions/checkout@v3
68
- - uses: actions/setup-node@v3
69
- with:
70
- node-version: ${{ matrix.node-version }}
71
- cache: 'yarn'
72
-
73
- - run: yarn install --frozen-lockfile --non-interactive
74
- - run: yarn test:all
75
-
76
- feature-flags:
77
- name: "Feature: ${{ matrix.feature-flag }}"
78
- runs-on: ubuntu-latest
79
-
80
- needs: [linting, basic-tests]
81
-
82
- strategy:
83
- fail-fast: false
84
- matrix:
85
- feature-flag:
86
- - ENABLE_ALL_EXPERIMENTS
87
- - EMBROIDER
88
- - CLASSIC
89
- - PNPM
90
-
91
- steps:
92
- - uses: actions/checkout@v3
93
- - uses: actions/setup-node@v3
94
- with:
95
- node-version: 16
96
- cache: 'yarn'
97
-
98
- - run: yarn install --frozen-lockfile --non-interactive
99
- - run: yarn test:all
100
- env:
101
- "EMBER_CLI_${{ matrix.feature-flag }}": true
@@ -1,32 +0,0 @@
1
- 'use strict';
2
-
3
- const findup = require('find-up');
4
- const fs = require('fs');
5
- const path = require('path');
6
- const yaml = require('js-yaml');
7
-
8
- let parsers = {
9
- '.yml': yaml.load,
10
- '.yaml': yaml.load,
11
- '.json': JSON.parse,
12
- };
13
-
14
- function loadConfig(file, basedir) {
15
- basedir = basedir || __dirname;
16
- let ext = path.extname(file);
17
- let configPath = findup.sync(file, { cwd: basedir });
18
-
19
- let content;
20
- try {
21
- content = fs.readFileSync(configPath, 'utf8');
22
- if (parsers[ext]) {
23
- content = parsers[ext](content);
24
- }
25
- } catch (e) {
26
- // ESLint doesn't like this.
27
- }
28
-
29
- return content;
30
- }
31
-
32
- module.exports = loadConfig;
@@ -1,57 +0,0 @@
1
- 'use strict';
2
-
3
- const semver = require('semver');
4
- const logger = require('heimdalljs-logger')('ember-cli:platform-checker:');
5
- const loadConfig = require('./load-config');
6
-
7
- const ci = loadConfig('.github/workflows/ci.yml');
8
- const nodeVersions = new Set();
9
-
10
- for (let jobName in ci.jobs) {
11
- let job = ci.jobs[jobName];
12
-
13
- job.steps.forEach((step) => {
14
- let isSetupNode = step.uses === 'actions/setup-node@v1';
15
- if (isSetupNode && step.with['node-version'].includes('${{') === false) {
16
- nodeVersions.add(step.with['node-version']);
17
- }
18
- });
19
-
20
- if (job.strategy && job.strategy.matrix && job.strategy.matrix['node-version']) {
21
- job.strategy.matrix['node-version'].forEach((version) => nodeVersions.add(version));
22
- }
23
- }
24
-
25
- const testedEngines = Array.from(nodeVersions).join(' || ');
26
-
27
- let supportedEngines = loadConfig('package.json').engines.node;
28
-
29
- module.exports = class PlatformChecker {
30
- constructor(version) {
31
- this.version = version;
32
- this.isValid = this.checkIsValid();
33
- this.isTested = this.checkIsTested();
34
- this.isDeprecated = this.checkIsDeprecated();
35
-
36
- logger.info('%o', {
37
- version: this.version,
38
- isValid: this.isValid,
39
- isTested: this.isTested,
40
- isDeprecated: this.isDeprecated,
41
- });
42
- }
43
-
44
- checkIsValid(range) {
45
- range = range || supportedEngines;
46
- return semver.satisfies(this.version, range) || semver.gtr(this.version, range);
47
- }
48
-
49
- checkIsDeprecated(range) {
50
- return !this.checkIsValid(range);
51
- }
52
-
53
- checkIsTested(range) {
54
- range = range || testedEngines;
55
- return semver.satisfies(this.version, range);
56
- }
57
- };