ember-cli 6.0.1 → 6.1.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 +24 -0
- package/CONTRIBUTING.md +14 -2
- package/blueprints/addon/files/npmignore +1 -2
- package/blueprints/addon/files/tsconfig.json +3 -0
- package/blueprints/addon/index.js +47 -1
- package/blueprints/app/files/.prettierrc.js +9 -1
- package/blueprints/app/files/_js_eslint.config.mjs +121 -0
- package/blueprints/app/files/_ts_eslint.config.mjs +144 -0
- package/blueprints/app/files/package.json +34 -27
- package/blueprints/app/files/tsconfig.json +4 -1
- package/blueprints/app/index.js +43 -0
- package/lib/models/blueprint.js +12 -7
- package/package.json +8 -7
- package/blueprints/app/files/.eslintignore +0 -14
- package/blueprints/app/files/.eslintrc.js +0 -67
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# ember-cli Changelog
|
|
2
2
|
|
|
3
|
+
## v6.1.0
|
|
4
|
+
|
|
5
|
+
#### Blueprint Changes
|
|
6
|
+
|
|
7
|
+
- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v6.0.0...v6.1.0)
|
|
8
|
+
- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v6.0.0...v6.1.0)
|
|
9
|
+
|
|
10
|
+
#### Changelog
|
|
11
|
+
|
|
12
|
+
- [#10563](https://github.com/ember-cli/ember-cli/pull/10563) [Backport release]: update @ember/test-helpers. #10522 [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
13
|
+
- [#10564](https://github.com/ember-cli/ember-cli/pull/10564) [BUGFIX] Add missing package for TS eslint config [@mkszepp](https://github.com/mkszepp)
|
|
14
|
+
- [#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)
|
|
15
|
+
- [#10515](https://github.com/ember-cli/ember-cli/pull/10515) Use colors for the concurrently prefixes in package.json [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
16
|
+
- [#10516](https://github.com/ember-cli/ember-cli/pull/10516) Use ESLint 9 and Flat Config [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
17
|
+
- [#10521](https://github.com/ember-cli/ember-cli/pull/10521) Make tests easier to run, closes #10520 [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
18
|
+
- [#10525](https://github.com/ember-cli/ember-cli/pull/10525) Upgrade concurrently, closes #10524 [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
19
|
+
- [#10526](https://github.com/ember-cli/ember-cli/pull/10526) Update ember-resolver, closes #10523 [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
20
|
+
- [#10527](https://github.com/ember-cli/ember-cli/pull/10527) Update @ember/test-helpers, closes #10522 [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
21
|
+
- [#10530](https://github.com/ember-cli/ember-cli/pull/10530) Update ember-load-initializers to v3 [@mkszepp](https://github.com/mkszepp)
|
|
22
|
+
- [#10531](https://github.com/ember-cli/ember-cli/pull/10531) Update stylelint and depended package [@mkszepp](https://github.com/mkszepp)
|
|
23
|
+
- [#10535](https://github.com/ember-cli/ember-cli/pull/10535) Upgrade eslint-plugin-ember [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
24
|
+
|
|
25
|
+
Thank you to all who took the time to contribute!
|
|
26
|
+
|
|
3
27
|
## v6.0.1
|
|
4
28
|
|
|
5
29
|
#### Blueprint Changes
|
package/CONTRIBUTING.md
CHANGED
|
@@ -37,17 +37,29 @@ for more information.
|
|
|
37
37
|
## Run the test suite
|
|
38
38
|
|
|
39
39
|
```
|
|
40
|
-
|
|
40
|
+
pnpm test
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
will run ESLint and the "fast" subset of the test suite. Run
|
|
44
|
-
`
|
|
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
|
-
|
|
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,23 +12,23 @@
|
|
|
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.26.0
|
|
29
|
+
"@babel/core": "^7.26.0",
|
|
30
30
|
"@babel/eslint-parser": "^7.25.9",
|
|
31
|
-
"@babel/plugin-proposal-decorators": "^7.25.9<%
|
|
31
|
+
"@babel/plugin-proposal-decorators": "^7.25.9<% if (typescript) { %>",
|
|
32
32
|
"@ember-data/adapter": "~5.4.0-beta.12",
|
|
33
33
|
"@ember-data/graph": "~5.4.0-beta.12",
|
|
34
34
|
"@ember-data/json-api": "~5.4.0-beta.12",
|
|
@@ -42,57 +42,64 @@
|
|
|
42
42
|
"@ember/optional-features": "^2.2.0",
|
|
43
43
|
"@ember/string": "^4.0.0",
|
|
44
44
|
"@ember/test-helpers": "^4.0.4<% if (embroider) { %>",
|
|
45
|
-
"@embroider/compat": "^3.7.
|
|
46
|
-
"@embroider/core": "^3.4.
|
|
47
|
-
"@embroider/webpack": "^4.0.
|
|
45
|
+
"@embroider/compat": "^3.7.1",
|
|
46
|
+
"@embroider/core": "^3.4.20",
|
|
47
|
+
"@embroider/webpack": "^4.0.9<% } %>",
|
|
48
|
+
"@eslint/js": "^9.17.0",
|
|
48
49
|
"@glimmer/component": "^1.1.2",
|
|
49
50
|
"@glimmer/tracking": "^1.1.2<% if (typescript) { %>",
|
|
50
51
|
"@glint/environment-ember-loose": "^1.5.0",
|
|
52
|
+
"@glint/environment-ember-template-imports": "^1.5.0",
|
|
51
53
|
"@glint/template": "^1.5.0",
|
|
52
54
|
"@tsconfig/ember": "^3.0.8",
|
|
55
|
+
"@types/eslint__js": "^8.42.3",
|
|
53
56
|
"@types/qunit": "^2.19.12",
|
|
54
57
|
"@types/rsvp": "^4.0.9",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
56
|
-
"@typescript-eslint/parser": "^
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^8.18.2",
|
|
59
|
+
"@typescript-eslint/parser": "^8.18.2",
|
|
57
60
|
"@warp-drive/core-types": "~0.0.0-beta.12<% } %>",
|
|
58
61
|
"broccoli-asset-rev": "^3.0.0",
|
|
59
|
-
"concurrently": "^
|
|
62
|
+
"concurrently": "^9.1.0",
|
|
60
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",
|
|
64
67
|
"ember-cli-clean-css": "^3.0.0",
|
|
65
|
-
"ember-cli-dependency-checker": "^3.3.
|
|
68
|
+
"ember-cli-dependency-checker": "^3.3.3",
|
|
66
69
|
"ember-cli-htmlbars": "^6.3.0",
|
|
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
73
|
"ember-data": "~5.3.9",
|
|
71
74
|
"ember-fetch": "^8.1.2",
|
|
72
|
-
"ember-load-initializers": "^
|
|
75
|
+
"ember-load-initializers": "^3.0.1",
|
|
73
76
|
"ember-modifier": "^4.2.0",
|
|
74
77
|
"ember-page-title": "^8.2.3",
|
|
75
78
|
"ember-qunit": "^8.1.1",
|
|
76
|
-
"ember-resolver": "^
|
|
77
|
-
"ember-source": "~6.
|
|
79
|
+
"ember-resolver": "^13.1.0",
|
|
80
|
+
"ember-source": "~6.1.0",
|
|
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": "^
|
|
84
|
+
"eslint": "^9.17.0",
|
|
81
85
|
"eslint-config-prettier": "^9.1.0",
|
|
82
|
-
"eslint-plugin-ember": "^12.3.
|
|
83
|
-
"eslint-plugin-n": "^
|
|
86
|
+
"eslint-plugin-ember": "^12.3.3",
|
|
87
|
+
"eslint-plugin-n": "^17.15.1",
|
|
84
88
|
"eslint-plugin-prettier": "^5.2.1",
|
|
85
89
|
"eslint-plugin-qunit": "^8.1.2",
|
|
90
|
+
"globals": "^15.14.0",
|
|
86
91
|
"loader.js": "^4.7.0",
|
|
87
|
-
"prettier": "^3.
|
|
88
|
-
"
|
|
89
|
-
"qunit
|
|
90
|
-
"
|
|
91
|
-
"stylelint
|
|
92
|
-
"stylelint-
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
92
|
+
"prettier": "^3.4.2",
|
|
93
|
+
"prettier-plugin-ember-template-tag": "^2.0.4",
|
|
94
|
+
"qunit": "^2.23.1",
|
|
95
|
+
"qunit-dom": "^3.4.0",
|
|
96
|
+
"stylelint": "^16.12.0",
|
|
97
|
+
"stylelint-config-standard": "^36.0.1",
|
|
98
|
+
"stylelint-prettier": "^5.0.2",
|
|
99
|
+
"tracked-built-ins": "^3.4.0<% if (typescript) { %>",
|
|
100
|
+
"typescript": "^5.7.2",
|
|
101
|
+
"typescript-eslint": "^8.18.2<% } %>",
|
|
102
|
+
"webpack": "^5.97.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",
|
package/blueprints/app/index.js
CHANGED
|
@@ -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
|
};
|
package/lib/models/blueprint.js
CHANGED
|
@@ -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
|
-
@
|
|
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
|
|
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
|
|
3
|
+
"version": "6.1.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": "^
|
|
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": "^
|
|
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.
|
|
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": "^
|
|
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.
|
|
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.
|
|
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,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
|
-
};
|