ember.nvp 1.6.0 → 1.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.
Files changed (99) hide show
  1. package/.github/workflows/ci.yml +5 -1
  2. package/.release-plan.json +51 -9
  3. package/CHANGELOG.md +30 -0
  4. package/README.md +41 -28
  5. package/RELEASE.md +16 -14
  6. package/package.json +1 -1
  7. package/packages/build-tooling-utils/README.md +7 -12
  8. package/packages/build-tooling-utils/package.json +1 -1
  9. package/packages/build-tooling-utils/src/extensions.ts +4 -3
  10. package/packages/build-tooling-utils/src/maybe-babel.ts +18 -15
  11. package/packages/rolldown/README.md +138 -98
  12. package/packages/rolldown/index.ts +66 -28
  13. package/packages/rolldown/package.json +1 -1
  14. package/packages/rolldown/src/app-reexports.test.ts +4 -3
  15. package/packages/rolldown/src/app-reexports.ts +37 -27
  16. package/packages/rolldown/src/babel.test.ts +10 -5
  17. package/packages/rolldown/src/babel.ts +117 -72
  18. package/packages/rolldown/src/bundle.test.ts +149 -0
  19. package/packages/rolldown/src/bundle.ts +71 -0
  20. package/packages/rolldown/src/config.ts +42 -18
  21. package/packages/rolldown/src/dts.test.ts +42 -26
  22. package/packages/rolldown/src/externals.test.ts +16 -11
  23. package/packages/rolldown/src/externals.ts +45 -28
  24. package/packages/rolldown/src/isolated-declarations.ts +56 -43
  25. package/packages/rolldown/src/plugin-like.ts +18 -15
  26. package/packages/rolldown/src/published-types.test.ts +18 -13
  27. package/packages/rolldown/src/transform.test.ts +26 -17
  28. package/packages/rolldown/src/transform.ts +68 -48
  29. package/packages/vite/README.md +10 -11
  30. package/packages/vite/package.json +1 -1
  31. package/packages/vite/src/ember.ts +44 -36
  32. package/packages/vite/src/test-html.ts +13 -11
  33. package/src/bases/README.md +6 -3
  34. package/src/bases/minimal-app/app.test.ts +7 -4
  35. package/src/bases/minimal-app/files/app/app.ts +2 -3
  36. package/src/bases/minimal-app/files/app/router.ts +3 -3
  37. package/src/bases/minimal-app/index.js +10 -6
  38. package/src/bases/minimal-custom-element/files/README.md +95 -0
  39. package/src/bases/minimal-custom-element/files/package.json +47 -0
  40. package/src/bases/minimal-custom-element/files/src/components/counter.gts +27 -0
  41. package/src/bases/minimal-custom-element/files/src/element.ts +45 -0
  42. package/src/bases/minimal-custom-element/files/src/index.ts +2 -0
  43. package/src/bases/minimal-custom-element/files/src/register.ts +5 -0
  44. package/src/bases/minimal-custom-element/files/tsconfig.json +10 -0
  45. package/src/bases/minimal-custom-element/files/tsdown.config.js +7 -0
  46. package/src/bases/minimal-custom-element/index.js +212 -0
  47. package/src/bases/minimal-extension/files/README.md +13 -5
  48. package/src/bases/minimal-extension/files/app/app.ts +2 -3
  49. package/src/bases/minimal-extension/files/app/config.ts +5 -3
  50. package/src/bases/minimal-extension/index.js +16 -11
  51. package/src/bases/minimal-library/files/README.md +8 -7
  52. package/src/bases/minimal-library/index.js +21 -15
  53. package/src/cli/args.js +1 -1
  54. package/src/cli/generator.js +4 -0
  55. package/src/cli/index.js +23 -18
  56. package/src/cli/questions/project-type.js +17 -2
  57. package/src/cli/questions/write.js +12 -10
  58. package/src/layers/are-the-types-wrong/index.js +6 -6
  59. package/src/layers/github-actions/index.js +7 -4
  60. package/src/layers/inspector-support/index.js +2 -2
  61. package/src/layers/publint/index.js +2 -2
  62. package/src/layers/qunit/index.js +21 -17
  63. package/src/layers/readme/index.js +55 -4
  64. package/src/layers/renovate/index.js +5 -5
  65. package/src/layers/typescript/index.js +20 -13
  66. package/src/layers/vitest/index.js +8 -4
  67. package/src/utils/babel.js +3 -2
  68. package/src/utils/buffer.js +2 -2
  69. package/src/utils/cli.js +4 -4
  70. package/src/utils/fs.js +23 -14
  71. package/src/utils/inspector-support.js +22 -19
  72. package/src/utils/npm.js +15 -12
  73. package/src/utils/project-type.js +19 -0
  74. package/src/utils/project.js +14 -2
  75. package/src/utils/remove-types.js +2 -4
  76. package/src/utils/rewrite-imports.js +43 -31
  77. package/src/utils/stage.js +44 -33
  78. package/src/utils/tsdown-config.js +6 -5
  79. package/src/utils/types.ts +10 -9
  80. package/test/ember.nvp/base-custom-element.test.ts +440 -0
  81. package/test/ember.nvp/base-library.test.ts +6 -4
  82. package/test/ember.nvp/generator-replace-or-update.test.ts +6 -4
  83. package/test/ember.nvp/inspector-support.test.ts +4 -3
  84. package/test/ember.nvp/layer-inspector-support.test.ts +2 -3
  85. package/test/ember.nvp/layer-publish-checks.test.ts +2 -3
  86. package/test/ember.nvp/layer-qunit.test.ts +2 -2
  87. package/test/ember.nvp/layer-readme.test.ts +63 -3
  88. package/test/ember.nvp/layer-vitest.test.ts +16 -9
  89. package/test/ember.nvp/layers-load.test.ts +26 -0
  90. package/test/ember.nvp/library-src-fixtures.ts +7 -3
  91. package/test/ember.nvp/permutations/custom-element-1.test.ts +3 -0
  92. package/test/ember.nvp/permutations/custom-element-2.test.ts +3 -0
  93. package/test/ember.nvp/permutations/custom-element-checks.test.ts +3 -0
  94. package/test/ember.nvp/permutations/shared.ts +22 -12
  95. package/test/ember.nvp/publish-configs.test.ts +44 -31
  96. package/test/ember.nvp/rewrite-imports.test.ts +4 -3
  97. package/test/ember.nvp/scoped-css-library.test.ts +6 -4
  98. package/test/test-helpers/permutate.test.ts +3 -3
  99. package/test/test-helpers.ts +12 -7
