@ember/app-blueprint 0.5.0 → 0.7.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/.prettierignore +8 -0
- package/.release-plan.json +7 -3
- package/CHANGELOG.md +26 -0
- package/eslint.config.mjs +5 -1
- package/files/.ember-cli +13 -1
- package/files/package.json +1 -3
- package/index.js +13 -4
- package/lib/prepend-emoji.js +3 -1
- package/package.json +7 -2
- package/tests/default.test.mjs +18 -2
- package/tests/helpers.mjs +38 -4
package/.prettierignore
ADDED
package/.release-plan.json
CHANGED
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
"solution": {
|
|
3
3
|
"@ember/app-blueprint": {
|
|
4
4
|
"impact": "minor",
|
|
5
|
-
"oldVersion": "0.
|
|
6
|
-
"newVersion": "0.
|
|
5
|
+
"oldVersion": "0.6.0",
|
|
6
|
+
"newVersion": "0.7.0",
|
|
7
7
|
"tagName": "latest",
|
|
8
8
|
"constraints": [
|
|
9
9
|
{
|
|
10
10
|
"impact": "minor",
|
|
11
11
|
"reason": "Appears in changelog section :rocket: Enhancement"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"impact": "patch",
|
|
15
|
+
"reason": "Appears in changelog section :house: Internal"
|
|
12
16
|
}
|
|
13
17
|
],
|
|
14
18
|
"pkgJSONPath": "./package.json"
|
|
15
19
|
}
|
|
16
20
|
},
|
|
17
|
-
"description": "## Release (2025-
|
|
21
|
+
"description": "## Release (2025-06-18)\n\n* @ember/app-blueprint 0.7.0 (minor)\n\n#### :rocket: Enhancement\n* `@ember/app-blueprint`\n * [#27](https://github.com/ember-cli/ember-app-blueprint/pull/27) Remove unused dependencies ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### :house: Internal\n* `@ember/app-blueprint`\n * [#35](https://github.com/ember-cli/ember-app-blueprint/pull/35) Adjust the lint command / enforce prettier in CI (our code, not for the output) ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### Committers: 1\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n"
|
|
18
22
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Release (2025-06-18)
|
|
4
|
+
|
|
5
|
+
* @ember/app-blueprint 0.7.0 (minor)
|
|
6
|
+
|
|
7
|
+
#### :rocket: Enhancement
|
|
8
|
+
* `@ember/app-blueprint`
|
|
9
|
+
* [#27](https://github.com/ember-cli/ember-app-blueprint/pull/27) Remove unused dependencies ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
10
|
+
|
|
11
|
+
#### :house: Internal
|
|
12
|
+
* `@ember/app-blueprint`
|
|
13
|
+
* [#35](https://github.com/ember-cli/ember-app-blueprint/pull/35) Adjust the lint command / enforce prettier in CI (our code, not for the output) ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
14
|
+
|
|
15
|
+
#### Committers: 1
|
|
16
|
+
- [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
17
|
+
|
|
18
|
+
## Release (2025-06-05)
|
|
19
|
+
|
|
20
|
+
* @ember/app-blueprint 0.6.0 (minor)
|
|
21
|
+
|
|
22
|
+
#### :rocket: Enhancement
|
|
23
|
+
* `@ember/app-blueprint`
|
|
24
|
+
* [#28](https://github.com/ember-cli/ember-app-blueprint/pull/28) make sure we always use strict generators ([@mansona](https://github.com/mansona))
|
|
25
|
+
|
|
26
|
+
#### Committers: 1
|
|
27
|
+
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
28
|
+
|
|
3
29
|
## Release (2025-05-22)
|
|
4
30
|
|
|
5
31
|
* @ember/app-blueprint 0.5.0 (minor)
|
package/eslint.config.mjs
CHANGED
|
@@ -25,6 +25,10 @@ export default [
|
|
|
25
25
|
pluginJs.configs.recommended,
|
|
26
26
|
eslintConfigPrettier,
|
|
27
27
|
{
|
|
28
|
-
ignores: [
|
|
28
|
+
ignores: [
|
|
29
|
+
'tests/fixture/*',
|
|
30
|
+
'tests/fixture-ts/*',
|
|
31
|
+
'files/ember-cli-build.js',
|
|
32
|
+
],
|
|
29
33
|
},
|
|
30
34
|
];
|
package/files/.ember-cli
CHANGED
|
@@ -3,5 +3,17 @@
|
|
|
3
3
|
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
|
|
4
4
|
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
|
|
5
5
|
*/
|
|
6
|
-
"isTypeScriptProject": <%= typescript ? 'true' : 'false'
|
|
6
|
+
"isTypeScriptProject": <%= typescript ? 'true' : 'false' %>,
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
Setting `componentAuthoringFormat` to "strict" will force the blueprint generators to generate GJS
|
|
10
|
+
or GTS files for the component and the component rendering test. "loose" is the default.
|
|
11
|
+
*/
|
|
12
|
+
"componentAuthoringFormat": "strict",
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
Setting `routeAuthoringFormat` to "strict" will force the blueprint generators to generate GJS
|
|
16
|
+
or GTS templates for routes. "loose" is the default
|
|
17
|
+
*/
|
|
18
|
+
"routeAuthoringFormat": "strict"
|
|
7
19
|
}
|
package/files/package.json
CHANGED
|
@@ -74,8 +74,7 @@
|
|
|
74
74
|
"ember-auto-import": "^2.10.0",
|
|
75
75
|
"ember-cli": "~6.5.0-beta.0",
|
|
76
76
|
"ember-cli-babel": "^8.2.0",
|
|
77
|
-
"ember-cli-deprecation-workflow": "^3.3.0",
|
|
78
|
-
"ember-cli-htmlbars": "^6.3.0<% if (emberData) { %>",
|
|
77
|
+
"ember-cli-deprecation-workflow": "^3.3.0<% if (emberData) { %>",
|
|
79
78
|
"ember-data": "~5.5.0<% } %>",
|
|
80
79
|
"ember-load-initializers": "^3.0.1",
|
|
81
80
|
"ember-modifier": "^4.2.2",
|
|
@@ -83,7 +82,6 @@
|
|
|
83
82
|
"ember-qunit": "^9.0.3",
|
|
84
83
|
"ember-resolver": "^13.1.1",
|
|
85
84
|
"ember-source": "~6.5.0-beta.1",
|
|
86
|
-
"ember-template-imports": "^4.3.0",
|
|
87
85
|
"ember-template-lint": "^7.7.0<% if (welcome) { %>",
|
|
88
86
|
"ember-welcome-page": "^7.0.2<% } %>",
|
|
89
87
|
"eslint": "^9.27.0",
|
package/index.js
CHANGED
|
@@ -24,7 +24,8 @@ module.exports = {
|
|
|
24
24
|
let name = stringUtil.dasherize(rawName);
|
|
25
25
|
let namespace = stringUtil.classify(rawName);
|
|
26
26
|
|
|
27
|
-
let hasOptions =
|
|
27
|
+
let hasOptions =
|
|
28
|
+
!options.welcome || options.packageManager || options.ciProvider;
|
|
28
29
|
let blueprintOptions = '';
|
|
29
30
|
if (hasOptions) {
|
|
30
31
|
let indent = `\n `;
|
|
@@ -66,7 +67,8 @@ module.exports = {
|
|
|
66
67
|
blueprintVersion: require('./package').version,
|
|
67
68
|
yarn: options.packageManager === 'yarn',
|
|
68
69
|
pnpm: options.packageManager === 'pnpm',
|
|
69
|
-
npm:
|
|
70
|
+
npm:
|
|
71
|
+
options.packageManager !== 'yarn' && options.packageManager !== 'pnpm',
|
|
70
72
|
invokeScriptPrefix,
|
|
71
73
|
execBinPrefix,
|
|
72
74
|
welcome: options.welcome,
|
|
@@ -93,7 +95,9 @@ module.exports = {
|
|
|
93
95
|
|
|
94
96
|
if (!options.typescript) {
|
|
95
97
|
files = files.filter(
|
|
96
|
-
(file) =>
|
|
98
|
+
(file) =>
|
|
99
|
+
!['tsconfig.json', 'app/config/', 'types/'].includes(file) &&
|
|
100
|
+
!file.endsWith('.d.ts'),
|
|
97
101
|
);
|
|
98
102
|
}
|
|
99
103
|
|
|
@@ -110,7 +114,12 @@ module.exports = {
|
|
|
110
114
|
beforeInstall() {
|
|
111
115
|
const prependEmoji = require('./lib/prepend-emoji');
|
|
112
116
|
|
|
113
|
-
this.ui.writeLine(
|
|
117
|
+
this.ui.writeLine(
|
|
118
|
+
prependEmoji(
|
|
119
|
+
'✨',
|
|
120
|
+
`Creating a new Ember app in ${chalk.yellow(process.cwd())}:`,
|
|
121
|
+
),
|
|
122
|
+
);
|
|
114
123
|
},
|
|
115
124
|
|
|
116
125
|
/**
|
package/lib/prepend-emoji.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
function supportEmoji() {
|
|
4
4
|
const hasEmojiTurnedOff = process.argv.indexOf('--no-emoji') > -1;
|
|
5
|
-
return
|
|
5
|
+
return (
|
|
6
|
+
process.stdout.isTTY && process.platform !== 'win32' && !hasEmojiTurnedOff
|
|
7
|
+
);
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
const areEmojiSupported = supportEmoji();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember/app-blueprint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Blueprint for next generation of Ember apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-blueprint"
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@eslint/js": "^9.3.0",
|
|
23
|
+
"concurrently": "^9.1.2",
|
|
23
24
|
"ember-cli": "^6.3.1",
|
|
24
25
|
"eslint": "9.x",
|
|
25
26
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -35,7 +36,11 @@
|
|
|
35
36
|
"vitest": "^3.1.2"
|
|
36
37
|
},
|
|
37
38
|
"scripts": {
|
|
38
|
-
"lint": "
|
|
39
|
+
"lint": "concurrently 'pnpm:lint:*(!fix)'",
|
|
40
|
+
"lint:fix": "pnpm lint:eslint && pnpm format",
|
|
41
|
+
"lint:eslint": "eslint .",
|
|
42
|
+
"lint:prettier": "prettier . --check",
|
|
43
|
+
"format": "prettier . --write",
|
|
39
44
|
"test": "vitest"
|
|
40
45
|
}
|
|
41
46
|
}
|
package/tests/default.test.mjs
CHANGED
|
@@ -6,23 +6,39 @@ import { newProjectWithFixtures } from './helpers.mjs';
|
|
|
6
6
|
|
|
7
7
|
const SCENARIOS = [
|
|
8
8
|
{
|
|
9
|
+
name: 'defaults',
|
|
10
|
+
flags: [],
|
|
11
|
+
fixturePath: join(import.meta.dirname, 'fixture'),
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'compat (v1 addon support)',
|
|
15
|
+
// @glimmer/component >= 2.0.0 is a v2 addon, which we don't need when testing "compat mode"
|
|
16
|
+
// this test is "compat mode"
|
|
17
|
+
// compat mode forces us to use v1 addon infra, ember-cli, etc
|
|
9
18
|
flags: [
|
|
10
19
|
/* none, default */
|
|
11
20
|
],
|
|
21
|
+
packageJson: {
|
|
22
|
+
devDependencies: {
|
|
23
|
+
'@glimmer/component': '^1.1.2',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
12
26
|
fixturePath: join(import.meta.dirname, 'fixture'),
|
|
13
27
|
},
|
|
14
28
|
{
|
|
29
|
+
name: 'typescript',
|
|
15
30
|
flags: ['--typescript'],
|
|
16
31
|
fixturePath: join(import.meta.dirname, 'fixture-ts'),
|
|
17
32
|
},
|
|
18
33
|
];
|
|
19
34
|
|
|
20
35
|
describe('basic functionality', function () {
|
|
21
|
-
for (let { flags, fixturePath } of SCENARIOS) {
|
|
22
|
-
describe(
|
|
36
|
+
for (let { name, flags, packageJson, fixturePath } of SCENARIOS) {
|
|
37
|
+
describe(name, function () {
|
|
23
38
|
let project = newProjectWithFixtures({
|
|
24
39
|
fixturePath,
|
|
25
40
|
flags,
|
|
41
|
+
packageJson,
|
|
26
42
|
});
|
|
27
43
|
|
|
28
44
|
it('verify files', async function () {
|
package/tests/helpers.mjs
CHANGED
|
@@ -4,7 +4,8 @@ import { beforeAll } from 'vitest';
|
|
|
4
4
|
import { sync as resolveBinSync } from 'resolve-bin';
|
|
5
5
|
import { execa } from 'execa';
|
|
6
6
|
import tmp from 'tmp-promise';
|
|
7
|
-
import
|
|
7
|
+
import fs from 'node:fs/promises';
|
|
8
|
+
import { join } from 'node:path';
|
|
8
9
|
import fixturify from 'fixturify';
|
|
9
10
|
|
|
10
11
|
let localEmberCli = require.resolve('ember-cli/bin/ember');
|
|
@@ -21,6 +22,7 @@ const appName = 'test-app';
|
|
|
21
22
|
export function newProjectWithFixtures({
|
|
22
23
|
flags = [],
|
|
23
24
|
fixturePath,
|
|
25
|
+
packageJson = {},
|
|
24
26
|
name = appName,
|
|
25
27
|
} = {}) {
|
|
26
28
|
let dir;
|
|
@@ -30,19 +32,21 @@ export function newProjectWithFixtures({
|
|
|
30
32
|
beforeAll(async () => {
|
|
31
33
|
const tmpDir = (await tmp.dir()).path;
|
|
32
34
|
dir = join(tmpDir, name);
|
|
33
|
-
await execa({
|
|
35
|
+
await execa({
|
|
36
|
+
cwd: tmpDir,
|
|
37
|
+
})`${localEmberCli} new ${name} -b ${blueprintPath} --skip-git --pnpm ${flags}`;
|
|
34
38
|
|
|
35
39
|
let addonFixture = fixturify.readSync(fixturePath);
|
|
36
40
|
fixturify.writeSync(dir, addonFixture);
|
|
37
41
|
|
|
42
|
+
await mergePackageJson(dir, packageJson);
|
|
43
|
+
|
|
38
44
|
// Sync the lints for the fixtures with the project's config
|
|
39
45
|
await execa(`pnpm`, ['lint:fix'], {
|
|
40
46
|
cwd: dir,
|
|
41
47
|
});
|
|
42
48
|
});
|
|
43
49
|
|
|
44
|
-
|
|
45
|
-
|
|
46
50
|
return {
|
|
47
51
|
appName: () => name,
|
|
48
52
|
dir: () => dir,
|
|
@@ -55,3 +59,33 @@ export function newProjectWithFixtures({
|
|
|
55
59
|
},
|
|
56
60
|
};
|
|
57
61
|
}
|
|
62
|
+
|
|
63
|
+
async function mergePackageJson(dir, packageJson) {
|
|
64
|
+
let rootKeys = Object.keys(packageJson || {});
|
|
65
|
+
|
|
66
|
+
if (rootKeys.length === 0) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
let packageJsonPath = join(dir, 'package.json');
|
|
71
|
+
let testPackageJson = JSON.parse(
|
|
72
|
+
(await fs.readFile(packageJsonPath)).toString(),
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
for (let rootKey of rootKeys) {
|
|
76
|
+
/**
|
|
77
|
+
* For searchability in logs
|
|
78
|
+
*/
|
|
79
|
+
console.log(`Modifying ${rootKey} in package.json @ ${packageJsonPath}`);
|
|
80
|
+
let value = packageJson[rootKey];
|
|
81
|
+
|
|
82
|
+
let isObject = typeof value === 'object' && !Array.isArray(value);
|
|
83
|
+
if (!isObject) {
|
|
84
|
+
throw new Error(`${rootKey} customization is currently not implemented`);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
Object.assign(testPackageJson[rootKey], value);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
await fs.writeFile(packageJsonPath, JSON.stringify(testPackageJson, null, 2));
|
|
91
|
+
}
|