Skip to content

Commit 9616092

Browse files
committed
Blueprint updates for ember-cli@6.3.0
1 parent ba83c66 commit 9616092

15 files changed

+630
-807
lines changed

.eslintignore

-14
This file was deleted.

.eslintrc.js

-54
This file was deleted.

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ jobs:
5555
fail-fast: false
5656
matrix:
5757
try-scenario:
58-
- ember-lts-4.12
59-
- ember-lts-5.4
58+
- ember-lts-5.8
59+
- ember-lts-5.12
6060
- ember-release
6161
- ember-beta
6262
- ember-canary

.npmignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
/.ember-cli
88
/.env*
99
/.eslintcache
10-
/.eslintignore
11-
/.eslintrc.js
1210
/.git/
1311
/.github/
1412
/.gitignore
@@ -17,10 +15,10 @@
1715
/.stylelintignore
1816
/.stylelintrc.js
1917
/.template-lintrc.js
20-
/.travis.yml
2118
/.watchmanconfig
2219
/CONTRIBUTING.md
2320
/ember-cli-build.js
21+
/eslint.config.mjs
2422
/testem.js
2523
/tests/
2624
/tsconfig.declarations.json

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
/coverage/
99
!.*
1010
.*/
11+
/pnpm-lock.yaml
12+
ember-cli-update.json
13+
*.html
1114

1215
# ember-try
1316
/.node_modules.ember-try/

.prettierrc.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
'use strict';
22

33
module.exports = {
4+
plugins: ['prettier-plugin-ember-template-tag'],
45
overrides: [
56
{
6-
files: '*.{js,ts}',
7+
files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}',
78
options: {
89
singleQuote: true,
10+
templateSingleQuote: false,
911
},
1012
},
1113
],

.stylelintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

33
module.exports = {
4-
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
4+
extends: ['stylelint-config-standard'],
55
};

eslint.config.mjs

+123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
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 eslintConfigPrettier from 'eslint-config-prettier';
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+
eslintConfigPrettier,
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+
'tests/dummy/config/**/*.js',
85+
'testem.js',
86+
'testem*.js',
87+
'index.js',
88+
'.prettierrc.js',
89+
'.stylelintrc.js',
90+
'.template-lintrc.js',
91+
'ember-cli-build.js',
92+
],
93+
plugins: {
94+
n,
95+
},
96+
97+
languageOptions: {
98+
sourceType: 'script',
99+
ecmaVersion: 'latest',
100+
globals: {
101+
...globals.node,
102+
},
103+
},
104+
},
105+
/**
106+
* ESM node files
107+
*/
108+
{
109+
files: ['**/*.mjs'],
110+
plugins: {
111+
n,
112+
},
113+
114+
languageOptions: {
115+
sourceType: 'module',
116+
ecmaVersion: 'latest',
117+
parserOptions: esmParserOptions,
118+
globals: {
119+
...globals.node,
120+
},
121+
},
122+
},
123+
];

package.json