@@ -49,8 +49,12 @@ jobs:
49
49
  args: test/ember.nvp/permutations/extension-1.test.ts
50
50
  - name: extension permutations 2/2
51
51
  args: test/ember.nvp/permutations/extension-2.test.ts
52
+ - name: custom-element permutations 1/2
53
+ args: test/ember.nvp/permutations/custom-element-1.test.ts
54
+ - name: custom-element permutations 2/2
55
+ args: test/ember.nvp/permutations/custom-element-2.test.ts
52
56
  - name: check-layer permutations
53
- args: test/ember.nvp/permutations/app-checks.test.ts test/ember.nvp/permutations/library-checks.test.ts test/ember.nvp/permutations/extension-checks.test.ts
57
+ args: test/ember.nvp/permutations/app-checks.test.ts test/ember.nvp/permutations/library-checks.test.ts test/ember.nvp/permutations/extension-checks.test.ts test/ember.nvp/permutations/custom-element-checks.test.ts
54
58
  - name: everything else
55
59
  args: --exclude 'test/ember.nvp/permutations/**'
56
60
 
@@ -1,27 +1,69 @@
1
1
  {
2
2
  "solution": {
3
3
  "ember.nvp": {
4
- "impact": "minor",
5
- "oldVersion": "1.5.0",
6
- "newVersion": "1.6.0",
4
+ "impact": "patch",
5
+ "oldVersion": "1.7.0",
6
+ "newVersion": "1.7.1",
7
7
  "tagName": "latest",
8
8
  "constraints": [
9
9
  {
10
- "impact": "minor",
11
- "reason": "Appears in changelog section :rocket: Enhancement"
10
+ "impact": "patch",
11
+ "reason": "Appears in changelog section :bug: Bug Fix"
12
+ },
13
+ {
14
+ "impact": "patch",
15
+ "reason": "Appears in changelog section :memo: Documentation"
12
16
  }
13
17
  ],
14
18
  "pkgJSONPath": "./package.json"
15
19
  },
16
20
  "@nullvoxpopuli/ember-build-tooling-utils": {
17
- "oldVersion": "1.1.0"
21
+ "impact": "patch",
22
+ "oldVersion": "1.1.0",
23
+ "newVersion": "1.1.1",
24
+ "tagName": "latest",
25
+ "constraints": [
26
+ {
27
+ "impact": "patch",
28
+ "reason": "Appears in changelog section :memo: Documentation"
29
+ }
30
+ ],
31
+ "pkgJSONPath": "./packages/build-tooling-utils/package.json"
18
32
  },
19
33
  "@nullvoxpopuli/ember-rolldown": {
20
- "oldVersion": "2.7.0"
34
+ "impact": "patch",
35
+ "oldVersion": "2.8.0",
36
+ "newVersion": "2.8.1",
37
+ "tagName": "latest",
38
+ "constraints": [
39
+ {
40
+ "impact": "patch",
41
+ "reason": "Has dependency `workspace:*` on @nullvoxpopuli/ember-build-tooling-utils"
42
+ },
43
+ {
44
+ "impact": "patch",
45
+ "reason": "Appears in changelog section :memo: Documentation"
46
+ }
47
+ ],
48
+ "pkgJSONPath": "./packages/rolldown/package.json"
21
49
  },
22
50
  "@nullvoxpopuli/ember-vite": {
23
- "oldVersion": "1.1.0"
51
+ "impact": "patch",
52
+ "oldVersion": "1.1.0",
53
+ "newVersion": "1.1.1",
54
+ "tagName": "latest",
55
+ "constraints": [
56
+ {
57
+ "impact": "patch",
58
+ "reason": "Has dependency `workspace:*` on @nullvoxpopuli/ember-build-tooling-utils"
59
+ },
60
+ {
61
+ "impact": "patch",
62
+ "reason": "Appears in changelog section :memo: Documentation"
63
+ }
64
+ ],
65
+ "pkgJSONPath": "./packages/vite/package.json"
24
66
  }
25
67
  },
26
- "description": "## Release (2026-09-10)\n\n* ember.nvp 1.6.0 (minor)\n\n#### :rocket: Enhancement\n* `ember.nvp`\n * [#129](https://github.com/NullVoxPopuli/ember.nvp/pull/129) Add routes import ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#127](https://github.com/NullVoxPopuli/ember.nvp/pull/127) Update eslint (+ deps) in layers ([@tcjr](https://github.com/tcjr))\n\n#### Committers: 2\n- Tom Carter ([@tcjr](https://github.com/tcjr))\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n"
68
+ "description": "## Release (2026-09-15)\n\n* ember.nvp 1.7.1 (patch)\n* @nullvoxpopuli/ember-build-tooling-utils 1.1.1 (patch)\n* @nullvoxpopuli/ember-rolldown 2.8.1 (patch)\n* @nullvoxpopuli/ember-vite 1.1.1 (patch)\n\n#### :bug: Bug Fix\n* `ember.nvp`\n * [#134](https://github.com/NullVoxPopuli/ember.nvp/pull/134) Break the import cycle that hangs the CLI on startup ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))\n\n#### :memo: Documentation\n* `ember.nvp`, `@nullvoxpopuli/ember-build-tooling-utils`, `@nullvoxpopuli/ember-rolldown`, `@nullvoxpopuli/ember-vite`\n * [#132](https://github.com/NullVoxPopuli/ember.nvp/pull/132) Prose pass: reflow comments and READMEs ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))\n\n#### Committers: 1\n- @NullVoxPopuli's reduced-access machine account for AI usage ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))\n"
27
69
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## Release (2026-09-15)
4
+
5
+ * ember.nvp 1.7.1 (patch)
6
+ * @nullvoxpopuli/ember-build-tooling-utils 1.1.1 (patch)
7
+ * @nullvoxpopuli/ember-rolldown 2.8.1 (patch)
8
+ * @nullvoxpopuli/ember-vite 1.1.1 (patch)
9
+
10
+ #### :bug: Bug Fix
11
+ * `ember.nvp`
12
+ * [#134](https://github.com/NullVoxPopuli/ember.nvp/pull/134) Break the import cycle that hangs the CLI on startup ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))
13
+
14
+ #### :memo: Documentation
15
+ * `ember.nvp`, `@nullvoxpopuli/ember-build-tooling-utils`, `@nullvoxpopuli/ember-rolldown`, `@nullvoxpopuli/ember-vite`
16
+ * [#132](https://github.com/NullVoxPopuli/ember.nvp/pull/132) Prose pass: reflow comments and READMEs ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))
17
+
18
+ #### Committers: 1
19
+ - @NullVoxPopuli's reduced-access machine account for AI usage ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))
20
+
21
+ ## Release (2026-09-15)
22
+
23
+ * ember.nvp 1.7.0 (minor)
24
+ * @nullvoxpopuli/ember-rolldown 2.8.0 (minor)
25
+
26
+ #### :rocket: Enhancement
27
+ * `ember.nvp`, `@nullvoxpopuli/ember-rolldown`
28
+ * [#130](https://github.com/NullVoxPopuli/ember.nvp/pull/130) Add a custom element project type, and a bundle mode for ember-rolldown ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))
29
+
30
+ #### Committers: 1
31
+ - @NullVoxPopuli's reduced-access machine account for AI usage ([@NullVoxPopuli-ai-agent](https://github.com/NullVoxPopuli-ai-agent))
32
+
3
33
  ## Release (2026-09-10)
4
34
 
5
35
  * ember.nvp 1.6.0 (minor)
package/README.md CHANGED
@@ -5,10 +5,14 @@ _ember project generator: a reenvisioning of blueprints -- hopefully one day to
5
5
  > [!NOTE]
6
6
  > **Why isn't this work happening in the default blueprints?** for a long time now, I've felt the old blueprint system from the very early days of ember-cli has not allowed for expressive enough layering of what people actually want out of a project generator. That said, that means there are some compromises in the CLI/generator in this repo. Throughout all files generated, whenever there is a caveat, there will be a comment in the file with the caveat, explaining status, open issues, and how we can collectively move forward. It's possible that one day ember-cli adopts or is inspired by this project, but it's too early to tell at the moment.
7
7
 
8
- _I can't recommend using this tool unless your comfortable with the emitted caveats in the project_.
9
- (And being comfortable debugging build issues is recommended)
8
+ _I can't recommend using this tool unless you're comfortable with the emitted caveats in the project_.
9
+ (And with debugging build issues.)
10
10
 
11
- But I'm very excited about this tool, because it's everything I've ever wanted from a project generator. Each layer is idempotent, and knows about the other layers. So if, for example, you omit eslint when setting up your project, but do have github-actions, when you do add eslint, your github-actions will be updated as well. And this works in any order.
11
+ But I'm very excited about this tool, because it's everything I've ever wanted from a project generator.
12
+ Each layer is idempotent, and knows about the other layers.
13
+ For example: set up a project with github-actions but without eslint.
14
+ When you add eslint later, your github-actions are updated as well.
15
+ This works in any order.
12
16
 
13
17
  ## Usage
14
18
 
@@ -32,21 +36,25 @@ npx NullVoxPopuli/ember.nvp
32
36
 
33
37
  ### Updating an existing project
34
38
 
35
- You can run `ember.nvp` on top of an existing project to add layers to it. Generation never writes directly to your project -- everything runs in a staging directory first, and before finishing you choose to:
39
+ You can run `ember.nvp` on top of an existing project to add layers to it.
40
+ Nothing is written to your project until you confirm. Before finishing, you choose to:
36
41
 
37
- - **write the files** -- apply all of the staged changes
38
- - **review the diff** -- step through each changed file's diff, accepting or rejecting it individually (or accept/reject everything remaining)
39
- - **cancel** -- discard everything; your project is untouched
42
+ - **write the files**: apply all of the staged changes
43
+ - **review the diff**: step through each changed file, and accept or reject it (or accept / reject everything remaining)
44
+ - **cancel**: discard everything. Your project is untouched.
40
45
 
41
- Only files that actually changed are written. `node_modules`, `.git`, and everything else in your project are left alone, and the accepted changes land as uncommitted edits for you to review with your own git tooling.
46
+ Only files that actually changed are written.
47
+ `node_modules`, `.git`, and everything else in your project are left alone.
48
+ The accepted changes land as uncommitted edits, for you to review with your own git tooling.
42
49
 
43
- New projects skip the confirmation and are written as soon as generation succeeds. For scripting, `--write yes` / `--write no` answers the confirmation up front.
50
+ New projects skip the confirmation, and are written as soon as generation succeeds.
51
+ For scripting, `--write yes` / `--write no` answers the confirmation up front.
44
52
 
45
53
  ### Wrapping
46
54
 
47
- The provided CLI is only a wrapper around our exported `generateProject` function.
55
+ The provided CLI is only a wrapper around the exported `generateProject` function.
48
56
 
49
- Other tools can call `generateProject` themselves if they wish to provide a different terminal or graphical UI.
57
+ Other tools can call `generateProject` themselves, to provide a different terminal or graphical UI.
50
58
 
51
59
  ```js
52
60
  import { generateProject, Project } from 'ember.nvp';
@@ -67,7 +75,9 @@ await generateProject(new Project(
67
75
 
68
76
  All parts of the generator are idempotent, so running generators on existing projects _can_ no-op.
69
77
 
70
- To get the same don't-write-until-confirmed behavior as the CLI, wrap generation in a `Stage`. A stage is a real directory in the OS temp dir, seeded with a copy of the target directory's current contents (sans `node_modules`/`.git`) -- so layers run against the project's existing state with plain `node:fs`, `ember-apply`, and subprocesses, and authoring a layer is exactly the same with or without one.
78
+ To get the same don't-write-until-confirmed behavior as the CLI, wrap generation in a `Stage`.
79
+ A stage is a scratch copy of the target directory (without `node_modules` and `.git`).
80
+ Layers run against that copy, and the target directory is untouched until you commit.
71
81
 
72
82
  ```js
73
83
  import { generateProject, Project, Stage } from "ember.nvp";
@@ -94,8 +104,9 @@ await stage.commit(); // write the changes to the target directory
94
104
  - Modern, incremental
95
105
  - Interactive CLI
96
106
  - choose your features
97
- - The generators fro the different types of projects are never out of date from each other
98
- - each feature/layer is a mini codemod that has to support working within all the other layers -- so eslint for example is always derived the same way -- no way for "app" and "library" configs to get out of sync
107
+ - The generators for the different types of projects are never out of date from each other
108
+ - each feature/layer is a mini codemod that has to work within all the other layers.
109
+ eslint, for example, is always derived the same way: "app" and "library" configs can't get out of sync
99
110
 
100
111
  Good for:
101
112
 
@@ -106,8 +117,9 @@ Good for:
106
117
 
107
118
  ## Layers
108
119
 
109
- Each layer is a standalone module that can add features to your ember project,
110
- and every layer is aware of the other layers, so if, for example, you run github actions first, and then later decide to add linting, the github actions output will be updated.
120
+ Each layer is a standalone module that adds a feature to your ember project.
121
+ Every layer is aware of the other layers.
122
+ For example: add github actions first, and linting later. The github actions output is updated.
111
123
 
112
124
  ### 🎯 Minimal (always included)
113
125
 
@@ -126,7 +138,8 @@ Perfect for demos, reproductions, and learning!
126
138
 
127
139
  Runs `git init` for you.
128
140
 
129
- By default this layer is enabled, _unless_ you are running the generator in a git repo already -- then you have to opt in to git.
141
+ This layer is enabled by default, _unless_ you run the generator inside a git repo already.
142
+ In that case, you have to opt in to git.
130
143
 
131
144
  ### GitHub Actions (optional)
132
145
 
@@ -163,17 +176,17 @@ Super experimental vitest setup using [ember-vitest](https://github.com/NullVoxP
163
176
 
164
177
  ### How Layers Work
165
178
 
166
- 1. **Discovery**: CLI scans `src/layers/` and imports each `index.js`
167
- 2. **Selection**: User selects which optional layers to include
168
- 3. **Execution**: Each layer's `run()` function is called in sequence:
179
+ 1. **Discovery**: the CLI scans `src/layers/` and imports each `index.js`
180
+ 2. **Selection**: the user selects which optional layers to include
181
+ 3. **Execution**: each layer's `run()` function is called in sequence:
169
182
  ```js
170
183
  await layer.run(project);
171
184
  ```
172
- 4. **Layer Functions**: Inside `run()`, layers use [`ember-apply`](https://ember-apply.pages.dev/) to apply codemods in order to:
173
- - Copy files from `files/` directory
174
- - Add dependencies/devDependencies to package.json
175
- - Add npm scripts
176
- - Modify package.json metadata
185
+ 4. **Layer Functions**: inside `run()`, layers use [`ember-apply`](https://ember-apply.pages.dev/) to apply codemods:
186
+ - copy files from the `files/` directory
187
+ - add dependencies / devDependencies to package.json
188
+ - add npm scripts
189
+ - modify package.json metadata
177
190
  - etc
178
191
 
179
192
  ### Adding New Layers
@@ -206,7 +219,7 @@ export default {
206
219
  };
207
220
  ```
208
221
 
209
- 2. **`files/`** directory - Template files to copy:
210
- - Files will be copied to the target directory maintaining structure
222
+ 2. **`files/`** directory: template files to copy
223
+ - files are copied to the target directory, keeping their structure
211
224
 
212
- The CLI will automatically discover and offer it as an option!
225
+ The CLI discovers the layer and offers it as an option.
package/RELEASE.md CHANGED
@@ -1,27 +1,29 @@
1
1
  # Release Process
2
2
 
3
- Releases in this repo are mostly automated using [release-plan](https://github.com/embroider-build/release-plan/). Once you label all your PRs correctly (see below) you will have an automatically generated PR that updates your CHANGELOG.md file and a `.release-plan.json` that is used to prepare the release once the PR is merged.
3
+ Releases in this repo are mostly automated with [release-plan](https://github.com/embroider-build/release-plan/).
4
+ Once you label all your PRs correctly (see below), a PR is generated for you.
5
+ That PR updates CHANGELOG.md and `.release-plan.json`. Merging it prepares the release.
4
6
 
5
7
  ## Preparation
6
8
 
7
- Since the majority of the actual release process is automated, the remaining tasks before releasing are:
9
+ Most of the release process is automated. The remaining tasks before a release are:
8
10
 
9
- - correctly labeling **all** pull requests that have been merged since the last release
10
- - updating pull request titles so they make sense to our users
11
+ - label **all** pull requests merged since the last release
12
+ - update pull request titles so they make sense to our users
11
13
 
12
- Some great information on why this is important can be found at [keepachangelog.com](https://keepachangelog.com/en/1.1.0/), but the overall
13
- guiding principle here is that changelogs are for humans, not machines.
14
+ [keepachangelog.com](https://keepachangelog.com/en/1.1.0/) explains why this matters.
15
+ The guiding principle: changelogs are for humans, not machines.
14
16
 
15
- When reviewing merged PR's the labels to be used are:
17
+ When reviewing merged PRs, use these labels:
16
18
 
17
- - breaking - Used when the PR is considered a breaking change.
18
- - enhancement - Used when the PR adds a new feature or enhancement.
19
- - bug - Used when the PR fixes a bug included in a previous release.
20
- - documentation - Used when the PR adds or updates documentation.
21
- - internal - Internal changes or things that don't fit in any other category.
19
+ - breaking: the PR is a breaking change
20
+ - enhancement: the PR adds a new feature or enhancement
21
+ - bug: the PR fixes a bug included in a previous release
22
+ - documentation: the PR adds or updates documentation
23
+ - internal: internal changes, or anything that fits no other category
22
24
 
23
- **Note:** `release-plan` requires that **all** PRs are labeled. If a PR doesn't fit in a category it's fine to label it as `internal`
25
+ **Note:** `release-plan` requires that **all** PRs are labeled. If a PR fits no category, label it `internal`.
24
26
 
25
27
  ## Release
26
28
 
27
- Once the prep work is completed, the actual release is straight forward: you just need to merge the open [Plan Release](https://github.com/NullVoxPopuli/ember.nvp/pulls?q=is%3Apr+is%3Aopen+%22Prepare+Release%22+in%3Atitle) PR
29
+ Once the prep work is done, the release itself is one step: merge the open [Plan Release](https://github.com/NullVoxPopuli/ember.nvp/pulls?q=is%3Apr+is%3Aopen+%22Prepare+Release%22+in%3Atitle) PR.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember.nvp",
3
- "version": "1.6.0",
3
+ "version": "1.7.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",
@@ -4,29 +4,24 @@ Shared build tooling for the `@nullvoxpopuli` ember meta-plugins
4
4
  ([`@nullvoxpopuli/ember-vite`](../vite) and
5
5
  [`@nullvoxpopuli/ember-rolldown`](../rolldown)).
6
6
 
7
- It's intentionally bundler-agnostic (no `vite`/`rolldown` dependency) so both
8
- meta-plugins can consume the same logic.
7
+ It has no `vite` or `rolldown` dependency, so both meta-plugins can use it.
9
8
 
10
- Requires node 24+, and — since this package ships TypeScript source — a
11
- modern TypeScript when type-checking: 6+ with `lib` covering `es2025` (e.g.
12
- `esnext`).
9
+ Requires node 24+. This package ships TypeScript source, so type-checking
10
+ needs TypeScript 6+ with `lib` covering `es2025` (for example `esnext`).
13
11
 
14
12
  ## Exports
15
13
 
16
14
  ### `maybeBabel(options?)`
17
15
 
18
- A babel plugin (`@rollup/plugin-babel`) wrapped in a
19
- [`@rolldown/pluginutils`](https://github.com/rolldown/rolldown) filter so babel
20
- runs **only** on files that actually need it:
16
+ A babel plugin that runs **only** on the files that need babel:
21
17
 
22
18
  - template-tag files (`.gts`/`.gjs`)
23
19
  - files importing template/macro modules (`@ember/template-compiler`,
24
20
  `@embroider/macros`, …)
25
21
  - local (non-`node_modules`) code using decorators
26
22
 
27
- Everything else skips babel and is handled by the bundler's native (oxc)
28
- transform. The point: don't buy rolldown/oxc speed and then give it all back by
29
- routing every module through babel.
23
+ Everything else uses the bundler's native (oxc) transform, which keeps the
24
+ build fast.
30
25
 
31
26
  `options` extends `@rollup/plugin-babel`'s options, plus a `filter.include`
32
27
  (`imports` / `code`) to opt additional files in.
@@ -34,4 +29,4 @@ routing every module through babel.
34
29
  ### `extensions`
35
30
 
36
31
  The list of file extensions ember source can be authored in. Mirrors
37
- embroider's canonical list (see `extensions.ts` for details).
32
+ embroider's list.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nullvoxpopuli/ember-build-tooling-utils",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Shared build tooling for @nullvoxpopuli ember meta-plugins: maybeBabel (run babel only where needed) and the ember file extensions list.",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * The file extensions ember source can be authored in.
3
3
  *
4
- * Mirrors embroider's canonical list, which is only exported from
5
- * `@embroider/vite` (its `src/ember.ts`) — copied rather than depended on so
6
- * this shared tooling stays bundler-agnostic. Keep in sync.
4
+ * Mirrors embroider's canonical list, which is only exported from `@embroider/vite` (its `src/ember.ts`).
5
+ * Copied rather than depended on, so this shared tooling stays bundler-agnostic.
6
+ *
7
+ * Keep in sync.
7
8
  */
8
9
  export const extensions = [
9
10
  ".mjs",
@@ -5,14 +5,16 @@
5
5
  * - scoped-css
6
6
  * - template compilation optimization
7
7
  *
8
- * `maybeBabel` runs babel ONLY on the files that actually need it (template-tag
9
- * files, files importing template/macro modules, and local code using
10
- * decorators). Everything else skips babel so the bundler's native (oxc)
11
- * transform handles it -- the whole point being to keep the fast path fast and
12
- * not re-slow the build by sending every file through babel.
8
+ * `maybeBabel` runs babel ONLY on the files that actually need it:
9
+ * - template-tag files
10
+ * - files importing template/macro modules
11
+ * - local code using decorators
13
12
  *
14
- * This is shared between the vite (app) and rolldown/tsdown (library)
15
- * meta-plugins.
13
+ * Everything else skips babel, so the bundler's native (oxc) transform handles it.
14
+ * The whole point is to keep the fast path fast,
15
+ * and not re-slow the build by sending every file through babel.
16
+ *
17
+ * This is shared between the vite (app) and rolldown/tsdown (library) meta-plugins.
16
18
  */
17
19
  import { and, code, id, include, not, or } from "@rolldown/pluginutils";
18
20
  import { babel } from "@rollup/plugin-babel";
@@ -21,8 +23,10 @@ import type { RollupBabelInputPluginOptions } from "@rollup/plugin-babel";
21
23
  import { extensions } from "./extensions.ts";
22
24
 
23
25
  /**
24
- * If a file imports any of these, it needs babel (templates, macros, and a
25
- * couple of addons that ship decorator-adjacent runtime code).
26
+ * If a file imports any of these, it needs babel:
27
+ * - templates
28
+ * - macros
29
+ * - a couple of addons that ship decorator-adjacent runtime code
26
30
  */
27
31
  const babelRequiredImports = [
28
32
  // Templates
@@ -65,20 +69,20 @@ type Options = Omit<RollupBabelInputPluginOptions, "filter"> & {
65
69
  filter?: {
66
70
  include: {
67
71
  /**
68
- * If any additional (custom) plugins are provided, a pattern
69
- * should be provided that detects their usage
72
+ * If any additional (custom) plugins are provided,
73
+ * a pattern must be provided that detects their usage.
70
74
  *
71
75
  * for example, to also run babel on files that import from ember-concurrency
72
76
  * ```js
73
77
  * {
74
- * code: ['ember-concurrency'],
78
+ * imports: ['ember-concurrency'],
75
79
  * }
76
80
  * ```
77
81
  */
78
82
  imports: string[];
79
83
  /**
80
- * If any additional (custom) plugins are provided, a pattern
81
- * should be provided that detects their usage
84
+ * If any additional (custom) plugins are provided,
85
+ * a pattern must be provided that detects their usage.
82
86
  *
83
87
  * for example, to also run babel on files that use polyfilled APIs,
84
88
  * or use the "formatMessage" technique for translations
@@ -121,7 +125,6 @@ export function maybeBabel(userOptions: Options = {}) {
121
125
  id(/\.gjs$/),
122
126
  // imports one of the modules above
123
127
  code(importsRegex),
124
- // (a common way to do translations)
125
128
  // local app code using a decorator
126
129
  // NOTE: maybeBabel requires that all libraries compile away their decorators
127
130
  //