ember-cli 6.0.0-beta.0 → 6.1.0-beta.0

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,14 +1,37 @@
1
1
  # ember-cli Changelog
2
2
 
3
- ## v6.0.0-beta.0
3
+ ## v6.1.0-beta.0
4
4
 
5
5
  #### Blueprint Changes
6
6
 
7
- - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v5.12.0...v6.0.0-beta.0)
8
- - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v5.12.0...v6.0.0-beta.0)
7
+ - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v6.0.0...v6.1.0-beta.0)
8
+ - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v6.0.0...v6.1.0-beta.0)
9
9
 
10
10
  #### Changelog
11
11
 
12
+ - [#10514](https://github.com/ember-cli/ember-cli/pull/10514) [backport release] use fork of remove-types with config: false [@mansona](https://github.com/mansona)
13
+ - [#10515](https://github.com/ember-cli/ember-cli/pull/10515) Use colors for the concurrently prefixes in package.json [@NullVoxPopuli](https://github.com/NullVoxPopuli)
14
+ - [#10516](https://github.com/ember-cli/ember-cli/pull/10516) Use ESLint 9 and Flat Config [@NullVoxPopuli](https://github.com/NullVoxPopuli)
15
+ - [#10521](https://github.com/ember-cli/ember-cli/pull/10521) Make tests easier to run, closes #10520 [@NullVoxPopuli](https://github.com/NullVoxPopuli)
16
+ - [#10525](https://github.com/ember-cli/ember-cli/pull/10525) Upgrade concurrently, closes #10524 [@NullVoxPopuli](https://github.com/NullVoxPopuli)
17
+ - [#10526](https://github.com/ember-cli/ember-cli/pull/10526) Update ember-resolver, closes #10523 [@NullVoxPopuli](https://github.com/NullVoxPopuli)
18
+ - [#10527](https://github.com/ember-cli/ember-cli/pull/10527) Update @ember/test-helpers, closes #10522 [@NullVoxPopuli](https://github.com/NullVoxPopuli)
19
+ - [#10530](https://github.com/ember-cli/ember-cli/pull/10530) Update ember-load-initializers to v3 [@mkszepp](https://github.com/mkszepp)
20
+ - [#10531](https://github.com/ember-cli/ember-cli/pull/10531) Update stylelint and depended package [@mkszepp](https://github.com/mkszepp)
21
+ - [#10535](https://github.com/ember-cli/ember-cli/pull/10535) Upgrade eslint-plugin-ember [@NullVoxPopuli](https://github.com/NullVoxPopuli)
22
+
23
+ Thank you to all who took the time to contribute!
24
+
25
+ ## v6.0.0
26
+
27
+ #### Blueprint Changes
28
+
29
+ - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v5.12.0...v6.0.0)
30
+ - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v5.12.0...v6.0.0)
31
+
32
+ #### Changelog
33
+
34
+ - [#10559](https://github.com/ember-cli/ember-cli/pull/10559) [ENHANCEMENT] Make deprecations throw when the `until` for `ember-cli` has passed [@kategengler](https://github.com/kategengler)
12
35
  - [#10453](https://github.com/ember-cli/ember-cli/pull/10453) [ENHANCEMENT] Allow specifying no CI provider [@deanylev](https://github.com/deanylev)
13
36
  - [#10505](https://github.com/ember-cli/ember-cli/pull/10505) use our fork of remove-types with config: false [@mansona](https://github.com/mansona)
14
37
  - [#10506](https://github.com/ember-cli/ember-cli/pull/10506) [ENHANCEMENT] Use the official types in the blueprints [@Windvis](https://github.com/Windvis)
package/CONTRIBUTING.md CHANGED
@@ -37,17 +37,29 @@ for more information.
37
37
  ## Run the test suite
38
38
 
39
39
  ```
40
- npm test
40
+ pnpm test
41
41
  ```
42
42
 
43
43
  will run ESLint and the "fast" subset of the test suite. Run
44
- `npm run test:all` for the full test suite which will currently take quite a
44
+ `pnpm run test:all` for the full test suite which will currently take quite a
45
45
  few minutes due to heavy IO and network usage.
46
46
 
47
+ To run a single test
48
+ ```
49
+ pnpm mocha --fgrep "ember new adds ember-welcome-page by default"
50
+ ```
51
+
52
+ To get help with mocha, run
53
+ ```
54
+ pnpm mocha --help
55
+ ```
56
+
47
57
  ember-cli is using [Mocha](https://mochajs.org/) for its internal tests. If
48
58
  you want to run a specific subset of tests have a look at their
49
59
  [documentation](https://mochajs.org/#exclusive-tests).
50
60
 
61
+
62
+
51
63
  ## Update fixtures
52
64
 
53
65
  ### `ember new`
@@ -7,8 +7,6 @@
7
7
  /.ember-cli
8
8
  /.env*
9
9
  /.eslintcache
10
- /.eslintignore
11
- /.eslintrc.js
12
10
  /.git/
13
11
  /.github/
14
12
  /.gitignore
@@ -21,6 +19,7 @@
21
19
  /.watchmanconfig
22
20
  /CONTRIBUTING.md
23
21
  /ember-cli-build.js
22
+ /eslint.config.mjs
24
23
  /testem.js
25
24
  /tests/
26
25
  /tsconfig.declarations.json
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "extends": "@tsconfig/ember/tsconfig.json",
3
+ "glint": {
4
+ "environment": ["ember-loose", "ember-template-imports"]
5
+ },
3
6
  "compilerOptions": {
4
7
  // The combination of `baseUrl` with `paths` allows Ember's classic package
5
8
  // layout, which is not resolvable with the Node resolution algorithm, to
@@ -68,6 +68,9 @@ module.exports = {
68
68
  contents.dependencies['ember-cli-htmlbars'] = contents.devDependencies['ember-cli-htmlbars'];
69
69
  delete contents.devDependencies['ember-cli-htmlbars'];
70
70
 
71
+ contents.dependencies['ember-template-imports'] = contents.devDependencies['ember-template-imports'];
72
+ delete contents.devDependencies['ember-template-imports'];
73
+
71
74
  // 95% of addons don't need ember-data or ember-fetch, make them opt-in instead
72
75
  let deps = Object.keys(contents.devDependencies);
73
76
  for (let depName of deps) {
@@ -112,7 +115,50 @@ module.exports = {
112
115
  return stringifyAndNormalize(sortPackageJson(contents));
113
116
  },
114
117
 
115
- buildFileInfo(intoDir, templateVariables, file) {
118
+ /**
119
+ * @override
120
+ *
121
+ * This modification of buildFileInfo allows our differing
122
+ * input files to output to a single file, depending on the options.
123
+ * For example:
124
+ *
125
+ * for javascript,
126
+ * _ts_eslint.config.mjs is deleted
127
+ * _js_eslint.config.mjs is renamed to eslint.config.mjs
128
+ *
129
+ * for typescript,
130
+ * _js_eslint.config.mjs is deleted
131
+ * _ts_eslint.config.mjs is renamed to eslint.config.mjs
132
+ */
133
+ buildFileInfo(intoDir, templateVariables, file, commandOptions) {
134
+ if (file.startsWith('_js_') || file.startsWith('_ts_')) {
135
+ let fileInfo = this._super.buildFileInfo.apply(this, arguments);
136
+
137
+ if (file.includes('_js_')) {
138
+ if (commandOptions.typescript) {
139
+ return null;
140
+ }
141
+
142
+ fileInfo.outputBasePath = fileInfo.outputPath.replace('_js_', '');
143
+ fileInfo.outputPath = fileInfo.outputPath.replace('_js_', '');
144
+ fileInfo.displayPath = fileInfo.outputPath.replace('_js_', '');
145
+ return fileInfo;
146
+ }
147
+
148
+ if (file.includes('_ts_')) {
149
+ if (!commandOptions.typescript) {
150
+ return null;
151
+ }
152
+
153
+ fileInfo.outputBasePath = fileInfo.outputPath.replace('_ts_', '');
154
+ fileInfo.outputPath = fileInfo.outputPath.replace('_ts_', '');
155
+ fileInfo.displayPath = fileInfo.outputPath.replace('_ts_', '');
156
+ return fileInfo;
157
+ }
158
+
159
+ return fileInfo;
160
+ }
161
+
116
162
  let mappedPath = this.mapFile(file, templateVariables);
117
163
  let options = {
118
164
  action: 'write',
@@ -1,12 +1,20 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
+ plugins: ['prettier-plugin-ember-template-tag'],
4
5
  overrides: [
5
6
  {
6
- files: '*.{js,ts}',
7
+ files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}',
7
8
  options: {
8
9
  singleQuote: true,
9
10
  },
10
11
  },
12
+ {
13
+ files: '*.{gjs,gts}',
14
+ options: {
15
+ singleQuote: true,
16
+ templateSingleQuote: false,
17
+ },
18
+ },
11
19
  ],
12
20
  };
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Debugging:
3
+ * https://eslint.org/docs/latest/use/configure/debug
4
+ * ----------------------------------------------------
5
+ *
6
+ * Print a file's calculated configuration
7
+ *
8
+ * npx eslint --print-config path/to/file.js
9
+ *
10
+ * Inspecting the config
11
+ *
12
+ * npx eslint --inspect-config
13
+ *
14
+ */
15
+ import globals from 'globals';
16
+ import js from '@eslint/js';
17
+
18
+ import ember from 'eslint-plugin-ember/recommended';
19
+ import prettier from 'eslint-plugin-prettier/recommended';
20
+ import qunit from 'eslint-plugin-qunit';
21
+ import n from 'eslint-plugin-n';
22
+
23
+ import babelParser from '@babel/eslint-parser';
24
+
25
+ const esmParserOptions = {
26
+ ecmaFeatures: { modules: true },
27
+ ecmaVersion: 'latest',
28
+ requireConfigFile: false,
29
+ babelOptions: {
30
+ plugins: [
31
+ ['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
32
+ ],
33
+ },
34
+ };
35
+
36
+ export default [
37
+ js.configs.recommended,
38
+ prettier,
39
+ ember.configs.base,
40
+ ember.configs.gjs,
41
+ /**
42
+ * Ignores must be in their own object
43
+ * https://eslint.org/docs/latest/use/configure/ignore
44
+ */
45
+ {
46
+ ignores: ['dist/', 'node_modules/', 'coverage/', '!**/.*'],
47
+ },
48
+ /**
49
+ * https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options
50
+ */
51
+ {
52
+ linterOptions: {
53
+ reportUnusedDisableDirectives: 'error',
54
+ },
55
+ },
56
+ {
57
+ files: ['**/*.js'],
58
+ languageOptions: {
59
+ parser: babelParser,
60
+ },
61
+ },
62
+ {
63
+ files: ['**/*.{js,gjs}'],
64
+ languageOptions: {
65
+ parserOptions: esmParserOptions,
66
+ globals: {
67
+ ...globals.browser,
68
+ },
69
+ },
70
+ },
71
+ {
72
+ files: ['tests/**/*-test.{js,gjs}'],
73
+ plugins: {
74
+ qunit,
75
+ },
76
+ },
77
+ /**
78
+ * CJS node files
79
+ */
80
+ {
81
+ files: [
82
+ '**/*.cjs',
83
+ 'config/**/*.js',
84
+ 'testem.js',
85
+ 'testem*.js',
86
+ '.prettierrc.js',
87
+ '.stylelintrc.js',
88
+ '.template-lintrc.js',
89
+ 'ember-cli-build.js',
90
+ ],
91
+ plugins: {
92
+ n,
93
+ },
94
+
95
+ languageOptions: {
96
+ sourceType: 'script',
97
+ ecmaVersion: 'latest',
98
+ globals: {
99
+ ...globals.node,
100
+ },
101
+ },
102
+ },
103
+ /**
104
+ * ESM node files
105
+ */
106
+ {
107
+ files: ['**/*.mjs'],
108
+ plugins: {
109
+ n,
110
+ },
111
+
112
+ languageOptions: {
113
+ sourceType: 'module',
114
+ ecmaVersion: 'latest',
115
+ parserOptions: esmParserOptions,
116
+ globals: {
117
+ ...globals.node,
118
+ },
119
+ },
120
+ },
121
+ ];
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Debugging:
3
+ * https://eslint.org/docs/latest/use/configure/debug
4
+ * ----------------------------------------------------
5
+ *
6
+ * Print a file's calculated configuration
7
+ *
8
+ * npx eslint --print-config path/to/file.js
9
+ *
10
+ * Inspecting the config
11
+ *
12
+ * npx eslint --inspect-config
13
+ *
14
+ */
15
+ import globals from 'globals';
16
+ import js from '@eslint/js';
17
+
18
+ import ts from 'typescript-eslint';
19
+
20
+ import ember from 'eslint-plugin-ember/recommended';
21
+
22
+ import prettier from 'eslint-plugin-prettier/recommended';
23
+ import qunit from 'eslint-plugin-qunit';
24
+ import n from 'eslint-plugin-n';
25
+
26
+ import babelParser from '@babel/eslint-parser';
27
+
28
+ const parserOptions = {
29
+ esm: {
30
+ js: {
31
+ ecmaFeatures: { modules: true },
32
+ ecmaVersion: 'latest',
33
+ requireConfigFile: false,
34
+ babelOptions: {
35
+ plugins: [
36
+ [
37
+ '@babel/plugin-proposal-decorators',
38
+ { decoratorsBeforeExport: true },
39
+ ],
40
+ ],
41
+ },
42
+ },
43
+ ts: {
44
+ projectService: true,
45
+ tsconfigRootDir: import.meta.dirname,
46
+ },
47
+ },
48
+ };
49
+
50
+ export default ts.config(
51
+ js.configs.recommended,
52
+ ember.configs.base,
53
+ ember.configs.gjs,
54
+ ember.configs.gts,
55
+ prettier,
56
+ /**
57
+ * Ignores must be in their own object
58
+ * https://eslint.org/docs/latest/use/configure/ignore
59
+ */
60
+ {
61
+ ignores: ['dist/', 'node_modules/', 'coverage/', '!**/.*'],
62
+ },
63
+ /**
64
+ * https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options
65
+ */
66
+ {
67
+ linterOptions: {
68
+ reportUnusedDisableDirectives: 'error',
69
+ },
70
+ },
71
+ {
72
+ files: ['**/*.js'],
73
+ languageOptions: {
74
+ parser: babelParser,
75
+ },
76
+ },
77
+ {
78
+ files: ['**/*.{js,gjs}'],
79
+ languageOptions: {
80
+ parserOptions: parserOptions.esm.js,
81
+ globals: {
82
+ ...globals.browser,
83
+ },
84
+ },
85
+ },
86
+ {
87
+ files: ['**/*.{ts,gts}'],
88
+ languageOptions: {
89
+ parser: ember.parser,
90
+ parserOptions: parserOptions.esm.ts,
91
+ },
92
+ extends: [...ts.configs.recommendedTypeChecked, ember.configs.gts],
93
+ },
94
+ {
95
+ files: ['tests/**/*-test.{js,gjs,ts,gts}'],
96
+ plugins: {
97
+ qunit,
98
+ },
99
+ },
100
+ /**
101
+ * CJS node files
102
+ */
103
+ {
104
+ files: [
105
+ '**/*.cjs',
106
+ 'config/**/*.js',
107
+ 'testem.js',
108
+ 'testem*.js',
109
+ '.prettierrc.js',
110
+ '.stylelintrc.js',
111
+ '.template-lintrc.js',
112
+ 'ember-cli-build.js',
113
+ ],
114
+ plugins: {
115
+ n,
116
+ },
117
+
118
+ languageOptions: {
119
+ sourceType: 'script',
120
+ ecmaVersion: 'latest',
121
+ globals: {
122
+ ...globals.node,
123
+ },
124
+ },
125
+ },
126
+ /**
127
+ * ESM node files
128
+ */
129
+ {
130
+ files: ['**/*.mjs'],
131
+ plugins: {
132
+ n,
133
+ },
134
+
135
+ languageOptions: {
136
+ sourceType: 'module',
137
+ ecmaVersion: 'latest',
138
+ parserOptions: parserOptions.esm.js,
139
+ globals: {
140
+ ...globals.node,
141
+ },
142
+ },
143
+ },
144
+ );
@@ -12,52 +12,55 @@
12
12
  },
13
13
  "scripts": {
14
14
  "build": "ember build --environment=production",
15
- "lint": "concurrently \"<%= packageManager %>:lint:*(!fix)\" --names \"lint:\"",
15
+ "lint": "concurrently \"<%= packageManager %>:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
16
16
  "lint:css": "stylelint \"**/*.css\"",
17
17
  "lint:css:fix": "concurrently \"<%= packageManager %>:lint:css -- --fix\"",
18
- "lint:fix": "concurrently \"<%= packageManager %>:lint:*:fix\" --names \"fix:\"",
18
+ "lint:fix": "concurrently \"<%= packageManager %>:lint:*:fix\" --names \"fix:\" --prefixColors auto",
19
19
  "lint:hbs": "ember-template-lint .",
20
20
  "lint:hbs:fix": "ember-template-lint . --fix",
21
21
  "lint:js": "eslint . --cache",
22
22
  "lint:js:fix": "eslint . --fix<% if (typescript) { %>",
23
23
  "lint:types": "tsc --noEmit<% } %>",
24
24
  "start": "ember serve",
25
- "test": "concurrently \"<%= packageManager %>:lint\" \"<%= packageManager %>:test:*\" --names \"lint,test:\"",
25
+ "test": "concurrently \"<%= packageManager %>:lint\" \"<%= packageManager %>:test:*\" --names \"lint,test:\" --prefixColors auto",
26
26
  "test:ember": "ember test"
27
27
  },
28
28
  "devDependencies": {
29
- "@babel/core": "^7.25.2<% if (!typescript) { %>",
30
- "@babel/eslint-parser": "^7.25.1",
31
- "@babel/plugin-proposal-decorators": "^7.24.7<% } %><% if (typescript) { %>",
32
- "@ember-data/adapter": "~5.4.0-beta.11",
33
- "@ember-data/graph": "~5.4.0-beta.11",
34
- "@ember-data/json-api": "~5.4.0-beta.11",
35
- "@ember-data/legacy-compat": "~5.4.0-beta.11",
36
- "@ember-data/model": "~5.4.0-beta.11",
37
- "@ember-data/request": "~5.4.0-beta.11",
38
- "@ember-data/request-utils": "~5.4.0-beta.11",
39
- "@ember-data/serializer": "~5.4.0-beta.11",
40
- "@ember-data/store": "~5.4.0-beta.11",
41
- "@ember-data/tracking": "~5.4.0-beta.11<% } %>",
42
- "@ember/optional-features": "^2.1.0",
29
+ "@babel/core": "^7.26.0<% if (!typescript) { %>",
30
+ "@babel/eslint-parser": "^7.25.9",
31
+ "@babel/plugin-proposal-decorators": "^7.25.9<% } %><% if (typescript) { %>",
32
+ "@ember-data/adapter": "~5.4.0-beta.12",
33
+ "@ember-data/graph": "~5.4.0-beta.12",
34
+ "@ember-data/json-api": "~5.4.0-beta.12",
35
+ "@ember-data/legacy-compat": "~5.4.0-beta.12",
36
+ "@ember-data/model": "~5.4.0-beta.12",
37
+ "@ember-data/request": "~5.4.0-beta.12",
38
+ "@ember-data/request-utils": "~5.4.0-beta.12",
39
+ "@ember-data/serializer": "~5.4.0-beta.12",
40
+ "@ember-data/store": "~5.4.0-beta.12",
41
+ "@ember-data/tracking": "~5.4.0-beta.12<% } %>",
42
+ "@ember/optional-features": "^2.2.0",
43
43
  "@ember/string": "^4.0.0",
44
- "@ember/test-helpers": "^3.3.1<% if (embroider) { %>",
45
- "@embroider/compat": "^3.6.1",
46
- "@embroider/core": "^3.4.16",
47
- "@embroider/webpack": "^4.0.5<% } %>",
44
+ "@ember/test-helpers": "^4.0.4<% if (embroider) { %>",
45
+ "@embroider/compat": "^3.7.0",
46
+ "@embroider/core": "^3.4.19",
47
+ "@embroider/webpack": "^4.0.8<% } %>",
48
+ "@eslint/js": "^9.14.0",
48
49
  "@glimmer/component": "^1.1.2",
49
50
  "@glimmer/tracking": "^1.1.2<% if (typescript) { %>",
50
- "@glint/environment-ember-loose": "^1.4.0",
51
- "@glint/template": "^1.4.0",
51
+ "@glint/environment-ember-loose": "^1.5.0",
52
+ "@glint/environment-ember-template-imports": "^1.5.0",
53
+ "@glint/template": "^1.5.0",
52
54
  "@tsconfig/ember": "^3.0.8",
53
- "@types/qunit": "^2.19.10",
55
+ "@types/eslint__js": "^8.42.3",
56
+ "@types/qunit": "^2.19.12",
54
57
  "@types/rsvp": "^4.0.9",
55
- "@typescript-eslint/eslint-plugin": "^7.18.0",
56
- "@typescript-eslint/parser": "^7.18.0",
57
- "@warp-drive/core-types": "~0.0.0-beta.11<% } %>",
58
+ "@typescript-eslint/eslint-plugin": "^8.14.0",
59
+ "@typescript-eslint/parser": "^8.14.0",
60
+ "@warp-drive/core-types": "~0.0.0-beta.12<% } %>",
58
61
  "broccoli-asset-rev": "^3.0.0",
59
- "concurrently": "^8.2.2",
60
- "ember-auto-import": "^2.8.1",
62
+ "concurrently": "^9.1.0",
63
+ "ember-auto-import": "^2.10.0",
61
64
  "ember-cli": "~<%= emberCLIVersion %>",
62
65
  "ember-cli-app-version": "^7.0.0",
63
66
  "ember-cli-babel": "^8.2.0",
@@ -67,32 +70,36 @@
67
70
  "ember-cli-inject-live-reload": "^2.1.0<% if (!embroider) { %>",
68
71
  "ember-cli-sri": "^2.1.1",
69
72
  "ember-cli-terser": "^4.0.2<% } %>",
70
- "ember-data": "~5.4.0-beta.11",
73
+ "ember-data": "~5.4.0-beta.12",
71
74
  "ember-fetch": "^8.1.2",
72
- "ember-load-initializers": "^2.1.2",
75
+ "ember-load-initializers": "^3.0.1",
73
76
  "ember-modifier": "^4.2.0",
74
77
  "ember-page-title": "^8.2.3",
75
- "ember-qunit": "^8.1.0",
76
- "ember-resolver": "^12.0.1",
77
- "ember-source": "~6.0.0-beta.1",
78
+ "ember-qunit": "^8.1.1",
79
+ "ember-resolver": "^13.0.2",
80
+ "ember-source": "~6.1.0-beta.1",
81
+ "ember-template-imports": "^4.2.0",
78
82
  "ember-template-lint": "^6.0.0<% if (welcome) { %>",
79
83
  "ember-welcome-page": "^7.0.2<% } %>",
80
- "eslint": "^8.57.1",
84
+ "eslint": "^9.14.0",
81
85
  "eslint-config-prettier": "^9.1.0",
82
- "eslint-plugin-ember": "^12.2.1",
83
- "eslint-plugin-n": "^16.6.2",
86
+ "eslint-plugin-ember": "^12.3.1",
87
+ "eslint-plugin-n": "^17.13.1",
84
88
  "eslint-plugin-prettier": "^5.2.1",
85
89
  "eslint-plugin-qunit": "^8.1.2",
90
+ "globals": "^15.12.0",
86
91
  "loader.js": "^4.7.0",
87
92
  "prettier": "^3.3.3",
93
+ "prettier-plugin-ember-template-tag": "^2.0.4",
88
94
  "qunit": "^2.22.0",
89
- "qunit-dom": "^3.2.1",
90
- "stylelint": "^15.11.0",
91
- "stylelint-config-standard": "^34.0.0",
92
- "stylelint-prettier": "^4.1.0",
95
+ "qunit-dom": "^3.3.0",
96
+ "stylelint": "^16.10.0",
97
+ "stylelint-config-standard": "^36.0.1",
98
+ "stylelint-prettier": "^5.0.2",
93
99
  "tracked-built-ins": "^3.3.0<% if (typescript) { %>",
94
- "typescript": "^5.6.2<% } %>",
95
- "webpack": "^5.95.0"
100
+ "typescript": "^5.6.3",
101
+ "typescript-eslint": "^8.14.0<% } %>",
102
+ "webpack": "^5.96.1"
96
103
  },
97
104
  "engines": {
98
105
  "node": ">= 18"
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "extends": "@tsconfig/ember/tsconfig.json",
3
+ "glint": {
4
+ "environment": ["ember-loose", "ember-template-imports"]
5
+ },
3
6
  "compilerOptions": {
4
7
  // The combination of `baseUrl` with `paths` allows Ember's classic package
5
8
  // layout, which is not resolvable with the Node resolution algorithm, to
@@ -11,7 +14,7 @@
11
14
  "*": ["types/*"]
12
15
  },
13
16
  "types": [
14
- "ember-source/types",
17
+ "./node_modules/ember-source/types/stable",
15
18
  "./node_modules/ember-data/unstable-preview-types",
16
19
  "./node_modules/@ember-data/store/unstable-preview-types",
17
20
  "./node_modules/@ember-data/adapter/unstable-preview-types",
@@ -115,4 +115,47 @@ module.exports = {
115
115
  this.ui.writeLine('');
116
116
  this.ui.writeLine(prependEmoji('✨', `Creating a new Ember app in ${chalk.yellow(process.cwd())}:`));
117
117
  },
118
+
119
+ /**
120
+ * @override
121
+ *
122
+ * This modification of buildFileInfo allows our differing
123
+ * input files to output to a single file, depending on the options.
124
+ * For example:
125
+ *
126
+ * for javascript,
127
+ * _ts_eslint.config.mjs is deleted
128
+ * _js_eslint.config.mjs is renamed to eslint.config.mjs
129
+ *
130
+ * for typescript,
131
+ * _js_eslint.config.mjs is deleted
132
+ * _ts_eslint.config.mjs is renamed to eslint.config.mjs
133
+ */
134
+ buildFileInfo(intoDir, templateVariables, file, options) {
135
+ let fileInfo = this._super.buildFileInfo.apply(this, arguments);
136
+
137
+ if (file.includes('_js_')) {
138
+ if (options.typescript) {
139
+ return null;
140
+ }
141
+
142
+ fileInfo.outputBasePath = fileInfo.outputPath.replace('_js_', '');
143
+ fileInfo.outputPath = fileInfo.outputPath.replace('_js_', '');
144
+ fileInfo.displayPath = fileInfo.outputPath.replace('_js_', '');
145
+ return fileInfo;
146
+ }
147
+
148
+ if (file.includes('_ts_')) {
149
+ if (!options.typescript) {
150
+ return null;
151
+ }
152
+
153
+ fileInfo.outputBasePath = fileInfo.outputPath.replace('_ts_', '');
154
+ fileInfo.outputPath = fileInfo.outputPath.replace('_ts_', '');
155
+ fileInfo.displayPath = fileInfo.outputPath.replace('_ts_', '');
156
+ return fileInfo;
157
+ }
158
+
159
+ return fileInfo;
160
+ },
118
161
  };
@@ -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, deprecate } = require('../debug');
12
+ const { assert, deprecate, DEPRECATIONS } = require('../debug');
13
13
  const Project = require('../models/project');
14
14
 
15
15
  const concat = require('broccoli-concat');
@@ -226,15 +226,7 @@ class EmberApp {
226
226
  deprecate(
227
227
  'Using the `outputPaths` build option is deprecated, as output paths will no longer be predetermined under Embroider.',
228
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
- }
229
+ DEPRECATIONS.DEPRECATE_OUTPUT_PATHS.options
238
230
  );
239
231
 
240
232
  let resolvePathFor = (defaultPath, specified) => {
@@ -9,7 +9,7 @@ const normalizeBlueprint = require('../utilities/normalize-blueprint-option');
9
9
  const mergeBlueprintOptions = require('../utilities/merge-blueprint-options');
10
10
  const { isPnpmProject, isYarnProject } = require('../utilities/package-managers');
11
11
  const getLangArg = require('../../lib/utilities/get-lang-arg');
12
- const { deprecate } = require('../debug');
12
+ const { deprecate, DEPRECATIONS } = require('../debug');
13
13
 
14
14
  module.exports = Command.extend({
15
15
  name: 'init',
@@ -126,16 +126,7 @@ module.exports = Command.extend({
126
126
  deprecate(
127
127
  'Support for generating a Travis CI config file is deprecated.\nYou can keep using Travis CI, or you could also consider switching to GitHub Actions instead.',
128
128
  false,
129
- {
130
- for: 'ember-cli',
131
- id: 'travis-ci-support',
132
- since: {
133
- available: '5.5.0',
134
- enabled: '5.5.0',
135
- },
136
- until: '6.0.0',
137
- url: 'https://deprecations.emberjs.com/id/travis-ci-support',
138
- }
129
+ DEPRECATIONS.DEPRECATE_TRAVIS_CI_SUPPORT.options
139
130
  );
140
131
  }
141
132
 
@@ -3,6 +3,7 @@
3
3
  const chalk = require('chalk');
4
4
  const semver = require('semver');
5
5
  const assert = require('./assert');
6
+ const emberCLIVersion = require('../../package').version;
6
7
 
7
8
  /**
8
9
  * Display a deprecation message.
@@ -71,6 +72,12 @@ function deprecate(description, condition, options) {
71
72
  return;
72
73
  }
73
74
 
75
+ if (options.for === 'ember-cli' && isDeprecationRemoved(options.until)) {
76
+ throw new Error(
77
+ `The API deprecated by ${options.id} was removed in ember-cli ${options.until}. The message was: ${description}. Please see ${options.url} for more details.`
78
+ );
79
+ }
80
+
74
81
  let message = formatMessage(description, options);
75
82
 
76
83
  warn(message);
@@ -117,4 +124,12 @@ function warn(message) {
117
124
  console.warn(chalk.yellow(message));
118
125
  }
119
126
 
127
+ function isDeprecationRemoved(until) {
128
+ const currentEmberCLIVersion = parseFloat(process.env.OVERRIDE_DEPRECATION_VERSION ?? emberCLIVersion);
129
+
130
+ let significantUntil = until.replace(/(\.0+)/g, '');
131
+ return currentEmberCLIVersion >= parseFloat(significantUntil);
132
+ }
133
+
120
134
  module.exports = deprecate;
135
+ module.exports._isDeprecationRemoved = isDeprecationRemoved;
@@ -0,0 +1,34 @@
1
+ 'use strict';
2
+
3
+ const { _isDeprecationRemoved } = require('./deprecate');
4
+
5
+ function deprecation(options) {
6
+ return {
7
+ options,
8
+ isRemoved: _isDeprecationRemoved(options.until),
9
+ };
10
+ }
11
+
12
+ const DEPRECATIONS = {
13
+ DEPRECATE_OUTPUT_PATHS: deprecation({
14
+ for: 'ember-cli',
15
+ id: 'ember-cli.outputPaths-build-option',
16
+ since: {
17
+ available: '5.3.0',
18
+ enabled: '5.3.0',
19
+ },
20
+ until: '6.0.0',
21
+ }),
22
+ DEPRECATE_TRAVIS_CI_SUPPORT: deprecation({
23
+ for: 'ember-cli',
24
+ id: 'travis-ci-support',
25
+ since: {
26
+ available: '5.5.0',
27
+ enabled: '5.5.0',
28
+ },
29
+ until: '6.0.0',
30
+ url: 'https://deprecations.emberjs.com/id/travis-ci-support',
31
+ }),
32
+ };
33
+
34
+ module.exports = DEPRECATIONS;
@@ -3,4 +3,5 @@
3
3
  module.exports = {
4
4
  assert: require('./assert'),
5
5
  deprecate: require('./deprecate'),
6
+ DEPRECATIONS: require('./deprecations'),
6
7
  };
@@ -457,7 +457,7 @@ let Blueprint = CoreObject.extend({
457
457
  await beforeHook.call(this, options, locals);
458
458
 
459
459
  // gather fileInfos to be processed
460
- let fileInfos = await process.call(this, intoDir, locals);
460
+ let fileInfos = await process.call(this, intoDir, locals, options);
461
461
 
462
462
  // commit changes for each FileInfo (with prompting as needed)
463
463
  await Promise.all(fileInfos.map((info) => this._commit(info)));
@@ -781,9 +781,10 @@ let Blueprint = CoreObject.extend({
781
781
  @param {Function} destPath
782
782
  @param {Object} templateVariables
783
783
  @param {String} file
784
- @return {FileInfo}
784
+ @param {Object} options may be used when buildFileInfo is customized in a blueprint
785
+ @return {FileInfo | null}
785
786
  */
786
- buildFileInfo(intoDir, templateVariables, file) {
787
+ buildFileInfo(intoDir, templateVariables, file /*, options */) {
787
788
  let mappedPath = this.mapFile(file, templateVariables);
788
789
 
789
790
  return new FileInfo({
@@ -813,10 +814,13 @@ let Blueprint = CoreObject.extend({
813
814
  @param {Array} files
814
815
  @param {String} intoDir
815
816
  @param {Object} templateVariables
817
+ @param {Object} options
816
818
  @return {Array} file infos
817
819
  */
818
- _getFileInfos(files, intoDir, templateVariables) {
819
- return files.map(this.buildFileInfo.bind(this, intoDir, templateVariables));
820
+ _getFileInfos(files, intoDir, templateVariables, options) {
821
+ return files
822
+ .map((file) => this.buildFileInfo.call(this, intoDir, templateVariables, file, options))
823
+ .filter(Boolean);
820
824
  },
821
825
 
822
826
  /**
@@ -863,11 +867,12 @@ let Blueprint = CoreObject.extend({
863
867
  @method processFiles
864
868
  @param {String} intoDir
865
869
  @param {Object} templateVariables
870
+ @param {Object} options
866
871
  @return {Promise<FileInfo[]>}
867
872
  */
868
- processFiles(intoDir, templateVariables) {
873
+ processFiles(intoDir, templateVariables, options) {
869
874
  let files = this._getFilesForInstall(templateVariables.targetFiles);
870
- let fileInfos = this._getFileInfos(files, intoDir, templateVariables);
875
+ let fileInfos = this._getFileInfos(files, intoDir, templateVariables, options);
871
876
  this._checkForNoMatch(fileInfos, templateVariables.rawArgs);
872
877
 
873
878
  this._ignoreUpdateFiles();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-cli",
3
- "version": "6.0.0-beta.0",
3
+ "version": "6.1.0-beta.0",
4
4
  "description": "Command line tool for developing ambitious ember.js apps",
5
5
  "keywords": [
6
6
  "app",
@@ -30,6 +30,7 @@
30
30
  "docs": "yuidoc",
31
31
  "lint": "eslint . --cache",
32
32
  "prepack": "pnpm docs",
33
+ "mocha": "pnpm exec mocha --require ./tests/bootstrap.js tests/**/*-test.js",
33
34
  "test": "node --unhandled-rejections=strict tests/runner",
34
35
  "test:all": "node --unhandled-rejections=strict tests/runner all",
35
36
  "test:cover": "nyc --all --reporter=text --reporter=lcov node tests/runner all",
@@ -37,7 +38,7 @@
37
38
  "test:slow": "node --unhandled-rejections=strict tests/runner slow"
38
39
  },
39
40
  "dependencies": {
40
- "@pnpm/find-workspace-dir": "^6.0.2",
41
+ "@pnpm/find-workspace-dir": "^7.0.2",
41
42
  "broccoli": "^3.5.2",
42
43
  "broccoli-builder": "^0.18.14",
43
44
  "broccoli-concat": "^4.2.5",
@@ -54,7 +55,7 @@
54
55
  "calculate-cache-key-for-tree": "^2.0.0",
55
56
  "capture-exit": "^2.0.0",
56
57
  "chalk": "^4.1.2",
57
- "ci-info": "^3.8.0",
58
+ "ci-info": "^4.0.0",
58
59
  "clean-base-url": "^1.0.0",
59
60
  "compression": "^1.7.4",
60
61
  "configstore": "^5.0.1",
@@ -71,7 +72,7 @@
71
72
  "ensure-posix-path": "^1.1.1",
72
73
  "execa": "^5.1.1",
73
74
  "exit": "^0.1.2",
74
- "express": "^4.18.1",
75
+ "express": "^4.21.1",
75
76
  "filesize": "^10.0.8",
76
77
  "find-up": "^5.0.0",
77
78
  "find-yarn-workspace-root": "^2.0.0",
@@ -97,7 +98,7 @@
97
98
  "minimatch": "^7.4.3",
98
99
  "morgan": "^1.10.0",
99
100
  "nopt": "^3.0.6",
100
- "npm-package-arg": "^10.1.0",
101
+ "npm-package-arg": "^12.0.0",
101
102
  "os-locale": "^5.0.0",
102
103
  "p-defer": "^3.0.0",
103
104
  "portfinder": "^1.0.32",
@@ -114,7 +115,7 @@
114
115
  "sort-package-json": "^1.57.0",
115
116
  "symlink-or-copy": "^1.3.1",
116
117
  "temp": "0.9.4",
117
- "testem": "^3.15.1",
118
+ "testem": "^3.15.2",
118
119
  "tiny-lr": "^2.0.0",
119
120
  "tree-sync": "^2.1.0",
120
121
  "walk-sync": "^3.0.0",
@@ -142,7 +143,7 @@
142
143
  "jsdom": "^21.1.1",
143
144
  "latest-version": "^5.1.0",
144
145
  "mocha": "^10.0.0",
145
- "nock": "^13.3.0",
146
+ "nock": "^13.5.5",
146
147
  "nyc": "^15.1.0",
147
148
  "prettier": "2.8.7",
148
149
  "release-it": "^15.10.0",
@@ -1,14 +0,0 @@
1
- # unconventional js
2
- /blueprints/*/files/
3
-
4
- # compiled output
5
- /declarations/
6
- /dist/
7
-
8
- # misc
9
- /coverage/
10
- !.*
11
- .*/
12
-
13
- # ember-try
14
- /.node_modules.ember-try/
@@ -1,67 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- root: true,
5
- parser: '<%= typescript ? '@typescript-eslint/parser' : '@babel/eslint-parser' %>',
6
- parserOptions: {
7
- ecmaVersion: 'latest',<% if (!typescript) { %>
8
- sourceType: 'module',
9
- requireConfigFile: false,
10
- babelOptions: {
11
- plugins: [
12
- ['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
13
- ],
14
- },<% } %>
15
- },
16
- plugins: ['ember'<% if (typescript) { %>, '@typescript-eslint'<% } %>],
17
- extends: [
18
- 'eslint:recommended',
19
- 'plugin:ember/recommended',
20
- 'plugin:prettier/recommended',
21
- ],
22
- env: {
23
- browser: true,
24
- },
25
- rules: {},
26
- overrides: [
27
- <% if (typescript) { %> // ts files
28
- {
29
- files: ['**/*.ts'],
30
- extends: [
31
- 'plugin:@typescript-eslint/eslint-recommended',
32
- 'plugin:@typescript-eslint/recommended',
33
- ],
34
- rules: {},
35
- },
36
- <% } %> // node files
37
- {
38
- files: [
39
- './.eslintrc.js',
40
- './.prettierrc.js',
41
- './.stylelintrc.js',
42
- './.template-lintrc.js',
43
- './ember-cli-build.js',<% if (blueprint !== 'app') { %>
44
- './index.js',<% } %>
45
- './testem.js',
46
- './blueprints/*/index.js',
47
- './config/**/*.js',<% if (blueprint === 'app') { %>
48
- './lib/*/index.js',
49
- './server/**/*.js',<% } else { %>
50
- './tests/dummy/config/**/*.js',<% } %>
51
- ],
52
- <% if (!typescript) { %> parserOptions: {
53
- sourceType: 'script',
54
- },
55
- <% } %> env: {
56
- browser: false,
57
- node: true,
58
- },
59
- extends: ['plugin:n/recommended'],
60
- },
61
- {
62
- // test files
63
- files: ['tests/**/*-test.{js,ts}'],
64
- extends: ['plugin:qunit/recommended'],
65
- },
66
- ],
67
- };