ember-cli 6.2.0-beta.0 → 6.3.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,11 +1,43 @@
1
1
  # ember-cli Changelog
2
2
 
3
- ## v6.2.0-beta.0
3
+ ## v6.3.0-beta.0
4
4
 
5
5
  #### Blueprint Changes
6
6
 
7
- - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v6.1.0...v6.2.0-beta.0)
8
- - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v6.1.0...v6.2.0-beta.0)
7
+ - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v6.2.0...v6.3.0-beta.0)
8
+ - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v6.2.0...v6.3.0-beta.0)
9
+
10
+ #### Changelog
11
+
12
+ - [#10534](https://github.com/ember-cli/ember-cli/pull/10534) [CLEANUP] Clean up `outputPaths` deprecation [@bertdeblock](https://github.com/bertdeblock)
13
+ - [#10538](https://github.com/ember-cli/ember-cli/pull/10538) [CLEANUP] Clean up Travis CI deprecation [@bertdeblock](https://github.com/bertdeblock)
14
+ - [#10586](https://github.com/ember-cli/ember-cli/pull/10586) [INTERNAL] Add tests to ensure no linting errors post generating a new app or addon [@bertdeblock](https://github.com/bertdeblock)
15
+ - [#10587](https://github.com/ember-cli/ember-cli/pull/10587) [BUGFIX] Fix including `ember-source` types for v1 addons [@bertdeblock](https://github.com/bertdeblock)
16
+ - [#10589](https://github.com/ember-cli/ember-cli/pull/10589) [ENHANCEMENT] Deprecate v1 addon `contentFor` types [RFC 1044] [@bertdeblock](https://github.com/bertdeblock)
17
+ - [#10592](https://github.com/ember-cli/ember-cli/pull/10592) [BUGFIX] Fix ESLint config for v1 addons [@bertdeblock](https://github.com/bertdeblock)
18
+ - [#10593](https://github.com/ember-cli/ember-cli/pull/10593) [CLEANUP] Clean up old `broccoli-builder` fallback [@bertdeblock](https://github.com/bertdeblock)
19
+ - [#10594](https://github.com/ember-cli/ember-cli/pull/10594) [CLEANUP] Clean up old `heimdalljs` deprecation [@bertdeblock](https://github.com/bertdeblock)
20
+ - [#10595](https://github.com/ember-cli/ember-cli/pull/10595) [ENHANCEMENT] Update `@glimmer/component` to v2 in blueprints [@bertdeblock](https://github.com/bertdeblock)
21
+ - [#10596](https://github.com/ember-cli/ember-cli/pull/10596) [ENHANCEMENT] Vanilla Prettier setup in blueprints [RFC 1055] [@bertdeblock](https://github.com/bertdeblock)
22
+ - [#10597](https://github.com/ember-cli/ember-cli/pull/10597) [CLEANUP] Clean up remaining Travis fixtures [@bertdeblock](https://github.com/bertdeblock)
23
+ - [#10599](https://github.com/ember-cli/ember-cli/pull/10599) [INTERNAL] Bump `content-tag` to v3 [@SergeAstapov](https://github.com/SergeAstapov)
24
+ - [#10612](https://github.com/ember-cli/ember-cli/pull/10612) [BUGFIX release]: tsconfig.json referenced paths to types instead of imports [@NullVoxPopuli](https://github.com/NullVoxPopuli)
25
+ - [#10613](https://github.com/ember-cli/ember-cli/pull/10613) [ENHANCEMENT] Support `--ember-data` / `--no-ember-data` flags when creating a new app [@NullVoxPopuli](https://github.com/NullVoxPopuli)
26
+ - [#10615](https://github.com/ember-cli/ember-cli/pull/10615) [ENHANCEMENT] Simplify Prettier config in blueprints [@bendemboski](https://github.com/bendemboski)
27
+ - [#10616](https://github.com/ember-cli/ember-cli/pull/10616) [INTERNAL] Add test to ensure all package files are parseable [@bertdeblock](https://github.com/bertdeblock)
28
+ - [#10617](https://github.com/ember-cli/ember-cli/pull/10617) [ENHANCEMENT] Use `staticInvokables` in the `app` blueprint [@bertdeblock](https://github.com/bertdeblock)
29
+ - [#10618](https://github.com/ember-cli/ember-cli/pull/10618) [INTERNAL] Avoid output for `deprecate` tests [@bertdeblock](https://github.com/bertdeblock)
30
+ - [#10619](https://github.com/ember-cli/ember-cli/pull/10619) [BUGFIX] Only remove type imports when removing the types from `.gts` files in blueprints [@Windvis](https://github.com/Windvis)
31
+ - [#10621](https://github.com/ember-cli/ember-cli/pull/10621) [ENHANCEMENT] Bump `@ember/test-helpers` to v5.1.0 in blueprints [@NullVoxPopuli](https://github.com/NullVoxPopuli)
32
+
33
+ Thank you to all who took the time to contribute!
34
+
35
+ ## v6.2.0
36
+
37
+ #### Blueprint Changes
38
+
39
+ - [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v6.1.0...v6.2.0)
40
+ - [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v6.1.0...v6.2.0)
9
41
 
10
42
  #### Changelog
11
43
 
@@ -15,7 +15,6 @@
15
15
  /.stylelintignore
16
16
  /.stylelintrc.js
17
17
  /.template-lintrc.js
18
- /.travis.yml
19
18
  /.watchmanconfig
20
19
  /CONTRIBUTING.md
21
20
  /ember-cli-build.js
@@ -16,9 +16,7 @@
16
16
  "<%= addonName %>/test-support": ["addon-test-support"],
17
17
  "<%= addonName %>/test-support/*": ["addon-test-support/*"],
18
18
  "*": ["types/*"]
19
- }
20
- },
21
- "types": [
22
- "ember-source/types"
23
- ]
19
+ },
20
+ "types": ["ember-source/types"]
21
+ }
24
22
  }
@@ -242,6 +242,7 @@ module.exports = {
242
242
  blueprintOptions,
243
243
  embroider: false,
244
244
  lang: options.lang,
245
+ emberData: options.emberData,
245
246
  ciProvider: options.ciProvider,
246
247
  typescript: options.typescript,
247
248
  packageManager: options.packageManager ?? 'npm',
@@ -252,9 +253,7 @@ module.exports = {
252
253
  let appFiles = this.lookupBlueprint(this.appBlueprintName).files(options);
253
254
  let addonFilesPath = this.filesPath(this.options);
254
255
  let ignore = [];
255
- if (this.options.ciProvider !== 'travis') {
256
- ignore.push('.travis.yml');
257
- }
256
+
258
257
  if (this.options.ciProvider !== 'github') {
259
258
  ignore.push('.github');
260
259
  }
@@ -8,6 +8,9 @@
8
8
  /coverage/
9
9
  !.*
10
10
  .*/
11
+ /pnpm-lock.yaml
12
+ ember-cli-update.json
13
+ *.html
11
14
 
12
15
  # ember-try
13
16
  /.node_modules.ember-try/
@@ -5,12 +5,6 @@ module.exports = {
5
5
  overrides: [
6
6
  {
7
7
  files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}',
8
- options: {
9
- singleQuote: true,
10
- },
11
- },
12
- {
13
- files: '*.{gjs,gts}',
14
8
  options: {
15
9
  singleQuote: true,
16
10
  templateSingleQuote: false,
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
4
+ extends: ['stylelint-config-standard'],
5
5
  };
@@ -16,7 +16,7 @@ import globals from 'globals';
16
16
  import js from '@eslint/js';
17
17
 
18
18
  import ember from 'eslint-plugin-ember/recommended';
19
- import prettier from 'eslint-plugin-prettier/recommended';
19
+ import eslintConfigPrettier from 'eslint-config-prettier';
20
20
  import qunit from 'eslint-plugin-qunit';
21
21
  import n from 'eslint-plugin-n';
22
22
 
@@ -35,7 +35,7 @@ const esmParserOptions = {
35
35
 
36
36
  export default [
37
37
  js.configs.recommended,
38
- prettier,
38
+ eslintConfigPrettier,
39
39
  ember.configs.base,
40
40
  ember.configs.gjs,
41
41
  /**
@@ -81,8 +81,10 @@ export default [
81
81
  files: [
82
82
  '**/*.cjs',
83
83
  'config/**/*.js',
84
+ 'tests/dummy/config/**/*.js',
84
85
  'testem.js',
85
86
  'testem*.js',
87
+ 'index.js',
86
88
  '.prettierrc.js',
87
89
  '.stylelintrc.js',
88
90
  '.template-lintrc.js',
@@ -19,7 +19,7 @@ import ts from 'typescript-eslint';
19
19
 
20
20
  import ember from 'eslint-plugin-ember/recommended';
21
21
 
22
- import prettier from 'eslint-plugin-prettier/recommended';
22
+ import eslintConfigPrettier from 'eslint-config-prettier';
23
23
  import qunit from 'eslint-plugin-qunit';
24
24
  import n from 'eslint-plugin-n';
25
25
 
@@ -52,7 +52,7 @@ export default ts.config(
52
52
  ember.configs.base,
53
53
  ember.configs.gjs,
54
54
  ember.configs.gts,
55
- prettier,
55
+ eslintConfigPrettier,
56
56
  /**
57
57
  * Ignores must be in their own object
58
58
  * https://eslint.org/docs/latest/use/configure/ignore
@@ -104,8 +104,10 @@ export default ts.config(
104
104
  files: [
105
105
  '**/*.cjs',
106
106
  'config/**/*.js',
107
+ 'tests/dummy/config/**/*.js',
107
108
  'testem.js',
108
109
  'testem*.js',
110
+ 'index.js',
109
111
  '.prettierrc.js',
110
112
  '.stylelintrc.js',
111
113
  '.template-lintrc.js',
@@ -2,6 +2,11 @@ import Application from '@ember/application';
2
2
  import Resolver from 'ember-resolver';
3
3
  import loadInitializers from 'ember-load-initializers';
4
4
  import config from '<%= modulePrefix %>/config/environment';
5
+ import { importSync, isDevelopingApp, macroCondition } from '@embroider/macros';
6
+
7
+ if (macroCondition(isDevelopingApp())) {
8
+ importSync('./deprecation-workflow');
9
+ }
5
10
 
6
11
  export default class App extends Application {
7
12
  modulePrefix = config.modulePrefix;
@@ -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
+ });
@@ -13,10 +13,8 @@ module.exports = function (defaults) {
13
13
  return require('@embroider/compat').compatBuild(app, Webpack, {
14
14
  staticAddonTestSupportTrees: true,
15
15
  staticAddonTrees: true,
16
- staticHelpers: true,
17
- staticModifiers: true,
18
- staticComponents: true,
19
16
  staticEmberSource: true,
17
+ staticInvokables: true,
20
18
  skipBabel: [
21
19
  {
22
20
  package: 'qunit',
@@ -12,10 +12,12 @@
12
12
  },
13
13
  "scripts": {
14
14
  "build": "ember build --environment=production",
15
+ "format": "prettier . --cache --write",
15
16
  "lint": "concurrently \"<%= packageManager %>:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
16
17
  "lint:css": "stylelint \"**/*.css\"",
17
18
  "lint:css:fix": "concurrently \"<%= packageManager %>:lint:css -- --fix\"",
18
- "lint:fix": "concurrently \"<%= packageManager %>:lint:*:fix\" --names \"fix:\" --prefixColors auto",
19
+ "lint:fix": "concurrently \"<%= packageManager %>:lint:*:fix\" --names \"fix:\" --prefixColors auto && <%= invokeScriptPrefix %> format",
20
+ "lint:format": "prettier . --cache --check",
19
21
  "lint:hbs": "ember-template-lint .",
20
22
  "lint:hbs:fix": "ember-template-lint . --fix",
21
23
  "lint:js": "eslint . --cache",
@@ -26,76 +28,76 @@
26
28
  "test:ember": "ember test"
27
29
  },
28
30
  "devDependencies": {
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<% } %>",
31
+ "@babel/core": "^7.26.7<% if (!typescript) { %>",
32
+ "@babel/eslint-parser": "^7.26.5",
33
+ "@babel/plugin-proposal-decorators": "^7.25.9<% } %><% if (typescript && emberData) { %>",
34
+ "@ember-data/adapter": "~5.4.0-beta.14",
35
+ "@ember-data/graph": "~5.4.0-beta.14",
36
+ "@ember-data/json-api": "~5.4.0-beta.14",
37
+ "@ember-data/legacy-compat": "~5.4.0-beta.14",
38
+ "@ember-data/model": "~5.4.0-beta.14",
39
+ "@ember-data/request": "~5.4.0-beta.14",
40
+ "@ember-data/request-utils": "~5.4.0-beta.14",
41
+ "@ember-data/serializer": "~5.4.0-beta.14",
42
+ "@ember-data/store": "~5.4.0-beta.14",
43
+ "@ember-data/tracking": "~5.4.0-beta.14<% } %>",
42
44
  "@ember/optional-features": "^2.2.0",
43
- "@ember/test-helpers": "^4.0.4<% if (embroider) { %>",
44
- "@embroider/compat": "^3.7.1",
45
- "@embroider/core": "^3.4.20",
45
+ "@ember/test-helpers": "^5.1.0<% if (embroider) { %>",
46
+ "@embroider/compat": "^3.8.0",
47
+ "@embroider/core": "^3.5.0<% } %>",
48
+ "@embroider/macros": "^1.16.10<% if (embroider) { %>",
46
49
  "@embroider/webpack": "^4.0.9<% } %>",
47
- "@eslint/js": "^9.17.0",
48
- "@glimmer/component": "^1.1.2",
50
+ "@eslint/js": "^9.19.0",
51
+ "@glimmer/component": "^2.0.0",
49
52
  "@glimmer/tracking": "^1.1.2<% if (typescript) { %>",
50
- "@glint/environment-ember-loose": "^1.5.0",
51
- "@glint/environment-ember-template-imports": "^1.5.0",
52
- "@glint/template": "^1.5.0",
53
- "@tsconfig/ember": "^3.0.8",
53
+ "@glint/environment-ember-loose": "^1.5.2",
54
+ "@glint/environment-ember-template-imports": "^1.5.2",
55
+ "@glint/template": "^1.5.2",
56
+ "@tsconfig/ember": "^3.0.9",
54
57
  "@types/eslint__js": "^8.42.3",
55
58
  "@types/qunit": "^2.19.12",
56
59
  "@types/rsvp": "^4.0.9",
57
- "@warp-drive/core-types": "~0.0.0-beta.12<% } %>",
60
+ "@warp-drive/core-types": "~0.0.0<% } %>",
58
61
  "broccoli-asset-rev": "^3.0.0",
59
- "concurrently": "^9.1.0",
62
+ "concurrently": "^9.1.2",
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
68
  "ember-cli-dependency-checker": "^3.3.3",
69
+ "ember-cli-deprecation-workflow": "^3.1.0",
66
70
  "ember-cli-htmlbars": "^6.3.0",
67
71
  "ember-cli-inject-live-reload": "^2.1.0<% if (!embroider) { %>",
68
72
  "ember-cli-sri": "^2.1.1",
69
- "ember-cli-terser": "^4.0.2<% } %>",
70
- "ember-data": "~5.4.0-beta.12",
73
+ "ember-cli-terser": "^4.0.2<% } %><% if (emberData) { %>",
74
+ "ember-data": "~5.4.0-beta.14<% } %>",
71
75
  "ember-fetch": "^8.1.2",
72
76
  "ember-load-initializers": "^3.0.1",
73
77
  "ember-modifier": "^4.2.0",
74
78
  "ember-page-title": "^8.2.3",
75
79
  "ember-qunit": "^9.0.1",
76
80
  "ember-resolver": "^13.1.0",
77
- "ember-source": "~6.2.0-beta.1",
78
- "ember-template-imports": "^4.2.0",
79
- "ember-template-lint": "^6.0.0<% if (welcome) { %>",
81
+ "ember-source": "~6.3.0-beta.1",
82
+ "ember-template-imports": "^4.3.0",
83
+ "ember-template-lint": "^6.1.0<% if (welcome) { %>",
80
84
  "ember-welcome-page": "^7.0.2<% } %>",
81
- "eslint": "^9.17.0",
85
+ "eslint": "^9.19.0",
82
86
  "eslint-config-prettier": "^9.1.0",
83
- "eslint-plugin-ember": "^12.3.3",
87
+ "eslint-plugin-ember": "^12.5.0",
84
88
  "eslint-plugin-n": "^17.15.1",
85
- "eslint-plugin-prettier": "^5.2.1",
86
89
  "eslint-plugin-qunit": "^8.1.2",
87
90
  "globals": "^15.14.0",
88
91
  "loader.js": "^4.7.0",
89
92
  "prettier": "^3.4.2",
90
93
  "prettier-plugin-ember-template-tag": "^2.0.4",
91
- "qunit": "^2.23.1",
94
+ "qunit": "^2.24.1",
92
95
  "qunit-dom": "^3.4.0",
93
- "stylelint": "^16.12.0",
96
+ "stylelint": "^16.14.1",
94
97
  "stylelint-config-standard": "^36.0.1",
95
- "stylelint-prettier": "^5.0.2",
96
98
  "tracked-built-ins": "^3.4.0<% if (typescript) { %>",
97
- "typescript": "^5.7.2",
98
- "typescript-eslint": "^8.18.2<% } %>",
99
+ "typescript": "^5.7.3",
100
+ "typescript-eslint": "^8.23.0<% } %>",
99
101
  "webpack": "^5.97.1"
100
102
  },
101
103
  "engines": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "@tsconfig/ember/tsconfig.json",
2
+ "extends": "@tsconfig/ember",
3
3
  "glint": {
4
4
  "environment": ["ember-loose", "ember-template-imports"]
5
5
  },
@@ -14,19 +14,19 @@
14
14
  "*": ["types/*"]
15
15
  },
16
16
  "types": [
17
- "./node_modules/ember-source/types/stable",
18
- "./node_modules/ember-data/unstable-preview-types",
19
- "./node_modules/@ember-data/store/unstable-preview-types",
20
- "./node_modules/@ember-data/adapter/unstable-preview-types",
21
- "./node_modules/@ember-data/graph/unstable-preview-types",
22
- "./node_modules/@ember-data/json-api/unstable-preview-types",
23
- "./node_modules/@ember-data/legacy-compat/unstable-preview-types",
24
- "./node_modules/@ember-data/request/unstable-preview-types",
25
- "./node_modules/@ember-data/request-utils/unstable-preview-types",
26
- "./node_modules/@ember-data/model/unstable-preview-types",
27
- "./node_modules/@ember-data/serializer/unstable-preview-types",
28
- "./node_modules/@ember-data/tracking/unstable-preview-types",
29
- "./node_modules/@warp-drive/core-types/unstable-preview-types"
17
+ "ember-source/types<% if (emberData) { %>",
18
+ "ember-data/unstable-preview-types",
19
+ "@ember-data/store/unstable-preview-types",
20
+ "@ember-data/adapter/unstable-preview-types",
21
+ "@ember-data/graph/unstable-preview-types",
22
+ "@ember-data/json-api/unstable-preview-types",
23
+ "@ember-data/legacy-compat/unstable-preview-types",
24
+ "@ember-data/request/unstable-preview-types",
25
+ "@ember-data/request-utils/unstable-preview-types",
26
+ "@ember-data/model/unstable-preview-types",
27
+ "@ember-data/serializer/unstable-preview-types",
28
+ "@ember-data/tracking/unstable-preview-types",
29
+ "@warp-drive/core-types/unstable-preview-types<% } %>"
30
30
  ]
31
31
  }
32
32
  }
@@ -76,6 +76,7 @@ module.exports = {
76
76
  blueprintOptions,
77
77
  embroider,
78
78
  lang: options.lang,
79
+ emberData: options.emberData,
79
80
  ciProvider: options.ciProvider,
80
81
  typescript: options.typescript,
81
82
  packageManager: options.packageManager ?? 'npm',
@@ -88,9 +89,6 @@ module.exports = {
88
89
  }
89
90
 
90
91
  let files = this._super();
91
- if (options.ciProvider !== 'travis') {
92
- files = files.filter((file) => file !== '.travis.yml');
93
- }
94
92
 
95
93
  if (options.ciProvider !== 'github') {
96
94
  files = files.filter((file) => file.indexOf('.github') < 0);
@@ -102,6 +100,11 @@ module.exports = {
102
100
  );
103
101
  }
104
102
 
103
+ if (!options.emberData) {
104
+ files = files.filter((file) => !file.includes('models/'));
105
+ files = files.filter((file) => !file.includes('ember-data/'));
106
+ }
107
+
105
108
  this._files = files;
106
109
 
107
110
  return this._files;
@@ -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, DEPRECATIONS } = require('../debug');
12
+ const { assert } = require('../debug');
13
13
  const Project = require('../models/project');
14
14
 
15
15
  const concat = require('broccoli-concat');
@@ -29,25 +29,6 @@ const DefaultPackager = require('./default-packager');
29
29
  let DEFAULT_CONFIG = {
30
30
  storeConfigInMeta: true,
31
31
  autoRun: true,
32
- outputPaths: {
33
- app: {
34
- html: 'index.html',
35
- },
36
- tests: {
37
- js: '/assets/tests.js',
38
- },
39
- vendor: {
40
- css: '/assets/vendor.css',
41
- js: '/assets/vendor.js',
42
- },
43
- testSupport: {
44
- css: '/assets/test-support.css',
45
- js: {
46
- testSupport: '/assets/test-support.js',
47
- testLoader: '/assets/test-loader.js',
48
- },
49
- },
50
- },
51
32
  minifyCSS: {
52
33
  options: { relativeTo: 'assets' },
53
34
  },
@@ -65,7 +46,6 @@ class EmberApp {
65
46
  Available init options:
66
47
  - storeConfigInMeta, defaults to `true`
67
48
  - autoRun, defaults to `true`
68
- - outputPaths, defaults to `{}`
69
49
  - minifyCSS, defaults to `{enabled: !!isProduction,options: { relativeTo: 'assets' }}
70
50
  - sourcemaps, defaults to `{}`
71
51
  - trees, defaults to `{}`
@@ -223,12 +203,6 @@ class EmberApp {
223
203
  @param {Object} options
224
204
  */
225
205
  _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
- DEPRECATIONS.DEPRECATE_OUTPUT_PATHS.options
230
- );
231
-
232
206
  let resolvePathFor = (defaultPath, specified) => {
233
207
  let path = defaultPath;
234
208
  if (specified && typeof specified === 'string') {
@@ -280,14 +254,6 @@ class EmberApp {
280
254
  enabled: this.isProduction,
281
255
  options: { processImport: false },
282
256
  },
283
- outputPaths: {
284
- app: {
285
- css: {
286
- app: `/assets/${this.name}.css`,
287
- },
288
- js: `/assets/${this.name}.js`,
289
- },
290
- },
291
257
  sourcemaps: {
292
258
  enabled: !this.isProduction,
293
259
  extensions: ['js'],
@@ -310,6 +276,32 @@ class EmberApp {
310
276
 
311
277
  this.options = defaultsDeep(options, detectedDefaultOptions, DEFAULT_CONFIG);
312
278
 
279
+ // Keep `outputPaths` on `this.options` for now, because ember-auto-import reads it here:
280
+ // https://github.com/embroider-build/ember-auto-import/blob/ce42c052151ca39e74955212a963fcf3091d7c90/packages/ember-auto-import/ts/auto-import.ts#L84
281
+ this.options.outputPaths = {
282
+ app: {
283
+ css: {
284
+ app: `/assets/${this.name}.css`,
285
+ },
286
+ html: 'index.html',
287
+ js: `/assets/${this.name}.js`,
288
+ },
289
+ tests: {
290
+ js: '/assets/tests.js',
291
+ },
292
+ vendor: {
293
+ css: '/assets/vendor.css',
294
+ js: '/assets/vendor.js',
295
+ },
296
+ testSupport: {
297
+ css: '/assets/test-support.css',
298
+ js: {
299
+ testSupport: '/assets/test-support.js',
300
+ testLoader: '/assets/test-loader.js',
301
+ },
302
+ },
303
+ };
304
+
313
305
  // For now we must disable Babel sourcemaps due to unforeseen
314
306
  // performance regressions.
315
307
  if (!('sourceMaps' in this.options.babel)) {
@@ -24,11 +24,12 @@ module.exports = NewCommand.extend({
24
24
  type: String,
25
25
  description: "Sets the base human language of the addon's own test application via index.html",
26
26
  },
27
+ { name: 'lint-fix', type: Boolean, default: true },
27
28
  {
28
29
  name: 'ci-provider',
29
- type: ['travis', 'github', 'none'],
30
+ type: ['github', 'none'],
30
31
  default: 'github',
31
- description: 'Installs the optional default CI blueprint. Either Travis or Github Actions is supported.',
32
+ description: 'Installs the optional default CI blueprint. Only Github Actions is supported at the moment.',
32
33
  },
33
34
  { name: 'typescript', type: Boolean, default: false, description: 'Set up the addon to use TypeScript' },
34
35
  ],
@@ -9,7 +9,6 @@ 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, DEPRECATIONS } = require('../debug');
13
12
 
14
13
  module.exports = Command.extend({
15
14
  name: 'init',
@@ -42,9 +41,15 @@ module.exports = Command.extend({
42
41
  { name: 'embroider', type: Boolean, default: false, description: 'Enables the build system to use Embroider' },
43
42
  {
44
43
  name: 'ci-provider',
45
- type: ['travis', 'github', 'none'],
44
+ type: ['github', 'none'],
46
45
  default: 'github',
47
- description: 'Installs the optional default CI blueprint. Either Travis or Github Actions is supported.',
46
+ description: 'Installs the optional default CI blueprint. Only Github Actions is supported at the moment.',
47
+ },
48
+ {
49
+ name: 'ember-data',
50
+ type: Boolean,
51
+ default: true,
52
+ description: 'Include ember-data dependencies and configuration',
48
53
  },
49
54
  { name: 'typescript', type: Boolean, default: false, description: 'Set up the app to use TypeScript' },
50
55
  ],
@@ -117,19 +122,10 @@ module.exports = Command.extend({
117
122
  if (commandOptions.skipGit === false) {
118
123
  await this.runTask('GitInit', commandOptions, rawArgs);
119
124
  }
125
+
120
126
  const projectName = this.project.name();
121
127
  const prependEmoji = require('../../lib/utilities/prepend-emoji');
122
128
 
123
- if (ciProvider === 'travis') {
124
- this.ui.writeLine('');
125
-
126
- deprecate(
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
- false,
129
- DEPRECATIONS.DEPRECATE_TRAVIS_CI_SUPPORT.options
130
- );
131
- }
132
-
133
129
  this.ui.writeLine('');
134
130
  this.ui.writeLine(prependEmoji('🎉', `Successfully created project ${chalk.yellow(projectName)}.`));
135
131
  this.ui.writeLine(prependEmoji('👉', 'Get started by typing:'));
@@ -36,11 +36,18 @@ module.exports = Command.extend({
36
36
  type: String,
37
37
  description: 'Sets the base human language of the application via index.html',
38
38
  },
39
+ { name: 'lint-fix', type: Boolean, default: true },
39
40
  { name: 'embroider', type: Boolean, default: false, description: 'Enables the build system to use Embroider' },
40
41
  {
41
42
  name: 'ci-provider',
42
- type: ['travis', 'github', 'none'],
43
- description: 'Installs the optional default CI blueprint. Either Travis or Github Actions is supported.',
43
+ type: ['github', 'none'],
44
+ description: 'Installs the optional default CI blueprint. Only Github Actions is supported at the moment.',
45
+ },
46
+ {
47
+ name: 'ember-data',
48
+ type: Boolean,
49
+ default: true,
50
+ description: 'Include ember-data dependencies and configuration',
44
51
  },
45
52
  {
46
53
  name: 'interactive',
@@ -72,6 +79,10 @@ module.exports = Command.extend({
72
79
  commandOptions.name = answers.name;
73
80
  }
74
81
 
82
+ if (answers.emberData) {
83
+ commandOptions.emberData = answers.emberData;
84
+ }
85
+
75
86
  if (answers.lang) {
76
87
  commandOptions.lang = answers.lang;
77
88
  }
@@ -80,13 +80,7 @@ function deprecate(description, condition, options) {
80
80
 
81
81
  let message = formatMessage(description, options);
82
82
 
83
- warn(message);
84
- warn('');
85
- warn(getStackTrace());
86
-
87
- // Return the message for testing purposes.
88
- // This can be removed once we can register deprecation handlers.
89
- return message;
83
+ warn(`${message}\n\n${getStackTrace()}`);
90
84
  }
91
85
 
92
86
  function isSemVer(version) {
@@ -2,6 +2,7 @@
2
2
 
3
3
  const { _isDeprecationRemoved } = require('./deprecate');
4
4
 
5
+ // eslint-disable-next-line no-unused-vars
5
6
  function deprecation(options) {
6
7
  return {
7
8
  options,
@@ -10,24 +11,17 @@ function deprecation(options) {
10
11
  }
11
12
 
12
13
  const DEPRECATIONS = {
13
- DEPRECATE_OUTPUT_PATHS: deprecation({
14
+ V1_ADDON_CONTENT_FOR_TYPES: deprecation({
14
15
  for: 'ember-cli',
15
- id: 'ember-cli.outputPaths-build-option',
16
+ id: 'ember-cli.v1-addon-content-for-types',
16
17
  since: {
17
- available: '5.3.0',
18
- enabled: '5.3.0',
18
+ available: '6.3.0',
19
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',
20
+ until: '7.0.0',
21
+ url: 'https://deprecations.emberjs.com/id/v1-addon-content-for-types',
22
+ meta: {
23
+ types: ['app-prefix', 'app-suffix', 'tests-prefix', 'tests-suffix', 'vendor-prefix', 'vendor-suffix'],
28
24
  },
29
- until: '6.0.0',
30
- url: 'https://deprecations.emberjs.com/id/travis-ci-support',
31
25
  }),
32
26
  };
33
27
 
@@ -24,9 +24,6 @@ class Builder extends CoreObject {
24
24
  constructor(options) {
25
25
  super(options);
26
26
 
27
- // Use Broccoli 2.0 by default, if this fails due to .read/.rebuild API, fallback to broccoli-builder
28
- this.broccoliBuilderFallback = false;
29
-
30
27
  this._instantiationStack = new Error().stack.replace(/[^\n]*\n/, '');
31
28
  this._cleanup = this.cleanup.bind(this);
32
29
 
@@ -67,31 +64,8 @@ class Builder extends CoreObject {
67
64
 
68
65
  this.tree = await this.readBuildFile(this.project.root);
69
66
 
70
- let broccoli = require('broccoli');
71
-
72
- try {
73
- this.builder = new broccoli.Builder(this.tree);
74
- return;
75
- } catch (e) {
76
- // Catch here to trap InvalidNodeError. If this is thrown, it's because the node provided is not valid
77
- // and likely uses the old .read/.rebuild API, so fallback to broccoli-builder that supports that API
78
- if (
79
- !(e instanceof broccoli.Builder.InvalidNodeError) ||
80
- e.message.indexOf('The .read/.rebuild API is no longer supported as of Broccoli 1.0') === -1
81
- ) {
82
- throw e;
83
- }
84
-
85
- // Fallback to broccoli-builder
86
- let error = `Invalid Broccoli2 node detected, falling back to broccoli-builder. Broccoli error:\n`;
87
- error += `---------------\n`;
88
- error += e.message;
89
- error += `---------------\n`;
90
- this.ui.writeWarnLine(error);
91
- }
67
+ const broccoli = require('broccoli');
92
68
 
93
- broccoli = require('broccoli-builder');
94
- this.broccoliBuilderFallback = true;
95
69
  this.builder = new broccoli.Builder(this.tree);
96
70
  }
97
71
 
@@ -179,7 +153,7 @@ class Builder extends CoreObject {
179
153
  try {
180
154
  this.project._instrumentation.start('build');
181
155
 
182
- if (addWatchDirCallback && !this.broccoliBuilderFallback) {
156
+ if (addWatchDirCallback) {
183
157
  for (let path of this.builder.watchedPaths) {
184
158
  addWatchDirCallback(path);
185
159
  }
@@ -193,24 +167,16 @@ class Builder extends CoreObject {
193
167
 
194
168
  await this.processAddonBuildSteps('preBuild');
195
169
 
196
- if (this.broccoliBuilderFallback) {
197
- try {
198
- buildResults = await this.builder.build(addWatchDirCallback);
199
- } catch (error) {
200
- this.throwFormattedBroccoliError(error);
201
- }
202
- } else {
203
- try {
204
- await this.builder.build();
205
-
206
- // build legacy style results object (this is passed to various addon APIs)
207
- buildResults = {
208
- directory: this.builder.outputPath,
209
- graph: this.builder.outputNodeWrapper,
210
- };
211
- } catch (error) {
212
- this.throwFormattedBroccoliError(error);
213
- }
170
+ try {
171
+ await this.builder.build();
172
+
173
+ // build legacy style results object (this is passed to various addon APIs)
174
+ buildResults = {
175
+ directory: this.builder.outputPath,
176
+ graph: this.builder.outputNodeWrapper,
177
+ };
178
+ } catch (error) {
179
+ this.throwFormattedBroccoliError(error);
214
180
  }
215
181
 
216
182
  await this.processAddonBuildSteps('postBuild', buildResults);
@@ -222,8 +188,6 @@ class Builder extends CoreObject {
222
188
  Object.assign({}, buildResults, { outputChanges, directory: this.outputPath })
223
189
  );
224
190
 
225
- this.checkForPostBuildEnvironmentIssues();
226
-
227
191
  return buildResults;
228
192
  } catch (error) {
229
193
  await this.processAddonBuildSteps('buildError', error);
@@ -273,26 +237,6 @@ class Builder extends CoreObject {
273
237
  }
274
238
  }
275
239
 
276
- /**
277
- * Checks for issues in the environment that can't easily be detected until
278
- * after a build and issues any necessary deprecation warnings.
279
- *
280
- * - check for old (pre 0.1.4) versions of heimdalljs
281
- *
282
- * @private
283
- * @method checkForPostBuildEnvironmentIssues
284
- */
285
- checkForPostBuildEnvironmentIssues(value) {
286
- // 0.1.3 and prior used a global heimdall instance to share sessions
287
- // newer versions keep the session itself on process
288
- this.project.ui.writeDeprecateLine(
289
- 'Heimdalljs < 0.1.4 found. Please remove old versions of heimdalljs and reinstall (you can find them with `npm ls heimdalljs` as long as you have nothing `npm link`d). Performance instrumentation data will be incomplete until then.',
290
- !process._heimdall
291
- );
292
-
293
- return value;
294
- }
295
-
296
240
  throwFormattedBroccoliError(err) {
297
241
  // TODO fix ember-cli/console-ui to handle current broccoli broccoliPayload
298
242
  let broccoliPayload = err && err.broccoliPayload;
@@ -316,12 +260,8 @@ class Builder extends CoreObject {
316
260
  };
317
261
  }
318
262
  if (!broccoliPayload.versions) {
319
- let builderVersion = this.broccoliBuilderFallback
320
- ? require('broccoli-builder/package').version
321
- : require('broccoli/package').version;
322
-
323
263
  broccoliPayload.versions = {
324
- 'broccoli-builder': builderVersion,
264
+ broccoli: require('broccoli/package').version,
325
265
  node: process.version,
326
266
  };
327
267
  }
@@ -111,10 +111,6 @@ class InteractiveNewTask extends Task {
111
111
  name: 'GitHub Actions',
112
112
  value: 'github',
113
113
  },
114
- {
115
- name: 'Travis CI',
116
- value: 'travis',
117
- },
118
114
  {
119
115
  name: 'None',
120
116
  value: 'none',
@@ -125,6 +121,22 @@ class InteractiveNewTask extends Task {
125
121
  },
126
122
  ],
127
123
  },
124
+ {
125
+ name: 'emberData',
126
+ type: 'confirm',
127
+ message: 'Do you want to include ember-data?',
128
+ when: undefined === newCommandOptions.emberData,
129
+ choices: [
130
+ {
131
+ name: 'Include ember-data',
132
+ value: true,
133
+ },
134
+ {
135
+ name: 'Do not include ember-data',
136
+ value: false,
137
+ },
138
+ ],
139
+ },
128
140
  ];
129
141
  }
130
142
 
@@ -3,6 +3,7 @@
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
5
  const cleanBaseURL = require('clean-base-url');
6
+ const { deprecate, DEPRECATIONS } = require('../debug');
6
7
 
7
8
  /**
8
9
  * Returns a normalized url given a string.
@@ -124,6 +125,14 @@ document.addEventListener('DOMContentLoaded', function() {
124
125
  content = options.addons.reduce((content, addon) => {
125
126
  let addonContent = addon.contentFor ? addon.contentFor(type, config, content) : null;
126
127
  if (addonContent) {
128
+ for (const deprecatedType of DEPRECATIONS.V1_ADDON_CONTENT_FOR_TYPES.options.meta.types) {
129
+ deprecate(
130
+ `Addon \`${addon.name}\` is using the deprecated \`${deprecatedType}\` type in its \`contentFor\` method. Please see the deprecation guide for the correct path forward.`,
131
+ type !== deprecatedType,
132
+ DEPRECATIONS.V1_ADDON_CONTENT_FOR_TYPES.options
133
+ );
134
+ }
135
+
127
136
  return content.concat(addonContent);
128
137
  }
129
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-cli",
3
- "version": "6.2.0-beta.0",
3
+ "version": "6.3.0-beta.0",
4
4
  "description": "Command line tool for developing ambitious ember.js apps",
5
5
  "keywords": [
6
6
  "app",
@@ -39,9 +39,8 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@pnpm/find-workspace-dir": "^7.0.2",
42
- "babel-remove-types": "^1.0.0",
42
+ "babel-remove-types": "^1.0.1",
43
43
  "broccoli": "^3.5.2",
44
- "broccoli-builder": "^0.18.14",
45
44
  "broccoli-concat": "^4.2.5",
46
45
  "broccoli-config-loader": "^1.0.1",
47
46
  "broccoli-config-replace": "^1.1.2",
@@ -61,10 +60,10 @@
61
60
  "compression": "^1.7.4",
62
61
  "configstore": "^5.0.1",
63
62
  "console-ui": "^3.1.2",
64
- "content-tag": "^2.0.1",
63
+ "content-tag": "^3.1.0",
65
64
  "core-object": "^3.1.5",
66
65
  "dag-map": "^2.0.2",
67
- "diff": "^5.1.0",
66
+ "diff": "^7.0.0",
68
67
  "ember-cli-is-package-missing": "^1.0.0",
69
68
  "ember-cli-lodash-subset": "^2.0.1",
70
69
  "ember-cli-normalize-entity-name": "^1.0.0",
@@ -78,7 +77,7 @@
78
77
  "find-up": "^5.0.0",
79
78
  "find-yarn-workspace-root": "^2.0.0",
80
79
  "fixturify-project": "^2.1.1",
81
- "fs-extra": "^11.1.1",
80
+ "fs-extra": "^11.3.0",
82
81
  "fs-tree-diff": "^2.0.1",
83
82
  "get-caller-file": "^2.0.5",
84
83
  "git-repo-info": "^2.1.1",
@@ -94,7 +93,7 @@
94
93
  "is-language-code": "^3.1.0",
95
94
  "isbinaryfile": "^5.0.4",
96
95
  "lodash": "^4.17.21",
97
- "markdown-it": "^13.0.1",
96
+ "markdown-it": "^14.1.0",
98
97
  "markdown-it-terminal": "^0.4.0",
99
98
  "minimatch": "^7.4.3",
100
99
  "morgan": "^1.10.0",
@@ -110,7 +109,7 @@
110
109
  "resolve-package-path": "^4.0.3",
111
110
  "safe-stable-stringify": "^2.4.3",
112
111
  "sane": "^5.0.1",
113
- "semver": "^7.3.5",
112
+ "semver": "^7.7.0",
114
113
  "silent-error": "^1.1.1",
115
114
  "sort-package-json": "^2.12.0",
116
115
  "symlink-or-copy": "^1.3.1",
@@ -142,7 +141,7 @@
142
141
  "fixturify": "^3.0.0",
143
142
  "jsdom": "^21.1.1",
144
143
  "latest-version": "^5.1.0",
145
- "mocha": "^10.0.0",
144
+ "mocha": "^11.0.1",
146
145
  "nock": "^13.5.5",
147
146
  "nyc": "^15.1.0",
148
147
  "prettier": "2.8.7",
@@ -1,78 +0,0 @@
1
- # DEPRECATION:
2
- #
3
- # Support for generating a Travis CI config file is deprecated.
4
- # You can keep using Travis CI, or you could also consider switching to GitHub Actions instead.
5
- #
6
- # Feel free to remove this comment block if you want to continue using Travis CI.
7
- #
8
- # ID travis-ci-support
9
- # UNTIL 6.0.0
10
- # URL https://deprecations.emberjs.com/id/travis-ci-support
11
-
12
- ---
13
- language: node_js
14
- node_js:
15
- # we recommend testing addons with the same minimum supported node version as Ember CLI
16
- # so that your addon works for all apps
17
- - "18"
18
-
19
- dist: xenial
20
-
21
- addons:
22
- chrome: stable
23
- <% if (yarn) { %>
24
- cache:
25
- yarn: true
26
- <% } else { %>
27
- cache:
28
- directories:
29
- - $HOME/.npm
30
- <% } %>
31
- env:
32
- global:
33
- # See https://github.com/ember-cli/ember-cli/blob/master/docs/build-concurrency.md for details.
34
- - JOBS=1
35
-
36
- branches:
37
- only:
38
- - master
39
- # npm version tags
40
- - /^v\d+\.\d+\.\d+/
41
-
42
- jobs:
43
- fast_finish: false
44
- allow_failures:
45
- - env: EMBER_TRY_SCENARIO=ember-canary
46
-
47
- include:
48
- # runs linting and tests with current locked deps
49
- - stage: "Tests"
50
- name: "Tests"
51
- script:
52
- - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> lint
53
- - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> test:ember
54
-
55
- - stage: "Additional Tests"
56
- name: "Floating Dependencies"
57
- install:<% if (yarn) { %>
58
- - yarn install --no-lockfile --non-interactive<% } else { %>
59
- - npm install --no-package-lock<% } %>
60
- script:
61
- - <% if (yarn) { %>yarn<% } else { %>npm run<% } %> test:ember
62
-
63
- # we recommend new addons test the current and previous LTS
64
- # as well as latest stable release (bonus points to beta/canary)
65
- - env: EMBER_TRY_SCENARIO=ember-lts-4.12
66
- - env: EMBER_TRY_SCENARIO=ember-lts-5.4
67
- - env: EMBER_TRY_SCENARIO=ember-release
68
- - env: EMBER_TRY_SCENARIO=ember-beta
69
- - env: EMBER_TRY_SCENARIO=ember-canary
70
- - env: EMBER_TRY_SCENARIO=embroider-safe
71
- - env: EMBER_TRY_SCENARIO=embroider-optimized
72
- <% if (yarn) { %>
73
- before_install:
74
- - curl -o- -L https://yarnpkg.com/install.sh | bash
75
- - export PATH=$HOME/.yarn/bin:$PATH
76
- <% } %>
77
- script:
78
- - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
@@ -1,43 +0,0 @@
1
- # DEPRECATION:
2
- #
3
- # Support for generating a Travis CI config file is deprecated.
4
- # You can keep using Travis CI, or you could also consider switching to GitHub Actions instead.
5
- #
6
- # Feel free to remove this comment block if you want to continue using Travis CI.
7
- #
8
- # ID travis-ci-support
9
- # UNTIL 6.0.0
10
- # URL https://deprecations.emberjs.com/id/travis-ci-support
11
-
12
- ---
13
- language: node_js
14
- node_js:
15
- - "18"
16
-
17
- dist: xenial
18
-
19
- addons:
20
- chrome: stable
21
- <% if (yarn) { %>
22
- cache:
23
- yarn: true
24
- <% } else { %>
25
- cache:
26
- directories:
27
- - $HOME/.npm
28
- <% } %>
29
- env:
30
- global:
31
- # See https://github.com/ember-cli/ember-cli/blob/master/docs/build-concurrency.md for details.
32
- - JOBS=1
33
-
34
- branches:
35
- only:
36
- - master
37
- <% if (yarn) { %>
38
- before_install:
39
- - curl -o- -L https://yarnpkg.com/install.sh | bash
40
- - export PATH=$HOME/.yarn/bin:$PATH
41
- <% } %>
42
- script:
43
- - <% if (yarn) { %>yarn<% } else { %>npm<% } %> test