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

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.
@@ -4,6 +4,8 @@ on:
4
4
  workflow_dispatch:
5
5
  pull_request:
6
6
  push:
7
+ paths-ignore:
8
+ - '**/*.md'
7
9
  branches:
8
10
  - main
9
11
 
@@ -30,13 +32,17 @@ jobs:
30
32
  os:
31
33
  - ubuntu-latest
32
34
  - windows-latest
35
+ node:
36
+ - 20
37
+ - 22
38
+ - 24
33
39
 
34
40
  steps:
35
41
  - uses: actions/checkout@v4
36
42
  - uses: pnpm/action-setup@v4
37
43
  - uses: actions/setup-node@v4
38
44
  with:
39
- node-version: 20
45
+ node-version: ${{ matrix.node }}
40
46
  cache: pnpm
41
47
  - name: Set TEMP to D:/Temp on windows
42
48
  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
 
@@ -1,26 +1,22 @@
1
1
  {
2
2
  "solution": {
3
3
  "@ember/app-blueprint": {
4
- "impact": "minor",
5
- "oldVersion": "6.10.0-alpha.4",
6
- "newVersion": "6.10.0-alpha.5",
4
+ "impact": "patch",
5
+ "oldVersion": "6.10.0-alpha.6",
6
+ "newVersion": "6.10.0-alpha.7",
7
7
  "tagName": "alpha",
8
8
  "constraints": [
9
- {
10
- "impact": "minor",
11
- "reason": "Appears in changelog section :rocket: Enhancement"
12
- },
13
9
  {
14
10
  "impact": "patch",
15
11
  "reason": "Appears in changelog section :bug: Bug Fix"
16
12
  },
17
13
  {
18
14
  "impact": "patch",
19
- "reason": "Appears in changelog section :memo: Documentation"
15
+ "reason": "Appears in changelog section :house: Internal"
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-12-09)\n\n* @ember/app-blueprint 6.10.0-alpha.7 (patch)\n\n#### :bug: Bug Fix\n* `@ember/app-blueprint`\n * [#153](https://github.com/ember-cli/ember-app-blueprint/pull/153) Pass extension to WelcomePage component ([@evoactivity](https://github.com/evoactivity))\n\n#### :house: Internal\n* `@ember/app-blueprint`\n * [#159](https://github.com/ember-cli/ember-app-blueprint/pull/159) don't run CI when you only change markdown files ([@mansona](https://github.com/mansona))\n\n#### Committers: 2\n- Chris Manson ([@mansona](https://github.com/mansona))\n- Liam Potter ([@evoactivity](https://github.com/evoactivity))\n"
26
22
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## Release (2025-12-09)
4
+
5
+ * @ember/app-blueprint 6.10.0-alpha.7 (patch)
6
+
7
+ #### :bug: Bug Fix
8
+ * `@ember/app-blueprint`
9
+ * [#153](https://github.com/ember-cli/ember-app-blueprint/pull/153) Pass extension to WelcomePage component ([@evoactivity](https://github.com/evoactivity))
10
+
11
+ #### :house: Internal
12
+ * `@ember/app-blueprint`
13
+ * [#159](https://github.com/ember-cli/ember-app-blueprint/pull/159) don't run CI when you only change markdown files ([@mansona](https://github.com/mansona))
14
+
15
+ #### Committers: 2
16
+ - Chris Manson ([@mansona](https://github.com/mansona))
17
+ - Liam Potter ([@evoactivity](https://github.com/evoactivity))
18
+
19
+ ## Release (2025-11-26)
20
+
21
+ * @ember/app-blueprint 6.10.0-alpha.6 (minor)
22
+
23
+ #### :rocket: Enhancement
24
+ * `@ember/app-blueprint`
25
+ * [#145](https://github.com/ember-cli/ember-app-blueprint/pull/145) Update generated workflow files ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
26
+
27
+ #### :bug: Bug Fix
28
+ * `@ember/app-blueprint`
29
+ * [#149](https://github.com/ember-cli/ember-app-blueprint/pull/149) Fix the full path display during project generation ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
30
+ * [#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))
31
+ * [#148](https://github.com/ember-cli/ember-app-blueprint/pull/148) Sort the package.json, using the replacers strategy ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
32
+
33
+ #### Committers: 1
34
+ - [@NullVoxPopuli](https://github.com/NullVoxPopuli)
35
+
3
36
  ## Release (2025-11-21)
4
37
 
5
38
  * @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' %>
@@ -7,7 +7,7 @@ import { pageTitle } from 'ember-page-title';
7
7
  {{outlet}}
8
8
 
9
9
  {{! The following component displays Ember's default welcome message. }}
10
- <WelcomePage />
10
+ <WelcomePage @extension="<% if (typescript) {%>gts<% } else { %>gjs<% } %>" />
11
11
  {{! Feel free to remove this! }}<% } else { %>
12
12
  <h2 id="title">Welcome to Ember</h2>
13
13
 
@@ -0,0 +1 @@
1
+ // See: conditional-files
@@ -0,0 +1 @@
1
+ // See: conditional-files
@@ -74,7 +74,7 @@
74
74
  "ember-resolver": "^13.1.1",
75
75
  "ember-source": "~6.10.0-alpha.1",
76
76
  "ember-template-lint": "^7.9.3<% if (welcome) { %>",
77
- "ember-welcome-page": "^7.0.2<% } %>",
77
+ "ember-welcome-page": "^8.0.4<% } %>",
78
78
  "eslint": "^9.37.0",
79
79
  "eslint-config-prettier": "^10.1.8",
80
80
  "eslint-plugin-ember": "^12.7.4",
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.7",
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"
@@ -154,7 +154,7 @@ describe('Blueprint Arguments', function () {
154
154
  expect(parse(files['package.json']).devDependencies['ember-welcome-page'])
155
155
  .to.not.be.undefined;
156
156
  expect(files.app.templates['application.gjs']).to.contain(
157
- '<WelcomePage />',
157
+ '<WelcomePage @extension="gjs" />',
158
158
  );
159
159
  });
160
160
 
@@ -164,7 +164,7 @@ describe('Blueprint Arguments', function () {
164
164
  expect(parse(files['package.json']).devDependencies['ember-welcome-page'])
165
165
  .to.be.undefined;
166
166
  expect(files.app.templates['application.gjs']).not.to.contain(
167
- '<WelcomePage />',
167
+ '<WelcomePage @extension="gjs" />',
168
168
  );
169
169
  });
170
170
  });
@@ -8,7 +8,7 @@ import { LinkTo } from '@ember/routing';
8
8
  {{outlet}}
9
9
 
10
10
  {{! The following component displays Ember's default welcome message. }}
11
- <WelcomePage />
11
+ <WelcomePage @extension="gjs" />
12
12
  {{! Feel free to remove this! }}
13
13
 
14
14
  <LinkTo @route="fancy" data-test-a>Fancy</LinkTo>
@@ -8,7 +8,7 @@ import { LinkTo } from '@ember/routing';
8
8
  {{outlet}}
9
9
 
10
10
  {{! The following component displays Ember's default welcome message. }}
11
- <WelcomePage />
11
+ <WelcomePage @extension="gts" />
12
12
  {{! Feel free to remove this! }}
13
13
 
14
14
  <LinkTo @route="fancy" data-test-a>Fancy</LinkTo>
@@ -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>