@ember/app-blueprint 6.10.0-alpha.5 → 6.10.0-alpha.6

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.
@@ -30,13 +30,17 @@ jobs:
30
30
  os:
31
31
  - ubuntu-latest
32
32
  - windows-latest
33
+ node:
34
+ - 20
35
+ - 22
36
+ - 24
33
37
 
34
38
  steps:
35
39
  - uses: actions/checkout@v4
36
40
  - uses: pnpm/action-setup@v4
37
41
  - uses: actions/setup-node@v4
38
42
  with:
39
- node-version: 20
43
+ node-version: ${{ matrix.node }}
40
44
  cache: pnpm
41
45
  - name: Set TEMP to D:/Temp on windows
42
46
  if: ${{matrix.os}} == windows-latest
package/.prettierignore CHANGED
@@ -1,4 +1,5 @@
1
1
  files/
2
+ conditional-files/
2
3
  node_modules/
3
4
  tests/fixtures/
4
5
 
@@ -2,8 +2,8 @@
2
2
  "solution": {
3
3
  "@ember/app-blueprint": {
4
4
  "impact": "minor",
5
- "oldVersion": "6.10.0-alpha.4",
6
- "newVersion": "6.10.0-alpha.5",
5
+ "oldVersion": "6.10.0-alpha.5",
6
+ "newVersion": "6.10.0-alpha.6",
7
7
  "tagName": "alpha",
8
8
  "constraints": [
9
9
  {
@@ -13,14 +13,10 @@
13
13
  {
14
14
  "impact": "patch",
15
15
  "reason": "Appears in changelog section :bug: Bug Fix"
16
- },
17
- {
18
- "impact": "patch",
19
- "reason": "Appears in changelog section :memo: Documentation"
20
16
  }
21
17
  ],
22
18
  "pkgJSONPath": "./package.json"
23
19
  }
24
20
  },
25
- "description": "## Release (2025-11-21)\n\n* @ember/app-blueprint 6.10.0-alpha.5 (minor)\n\n#### :rocket: Enhancement\n* `@ember/app-blueprint`\n * [#140](https://github.com/ember-cli/ember-app-blueprint/pull/140) Use an `.mjs` file for configuring Stylelint ([@bertdeblock](https://github.com/bertdeblock))\n * [#142](https://github.com/ember-cli/ember-app-blueprint/pull/142) Use pnpm v10 ([@bertdeblock](https://github.com/bertdeblock))\n * [#138](https://github.com/ember-cli/ember-app-blueprint/pull/138) Update generated ESLint config ([@bertdeblock](https://github.com/bertdeblock))\n * [#44](https://github.com/ember-cli/ember-app-blueprint/pull/44) Use ESM for the babel config ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### :bug: Bug Fix\n* `@ember/app-blueprint`\n * [#139](https://github.com/ember-cli/ember-app-blueprint/pull/139) Remove `/declarations/` entry in `.gitignore` file ([@bertdeblock](https://github.com/bertdeblock))\n\n#### :memo: Documentation\n* `@ember/app-blueprint`\n * [#141](https://github.com/ember-cli/ember-app-blueprint/pull/141) Update some links to use https ([@bertdeblock](https://github.com/bertdeblock))\n\n#### Committers: 2\n- Bert De Block ([@bertdeblock](https://github.com/bertdeblock))\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n"
21
+ "description": "## Release (2025-11-26)\n\n* @ember/app-blueprint 6.10.0-alpha.6 (minor)\n\n#### :rocket: Enhancement\n* `@ember/app-blueprint`\n * [#145](https://github.com/ember-cli/ember-app-blueprint/pull/145) Update generated workflow files ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### :bug: Bug Fix\n* `@ember/app-blueprint`\n * [#149](https://github.com/ember-cli/ember-app-blueprint/pull/149) Fix the full path display during project generation ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#146](https://github.com/ember-cli/ember-app-blueprint/pull/146) Test against our supported node versions (and fix the babel config for the maintenance-node version (20)) ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#148](https://github.com/ember-cli/ember-app-blueprint/pull/148) Sort the package.json, using the replacers strategy ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### Committers: 1\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n"
26
22
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## Release (2025-11-26)
4
+
5
+ * @ember/app-blueprint 6.10.0-alpha.6 (minor)
6
+
7
+ #### :rocket: Enhancement
8
+ * `@ember/app-blueprint`
9
+ * [#145](https://github.com/ember-cli/ember-app-blueprint/pull/145) Update generated workflow files ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
10
+
11
+ #### :bug: Bug Fix
12
+ * `@ember/app-blueprint`
13
+ * [#149](https://github.com/ember-cli/ember-app-blueprint/pull/149) Fix the full path display during project generation ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
14
+ * [#146](https://github.com/ember-cli/ember-app-blueprint/pull/146) Test against our supported node versions (and fix the babel config for the maintenance-node version (20)) ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
15
+ * [#148](https://github.com/ember-cli/ember-app-blueprint/pull/148) Sort the package.json, using the replacers strategy ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
16
+
17
+ #### Committers: 1
18
+ - [@NullVoxPopuli](https://github.com/NullVoxPopuli)
19
+
3
20
  ## Release (2025-11-21)
4
21
 
5
22
  * @ember/app-blueprint 6.10.0-alpha.5 (minor)
@@ -1,3 +1,5 @@
1
+ import { dirname } from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
1
3
  import {
2
4
  babelCompatSupport,
3
5
  templateCompatSupport,
@@ -28,7 +30,7 @@ export default {
28
30
  [
29
31
  '@babel/plugin-transform-runtime',
30
32
  {
31
- absoluteRuntime: import.meta.dirname,
33
+ absoluteRuntime: dirname(fileURLToPath(import.meta.url)),
32
34
  useESModules: true,
33
35
  regenerator: false,
34
36
  },
@@ -1,3 +1,5 @@
1
+ import { dirname } from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
1
3
  import {
2
4
  babelCompatSupport,
3
5
  templateCompatSupport,
@@ -36,7 +38,7 @@ export default {
36
38
  [
37
39
  '@babel/plugin-transform-runtime',
38
40
  {
39
- absoluteRuntime: import.meta.dirname,
41
+ absoluteRuntime: dirname(fileURLToPath(import.meta.url)),
40
42
  useESModules: true,
41
43
  regenerator: false,
42
44
  },
package/eslint.config.mjs CHANGED
@@ -28,8 +28,8 @@ export default [
28
28
  ignores: [
29
29
  'tests/fixtures/*',
30
30
  'files/ember-cli-build.js',
31
- 'files/_js_*',
32
- 'files/_ts_*',
31
+ 'conditional-files/_js_*',
32
+ 'conditional-files/_ts_*',
33
33
  ],
34
34
  },
35
35
  ];
@@ -18,14 +18,14 @@ jobs:
18
18
  timeout-minutes: 10
19
19
 
20
20
  steps:
21
- - uses: actions/checkout@v3<% if (pnpm) { %>
21
+ - uses: actions/checkout@v6<% if (pnpm) { %>
22
22
  - uses: pnpm/action-setup@v4
23
23
  with:
24
24
  version: 10<% } %>
25
25
  - name: Install Node
26
- uses: actions/setup-node@v3
26
+ uses: actions/setup-node@v6
27
27
  with:
28
- node-version: 18
28
+ node-version: 22
29
29
  cache: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm' %>
30
30
  - name: Install Dependencies
31
31
  run: <%= pnpm ? 'pnpm install --frozen-lockfile' : yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %>
@@ -38,14 +38,14 @@ jobs:
38
38
  timeout-minutes: 10
39
39
 
40
40
  steps:
41
- - uses: actions/checkout@v3<% if (pnpm) { %>
41
+ - uses: actions/checkout@v6<% if (pnpm) { %>
42
42
  - uses: pnpm/action-setup@v4
43
43
  with:
44
44
  version: 10<% } %>
45
45
  - name: Install Node
46
- uses: actions/setup-node@v3
46
+ uses: actions/setup-node@v6
47
47
  with:
48
- node-version: 18
48
+ node-version: 22
49
49
  cache: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm' %>
50
50
  - name: Install Dependencies
51
51
  run: <%= pnpm ? 'pnpm install --frozen-lockfile' : yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %>
@@ -0,0 +1 @@
1
+ // See: conditional-files
@@ -0,0 +1 @@
1
+ // See: conditional-files
package/index.js CHANGED
@@ -3,6 +3,47 @@
3
3
  const stringUtil = require('ember-cli-string-utils');
4
4
  const chalk = require('chalk');
5
5
  const directoryForPackageName = require('./lib/directory-for-package-name');
6
+ const { sortPackageJson } = require('sort-package-json');
7
+ const { join } = require('path');
8
+ const { readFileSync } = require('fs');
9
+ const ejs = require('ejs');
10
+
11
+ const CONDITIONAL_FILES = join(__dirname, 'conditional-files');
12
+
13
+ function stringifyAndNormalize(contents) {
14
+ return `${JSON.stringify(contents, null, 2)}\n`;
15
+ }
16
+
17
+ /**
18
+ * This overrides ember-cli's default replace function,
19
+ * which is a call to ejs with the template locals.
20
+ *
21
+ * If we want to continue using ejs in any of these,
22
+ * we _may_ need to call ejs ourselves
23
+ * (in the case where we ignore the "contents" passed to these functions)
24
+ * (see `conditional-files`)
25
+ */
26
+ const replacers = {
27
+ 'package.json'(...args) {
28
+ return this.updatePackageJson(...args);
29
+ },
30
+ 'eslint.config.mjs'(locals) {
31
+ let prefix = locals.typescript ? '_ts_' : '_js_';
32
+ let filePath = join(CONDITIONAL_FILES, prefix + 'eslint.config.mjs');
33
+
34
+ let raw = readFileSync(filePath).toString();
35
+
36
+ return ejs.render(raw, locals);
37
+ },
38
+ 'babel.config.mjs'(locals) {
39
+ let prefix = locals.typescript ? '_ts_' : '_js_';
40
+ let filePath = join(CONDITIONAL_FILES, prefix + 'babel.config.mjs');
41
+
42
+ let raw = readFileSync(filePath).toString();
43
+
44
+ return ejs.render(raw, locals);
45
+ },
46
+ };
6
47
 
7
48
  module.exports = {
8
49
  description: 'The default blueprint for ember-cli projects.',
@@ -127,44 +168,20 @@ module.exports = {
127
168
 
128
169
  /**
129
170
  * @override
130
- *
131
- * This modification of buildFileInfo allows our differing
132
- * input files to output to a single file, depending on the options.
133
- * For example:
134
- *
135
- * for javascript,
136
- * _ts_eslint.config.mjs is deleted
137
- * _js_eslint.config.mjs is renamed to eslint.config.mjs
138
- *
139
- * for typescript,
140
- * _js_eslint.config.mjs is deleted
141
- * _ts_eslint.config.mjs is renamed to eslint.config.mjs
142
171
  */
143
- buildFileInfo(intoDir, templateVariables, file, options) {
172
+ buildFileInfo(intoDir, templateVariables, file) {
144
173
  let fileInfo = this._super.buildFileInfo.apply(this, arguments);
145
174
 
146
- if (file.includes('_js_')) {
147
- if (options.typescript) {
148
- return null;
149
- }
150
-
151
- fileInfo.outputBasePath = fileInfo.outputPath.replace('_js_', '');
152
- fileInfo.outputPath = fileInfo.outputPath.replace('_js_', '');
153
- fileInfo.displayPath = fileInfo.outputPath.replace('_js_', '');
154
- return fileInfo;
175
+ if (file in replacers) {
176
+ fileInfo.replacer = replacers[file].bind(this, templateVariables);
155
177
  }
156
178
 
157
- if (file.includes('_ts_')) {
158
- if (!options.typescript) {
159
- return null;
160
- }
179
+ return fileInfo;
180
+ },
161
181
 
162
- fileInfo.outputBasePath = fileInfo.outputPath.replace('_ts_', '');
163
- fileInfo.outputPath = fileInfo.outputPath.replace('_ts_', '');
164
- fileInfo.displayPath = fileInfo.outputPath.replace('_ts_', '');
165
- return fileInfo;
166
- }
182
+ updatePackageJson(options, content) {
183
+ let contents = JSON.parse(content);
167
184
 
168
- return fileInfo;
185
+ return stringifyAndNormalize(sortPackageJson(contents));
169
186
  },
170
187
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember/app-blueprint",
3
- "version": "6.10.0-alpha.5",
3
+ "version": "6.10.0-alpha.6",
4
4
  "description": "Blueprint for next generation of Ember apps",
5
5
  "keywords": [
6
6
  "ember-blueprint"
@@ -22,6 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "chalk": "^4.1.2",
25
+ "ejs": "^3.1.10",
25
26
  "ember-cli-string-utils": "^1.1.0",
26
27
  "lodash": "^4.17.21",
27
28
  "walk-sync": "^3.0.0"
@@ -1,15 +0,0 @@
1
- import { pageTitle } from 'ember-page-title';
2
- <% if (welcome) {%>import { WelcomePage } from 'ember-welcome-page';<% } %>
3
-
4
- <template>
5
- {{pageTitle "<%= namespace %>"}}<% if (welcome) { %>
6
-
7
- {{outlet}}
8
-
9
- {{! The following component displays Ember's default welcome message. }}
10
- <WelcomePage />
11
- {{! Feel free to remove this! }}<% } else { %>
12
- <h2 id="title">Welcome to Ember</h2>
13
-
14
- {{outlet}}<% } %>
15
- </template>