ember.nvp 0.2.0 → 0.2.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/publish.yml +2 -3
- package/.release-plan.json +4 -12
- package/CHANGELOG.md +16 -0
- package/package.json +6 -6
- package/src/bases/minimal-app/files/app/config.ts +0 -13
- package/src/bases/minimal-app/files/babel.config.js +7 -1
- package/src/layers/qunit/files/tests/test-helper.ts +6 -2
- package/src/layers/qunit/files/tests/unit/macros-test.ts +26 -0
- package/src/layers/qunit/index.js +1 -1
- package/src/layers/qunit/files/tests/unit/.gitkeep +0 -0
|
@@ -27,13 +27,12 @@ jobs:
|
|
|
27
27
|
|
|
28
28
|
steps:
|
|
29
29
|
- uses: actions/checkout@v6
|
|
30
|
-
- uses: pnpm/action-setup@
|
|
30
|
+
- uses: pnpm/action-setup@v5
|
|
31
31
|
- uses: actions/setup-node@v6
|
|
32
32
|
with:
|
|
33
|
-
node-version:
|
|
33
|
+
node-version: 24
|
|
34
34
|
registry-url: "https://registry.npmjs.org"
|
|
35
35
|
cache: pnpm
|
|
36
|
-
- run: npm install -g npm@latest # ensure that the globally installed npm is new enough to support OIDC
|
|
37
36
|
- run: pnpm install --frozen-lockfile
|
|
38
37
|
- name: Publish to NPM
|
|
39
38
|
run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish
|
package/.release-plan.json
CHANGED
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"solution": {
|
|
3
3
|
"ember.nvp": {
|
|
4
|
-
"impact": "
|
|
5
|
-
"oldVersion": "0.
|
|
6
|
-
"newVersion": "0.2.
|
|
4
|
+
"impact": "patch",
|
|
5
|
+
"oldVersion": "0.2.0",
|
|
6
|
+
"newVersion": "0.2.1",
|
|
7
7
|
"tagName": "latest",
|
|
8
8
|
"constraints": [
|
|
9
|
-
{
|
|
10
|
-
"impact": "minor",
|
|
11
|
-
"reason": "Appears in changelog section :rocket: Enhancement"
|
|
12
|
-
},
|
|
13
9
|
{
|
|
14
10
|
"impact": "patch",
|
|
15
11
|
"reason": "Appears in changelog section :bug: Bug Fix"
|
|
16
12
|
},
|
|
17
|
-
{
|
|
18
|
-
"impact": "patch",
|
|
19
|
-
"reason": "Appears in changelog section :memo: Documentation"
|
|
20
|
-
},
|
|
21
13
|
{
|
|
22
14
|
"impact": "patch",
|
|
23
15
|
"reason": "Appears in changelog section :house: Internal"
|
|
@@ -26,5 +18,5 @@
|
|
|
26
18
|
"pkgJSONPath": "./package.json"
|
|
27
19
|
}
|
|
28
20
|
},
|
|
29
|
-
"description": "## Release (2026-
|
|
21
|
+
"description": "## Release (2026-05-15)\n\n* ember.nvp 0.2.1 (patch)\n\n#### :bug: Bug Fix\n* `ember.nvp`\n * [#29](https://github.com/NullVoxPopuli/ember.nvp/pull/29) Fix production vite build broken by setTesting in app/config.ts ([@Copilot](https://github.com/apps/copilot-swe-agent))\n\n#### :house: Internal\n* `ember.nvp`\n * [#31](https://github.com/NullVoxPopuli/ember.nvp/pull/31) Update release-plan ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### Committers: 2\n- Copilot [Bot] ([@copilot-swe-agent](https://github.com/apps/copilot-swe-agent))\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n"
|
|
30
22
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Release (2026-05-15)
|
|
4
|
+
|
|
5
|
+
* ember.nvp 0.2.1 (patch)
|
|
6
|
+
|
|
7
|
+
#### :bug: Bug Fix
|
|
8
|
+
* `ember.nvp`
|
|
9
|
+
* [#29](https://github.com/NullVoxPopuli/ember.nvp/pull/29) Fix production vite build broken by setTesting in app/config.ts ([@Copilot](https://github.com/apps/copilot-swe-agent))
|
|
10
|
+
|
|
11
|
+
#### :house: Internal
|
|
12
|
+
* `ember.nvp`
|
|
13
|
+
* [#31](https://github.com/NullVoxPopuli/ember.nvp/pull/31) Update release-plan ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
14
|
+
|
|
15
|
+
#### Committers: 2
|
|
16
|
+
- Copilot [Bot] ([@copilot-swe-agent](https://github.com/apps/copilot-swe-agent))
|
|
17
|
+
- [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
18
|
+
|
|
3
19
|
## Release (2026-01-28)
|
|
4
20
|
|
|
5
21
|
* ember.nvp 0.2.0 (minor)
|
package/package.json
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember.nvp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "ember project generator, alternative to the official blueprints, but more modern -- hopefully one day to upstream back in to ember-cli / official blueprints",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git@github.com:NullVoxPopuli/ember.nvp.git"
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
|
-
"bin": "./src/cli/index.js",
|
|
11
|
-
"exports": "./src/index.js",
|
|
12
10
|
"imports": {
|
|
13
11
|
"#args": "./src/cli/args.js",
|
|
14
12
|
"#bases/*": "./src/bases/*/index.js",
|
|
@@ -18,6 +16,8 @@
|
|
|
18
16
|
"#utils/*": "./src/utils/*",
|
|
19
17
|
"#test-helpers": "./test/test-helpers.ts"
|
|
20
18
|
},
|
|
19
|
+
"exports": "./src/index.js",
|
|
20
|
+
"bin": "./src/cli/index.js",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@clack/prompts": "^0.11.0",
|
|
23
23
|
"babel-remove-types": "^1.1.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"ember-source": "^6.10.0",
|
|
38
38
|
"prettier": "^3.7.4",
|
|
39
39
|
"prettier-plugin-ember-template-tag": "^2.1.2",
|
|
40
|
-
"release-plan": "^0.
|
|
40
|
+
"release-plan": "^0.18.0",
|
|
41
41
|
"rimraf": "^6.1.2",
|
|
42
42
|
"vite": "^7.3.1",
|
|
43
43
|
"vitest": "^4.0.17"
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"node": ">= 24"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
|
+
"format": "prettier . --write",
|
|
49
50
|
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
|
|
50
51
|
"lint:fix": "pnpm format",
|
|
51
|
-
"lint:types": "tsc --noEmit",
|
|
52
|
-
"format": "prettier . --write",
|
|
53
52
|
"lint:format": "prettier . --check",
|
|
53
|
+
"lint:types": "tsc --noEmit",
|
|
54
54
|
"new": "./test/manual.sh",
|
|
55
55
|
"test:node": "FORCE_COLOR=1 vitest run --reporter=verbose --printConsoleTrace",
|
|
56
56
|
"test:vitest": "FORCE_COLOR=1 vitest"
|
|
@@ -15,16 +15,3 @@ const ENV: Config = {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export default ENV;
|
|
18
|
-
|
|
19
|
-
// @ts-expect-error: Ignoreing private API
|
|
20
|
-
import { getGlobalConfig } from "@embroider/macros/src/addon/runtime";
|
|
21
|
-
|
|
22
|
-
export function enterTestMode() {
|
|
23
|
-
ENV.locationType = "none";
|
|
24
|
-
ENV.APP.rootElement = "#ember-testing";
|
|
25
|
-
ENV.APP.autoboot = false;
|
|
26
|
-
|
|
27
|
-
const theMacrosGlobal = getGlobalConfig();
|
|
28
|
-
theMacrosGlobal["@embroider/macros"] ||= {};
|
|
29
|
-
theMacrosGlobal["@embroider/macros"].isTesting ||= true;
|
|
30
|
-
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { buildMacros } from "@embroider/macros/babel";
|
|
2
2
|
|
|
3
|
-
const macros = buildMacros(
|
|
3
|
+
const macros = buildMacros({
|
|
4
|
+
configure(config) {
|
|
5
|
+
if (process.env.EMBER_ENV === "test") {
|
|
6
|
+
config.enableRuntimeMode();
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
});
|
|
4
10
|
|
|
5
11
|
export default {
|
|
6
12
|
plugins: [
|
|
@@ -11,12 +11,13 @@ import { getPendingWaiterState } from "@ember/test-waiters";
|
|
|
11
11
|
import * as QUnit from "qunit";
|
|
12
12
|
import { setup } from "qunit-dom";
|
|
13
13
|
import { setupEmberOnerrorValidation, start as qunitStart } from "ember-qunit";
|
|
14
|
+
import { setTesting } from "@embroider/macros";
|
|
14
15
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
15
16
|
// @ts-expect-error
|
|
16
17
|
import { getGlobalConfig } from "@embroider/macros/src/addon/runtime";
|
|
17
18
|
|
|
18
19
|
import Application from "#app/app";
|
|
19
|
-
import config
|
|
20
|
+
import config from "#config";
|
|
20
21
|
|
|
21
22
|
Object.assign(window, {
|
|
22
23
|
visit,
|
|
@@ -39,7 +40,10 @@ Object.assign(window, {
|
|
|
39
40
|
});
|
|
40
41
|
|
|
41
42
|
export function start() {
|
|
42
|
-
|
|
43
|
+
config.locationType = "none";
|
|
44
|
+
config.APP.rootElement = "#ember-testing";
|
|
45
|
+
config.APP.autoboot = false;
|
|
46
|
+
setTesting(true);
|
|
43
47
|
|
|
44
48
|
const theMacrosGlobal = getGlobalConfig();
|
|
45
49
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { module, test } from "qunit";
|
|
2
|
+
import { isTesting } from "@embroider/macros";
|
|
3
|
+
import { assert as emberAssert } from "@ember/debug";
|
|
4
|
+
|
|
5
|
+
module("@embroider/macros | runtime mode in tests", function () {
|
|
6
|
+
/**
|
|
7
|
+
* In compile-time mode `isTesting()` is inlined as `false` at build time,
|
|
8
|
+
* regardless of what the runtime global config says. Only when the test
|
|
9
|
+
* build runs the macros plugin in runtime mode (see babel.config.js +
|
|
10
|
+
* EMBER_ENV=test) does `isTesting()` reflect the value set by
|
|
11
|
+
* `setTesting(true)` in tests/test-helper.ts.
|
|
12
|
+
*/
|
|
13
|
+
test("isTesting() is true", function (assert) {
|
|
14
|
+
assert.strictEqual(isTesting(), true);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* `@ember/debug`'s `assert(description, condition)` is only active when
|
|
19
|
+
* DEBUG is true (i.e. non-production builds). Assertions are stripped
|
|
20
|
+
* from production bundles, so this also doubles as a sanity check that
|
|
21
|
+
* the test build keeps DEBUG enabled.
|
|
22
|
+
*/
|
|
23
|
+
test("@ember/debug assert throws when the condition is false", function (assert) {
|
|
24
|
+
assert.throws(() => emberAssert("string", false));
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
// Add scripts
|
|
39
39
|
await packageJson.addScripts(
|
|
40
40
|
{
|
|
41
|
-
"build:test": "vite build --mode development",
|
|
41
|
+
"build:test": "EMBER_ENV=test NODE_ENV=development vite build --mode development",
|
|
42
42
|
"test:ci": "testem ci --port 0",
|
|
43
43
|
test: "pnpm build:test && pnpm test:ci",
|
|
44
44
|
},
|
|
File without changes
|