@ember/app-blueprint 0.8.1 → 6.6.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 +1 -2
- package/.release-plan.json +9 -5
- package/CHANGELOG.md +28 -0
- package/eslint.config.mjs +1 -5
- package/files/app/config/environment.ts +24 -9
- package/files/app/templates/_js_application.gjs +2 -2
- package/files/app/templates/_ts_application.gts +2 -2
- package/files/package.json +43 -43
- package/files/tsconfig.json +7 -22
- package/package.json +2 -2
- package/tests/arguments.test.mjs +155 -0
- package/tests/fixtures/tests-js-10/app/components/.gitkeep +0 -0
- package/tests/fixtures/tests-js-10/app/components/sweet.gjs +3 -0
- package/tests/{fixture → fixtures/tests-js-10}/app/router.js +2 -3
- package/tests/fixtures/tests-js-10/app/routes/.gitkeep +0 -0
- package/tests/{fixture/app/routes/styles.js → fixtures/tests-js-10/app/routes/fancy.js} +1 -1
- package/tests/fixtures/tests-js-10/app/styles/app.css +3 -0
- package/tests/fixtures/tests-js-10/app/templates/application.gjs +15 -0
- package/tests/fixtures/tests-js-10/app/templates/fancy.gjs +12 -0
- package/tests/fixtures/tests-js-10/tests/acceptance/index-test.js +26 -0
- package/tests/fixtures/tests-js-10/tests/integration/components/sweet-test.gjs +28 -0
- package/tests/fixtures/tests-js-10/tests/routes/fancy-test.js +11 -0
- package/tests/{fixture-ts/testem-proxy.js → fixtures/tests-js-20/testem-dev.js} +26 -2
- package/tests/fixtures/tests-ts-10/app/components/.gitkeep +0 -0
- package/tests/fixtures/tests-ts-10/app/components/sweet.gts +3 -0
- package/tests/{fixture-ts → fixtures/tests-ts-10}/app/router.ts +2 -3
- package/tests/fixtures/tests-ts-10/app/routes/.gitkeep +0 -0
- package/tests/{fixture-ts/app/routes/styles.ts → fixtures/tests-ts-10/app/routes/fancy.ts} +1 -1
- package/tests/fixtures/tests-ts-10/app/styles/app.css +3 -0
- package/tests/fixtures/tests-ts-10/app/templates/application.gts +15 -0
- package/tests/fixtures/tests-ts-10/app/templates/fancy.gts +12 -0
- package/tests/fixtures/tests-ts-10/tests/acceptance/index-test.ts +26 -0
- package/tests/fixtures/tests-ts-10/tests/integration/components/sweet-test.gjs +28 -0
- package/tests/fixtures/tests-ts-10/tests/routes/fancy-test.js +11 -0
- package/tests/generators.test.mjs +60 -0
- package/tests/helpers.mjs +26 -67
- package/tests/lint.test.mjs +44 -0
- package/tests/tests.test.mjs +218 -0
- package/vitest.config.ts +2 -2
- package/tests/default.test.mjs +0 -161
- package/tests/fixture/app/components/custom-component.hbs +0 -3
- package/tests/fixture/app/styles/app.css +0 -5
- package/tests/fixture/app/templates/application.hbs +0 -3
- package/tests/fixture/app/templates/custom-component.hbs +0 -1
- package/tests/fixture/app/templates/index.hbs +0 -1
- package/tests/fixture/app/templates/styles.hbs +0 -5
- package/tests/fixture/testem-proxy.js +0 -35
- package/tests/fixture/tests/acceptance/custom-component-test.js +0 -14
- package/tests/fixture/tests/acceptance/styles-test.js +0 -18
- package/tests/fixture-ts/app/styles/app.css +0 -5
- package/tests/fixture-ts/app/templates/components/custom.gts +0 -5
- package/tests/fixture-ts/app/templates/custom-component.gts +0 -5
- package/tests/fixture-ts/app/templates/index.gts +0 -5
- package/tests/fixture-ts/app/templates/styles.gts +0 -7
- package/tests/fixture-ts/tests/acceptance/custom-component-test.ts +0 -14
- package/tests/fixture-ts/tests/acceptance/styles-test.ts +0 -18
- package/tests/typescript.test.mjs +0 -24
- /package/tests/{fixture → fixtures/tests-js-10}/app/initializers/test-init.js +0 -0
- /package/tests/{fixture → fixtures/tests-js-10}/app/instance-initializers/test-instance-init.js +0 -0
- /package/tests/{fixture → fixtures/tests-js-10}/tests/acceptance/app-init-test.js +0 -0
- /package/tests/{fixture → fixtures/tests-js-10}/tests/acceptance/welcome-page-test.js +0 -0
- /package/tests/{fixture-ts → fixtures/tests-ts-10}/app/initializers/test-init.ts +0 -0
- /package/tests/{fixture-ts → fixtures/tests-ts-10}/app/instance-initializers/test-instance-init.ts +0 -0
- /package/tests/{fixture-ts → fixtures/tests-ts-10}/tests/acceptance/app-init-test.ts +0 -0
- /package/tests/{fixture-ts → fixtures/tests-ts-10}/tests/acceptance/welcome-page-test.ts +0 -0
package/.prettierignore
CHANGED
package/.release-plan.json
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"solution": {
|
|
3
3
|
"@ember/app-blueprint": {
|
|
4
|
-
"impact": "
|
|
5
|
-
"oldVersion": "
|
|
6
|
-
"newVersion": "
|
|
4
|
+
"impact": "minor",
|
|
5
|
+
"oldVersion": "6.5.0",
|
|
6
|
+
"newVersion": "6.6.0",
|
|
7
7
|
"tagName": "latest",
|
|
8
8
|
"constraints": [
|
|
9
|
+
{
|
|
10
|
+
"impact": "minor",
|
|
11
|
+
"reason": "Appears in changelog section :rocket: Enhancement"
|
|
12
|
+
},
|
|
9
13
|
{
|
|
10
14
|
"impact": "patch",
|
|
11
|
-
"reason": "Appears in changelog section :
|
|
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-09-04)\n\n* @ember/app-blueprint 6.6.0 (minor)\n\n#### :rocket: Enhancement\n* `@ember/app-blueprint`\n * [#63](https://github.com/ember-cli/ember-app-blueprint/pull/63) reset blueprint to match ember-cli app blueprint (in the next release) ([@mansona](https://github.com/mansona))\n * [#57](https://github.com/ember-cli/ember-app-blueprint/pull/57) run update-blueprint-deps to update to Ember 6.6 ([@mansona](https://github.com/mansona))\n\n#### :house: Internal\n* `@ember/app-blueprint`\n * [#60](https://github.com/ember-cli/ember-app-blueprint/pull/60) Split test files ([@pichfl](https://github.com/pichfl))\n\n#### Committers: 2\n- Chris Manson ([@mansona](https://github.com/mansona))\n- Florian Pichler ([@pichfl](https://github.com/pichfl))\n"
|
|
18
22
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Release (2025-09-04)
|
|
4
|
+
|
|
5
|
+
* @ember/app-blueprint 6.6.0 (minor)
|
|
6
|
+
|
|
7
|
+
#### :rocket: Enhancement
|
|
8
|
+
* `@ember/app-blueprint`
|
|
9
|
+
* [#63](https://github.com/ember-cli/ember-app-blueprint/pull/63) reset blueprint to match ember-cli app blueprint (in the next release) ([@mansona](https://github.com/mansona))
|
|
10
|
+
* [#57](https://github.com/ember-cli/ember-app-blueprint/pull/57) run update-blueprint-deps to update to Ember 6.6 ([@mansona](https://github.com/mansona))
|
|
11
|
+
|
|
12
|
+
#### :house: Internal
|
|
13
|
+
* `@ember/app-blueprint`
|
|
14
|
+
* [#60](https://github.com/ember-cli/ember-app-blueprint/pull/60) Split test files ([@pichfl](https://github.com/pichfl))
|
|
15
|
+
|
|
16
|
+
#### Committers: 2
|
|
17
|
+
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
18
|
+
- Florian Pichler ([@pichfl](https://github.com/pichfl))
|
|
19
|
+
|
|
20
|
+
## Release (2025-09-03)
|
|
21
|
+
|
|
22
|
+
* @ember/app-blueprint 0.8.2 (patch)
|
|
23
|
+
|
|
24
|
+
#### :bug: Bug Fix
|
|
25
|
+
* `@ember/app-blueprint`
|
|
26
|
+
* [#56](https://github.com/ember-cli/ember-app-blueprint/pull/56) Make sure that `npm run lint` doesn't fail on a newly generated app ([@pichfl](https://github.com/pichfl))
|
|
27
|
+
|
|
28
|
+
#### Committers: 1
|
|
29
|
+
- Florian Pichler ([@pichfl](https://github.com/pichfl))
|
|
30
|
+
|
|
3
31
|
## Release (2025-07-22)
|
|
4
32
|
|
|
5
33
|
* @ember/app-blueprint 0.8.1 (patch)
|
package/eslint.config.mjs
CHANGED
|
@@ -3,15 +3,30 @@ import { assert } from '@ember/debug';
|
|
|
3
3
|
|
|
4
4
|
const config = loadConfigFromMeta('<%= name %>') as unknown;
|
|
5
5
|
|
|
6
|
-
assert(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
assert(
|
|
6
|
+
assert(
|
|
7
|
+
'config is not an object',
|
|
8
|
+
typeof config === 'object' && config !== null
|
|
9
|
+
);
|
|
10
|
+
assert(
|
|
11
|
+
'modulePrefix was not detected on your config',
|
|
12
|
+
'modulePrefix' in config && typeof config.modulePrefix === 'string'
|
|
13
|
+
);
|
|
14
|
+
assert(
|
|
15
|
+
'locationType was not detected on your config',
|
|
16
|
+
'locationType' in config && typeof config.locationType === 'string'
|
|
17
|
+
);
|
|
18
|
+
assert(
|
|
19
|
+
'rootURL was not detected on your config',
|
|
20
|
+
'rootURL' in config && typeof config.rootURL === 'string'
|
|
21
|
+
);
|
|
22
|
+
assert(
|
|
23
|
+
'APP was not detected on your config',
|
|
24
|
+
'APP' in config && typeof config.APP === 'object'
|
|
25
|
+
);
|
|
11
26
|
|
|
12
27
|
export default config as {
|
|
13
|
-
modulePrefix: string
|
|
14
|
-
locationType: string
|
|
15
|
-
rootURL: string
|
|
16
|
-
APP: Record<string, unknown
|
|
28
|
+
modulePrefix: string;
|
|
29
|
+
locationType: string;
|
|
30
|
+
rootURL: string;
|
|
31
|
+
APP: Record<string, unknown>;
|
|
17
32
|
} & Record<string, unknown>;
|
|
@@ -2,8 +2,8 @@ import { pageTitle } from 'ember-page-title';
|
|
|
2
2
|
<% if (welcome) {%>import { WelcomePage } from 'ember-welcome-page';<% } %>
|
|
3
3
|
|
|
4
4
|
<template>
|
|
5
|
-
{{pageTitle "<%= namespace %>"}}
|
|
6
|
-
|
|
5
|
+
{{pageTitle "<%= namespace %>"}}<% if (welcome) { %>
|
|
6
|
+
|
|
7
7
|
{{outlet}}
|
|
8
8
|
|
|
9
9
|
{{! The following component displays Ember's default welcome message. }}
|
|
@@ -2,8 +2,8 @@ import { pageTitle } from 'ember-page-title';
|
|
|
2
2
|
<% if (welcome) {%>import { WelcomePage } from 'ember-welcome-page';<% } %>
|
|
3
3
|
|
|
4
4
|
<template>
|
|
5
|
-
{{pageTitle "<%= namespace %>"}}
|
|
6
|
-
|
|
5
|
+
{{pageTitle "<%= namespace %>"}}<% if (welcome) { %>
|
|
6
|
+
|
|
7
7
|
{{outlet}}
|
|
8
8
|
|
|
9
9
|
{{! The following component displays Ember's default welcome message. }}
|
package/files/package.json
CHANGED
|
@@ -31,74 +31,74 @@
|
|
|
31
31
|
"./*": "./app/*"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@babel/core": "^7.
|
|
35
|
-
"@babel/runtime": "^7.
|
|
36
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
37
|
-
"@babel/plugin-transform-typescript": "^7.
|
|
38
|
-
"@babel/eslint-parser": "^7.
|
|
39
|
-
"@ember-data/adapter": "~5.
|
|
40
|
-
"@ember-data/graph": "~5.
|
|
41
|
-
"@ember-data/json-api": "~5.
|
|
42
|
-
"@ember-data/legacy-compat": "~5.
|
|
43
|
-
"@ember-data/model": "~5.
|
|
44
|
-
"@ember-data/request": "~5.
|
|
45
|
-
"@ember-data/request-utils": "~5.
|
|
46
|
-
"@ember-data/serializer": "~5.
|
|
47
|
-
"@ember-data/store": "~5.
|
|
34
|
+
"@babel/core": "^7.28.3",
|
|
35
|
+
"@babel/runtime": "^7.28.3",
|
|
36
|
+
"@babel/plugin-transform-runtime": "^7.28.3<% if (typescript) { %>",
|
|
37
|
+
"@babel/plugin-transform-typescript": "^7.28.0<% } %>",
|
|
38
|
+
"@babel/eslint-parser": "^7.28.0<% if (typescript && emberData) { %>",
|
|
39
|
+
"@ember-data/adapter": "~5.6.0",
|
|
40
|
+
"@ember-data/graph": "~5.6.0",
|
|
41
|
+
"@ember-data/json-api": "~5.6.0",
|
|
42
|
+
"@ember-data/legacy-compat": "~5.6.0",
|
|
43
|
+
"@ember-data/model": "~5.6.0",
|
|
44
|
+
"@ember-data/request": "~5.6.0",
|
|
45
|
+
"@ember-data/request-utils": "~5.6.0",
|
|
46
|
+
"@ember-data/serializer": "~5.6.0",
|
|
47
|
+
"@ember-data/store": "~5.6.0<% } %><% if (typescript) { %>",
|
|
48
48
|
"@ember/app-tsconfig": "^1.0.3<% } %>",
|
|
49
49
|
"@ember/optional-features": "^2.2.0",
|
|
50
50
|
"@ember/string": "^4.0.1",
|
|
51
51
|
"@ember/test-helpers": "^5.2.2",
|
|
52
|
-
"@ember/test-waiters": "^4.1.
|
|
53
|
-
"@embroider/macros": "^1.18.
|
|
54
|
-
"@embroider/core": "^4.1.
|
|
55
|
-
"@embroider/vite": "^1.
|
|
56
|
-
"@embroider/compat": "^4.1.
|
|
57
|
-
"@embroider/router": "^3.0.
|
|
52
|
+
"@ember/test-waiters": "^4.1.1",
|
|
53
|
+
"@embroider/macros": "^1.18.1",
|
|
54
|
+
"@embroider/core": "^4.1.3",
|
|
55
|
+
"@embroider/vite": "^1.2.0",
|
|
56
|
+
"@embroider/compat": "^4.1.3",
|
|
57
|
+
"@embroider/router": "^3.0.3",
|
|
58
58
|
"@embroider/config-meta-loader": "^1.0.0",
|
|
59
|
-
"@eslint/js": "^9.
|
|
59
|
+
"@eslint/js": "^9.34.0",
|
|
60
60
|
"@glimmer/component": "^2.0.0<% if (typescript) { %>",
|
|
61
61
|
"@glint/core": "^1.5.2",
|
|
62
62
|
"@glint/environment-ember-loose": "^1.5.2",
|
|
63
63
|
"@glint/environment-ember-template-imports": "^1.5.2",
|
|
64
64
|
"@glint/template": "^1.5.2<% } %>",
|
|
65
65
|
"@rollup/plugin-babel": "^6.0.4<% if (typescript) { %>",
|
|
66
|
-
"@types/qunit": "^2.19.
|
|
66
|
+
"@types/qunit": "^2.19.13",
|
|
67
67
|
"@types/rsvp": "^4.0.9<% if (emberData) {%>",
|
|
68
|
-
"@warp-drive/core-types": "~5.
|
|
69
|
-
"@warp-drive/ember": "~5.
|
|
68
|
+
"@warp-drive/core-types": "~5.6.0<% }} %><% if (emberData) { %>",
|
|
69
|
+
"@warp-drive/ember": "~5.6.0<% } %>",
|
|
70
70
|
"babel-plugin-ember-template-compilation": "^2.4.1",
|
|
71
|
-
"concurrently": "^9.1
|
|
71
|
+
"concurrently": "^9.2.1",
|
|
72
72
|
"decorator-transforms": "^2.3.0",
|
|
73
73
|
"ember-auto-import": "^2.10.0",
|
|
74
|
-
"ember-cli": "~6.
|
|
74
|
+
"ember-cli": "~6.6.0",
|
|
75
75
|
"ember-cli-babel": "^8.2.0",
|
|
76
|
-
"ember-cli-deprecation-workflow": "^3.
|
|
77
|
-
"ember-data": "~5.
|
|
76
|
+
"ember-cli-deprecation-workflow": "^3.4.0<% if (emberData) { %>",
|
|
77
|
+
"ember-data": "~5.6.0<% } %>",
|
|
78
78
|
"ember-load-initializers": "^3.0.1",
|
|
79
79
|
"ember-modifier": "^4.2.2",
|
|
80
|
-
"ember-page-title": "^9.0.
|
|
80
|
+
"ember-page-title": "^9.0.3",
|
|
81
81
|
"ember-qunit": "^9.0.3",
|
|
82
82
|
"ember-resolver": "^13.1.1",
|
|
83
|
-
"ember-source": "~6.
|
|
84
|
-
"ember-template-lint": "^7.
|
|
83
|
+
"ember-source": "~6.6.0",
|
|
84
|
+
"ember-template-lint": "^7.9.3<% if (welcome) { %>",
|
|
85
85
|
"ember-welcome-page": "^7.0.2<% } %>",
|
|
86
|
-
"eslint": "^9.
|
|
87
|
-
"eslint-config-prettier": "^10.1.
|
|
88
|
-
"eslint-plugin-ember": "^12.
|
|
89
|
-
"eslint-plugin-n": "^17.
|
|
90
|
-
"eslint-plugin-qunit": "^8.
|
|
91
|
-
"globals": "^16.
|
|
92
|
-
"prettier": "^3.
|
|
93
|
-
"prettier-plugin-ember-template-tag": "^2.0
|
|
86
|
+
"eslint": "^9.34.0",
|
|
87
|
+
"eslint-config-prettier": "^10.1.8",
|
|
88
|
+
"eslint-plugin-ember": "^12.7.3",
|
|
89
|
+
"eslint-plugin-n": "^17.21.3",
|
|
90
|
+
"eslint-plugin-qunit": "^8.2.5",
|
|
91
|
+
"globals": "^16.3.0",
|
|
92
|
+
"prettier": "^3.6.2",
|
|
93
|
+
"prettier-plugin-ember-template-tag": "^2.1.0",
|
|
94
94
|
"qunit": "^2.24.1",
|
|
95
|
-
"qunit-dom": "^3.
|
|
96
|
-
"stylelint": "^16.
|
|
95
|
+
"qunit-dom": "^3.5.0",
|
|
96
|
+
"stylelint": "^16.23.1",
|
|
97
97
|
"stylelint-config-standard": "^38.0.0",
|
|
98
98
|
"testem": "^3.16.0",
|
|
99
99
|
"tracked-built-ins": "^4.0.0<% if (typescript) { %>",
|
|
100
|
-
"typescript": "^5.
|
|
101
|
-
"typescript-eslint": "^8.
|
|
100
|
+
"typescript": "^5.9.2",
|
|
101
|
+
"typescript-eslint": "^8.41.0<% } %>",
|
|
102
102
|
"vite": "^6.3.5"
|
|
103
103
|
},
|
|
104
104
|
"engines": {
|
package/files/tsconfig.json
CHANGED
|
@@ -1,31 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "@ember/app-tsconfig",
|
|
3
|
-
"include": [
|
|
4
|
-
"app", "tests", "types"
|
|
5
|
-
],
|
|
3
|
+
"include": ["app", "tests", "types"],
|
|
6
4
|
"glint": {
|
|
7
|
-
"environment": [
|
|
8
|
-
"ember-loose",
|
|
9
|
-
"ember-template-imports"
|
|
10
|
-
]
|
|
5
|
+
"environment": ["ember-loose", "ember-template-imports"]
|
|
11
6
|
},
|
|
12
7
|
"compilerOptions": {
|
|
13
8
|
"allowJs": true,
|
|
14
9
|
"paths": {
|
|
15
|
-
"<%= name %>/tests/*": [
|
|
16
|
-
|
|
17
|
-
]
|
|
18
|
-
"<%= name %>/*": [
|
|
19
|
-
"./app/*"
|
|
20
|
-
],
|
|
21
|
-
"*": [
|
|
22
|
-
"./types/*"
|
|
23
|
-
]
|
|
10
|
+
"<%= name %>/tests/*": ["./tests/*"],
|
|
11
|
+
"<%= name %>/*": ["./app/*"],
|
|
12
|
+
"*": ["./types/*"]
|
|
24
13
|
},
|
|
25
|
-
"types": [
|
|
26
|
-
|
|
27
|
-
"@embroider/core/virtual",
|
|
28
|
-
"vite/client"
|
|
29
|
-
]
|
|
30
|
-
},
|
|
14
|
+
"types": ["ember-source/types", "@embroider/core/virtual", "vite/client"]
|
|
15
|
+
}
|
|
31
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember/app-blueprint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"description": "Blueprint for next generation of Ember apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-blueprint"
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"execa": "^9.1.0",
|
|
28
28
|
"fixturify": "^3.0.0",
|
|
29
29
|
"globals": "^15.3.0",
|
|
30
|
+
"jsonc-parser": "^3.3.1",
|
|
30
31
|
"prettier": "^3.2.5",
|
|
31
32
|
"prettier-plugin-ember-template-tag": "^2.0.2",
|
|
32
33
|
"release-plan": "^0.16.0",
|
|
33
|
-
"resolve-bin": "^1.0.1",
|
|
34
34
|
"strip-ansi": "^7.1.0",
|
|
35
35
|
"tmp-promise": "^3.0.3",
|
|
36
36
|
"vitest": "^3.1.2"
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import { parse } from 'jsonc-parser';
|
|
4
|
+
import { generateApp } from './helpers.mjs';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* These tests are non-functional that are designed to test only the output of the blueprint
|
|
8
|
+
* and should never install packages or run any lints or tests
|
|
9
|
+
*/
|
|
10
|
+
describe('Blueprint Arguments', function () {
|
|
11
|
+
describe('--typescript', async function () {
|
|
12
|
+
it('does not generate a tsconfig if you do not pass --typescript', async function () {
|
|
13
|
+
const { files } = await generateApp();
|
|
14
|
+
|
|
15
|
+
expect(files['tsconfig.json']).to.be.undefined;
|
|
16
|
+
expect(Object.keys(files.app.templates)).toMatchInlineSnapshot(`
|
|
17
|
+
[
|
|
18
|
+
"application.gjs",
|
|
19
|
+
]
|
|
20
|
+
`);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('generates an app with --typescript', async function () {
|
|
24
|
+
const { files } = await generateApp({ flags: ['--typescript'] });
|
|
25
|
+
|
|
26
|
+
expect(parse(files['tsconfig.json']).extends).to.equal(
|
|
27
|
+
'@ember/app-tsconfig',
|
|
28
|
+
);
|
|
29
|
+
expect(parse(files['package.json']).scripts['lint:types']).to.not.be
|
|
30
|
+
.undefined;
|
|
31
|
+
expect(Object.keys(files.app.templates)).toMatchInlineSnapshot(`
|
|
32
|
+
[
|
|
33
|
+
"application.gts",
|
|
34
|
+
]
|
|
35
|
+
`);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
describe('--package-manager', async function () {
|
|
40
|
+
it('works with npm by default', async function () {
|
|
41
|
+
const { files } = await generateApp();
|
|
42
|
+
|
|
43
|
+
expect(parse(files['package.json']).scripts.lint).toMatchInlineSnapshot(
|
|
44
|
+
`"concurrently "npm:lint:*(!fix)" --names "lint:" --prefixColors auto"`,
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('works with --package-manager=pnpm', async function () {
|
|
49
|
+
const { files } = await generateApp({
|
|
50
|
+
flags: ['--package-manager=pnpm'],
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
expect(parse(files['package.json']).scripts.lint).toMatchInlineSnapshot(
|
|
54
|
+
`"concurrently "pnpm:lint:*(!fix)" --names "lint:" --prefixColors auto"`,
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('works with --pnpm in the same way as --package-manager=pnpm', async function () {
|
|
59
|
+
const { files } = await generateApp({ flags: ['--pnpm'] });
|
|
60
|
+
|
|
61
|
+
expect(parse(files['package.json']).scripts.lint).toMatchInlineSnapshot(
|
|
62
|
+
`"concurrently "pnpm:lint:*(!fix)" --names "lint:" --prefixColors auto"`,
|
|
63
|
+
);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it('works with --package-manager=yarn', async function () {
|
|
67
|
+
const { files } = await generateApp({
|
|
68
|
+
flags: ['--package-manager=yarn'],
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
expect(parse(files['package.json']).scripts.lint).toMatchInlineSnapshot(
|
|
72
|
+
`"concurrently "yarn:lint:*(!fix)" --names "lint:" --prefixColors auto"`,
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it('works with --yarn in the same way as --package-manager=yarn', async function () {
|
|
77
|
+
const { files } = await generateApp({ flags: ['--yarn'] });
|
|
78
|
+
|
|
79
|
+
expect(parse(files['package.json']).scripts.lint).toMatchInlineSnapshot(
|
|
80
|
+
`"concurrently "yarn:lint:*(!fix)" --names "lint:" --prefixColors auto"`,
|
|
81
|
+
);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
describe('--ci-provider', async function () {
|
|
86
|
+
it('uses github by default', async function () {
|
|
87
|
+
const { files } = await generateApp();
|
|
88
|
+
|
|
89
|
+
expect(files['.github'].workflows['ci.yml']).to.not.be.undefined;
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it('does not generate any workflow files if --ci-provider=none is passed', async function () {
|
|
93
|
+
const { files } = await generateApp({ flags: ['--ci-provider=none'] });
|
|
94
|
+
|
|
95
|
+
expect(files['.github']).to.be.undefined;
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
describe('--lang', async function () {
|
|
100
|
+
it('generates an app --lang=(valid code): no message + set `lang` in index.html', async function () {
|
|
101
|
+
const { files } = await generateApp({ flags: ['--lang=eo'] });
|
|
102
|
+
|
|
103
|
+
expect(files['index.html']).to.contain('<html lang="eo">');
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
describe('--no-ember-data', async function () {
|
|
108
|
+
it('installs ember-data by default', async function () {
|
|
109
|
+
const { files } = await generateApp();
|
|
110
|
+
|
|
111
|
+
expect(parse(files['package.json']).devDependencies['ember-data']).to.not
|
|
112
|
+
.be.undefined;
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
it('does not add ember-data if you pass --no-ember-data', async function () {
|
|
116
|
+
const { files } = await generateApp({ flags: ['--no-ember-data'] });
|
|
117
|
+
|
|
118
|
+
expect(parse(files['package.json']).devDependencies['ember-data']).to.be
|
|
119
|
+
.undefined;
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
describe('--name', async function () {
|
|
124
|
+
it('generates an app with a specified name', async function () {
|
|
125
|
+
const { files } = await generateApp({
|
|
126
|
+
name: 'foo',
|
|
127
|
+
flags: ['--name=foo'],
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
expect(parse(files['package.json']).name).toBe('foo');
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
describe('--no-welcome', async function () {
|
|
135
|
+
it('generates an app with the welcome page component by default', async function () {
|
|
136
|
+
const { files } = await generateApp();
|
|
137
|
+
|
|
138
|
+
expect(parse(files['package.json']).devDependencies['ember-welcome-page'])
|
|
139
|
+
.to.not.be.undefined;
|
|
140
|
+
expect(files.app.templates['application.gjs']).to.contain(
|
|
141
|
+
'<WelcomePage />',
|
|
142
|
+
);
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it('generates an app without the welcome page component', async function () {
|
|
146
|
+
const { files } = await generateApp({ flags: ['--no-welcome'] });
|
|
147
|
+
|
|
148
|
+
expect(parse(files['package.json']).devDependencies['ember-welcome-page'])
|
|
149
|
+
.to.be.undefined;
|
|
150
|
+
expect(files.app.templates['application.gjs']).not.to.contain(
|
|
151
|
+
'<WelcomePage />',
|
|
152
|
+
);
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
});
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import EmberRouter from '@
|
|
1
|
+
import EmberRouter from '@embroider/router';
|
|
2
2
|
import config from 'test-app/config/environment';
|
|
3
3
|
|
|
4
4
|
export default class Router extends EmberRouter {
|
|
@@ -7,6 +7,5 @@ export default class Router extends EmberRouter {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
Router.map(function () {
|
|
10
|
-
this.route('
|
|
11
|
-
this.route('custom-component');
|
|
10
|
+
this.route('fancy');
|
|
12
11
|
});
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { pageTitle } from 'ember-page-title';
|
|
2
|
+
import { WelcomePage } from 'ember-welcome-page';
|
|
3
|
+
import { LinkTo } from '@ember/routing';
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
{{pageTitle "TestApp"}}
|
|
7
|
+
|
|
8
|
+
{{outlet}}
|
|
9
|
+
|
|
10
|
+
{{! The following component displays Ember's default welcome message. }}
|
|
11
|
+
<WelcomePage />
|
|
12
|
+
{{! Feel free to remove this! }}
|
|
13
|
+
|
|
14
|
+
<LinkTo @route="fancy" data-test-a>Fancy</LinkTo>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { module, test } from 'qunit';
|
|
2
|
+
import { visit, currentURL, click } from '@ember/test-helpers';
|
|
3
|
+
import { setupApplicationTest } from 'test-app/tests/helpers';
|
|
4
|
+
|
|
5
|
+
module('Acceptance | index', function (hooks) {
|
|
6
|
+
setupApplicationTest(hooks);
|
|
7
|
+
|
|
8
|
+
test('visiting /', async function (assert) {
|
|
9
|
+
await visit('/');
|
|
10
|
+
|
|
11
|
+
assert.strictEqual(currentURL(), '/');
|
|
12
|
+
|
|
13
|
+
await click('[data-test-a]');
|
|
14
|
+
|
|
15
|
+
assert.strictEqual(currentURL(), '/fancy');
|
|
16
|
+
|
|
17
|
+
assert.dom('p').hasText('Fancy');
|
|
18
|
+
|
|
19
|
+
assert.dom('p.purple').hasStyle(
|
|
20
|
+
{
|
|
21
|
+
'color': 'rgb(102, 51, 153)',
|
|
22
|
+
},
|
|
23
|
+
'The text should be purple if the app styles are working correctly',
|
|
24
|
+
)
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { module, test } from 'qunit';
|
|
2
|
+
import { setupRenderingTest } from 'test-app/tests/helpers';
|
|
3
|
+
import { render } from '@ember/test-helpers';
|
|
4
|
+
import Sweet from 'test-app/components/sweet';
|
|
5
|
+
|
|
6
|
+
module('Integration | Component | sweet', function (hooks) {
|
|
7
|
+
setupRenderingTest(hooks);
|
|
8
|
+
|
|
9
|
+
test('it renders', async function (assert) {
|
|
10
|
+
// Updating values is achieved using autotracking, just like in app code. For example:
|
|
11
|
+
// class State { @tracked myProperty = 0; }; const state = new State();
|
|
12
|
+
// and update using state.myProperty = 1; await rerender();
|
|
13
|
+
// Handle any actions with function myAction(val) { ... };
|
|
14
|
+
|
|
15
|
+
await render(<template><Sweet /></template>);
|
|
16
|
+
|
|
17
|
+
assert.dom().hasText('');
|
|
18
|
+
|
|
19
|
+
// Template block usage:
|
|
20
|
+
await render(<template>
|
|
21
|
+
<Sweet>
|
|
22
|
+
template block text
|
|
23
|
+
</Sweet>
|
|
24
|
+
</template>);
|
|
25
|
+
|
|
26
|
+
assert.dom().hasText('template block text');
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { module, test } from 'qunit';
|
|
2
|
+
import { setupTest } from 'test-app/tests/helpers';
|
|
3
|
+
|
|
4
|
+
module('Unit | Route | fancy', function (hooks) {
|
|
5
|
+
setupTest(hooks);
|
|
6
|
+
|
|
7
|
+
test('it exists', function (assert) {
|
|
8
|
+
let route = this.owner.lookup('route:fancy');
|
|
9
|
+
assert.ok(route);
|
|
10
|
+
});
|
|
11
|
+
});
|