+27-22
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,27 @@
1616
},
1717
"scripts": {
1818
"build": "ember build --environment=production",
19-
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
19+
"format": "prettier . --cache --write",
20+
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
2021
"lint:css": "stylelint \"**/*.css\"",
2122
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
22-
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
23+
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\" --prefixColors auto && npm run format",
24+
"lint:format": "prettier . --cache --check",
2325
"lint:hbs": "ember-template-lint .",
2426
"lint:hbs:fix": "ember-template-lint . --fix",
2527
"lint:js": "eslint . --cache",
2628
"lint:js:fix": "eslint . --fix",
2729
"start": "ember serve",
28-
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
30+
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\" --prefixColors auto",
2931
"test:ember": "ember test",
3032
"test:ember-compatibility": "ember try:each"
3133
},
3234
"dependencies": {
33-
"@babel/core": "^7.26.0",
35+
"@babel/core": "^7.26.10",
3436
"broccoli-funnel": "^3.0.1",
3537
"ember-cli-babel": "^8.2.0",
3638
"ember-cli-htmlbars": "^6.3.0",
39+
"ember-template-imports": "^4.3.0",
3740
"glob": "^10.2.2",
3841
"validate-peer-dependencies": "^2.0.0"
3942
},
@@ -42,47 +45,49 @@
4245
"ember-source": "^4.0.0 || >= 5"
4346
},
4447
"devDependencies": {
45-
"@babel/eslint-parser": "^7.25.9",
48+
"@babel/eslint-parser": "^7.26.10",
4649
"@babel/plugin-proposal-decorators": "^7.25.9",
4750
"@ember/optional-features": "^2.2.0",
4851
"@ember/test-helpers": "^5.1.0",
52+
"@embroider/macros": "^1.16.12",
4953
"@embroider/test-setup": "^4.0.0",
50-
"@glimmer/component": "^1.0.4",
54+
"@eslint/js": "^9.23.0",
55+
"@glimmer/component": "^2.0.0",
5156
"@glimmer/tracking": "^1.0.4",
5257
"@primer/octicons": "^19.1.0",
5358
"broccoli-asset-rev": "^3.0.0",
54-
"concurrently": "^9.0.0",
59+
"concurrently": "^9.1.2",
5560
"ember-auto-import": "^2.10.0",
5661
"ember-cli": "~6.3.0",
5762
"ember-cli-clean-css": "^3.0.0",
58-
"ember-cli-dependency-checker": "^3.3.2",
59-
"ember-cli-deprecation-workflow": "^3.0.1",
63+
"ember-cli-dependency-checker": "^3.3.3",
64+
"ember-cli-deprecation-workflow": "^3.3.0",
6065
"ember-cli-inject-live-reload": "^2.1.0",
6166
"ember-cli-sri": "^2.1.1",
6267
"ember-cli-terser": "^4.0.2",
6368
"ember-load-initializers": "^3.0.1",
6469
"ember-page-title": "^9.0.1",
65-
"ember-qunit": "^8.1.1",
66-
"ember-resolver": "^13.0.0",
70+
"ember-qunit": "^9.0.1",
71+
"ember-resolver": "^13.1.0",
6772
"ember-source": "~6.3.0",
6873
"ember-source-channel-url": "^3.0.0",
6974
"ember-svg-jar": "^2.3.3",
7075
"ember-template-lint": "^7.0.1",
7176
"ember-try": "^4.0.0",
72-
"eslint": "^8.57.1",
77+
"eslint": "^9.23.0",
7378
"eslint-config-prettier": "^10.0.1",
74-
"eslint-plugin-ember": "^12.3.1",
75-
"eslint-plugin-n": "^17.0.0",
76-
"eslint-plugin-prettier": "^5.2.1",
79+
"eslint-plugin-ember": "^12.5.0",
80+
"eslint-plugin-n": "^17.16.2",
7781
"eslint-plugin-qunit": "^8.1.2",
82+
"globals": "^15.15.0",
7883
"loader.js": "^4.7.0",
79-
"prettier": "^3.3.3",
80-
"qunit": "^2.22.0",
81-
"qunit-dom": "^3.3.0",
82-
"stylelint": "^15.11.0",
83-
"stylelint-config-standard": "^34.0.0",
84-
"stylelint-prettier": "^4.1.0",
85-
"webpack": "^5.96.1"
84+
"prettier": "^3.5.3",
85+
"prettier-plugin-ember-template-tag": "^2.0.4",
86+
"qunit": "^2.24.1",
87+
"qunit-dom": "^3.4.0",
88+
"stylelint": "^16.16.0",
89+
"stylelint-config-standard": "^36.0.1",
90+
"webpack": "^5.98.0"
8691
},
8792
"resolutions": {
8893
"string-width": "^4.2.0"

tests/dummy/app/app.js

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ import Application from '@ember/application';
22
import Resolver from 'ember-resolver';
33
import loadInitializers from 'ember-load-initializers';
44
import config from 'dummy/config/environment';
5+
import { importSync, isDevelopingApp, macroCondition } from '@embroider/macros';
6+
7+
if (macroCondition(isDevelopingApp())) {
8+
importSync('./deprecation-workflow');
9+
}
510

611
export default class App extends Application {
712
modulePrefix = config.modulePrefix;
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import setupDeprecationWorkflow from 'ember-cli-deprecation-workflow';
2+
3+
/**
4+
* Docs: https://github.com/ember-cli/ember-cli-deprecation-workflow
5+
*/
6+
setupDeprecationWorkflow({
7+
/**
8+
false by default, but if a developer / team wants to be more aggressive about being proactive with
9+
handling their deprecations, this should be set to "true"
10+
*/
11+
throwOnUnhandled: false,
12+
workflow: [
13+
/* ... handlers ... */
14+
/* to generate this list, run your app for a while (or run the test suite),
15+
* and then run in the browser console:
16+
*
17+
* deprecationWorkflow.flushDeprecations()
18+
*
19+
* And copy the handlers here
20+
*/
21+
/* example: */
22+
/* { handler: 'silence', matchId: 'template-action' }, */
23+
],
24+
});

0 commit comments

Comments
 (0)