@ember/app-blueprint 0.8.2 → 6.7.1
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/.github/workflows/{plan-release.yml → plan-stable-release.yml} +5 -6
- package/.github/workflows/{publish.yml → publish-stable.yml} +2 -3
- package/.prettierignore +1 -2
- package/.release-plan.json +4 -4
- package/CHANGELOG.md +47 -0
- package/README.md +10 -0
- package/eslint.config.mjs +1 -5
- package/files/package.json +43 -43
- 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 -91
- package/tests/lint.test.mjs +27 -10
- package/tests/tests.test.mjs +218 -0
- package/vitest.config.ts +2 -2
- package/tests/default.test.mjs +0 -155
- 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
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
name: Plan Release
|
|
1
|
+
name: Plan Stable Release
|
|
2
2
|
on:
|
|
3
3
|
workflow_dispatch:
|
|
4
4
|
push:
|
|
5
5
|
branches:
|
|
6
|
-
-
|
|
7
|
-
- master
|
|
6
|
+
- release
|
|
8
7
|
pull_request_target: # This workflow has permissions on the repo, do NOT run code from PRs in this workflow. See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
|
|
9
8
|
types:
|
|
10
9
|
- labeled
|
|
@@ -25,7 +24,7 @@ jobs:
|
|
|
25
24
|
- uses: actions/checkout@v4
|
|
26
25
|
with:
|
|
27
26
|
fetch-depth: 2
|
|
28
|
-
ref: '
|
|
27
|
+
ref: 'release'
|
|
29
28
|
# This will only cause the `is-this-a-release` job to have a "command" of `release`
|
|
30
29
|
# when the .release-plan.json file was changed on the last commit.
|
|
31
30
|
- id: check-release
|
|
@@ -50,7 +49,7 @@ jobs:
|
|
|
50
49
|
# github-changelog can discover what's changed since the last release
|
|
51
50
|
with:
|
|
52
51
|
fetch-depth: 0
|
|
53
|
-
ref: '
|
|
52
|
+
ref: 'release'
|
|
54
53
|
- uses: pnpm/action-setup@v4
|
|
55
54
|
- uses: actions/setup-node@v4
|
|
56
55
|
with:
|
|
@@ -85,7 +84,7 @@ jobs:
|
|
|
85
84
|
commit-message: "Prepare Release ${{ steps.explanation.outputs.new_version}} using 'release-plan'"
|
|
86
85
|
labels: "internal"
|
|
87
86
|
branch: release-preview
|
|
88
|
-
title: Prepare Release ${{ steps.explanation.outputs.new_version }}
|
|
87
|
+
title: Prepare Stable Release ${{ steps.explanation.outputs.new_version }}
|
|
89
88
|
body: |
|
|
90
89
|
This PR is a preview of the release that [release-plan](https://github.com/embroider-build/release-plan) has prepared. To release you should just merge this PR 👍
|
|
91
90
|
|
|
@@ -7,8 +7,7 @@ on:
|
|
|
7
7
|
workflow_dispatch:
|
|
8
8
|
push:
|
|
9
9
|
branches:
|
|
10
|
-
-
|
|
11
|
-
- master
|
|
10
|
+
- release
|
|
12
11
|
paths:
|
|
13
12
|
- '.release-plan.json'
|
|
14
13
|
|
|
@@ -37,7 +36,7 @@ jobs:
|
|
|
37
36
|
cache: pnpm
|
|
38
37
|
- run: pnpm install --frozen-lockfile
|
|
39
38
|
- name: Publish to NPM
|
|
40
|
-
run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish
|
|
39
|
+
run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish --publish-branch=release
|
|
41
40
|
env:
|
|
42
41
|
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
|
|
43
42
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.prettierignore
CHANGED
package/.release-plan.json
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
"solution": {
|
|
3
3
|
"@ember/app-blueprint": {
|
|
4
4
|
"impact": "patch",
|
|
5
|
-
"oldVersion": "
|
|
6
|
-
"newVersion": "
|
|
5
|
+
"oldVersion": "6.7.0",
|
|
6
|
+
"newVersion": "6.7.1",
|
|
7
7
|
"tagName": "latest",
|
|
8
8
|
"constraints": [
|
|
9
9
|
{
|
|
10
10
|
"impact": "patch",
|
|
11
|
-
"reason": "Appears in changelog section :
|
|
11
|
+
"reason": "Appears in changelog section :house: Internal"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
14
|
"pkgJSONPath": "./package.json"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
"description": "## Release (2025-09-
|
|
17
|
+
"description": "## Release (2025-09-04)\n\n* @ember/app-blueprint 6.7.1 (patch)\n\n#### :house: Internal\n* `@ember/app-blueprint`\n * [#71](https://github.com/ember-cli/ember-app-blueprint/pull/71) fix publish-branch for pnpm publish ([@mansona](https://github.com/mansona))\n\n#### Committers: 1\n- Chris Manson ([@mansona](https://github.com/mansona))\n"
|
|
18
18
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Release (2025-09-04)
|
|
4
|
+
|
|
5
|
+
* @ember/app-blueprint 6.7.1 (patch)
|
|
6
|
+
|
|
7
|
+
#### :house: Internal
|
|
8
|
+
* `@ember/app-blueprint`
|
|
9
|
+
* [#71](https://github.com/ember-cli/ember-app-blueprint/pull/71) fix publish-branch for pnpm publish ([@mansona](https://github.com/mansona))
|
|
10
|
+
|
|
11
|
+
#### Committers: 1
|
|
12
|
+
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
13
|
+
|
|
14
|
+
## Release (2025-09-04)
|
|
15
|
+
|
|
16
|
+
* @ember/app-blueprint 6.7.0 (minor)
|
|
17
|
+
|
|
18
|
+
#### :rocket: Enhancement
|
|
19
|
+
* `@ember/app-blueprint`
|
|
20
|
+
* [#65](https://github.com/ember-cli/ember-app-blueprint/pull/65) Update all dependencies for 6.7 release ([@mansona](https://github.com/mansona))
|
|
21
|
+
|
|
22
|
+
#### :bug: Bug Fix
|
|
23
|
+
* `@ember/app-blueprint`
|
|
24
|
+
* [#67](https://github.com/ember-cli/ember-app-blueprint/pull/67) make sure that release-plan publishes from release branch ([@mansona](https://github.com/mansona))
|
|
25
|
+
|
|
26
|
+
#### :memo: Documentation
|
|
27
|
+
* `@ember/app-blueprint`
|
|
28
|
+
* [#70](https://github.com/ember-cli/ember-app-blueprint/pull/70) add a basic readme ([@mansona](https://github.com/mansona))
|
|
29
|
+
|
|
30
|
+
#### Committers: 1
|
|
31
|
+
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
32
|
+
|
|
33
|
+
## Release (2025-09-04)
|
|
34
|
+
|
|
35
|
+
* @ember/app-blueprint 6.6.0 (minor)
|
|
36
|
+
|
|
37
|
+
#### :rocket: Enhancement
|
|
38
|
+
* `@ember/app-blueprint`
|
|
39
|
+
* [#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))
|
|
40
|
+
* [#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))
|
|
41
|
+
|
|
42
|
+
#### :house: Internal
|
|
43
|
+
* `@ember/app-blueprint`
|
|
44
|
+
* [#60](https://github.com/ember-cli/ember-app-blueprint/pull/60) Split test files ([@pichfl](https://github.com/pichfl))
|
|
45
|
+
|
|
46
|
+
#### Committers: 2
|
|
47
|
+
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
48
|
+
- Florian Pichler ([@pichfl](https://github.com/pichfl))
|
|
49
|
+
|
|
3
50
|
## Release (2025-09-03)
|
|
4
51
|
|
|
5
52
|
* @ember/app-blueprint 0.8.2 (patch)
|
package/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# @ember/app-blueprint
|
|
2
|
+
|
|
3
|
+
This is the blueprint that is used to generate a **new** Ember app using [Vite](https://vite.dev/) as the primary build system.
|
|
4
|
+
|
|
5
|
+
If you have an existing app that you would like to upgrade to use Vite consider using the [ember-vite-codemod](https://github.com/mainmatter/ember-vite-codemod)
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
pnpm dlx ember-cli@latest app my-app-name -b @ember/app-blueprint --pnpm
|
|
10
|
+
|
package/eslint.config.mjs
CHANGED
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": "
|
|
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.7.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.42.0<% } %>",
|
|
102
102
|
"vite": "^6.3.5"
|
|
103
103
|
},
|
|
104
104
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember/app-blueprint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.7.1",
|
|
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
|
+
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
1
|
const httpProxy = require('http-proxy');
|
|
3
2
|
|
|
4
3
|
/*
|
|
@@ -10,7 +9,7 @@ const httpProxy = require('http-proxy');
|
|
|
10
9
|
"/tests/index.html" URL.
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
function testemProxy(targetURL) {
|
|
14
13
|
return function testemProxyHandler(app) {
|
|
15
14
|
const proxy = httpProxy.createProxyServer({
|
|
16
15
|
changeOrigin: true,
|
|
@@ -33,4 +32,29 @@ module.exports = function testemProxy(targetURL) {
|
|
|
33
32
|
proxy.web(req, res, { target: targetURL + url });
|
|
34
33
|
});
|
|
35
34
|
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
module.exports = {
|
|
38
|
+
test_page: 'tests/index.html?hidepassed',
|
|
39
|
+
disable_watching: true,
|
|
40
|
+
launch_in_ci: ['Chrome'],
|
|
41
|
+
launch_in_dev: ['Chrome'],
|
|
42
|
+
browser_start_timeout: 120,
|
|
43
|
+
browser_args: {
|
|
44
|
+
Chrome: {
|
|
45
|
+
ci: [
|
|
46
|
+
// --no-sandbox is needed when running Chrome inside a container
|
|
47
|
+
process.env.CI ? '--no-sandbox' : null,
|
|
48
|
+
'--headless',
|
|
49
|
+
'--disable-dev-shm-usage',
|
|
50
|
+
'--disable-software-rasterizer',
|
|
51
|
+
'--mute-audio',
|
|
52
|
+
'--remote-debugging-port=0',
|
|
53
|
+
'--window-size=1440,900',
|
|
54
|
+
].filter(Boolean),
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
middleware: [
|
|
58
|
+
testemProxy('%APP_URL%')
|
|
59
|
+
],
|
|
36
60
|
};
|
|
File without changes
|