@ember/app-blueprint 6.9.0-beta.2 → 6.10.0-alpha.2
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/.release-plan.json +4 -4
- package/CHANGELOG.md +54 -44
- package/RELEASE.md +7 -0
- package/eslint.config.mjs +6 -1
- package/files/_js_eslint.config.mjs +3 -0
- package/files/_ts_eslint.config.mjs +2 -0
- package/files/app/app.ts +1 -0
- package/files/app/services/store.ts +17 -0
- package/files/ember-cli-build.js +14 -11
- package/files/package.json +15 -22
- package/files/tests/test-helper.ts +1 -0
- package/files/tsconfig.json +6 -4
- package/index.js +7 -4
- package/package.json +3 -3
- package/tests/arguments.test.mjs +20 -4
- package/tests/fixtures/warpdrive-js/app/routes/application.js +14 -0
- package/tests/fixtures/warpdrive-js/app/services/store.js +30 -0
- package/tests/fixtures/warpdrive-js/app/templates/application.gjs +22 -0
- package/tests/fixtures/warpdrive-js/tests/application/index-test.js +13 -0
- package/tests/fixtures/warpdrive-ts/app/routes/application.ts +26 -0
- package/tests/fixtures/warpdrive-ts/app/services/store.ts +32 -0
- package/tests/fixtures/warpdrive-ts/app/templates/application.gts +32 -0
- package/tests/fixtures/warpdrive-ts/tests/application/index-test.ts +13 -0
- package/tests/lint.test.mjs +1 -1
- package/tests/warpdrive.test.mjs +137 -0
- package/files/app/models/.gitkeep +0 -0
package/.release-plan.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"solution": {
|
|
3
3
|
"@ember/app-blueprint": {
|
|
4
4
|
"impact": "patch",
|
|
5
|
-
"oldVersion": "6.
|
|
6
|
-
"newVersion": "6.
|
|
7
|
-
"tagName": "
|
|
5
|
+
"oldVersion": "6.10.0-alpha.1",
|
|
6
|
+
"newVersion": "6.10.0-alpha.2",
|
|
7
|
+
"tagName": "alpha",
|
|
8
8
|
"constraints": [
|
|
9
9
|
{
|
|
10
10
|
"impact": "patch",
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"pkgJSONPath": "./package.json"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
"description": "## Release (2025-11-
|
|
21
|
+
"description": "## Release (2025-11-07)\n\n* @ember/app-blueprint 6.10.0-alpha.2 (patch)\n\n#### :bug: Bug Fix\n* `@ember/app-blueprint`\n * [#126](https://github.com/ember-cli/ember-app-blueprint/pull/126) [bugfix release] Add eslint parser option `project: true` ([@mkszepp](https://github.com/mkszepp))\n * [#120](https://github.com/ember-cli/ember-app-blueprint/pull/120) [bugfix release] set node version in engines to >= 20 ([@aklkv](https://github.com/aklkv))\n * [#116](https://github.com/ember-cli/ember-app-blueprint/pull/116) [bugfix release] update ember-cli version to latest stable ([@mansona](https://github.com/mansona))\n\n#### :house: Internal\n* `@ember/app-blueprint`\n * [#130](https://github.com/ember-cli/ember-app-blueprint/pull/130) Merge beta into main ([@mansona](https://github.com/mansona))\n * [#131](https://github.com/ember-cli/ember-app-blueprint/pull/131) fix warpdrive lint tests ([@mansona](https://github.com/mansona))\n * [#129](https://github.com/ember-cli/ember-app-blueprint/pull/129) Prepare Beta Release v6.9.0-beta.2 ([@github-actions[bot]](https://github.com/apps/github-actions))\n * [#122](https://github.com/ember-cli/ember-app-blueprint/pull/122) Merge release into beta ([@mansona](https://github.com/mansona))\n * [#127](https://github.com/ember-cli/ember-app-blueprint/pull/127) Prepare Stable Release v6.8.3 ([@github-actions[bot]](https://github.com/apps/github-actions))\n * [#121](https://github.com/ember-cli/ember-app-blueprint/pull/121) Prepare Stable Release v6.8.2 ([@github-actions[bot]](https://github.com/apps/github-actions))\n * [#117](https://github.com/ember-cli/ember-app-blueprint/pull/117) Prepare Stable Release v6.8.1 ([@github-actions[bot]](https://github.com/apps/github-actions))\n\n#### Committers: 4\n- Alexey Kulakov ([@aklkv](https://github.com/aklkv))\n- Chris Manson ([@mansona](https://github.com/mansona))\n- Markus Sanin ([@mkszepp](https://github.com/mkszepp))\n- [@github-actions[bot]](https://github.com/apps/github-actions)\n"
|
|
22
22
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## Release (2025-11-
|
|
3
|
+
## Release (2025-11-07)
|
|
4
4
|
|
|
5
|
-
* @ember/app-blueprint 6.
|
|
5
|
+
* @ember/app-blueprint 6.10.0-alpha.2 (patch)
|
|
6
6
|
|
|
7
7
|
#### :bug: Bug Fix
|
|
8
8
|
* `@ember/app-blueprint`
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
#### :house: Internal
|
|
14
14
|
* `@ember/app-blueprint`
|
|
15
|
+
* [#130](https://github.com/ember-cli/ember-app-blueprint/pull/130) Merge beta into main ([@mansona](https://github.com/mansona))
|
|
16
|
+
* [#131](https://github.com/ember-cli/ember-app-blueprint/pull/131) fix warpdrive lint tests ([@mansona](https://github.com/mansona))
|
|
17
|
+
* [#129](https://github.com/ember-cli/ember-app-blueprint/pull/129) Prepare Beta Release v6.9.0-beta.2 ([@github-actions[bot]](https://github.com/apps/github-actions))
|
|
15
18
|
* [#122](https://github.com/ember-cli/ember-app-blueprint/pull/122) Merge release into beta ([@mansona](https://github.com/mansona))
|
|
16
19
|
* [#127](https://github.com/ember-cli/ember-app-blueprint/pull/127) Prepare Stable Release v6.8.3 ([@github-actions[bot]](https://github.com/apps/github-actions))
|
|
17
20
|
* [#121](https://github.com/ember-cli/ember-app-blueprint/pull/121) Prepare Stable Release v6.8.2 ([@github-actions[bot]](https://github.com/apps/github-actions))
|
|
@@ -23,95 +26,102 @@
|
|
|
23
26
|
- Markus Sanin ([@mkszepp](https://github.com/mkszepp))
|
|
24
27
|
- [@github-actions[bot]](https://github.com/apps/github-actions)
|
|
25
28
|
|
|
26
|
-
## Release (2025-
|
|
29
|
+
## Release (2025-10-31)
|
|
27
30
|
|
|
28
|
-
* @ember/app-blueprint 6.
|
|
31
|
+
* @ember/app-blueprint 6.10.0-alpha.1 (minor)
|
|
29
32
|
|
|
30
|
-
#### :
|
|
33
|
+
#### :rocket: Enhancement
|
|
31
34
|
* `@ember/app-blueprint`
|
|
32
|
-
* [#
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- Markus Sanin ([@mkszepp](https://github.com/mkszepp))
|
|
36
|
-
|
|
37
|
-
## Release (2025-10-24)
|
|
38
|
-
|
|
39
|
-
* @ember/app-blueprint 6.8.2 (patch)
|
|
35
|
+
* [#125](https://github.com/ember-cli/ember-app-blueprint/pull/125) Glint 2 (for `--typescript` projects) ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
36
|
+
* [#124](https://github.com/ember-cli/ember-app-blueprint/pull/124) Use modern EmberData/WarpDrive ([@runspired](https://github.com/runspired))
|
|
37
|
+
* [#113](https://github.com/ember-cli/ember-app-blueprint/pull/113) Prepare 6.10 alpha ([@mansona](https://github.com/mansona))
|
|
40
38
|
|
|
41
|
-
#### :
|
|
39
|
+
#### :memo: Documentation
|
|
42
40
|
* `@ember/app-blueprint`
|
|
43
|
-
* [#
|
|
44
|
-
|
|
45
|
-
#### Committers: 1
|
|
46
|
-
- Alexey Kulakov ([@aklkv](https://github.com/aklkv))
|
|
47
|
-
|
|
48
|
-
## Release (2025-10-17)
|
|
41
|
+
* [#114](https://github.com/ember-cli/ember-app-blueprint/pull/114) update RELEASE.md with notes for after ember-cli release ([@mansona](https://github.com/mansona))
|
|
49
42
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
#### :bug: Bug Fix
|
|
53
|
-
* `@ember/app-blueprint`
|
|
54
|
-
* [#116](https://github.com/ember-cli/ember-app-blueprint/pull/116) [bugfix release] update ember-cli version to latest stable ([@mansona](https://github.com/mansona))
|
|
55
|
-
|
|
56
|
-
#### Committers: 1
|
|
43
|
+
#### Committers: 3
|
|
57
44
|
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
45
|
+
- Chris Thoburn ([@runspired](https://github.com/runspired))
|
|
46
|
+
- [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
58
47
|
|
|
59
48
|
## Release (2025-10-14)
|
|
60
49
|
|
|
61
|
-
* @ember/app-blueprint 6.9.0-
|
|
50
|
+
* @ember/app-blueprint 6.9.0-alpha.2 (minor)
|
|
62
51
|
|
|
63
52
|
#### :rocket: Enhancement
|
|
64
53
|
* `@ember/app-blueprint`
|
|
65
|
-
* [#
|
|
66
|
-
* [#
|
|
67
|
-
* [#
|
|
54
|
+
* [#103](https://github.com/ember-cli/ember-app-blueprint/pull/103) [beta] update Vite to latest (v7) ([@mansona](https://github.com/mansona))
|
|
55
|
+
* [#98](https://github.com/ember-cli/ember-app-blueprint/pull/98) Update deps ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
56
|
+
* [#95](https://github.com/ember-cli/ember-app-blueprint/pull/95) [Beta] add services directory ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
57
|
+
* [#91](https://github.com/ember-cli/ember-app-blueprint/pull/91) [bugfix beta] add legacy inspector support ([@mansona](https://github.com/mansona))
|
|
68
58
|
|
|
69
59
|
#### :bug: Bug Fix
|
|
70
60
|
* `@ember/app-blueprint`
|
|
61
|
+
* [#100](https://github.com/ember-cli/ember-app-blueprint/pull/100) [beta] swap to the Vitest beta to fix CI ([@mansona](https://github.com/mansona))
|
|
62
|
+
* [#88](https://github.com/ember-cli/ember-app-blueprint/pull/88) [bugfix beta] fix the use of ember test in the new blueprint ([@mansona](https://github.com/mansona))
|
|
63
|
+
* [#86](https://github.com/ember-cli/ember-app-blueprint/pull/86) [bugfix beta] update ember-cli to beta ([@mansona](https://github.com/mansona))
|
|
64
|
+
* [#82](https://github.com/ember-cli/ember-app-blueprint/pull/82) Use TypeScript way of accessing potentially undefined `podModulePrefix` ([@pichfl](https://github.com/pichfl))
|
|
71
65
|
* [#78](https://github.com/ember-cli/ember-app-blueprint/pull/78) Use strict mode for all CJS files ([@simonihmig](https://github.com/simonihmig))
|
|
72
66
|
|
|
73
67
|
#### :memo: Documentation
|
|
74
68
|
* `@ember/app-blueprint`
|
|
69
|
+
* [#97](https://github.com/ember-cli/ember-app-blueprint/pull/97) [documentation beta] update readme for Vite ([@mansona](https://github.com/mansona))
|
|
75
70
|
* [#64](https://github.com/ember-cli/ember-app-blueprint/pull/64) Update the release document to match the ember-cli process ([@mansona](https://github.com/mansona))
|
|
76
71
|
* [#81](https://github.com/ember-cli/ember-app-blueprint/pull/81) Correct example usage command in README ([@abeforgit](https://github.com/abeforgit))
|
|
77
72
|
* [#80](https://github.com/ember-cli/ember-app-blueprint/pull/80) Fix formatting of README file ([@bertdeblock](https://github.com/bertdeblock))
|
|
78
73
|
|
|
79
74
|
#### :house: Internal
|
|
80
75
|
* `@ember/app-blueprint`
|
|
81
|
-
* [#110](https://github.com/ember-cli/ember-app-blueprint/pull/110) Prepare Stable Release v6.8.0 ([@github-actions[bot]](https://github.com/apps/github-actions))
|
|
82
|
-
* [#107](https://github.com/ember-cli/ember-app-blueprint/pull/107) Prepare Alpha Release v6.9.0-alpha.2 ([@github-actions[bot]](https://github.com/apps/github-actions))
|
|
83
76
|
* [#108](https://github.com/ember-cli/ember-app-blueprint/pull/108) update release-plan ([@mansona](https://github.com/mansona))
|
|
84
77
|
* [#106](https://github.com/ember-cli/ember-app-blueprint/pull/106) Merge beta into main ([@mansona](https://github.com/mansona))
|
|
85
|
-
* [#
|
|
86
|
-
|
|
87
|
-
|
|
78
|
+
* [#105](https://github.com/ember-cli/ember-app-blueprint/pull/105) Prepare Beta Release v6.8.0-beta.8 ([@github-actions[bot]](https://github.com/apps/github-actions))
|
|
79
|
+
* [#104](https://github.com/ember-cli/ember-app-blueprint/pull/104) Merge release into beta ([@mansona](https://github.com/mansona))
|
|
80
|
+
* [#102](https://github.com/ember-cli/ember-app-blueprint/pull/102) Prepare Beta Release v6.8.0-beta.7 ([@github-actions[bot]](https://github.com/apps/github-actions))
|
|
81
|
+
* [#101](https://github.com/ember-cli/ember-app-blueprint/pull/101) [beta] update node version used in CI ([@mansona](https://github.com/mansona))
|
|
82
|
+
* [#96](https://github.com/ember-cli/ember-app-blueprint/pull/96) Prepare Beta Release v6.8.0-beta.6 ([@github-actions[bot]](https://github.com/apps/github-actions))
|
|
83
|
+
* [#93](https://github.com/ember-cli/ember-app-blueprint/pull/93) Add Windows tests ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
84
|
+
* [#92](https://github.com/ember-cli/ember-app-blueprint/pull/92) Prepare Beta Release v6.8.0-beta.5 ([@github-actions[bot]](https://github.com/apps/github-actions))
|
|
85
|
+
* [#89](https://github.com/ember-cli/ember-app-blueprint/pull/89) Prepare Beta Release v6.8.0-beta.4 ([@github-actions[bot]](https://github.com/apps/github-actions))
|
|
86
|
+
* [#87](https://github.com/ember-cli/ember-app-blueprint/pull/87) Prepare Beta Release v6.8.0-beta.3 ([@github-actions[bot]](https://github.com/apps/github-actions))
|
|
87
|
+
* [#85](https://github.com/ember-cli/ember-app-blueprint/pull/85) Prepare Stable Release v6.7.2 ([@github-actions[bot]](https://github.com/apps/github-actions))
|
|
88
|
+
* [#84](https://github.com/ember-cli/ember-app-blueprint/pull/84) Prepare Beta Release v6.8.0-beta.2 ([@github-actions[bot]](https://github.com/apps/github-actions))
|
|
89
|
+
* [#83](https://github.com/ember-cli/ember-app-blueprint/pull/83) update ember source to latest beta ([@mansona](https://github.com/mansona))
|
|
90
|
+
|
|
91
|
+
#### Committers: 7
|
|
88
92
|
- Arne Bertrand ([@abeforgit](https://github.com/abeforgit))
|
|
89
93
|
- Bert De Block ([@bertdeblock](https://github.com/bertdeblock))
|
|
90
94
|
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
95
|
+
- Florian Pichler ([@pichfl](https://github.com/pichfl))
|
|
91
96
|
- Simon Ihmig ([@simonihmig](https://github.com/simonihmig))
|
|
97
|
+
- [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
92
98
|
- [@github-actions[bot]](https://github.com/apps/github-actions)
|
|
93
99
|
|
|
94
|
-
## Release (2025-
|
|
100
|
+
## Release (2025-09-05)
|
|
95
101
|
|
|
96
|
-
* @ember/app-blueprint 6.
|
|
102
|
+
* @ember/app-blueprint 6.9.0-alpha.1 (minor)
|
|
97
103
|
|
|
98
104
|
#### :rocket: Enhancement
|
|
99
105
|
* `@ember/app-blueprint`
|
|
100
|
-
* [#
|
|
106
|
+
* [#76](https://github.com/ember-cli/ember-app-blueprint/pull/76) Prepare 6.9-alpha ([@mansona](https://github.com/mansona))
|
|
101
107
|
|
|
102
108
|
#### Committers: 1
|
|
103
109
|
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
104
110
|
|
|
105
|
-
## Release (2025-
|
|
111
|
+
## Release (2025-09-05)
|
|
106
112
|
|
|
107
|
-
* @ember/app-blueprint 6.
|
|
113
|
+
* @ember/app-blueprint 6.8.0-beta.1 (minor)
|
|
108
114
|
|
|
109
|
-
#### :
|
|
115
|
+
#### :rocket: Enhancement
|
|
110
116
|
* `@ember/app-blueprint`
|
|
111
|
-
* [#
|
|
117
|
+
* [#73](https://github.com/ember-cli/ember-app-blueprint/pull/73) Prepare 6.8 beta ([@mansona](https://github.com/mansona))
|
|
118
|
+
|
|
119
|
+
#### :house: Internal
|
|
120
|
+
* `@ember/app-blueprint`
|
|
121
|
+
* [#75](https://github.com/ember-cli/ember-app-blueprint/pull/75) update the beta version ([@mansona](https://github.com/mansona))
|
|
112
122
|
|
|
113
123
|
#### Committers: 1
|
|
114
|
-
-
|
|
124
|
+
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
115
125
|
|
|
116
126
|
## Release (2025-09-04)
|
|
117
127
|
|
package/RELEASE.md
CHANGED
|
@@ -120,6 +120,13 @@ You can use [this saved search](https://github.com/ember-cli/ember-app-blueprint
|
|
|
120
120
|
- Check the `Release Alpha` GitHub action to make sure the release succeeded
|
|
121
121
|
|
|
122
122
|
|
|
123
|
+
### Release ember-cli and update ember-cli versions
|
|
124
|
+
|
|
125
|
+
After doing all this release process you can go and release ember-cli. Once ember-cli has been updated you will need to come back here and update the ember-cli reference to be the release (and not the pre-release) for each of the branches.
|
|
126
|
+
|
|
127
|
+
This is necessary because we're not in the same repository and can't make release `ember-cli` and `@ember/app-blueprint` atomically.
|
|
128
|
+
|
|
129
|
+
|
|
123
130
|
## Changelog updates
|
|
124
131
|
|
|
125
132
|
`release-plan` is designed to automatically generate a Changelog that includes the titles of every PR that was merged since the last release. As we would like to make use of this auto-generated Changelog we need to make sure that PRs are named correctly and the Changelog included in the "Prepare Release" PRs are what we were expecting.
|
package/eslint.config.mjs
CHANGED
|
@@ -25,6 +25,11 @@ export default [
|
|
|
25
25
|
pluginJs.configs.recommended,
|
|
26
26
|
eslintConfigPrettier,
|
|
27
27
|
{
|
|
28
|
-
ignores: [
|
|
28
|
+
ignores: [
|
|
29
|
+
'tests/fixtures/*',
|
|
30
|
+
'files/ember-cli-build.js',
|
|
31
|
+
'files/_js_*',
|
|
32
|
+
'files/_ts_*',
|
|
33
|
+
],
|
|
29
34
|
},
|
|
30
35
|
];
|
|
@@ -16,6 +16,7 @@ import globals from 'globals';
|
|
|
16
16
|
import js from '@eslint/js';
|
|
17
17
|
|
|
18
18
|
import ember from 'eslint-plugin-ember/recommended';
|
|
19
|
+
<% if (warpDrive) { %>import WarpDrive from 'eslint-plugin-warp-drive/recommended';<% } %>
|
|
19
20
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
20
21
|
import qunit from 'eslint-plugin-qunit';
|
|
21
22
|
import n from 'eslint-plugin-n';
|
|
@@ -32,6 +33,8 @@ export default [
|
|
|
32
33
|
eslintConfigPrettier,
|
|
33
34
|
ember.configs.base,
|
|
34
35
|
ember.configs.gjs,
|
|
36
|
+
<% if (warpDrive) { %>...WarpDrive,<% } %>
|
|
37
|
+
|
|
35
38
|
/**
|
|
36
39
|
* Ignores must be in their own object
|
|
37
40
|
* https://eslint.org/docs/latest/use/configure/ignore
|
|
@@ -18,6 +18,7 @@ import js from '@eslint/js';
|
|
|
18
18
|
import ts from 'typescript-eslint';
|
|
19
19
|
|
|
20
20
|
import ember from 'eslint-plugin-ember/recommended';
|
|
21
|
+
<% if (warpDrive) { %>import WarpDrive from 'eslint-plugin-warp-drive/recommended';<% } %>
|
|
21
22
|
|
|
22
23
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
23
24
|
import qunit from 'eslint-plugin-qunit';
|
|
@@ -44,6 +45,7 @@ export default ts.config(
|
|
|
44
45
|
ember.configs.base,
|
|
45
46
|
ember.configs.gjs,
|
|
46
47
|
ember.configs.gts,
|
|
48
|
+
<% if (warpDrive) { %>...WarpDrive,<% } %>
|
|
47
49
|
eslintConfigPrettier,
|
|
48
50
|
/**
|
|
49
51
|
* Ignores must be in their own object
|
package/files/app/app.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useLegacyStore } from '@warp-drive/legacy';
|
|
2
|
+
import { JSONAPICache } from '@warp-drive/json-api';
|
|
3
|
+
|
|
4
|
+
const Store = useLegacyStore({
|
|
5
|
+
linksMode: true,
|
|
6
|
+
cache: JSONAPICache,
|
|
7
|
+
handlers: [
|
|
8
|
+
// -- your handlers here
|
|
9
|
+
],
|
|
10
|
+
schemas: [
|
|
11
|
+
// -- your schemas here
|
|
12
|
+
],
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
type Store = InstanceType<typeof Store>;
|
|
16
|
+
|
|
17
|
+
export default Store;
|
package/files/ember-cli-build.js
CHANGED
|
@@ -4,19 +4,22 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
|
|
4
4
|
const { compatBuild } = require('@embroider/compat');
|
|
5
5
|
|
|
6
6
|
module.exports = async function (defaults) {
|
|
7
|
-
const {
|
|
7
|
+
<% if (warpDrive) {%>const { setConfig } = await import('@warp-drive/core/build-config');
|
|
8
|
+
<% } %>const { buildOnce } = await import('@embroider/vite');
|
|
9
|
+
|
|
8
10
|
let app = new EmberApp(defaults, {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
// Add options here
|
|
12
|
+
});
|
|
13
|
+
<% if (warpDrive) {%>
|
|
14
|
+
setConfig(app, __dirname, {
|
|
15
|
+
// this should be the most recent <major>.<minor> version for
|
|
16
|
+
// which all deprecations have been fully resolved
|
|
17
|
+
// and should be updated when that changes
|
|
18
|
+
compatWith: '5.8',
|
|
19
|
+
deprecations: {
|
|
20
|
+
// ... list individual deprecations that have been resolved here
|
|
17
21
|
},
|
|
18
|
-
<% } %>// Add options here
|
|
19
22
|
});
|
|
20
|
-
|
|
23
|
+
<% } %>
|
|
21
24
|
return compatBuild(app, buildOnce);
|
|
22
25
|
};
|
package/files/package.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"lint:hbs:fix": "ember-template-lint . --fix",
|
|
23
23
|
"lint:js": "eslint . --cache",
|
|
24
24
|
"lint:js:fix": "eslint . --fix<% if (typescript) { %>",
|
|
25
|
-
"lint:types": "
|
|
25
|
+
"lint:types": "ember-tsc --noEmit<% } %>",
|
|
26
26
|
"start": "vite",
|
|
27
27
|
"test": "vite build --mode development && ember test --path dist"
|
|
28
28
|
},
|
|
@@ -35,16 +35,7 @@
|
|
|
35
35
|
"@babel/runtime": "^7.28.4",
|
|
36
36
|
"@babel/plugin-transform-runtime": "^7.28.3<% if (typescript) { %>",
|
|
37
37
|
"@babel/plugin-transform-typescript": "^7.28.0<% } %>",
|
|
38
|
-
"@babel/eslint-parser": "^7.28.4<% if (typescript
|
|
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) { %>",
|
|
38
|
+
"@babel/eslint-parser": "^7.28.4<% if (typescript) { %>",
|
|
48
39
|
"@ember/app-tsconfig": "^1.0.3<% } %>",
|
|
49
40
|
"@ember/optional-features": "^2.2.0",
|
|
50
41
|
"@ember/string": "^4.0.1",
|
|
@@ -59,36 +50,38 @@
|
|
|
59
50
|
"@embroider/legacy-inspector-support": "^0.1.3",
|
|
60
51
|
"@eslint/js": "^9.37.0",
|
|
61
52
|
"@glimmer/component": "^2.0.0<% if (typescript) { %>",
|
|
62
|
-
"@glint/
|
|
63
|
-
"@glint/
|
|
64
|
-
"@glint/
|
|
65
|
-
"@glint/template": "^1.6.1<% } %>",
|
|
53
|
+
"@glint/ember-tsc": "^1.0.4",
|
|
54
|
+
"@glint/template": "^1.6.2",
|
|
55
|
+
"@glint/tsserver-plugin": "^2.0.4<% } %>",
|
|
66
56
|
"@rollup/plugin-babel": "^6.0.4<% if (typescript) { %>",
|
|
67
57
|
"@types/qunit": "^2.19.13",
|
|
68
|
-
"@types/rsvp": "^4.0.9<% if (
|
|
69
|
-
"@warp-drive/core
|
|
70
|
-
"@warp-drive/ember": "
|
|
58
|
+
"@types/rsvp": "^4.0.9<% } %><% if (warpDrive) { %>",
|
|
59
|
+
"@warp-drive/core": "5.8.0",
|
|
60
|
+
"@warp-drive/ember": "5.8.0",
|
|
61
|
+
"@warp-drive/json-api": "5.8.0",
|
|
62
|
+
"@warp-drive/legacy": "5.8.0",
|
|
63
|
+
"@warp-drive/utilities": "5.8.0<% } %>",
|
|
71
64
|
"babel-plugin-ember-template-compilation": "^2.4.1",
|
|
72
65
|
"concurrently": "^9.2.1",
|
|
73
66
|
"decorator-transforms": "^2.3.0",
|
|
74
67
|
"ember-auto-import": "^2.11.1",
|
|
75
68
|
"ember-cli": "~6.9.0-alpha.1",
|
|
76
69
|
"ember-cli-babel": "^8.2.0",
|
|
77
|
-
"ember-cli-deprecation-workflow": "^3.4.0
|
|
78
|
-
"ember-data": "~5.6.0<% } %>",
|
|
70
|
+
"ember-cli-deprecation-workflow": "^3.4.0",
|
|
79
71
|
"ember-load-initializers": "^3.0.1",
|
|
80
72
|
"ember-modifier": "^4.2.2",
|
|
81
73
|
"ember-page-title": "^9.0.3",
|
|
82
74
|
"ember-qunit": "^9.0.4",
|
|
83
75
|
"ember-resolver": "^13.1.1",
|
|
84
|
-
"ember-source": "~6.
|
|
76
|
+
"ember-source": "~6.10.0-alpha.1",
|
|
85
77
|
"ember-template-lint": "^7.9.3<% if (welcome) { %>",
|
|
86
78
|
"ember-welcome-page": "^7.0.2<% } %>",
|
|
87
79
|
"eslint": "^9.37.0",
|
|
88
80
|
"eslint-config-prettier": "^10.1.8",
|
|
89
81
|
"eslint-plugin-ember": "^12.7.4",
|
|
90
82
|
"eslint-plugin-n": "^17.23.1",
|
|
91
|
-
"eslint-plugin-qunit": "^8.2.5",
|
|
83
|
+
"eslint-plugin-qunit": "^8.2.5<% if (warpDrive) { %>",
|
|
84
|
+
"eslint-plugin-warp-drive": "5.8.0<% } %>",
|
|
92
85
|
"globals": "^16.4.0",
|
|
93
86
|
"prettier": "^3.6.2",
|
|
94
87
|
"prettier-plugin-ember-template-tag": "^2.1.0",
|
package/files/tsconfig.json
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "@ember/app-tsconfig",
|
|
3
3
|
"include": ["app", "tests", "types"],
|
|
4
|
-
"glint": {
|
|
5
|
-
"environment": ["ember-loose", "ember-template-imports"]
|
|
6
|
-
},
|
|
7
4
|
"compilerOptions": {
|
|
8
5
|
"allowJs": true,
|
|
9
6
|
"paths": {
|
|
@@ -11,6 +8,11 @@
|
|
|
11
8
|
"<%= name %>/*": ["./app/*"],
|
|
12
9
|
"*": ["./types/*"]
|
|
13
10
|
},
|
|
14
|
-
"types": [
|
|
11
|
+
"types": [
|
|
12
|
+
"ember-source/types",
|
|
13
|
+
"@embroider/core/virtual",
|
|
14
|
+
"vite/client",
|
|
15
|
+
"@glint/ember-tsc/types"
|
|
16
|
+
]
|
|
15
17
|
}
|
|
16
18
|
}
|
package/index.js
CHANGED
|
@@ -40,6 +40,7 @@ module.exports = {
|
|
|
40
40
|
options.ciProvider && `"--ci-provider=${options.ciProvider}"`,
|
|
41
41
|
options.typescript && `"--typescript"`,
|
|
42
42
|
!options.emberData && `"--no-ember-data"`,
|
|
43
|
+
!options.warpDrive && `"--no-warp-drive"`,
|
|
43
44
|
]
|
|
44
45
|
.filter(Boolean)
|
|
45
46
|
.join(',\n ') +
|
|
@@ -75,7 +76,7 @@ module.exports = {
|
|
|
75
76
|
blueprint: 'app',
|
|
76
77
|
blueprintOptions,
|
|
77
78
|
lang: options.lang,
|
|
78
|
-
|
|
79
|
+
warpDrive: options.warpDrive ?? options.emberData,
|
|
79
80
|
ciProvider: options.ciProvider,
|
|
80
81
|
typescript: options.typescript,
|
|
81
82
|
packageManager: options.packageManager ?? 'npm',
|
|
@@ -101,9 +102,11 @@ module.exports = {
|
|
|
101
102
|
);
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
files = files.filter((file) => !file.includes('
|
|
105
|
+
const warpDrive = options.warpDrive || options.emberData;
|
|
106
|
+
if (!warpDrive) {
|
|
107
|
+
files = files.filter((file) => !file.includes('services/store.ts'));
|
|
108
|
+
} else {
|
|
109
|
+
files = files.filter((file) => !file.includes('services/.gitkeep'));
|
|
107
110
|
}
|
|
108
111
|
|
|
109
112
|
this._files = files;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember/app-blueprint",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.0-alpha.2",
|
|
4
4
|
"description": "Blueprint for next generation of Ember apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-blueprint"
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"minor": "prerelease",
|
|
18
18
|
"patch": "prerelease"
|
|
19
19
|
},
|
|
20
|
-
"semverIncrementTag": "
|
|
21
|
-
"publishTag": "
|
|
20
|
+
"semverIncrementTag": "alpha",
|
|
21
|
+
"publishTag": "alpha"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"chalk": "^4.1.2",
|
package/tests/arguments.test.mjs
CHANGED
|
@@ -108,15 +108,31 @@ describe('Blueprint Arguments', function () {
|
|
|
108
108
|
it('installs ember-data by default', async function () {
|
|
109
109
|
const { files } = await generateApp();
|
|
110
110
|
|
|
111
|
-
expect(parse(files['package.json']).devDependencies['
|
|
112
|
-
.be.undefined;
|
|
111
|
+
expect(parse(files['package.json']).devDependencies['@warp-drive/core'])
|
|
112
|
+
.to.not.be.undefined;
|
|
113
113
|
});
|
|
114
114
|
|
|
115
115
|
it('does not add ember-data if you pass --no-ember-data', async function () {
|
|
116
116
|
const { files } = await generateApp({ flags: ['--no-ember-data'] });
|
|
117
117
|
|
|
118
|
-
expect(parse(files['package.json']).devDependencies['
|
|
119
|
-
.undefined;
|
|
118
|
+
expect(parse(files['package.json']).devDependencies['@warp-drive/core'])
|
|
119
|
+
.to.be.undefined;
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
describe('--no-warp-drive', async function () {
|
|
124
|
+
it('installs warp-drive by default', async function () {
|
|
125
|
+
const { files } = await generateApp();
|
|
126
|
+
|
|
127
|
+
expect(parse(files['package.json']).devDependencies['@warp-drive/core'])
|
|
128
|
+
.to.not.be.undefined;
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it('does not add warp-drive if you pass --no-warp-drive', async function () {
|
|
132
|
+
const { files } = await generateApp({ flags: ['--no-warp-drive'] });
|
|
133
|
+
|
|
134
|
+
expect(parse(files['package.json']).devDependencies['@warp-drive/core'])
|
|
135
|
+
.to.be.undefined;
|
|
120
136
|
});
|
|
121
137
|
});
|
|
122
138
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Route from '@ember/routing/route';
|
|
2
|
+
import { service } from '@ember/service';
|
|
3
|
+
|
|
4
|
+
export default class ApplicationRoute extends Route {
|
|
5
|
+
@service store;
|
|
6
|
+
|
|
7
|
+
model() {
|
|
8
|
+
return {
|
|
9
|
+
person: this.store.request({
|
|
10
|
+
url: 'https://swapi.dev/api/people/1',
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useLegacyStore } from '@warp-drive/legacy';
|
|
2
|
+
import { JSONAPICache } from '@warp-drive/json-api';
|
|
3
|
+
import { withDefaults } from '@warp-drive/legacy/model/migration-support';
|
|
4
|
+
|
|
5
|
+
const Store = useLegacyStore({
|
|
6
|
+
linksMode: true,
|
|
7
|
+
cache: JSONAPICache,
|
|
8
|
+
handlers: [
|
|
9
|
+
{
|
|
10
|
+
request() {
|
|
11
|
+
return Promise.resolve({
|
|
12
|
+
data: {
|
|
13
|
+
type: 'person',
|
|
14
|
+
id: '1',
|
|
15
|
+
attributes: { name: 'Luke Skywalker' },
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
schemas: [
|
|
22
|
+
// -- your schemas here
|
|
23
|
+
withDefaults({
|
|
24
|
+
type: 'person',
|
|
25
|
+
fields: [{ kind: 'field', name: 'name' }],
|
|
26
|
+
}),
|
|
27
|
+
],
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export default Store;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { pageTitle } from 'ember-page-title';
|
|
2
|
+
import { Request } from '@warp-drive/ember';
|
|
3
|
+
|
|
4
|
+
<template>
|
|
5
|
+
{{pageTitle "MyTestApp"}}
|
|
6
|
+
|
|
7
|
+
{{outlet}}
|
|
8
|
+
|
|
9
|
+
{{! The following component displays Ember's default welcome message. }}
|
|
10
|
+
<Request @request={{@model.person}}>
|
|
11
|
+
<:loading>
|
|
12
|
+
<p>Loading person...</p>
|
|
13
|
+
</:loading>
|
|
14
|
+
<:error as |error|>
|
|
15
|
+
<p>Error loading person: {{error.message}}</p>
|
|
16
|
+
</:error>
|
|
17
|
+
<:content as |result|>
|
|
18
|
+
<h1>Welcome {{result.data.name}}</h1>
|
|
19
|
+
</:content>
|
|
20
|
+
</Request>
|
|
21
|
+
{{! Feel free to remove this! }}
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { module, test } from 'qunit';
|
|
2
|
+
import { setupApplicationTest } from 'ember-qunit';
|
|
3
|
+
import { visit } from '@ember/test-helpers';
|
|
4
|
+
|
|
5
|
+
module('Application | index', function (hooks) {
|
|
6
|
+
setupApplicationTest(hooks);
|
|
7
|
+
|
|
8
|
+
test('visiting / shows welcome message', async function (assert) {
|
|
9
|
+
await visit('/');
|
|
10
|
+
|
|
11
|
+
assert.dom('h1').hasText('Welcome Luke Skywalker');
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Route from '@ember/routing/route';
|
|
2
|
+
import { service } from '@ember/service';
|
|
3
|
+
import { withReactiveResponse } from '@warp-drive/core/request';
|
|
4
|
+
import type { Type } from '@warp-drive/core/types/symbols';
|
|
5
|
+
import type Store from 'test-app/services/store';
|
|
6
|
+
|
|
7
|
+
export interface Person {
|
|
8
|
+
id: string;
|
|
9
|
+
$type: 'person';
|
|
10
|
+
name: string;
|
|
11
|
+
[Type]: 'person';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default class ApplicationRoute extends Route {
|
|
15
|
+
@service declare store: Store;
|
|
16
|
+
|
|
17
|
+
model() {
|
|
18
|
+
return {
|
|
19
|
+
person: this.store.request(
|
|
20
|
+
withReactiveResponse<Person>({
|
|
21
|
+
url: 'https://swapi.dev/api/people/1',
|
|
22
|
+
}),
|
|
23
|
+
),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useLegacyStore } from '@warp-drive/legacy';
|
|
2
|
+
import { JSONAPICache } from '@warp-drive/json-api';
|
|
3
|
+
import { withDefaults } from '@warp-drive/legacy/model/migration-support';
|
|
4
|
+
|
|
5
|
+
const Store = useLegacyStore({
|
|
6
|
+
linksMode: true,
|
|
7
|
+
cache: JSONAPICache,
|
|
8
|
+
handlers: [
|
|
9
|
+
{
|
|
10
|
+
request<T>(): Promise<T> {
|
|
11
|
+
return Promise.resolve({
|
|
12
|
+
data: {
|
|
13
|
+
type: 'person',
|
|
14
|
+
id: '1',
|
|
15
|
+
attributes: { name: 'Luke Skywalker' }
|
|
16
|
+
},
|
|
17
|
+
} as T);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
schemas: [
|
|
22
|
+
// -- your schemas here
|
|
23
|
+
withDefaults({
|
|
24
|
+
type: 'person',
|
|
25
|
+
fields: [{ kind: 'field', name: 'name' }],
|
|
26
|
+
}),
|
|
27
|
+
],
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
type Store = InstanceType<typeof Store>;
|
|
31
|
+
|
|
32
|
+
export default Store;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { pageTitle } from 'ember-page-title';
|
|
2
|
+
import { Request } from '@warp-drive/ember';
|
|
3
|
+
import type { TOC } from '@ember/component/template-only';
|
|
4
|
+
import type { Future } from '@warp-drive/core/request';
|
|
5
|
+
import type { ReactiveDataDocument } from '@warp-drive/core/reactive';
|
|
6
|
+
import type { Person } from 'test-app/routes/application';
|
|
7
|
+
|
|
8
|
+
const Route: TOC<{ Args: {
|
|
9
|
+
model: {
|
|
10
|
+
person: Future<ReactiveDataDocument<Person>>
|
|
11
|
+
}
|
|
12
|
+
} }> = <template>
|
|
13
|
+
{{pageTitle "MyTestApp"}}
|
|
14
|
+
|
|
15
|
+
{{outlet}}
|
|
16
|
+
|
|
17
|
+
{{! The following component displays Ember's default welcome message. }}
|
|
18
|
+
<Request @request={{@model.person}}>
|
|
19
|
+
<:loading>
|
|
20
|
+
<p>Loading person...</p>
|
|
21
|
+
</:loading>
|
|
22
|
+
<:error as |error|>
|
|
23
|
+
<p>Error loading person: {{error.message}}</p>
|
|
24
|
+
</:error>
|
|
25
|
+
<:content as |result|>
|
|
26
|
+
<h1>Welcome {{result.data.name}}</h1>
|
|
27
|
+
</:content>
|
|
28
|
+
</Request>
|
|
29
|
+
{{! Feel free to remove this! }}
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
export default Route;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { module, test } from 'qunit';
|
|
2
|
+
import { setupApplicationTest } from 'ember-qunit';
|
|
3
|
+
import { visit } from '@ember/test-helpers';
|
|
4
|
+
|
|
5
|
+
module('Application | index', function (hooks) {
|
|
6
|
+
setupApplicationTest(hooks);
|
|
7
|
+
|
|
8
|
+
test('visiting / shows welcome message', async function (assert) {
|
|
9
|
+
await visit('/');
|
|
10
|
+
|
|
11
|
+
assert.dom('h1').hasText('Welcome Luke Skywalker');
|
|
12
|
+
});
|
|
13
|
+
});
|
package/tests/lint.test.mjs
CHANGED
|
@@ -56,7 +56,7 @@ describe('linting & formatting', function () {
|
|
|
56
56
|
it('glint passes', async function () {
|
|
57
57
|
expect(
|
|
58
58
|
JSON.parse(app.files['package.json']).scripts['lint:types'],
|
|
59
|
-
).to.equal('
|
|
59
|
+
).to.equal('ember-tsc --noEmit');
|
|
60
60
|
|
|
61
61
|
let { exitCode, stdout } = await app.execa('pnpm', ['lint:types']);
|
|
62
62
|
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { describe, it, expect, beforeAll } from 'vitest';
|
|
2
|
+
import fixturify from 'fixturify';
|
|
3
|
+
|
|
4
|
+
import { generateApp } from './helpers.mjs';
|
|
5
|
+
|
|
6
|
+
it('Slow(JavaScript): Runs tests', async function () {
|
|
7
|
+
let app = await generateApp({
|
|
8
|
+
flags: ['--pnpm', '--typescript'],
|
|
9
|
+
skipNpm: false,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
fixturify.writeSync(
|
|
13
|
+
app.dir,
|
|
14
|
+
fixturify.readSync('./tests/fixtures/warpdrive-js'),
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
let { stdout: stdout2, exitCode: exitCode2 } = await app.execa('pnpm', [
|
|
18
|
+
'test',
|
|
19
|
+
]);
|
|
20
|
+
|
|
21
|
+
if (!process.env.CI) {
|
|
22
|
+
console.log(stdout2);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
expect(stdout2).to.match(/ok .* Application \| index/);
|
|
26
|
+
expect(stdout2).to.match(/ok .* Ember.onerror/);
|
|
27
|
+
|
|
28
|
+
expect(stdout2).to.contain('# tests 2');
|
|
29
|
+
expect(stdout2).to.contain('# pass 2');
|
|
30
|
+
expect(stdout2).to.contain('# skip 0');
|
|
31
|
+
expect(stdout2).to.contain('# todo 0');
|
|
32
|
+
expect(stdout2).to.contain('# ok');
|
|
33
|
+
|
|
34
|
+
expect(exitCode2).to.equal(0);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('Slow(TypeScript): Runs tests', async function () {
|
|
38
|
+
let app = await generateApp({
|
|
39
|
+
flags: ['--pnpm', '--typescript'],
|
|
40
|
+
skipNpm: false,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
fixturify.writeSync(
|
|
44
|
+
app.dir,
|
|
45
|
+
fixturify.readSync('./tests/fixtures/warpdrive-ts'),
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
let { stdout: stdout2, exitCode: exitCode2 } = await app.execa('pnpm', [
|
|
49
|
+
'test',
|
|
50
|
+
]);
|
|
51
|
+
|
|
52
|
+
if (!process.env.CI) {
|
|
53
|
+
console.log(stdout2);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
expect(stdout2).to.match(/ok .* Application \| index/);
|
|
57
|
+
expect(stdout2).to.match(/ok .* Ember.onerror/);
|
|
58
|
+
|
|
59
|
+
expect(stdout2).to.contain('# tests 2');
|
|
60
|
+
expect(stdout2).to.contain('# pass 2');
|
|
61
|
+
expect(stdout2).to.contain('# skip 0');
|
|
62
|
+
expect(stdout2).to.contain('# todo 0');
|
|
63
|
+
expect(stdout2).to.contain('# ok');
|
|
64
|
+
expect(exitCode2).to.equal(0);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
describe('linting & formatting', function () {
|
|
68
|
+
describe('JavaScript', function () {
|
|
69
|
+
let app;
|
|
70
|
+
|
|
71
|
+
beforeAll(async function () {
|
|
72
|
+
/**
|
|
73
|
+
* We are passing --pnpm here because it's just faster to run in CI and realistically
|
|
74
|
+
* we don't need to worry about the differences between pnpm and npm at this level
|
|
75
|
+
*/
|
|
76
|
+
app = await generateApp({ flags: ['--pnpm'], skipNpm: false });
|
|
77
|
+
fixturify.writeSync(
|
|
78
|
+
app.dir,
|
|
79
|
+
fixturify.readSync('./tests/fixtures/warpdrive-js'),
|
|
80
|
+
);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it('yields output without errors', async function (context) {
|
|
84
|
+
// Lint errors on windows machines - probably because of line-endings.
|
|
85
|
+
// TODO fix the config so that a newly generated app doens't fail lint on windows
|
|
86
|
+
if (process.platform === 'win32') {
|
|
87
|
+
context.skip();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
let { exitCode } = await app.execa('pnpm', ['lint']);
|
|
91
|
+
|
|
92
|
+
expect(exitCode).to.equal(0);
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
describe('TypeScript', function () {
|
|
97
|
+
let app;
|
|
98
|
+
|
|
99
|
+
beforeAll(async function () {
|
|
100
|
+
/**
|
|
101
|
+
* We are passing --pnpm here because it's just faster to run in CI and realistically
|
|
102
|
+
* we don't need to worry about the differences between pnpm and npm at this level
|
|
103
|
+
*/
|
|
104
|
+
app = await generateApp({
|
|
105
|
+
flags: ['--typescript', '--pnpm'],
|
|
106
|
+
skipNpm: false,
|
|
107
|
+
});
|
|
108
|
+
fixturify.writeSync(
|
|
109
|
+
app.dir,
|
|
110
|
+
fixturify.readSync('./tests/fixtures/warpdrive-js'),
|
|
111
|
+
);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
it('yields output without errors', async function (context) {
|
|
115
|
+
// Lint errors on windows machines - probably because of line-endings.
|
|
116
|
+
// TODO fix the config so that a newly generated app doens't fail lint on windows
|
|
117
|
+
if (process.platform === 'win32') {
|
|
118
|
+
context.skip();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
let { exitCode } = await app.execa('pnpm', ['lint']);
|
|
122
|
+
|
|
123
|
+
expect(exitCode).to.equal(0);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it('glint passes', async function () {
|
|
127
|
+
expect(
|
|
128
|
+
JSON.parse(app.files['package.json']).scripts['lint:types'],
|
|
129
|
+
).to.equal('ember-tsc --noEmit');
|
|
130
|
+
|
|
131
|
+
let { exitCode, stdout } = await app.execa('pnpm', ['lint:types']);
|
|
132
|
+
|
|
133
|
+
console.log(stdout);
|
|
134
|
+
expect(exitCode).to.equal(0);
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
});
|
|
File without changes
|