ember.nvp 0.7.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-plan.json +15 -75
- package/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/packages/rolldown/README.md +6 -1
- package/packages/rolldown/index.ts +8 -4
- package/packages/rolldown/package.json +1 -1
- package/packages/rolldown/src/config.ts +50 -0
- package/src/bases/minimal-library/files/tsdown.config.js +2 -1
- package/test/ember.nvp/base-library.test.ts +6 -2
- package/test/ember.nvp/layer-publish-checks.test.ts +9 -3
- package/test/ember.nvp/layer-qunit.test.ts +7 -3
- package/test/test-helpers.ts +26 -1
- package/packages/rolldown/src/define-config.ts +0 -32
package/.release-plan.json
CHANGED
|
@@ -1,105 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"solution": {
|
|
3
3
|
"ember.nvp": {
|
|
4
|
-
"impact": "
|
|
5
|
-
"oldVersion": "0.
|
|
6
|
-
"newVersion": "0.
|
|
4
|
+
"impact": "major",
|
|
5
|
+
"oldVersion": "0.7.0",
|
|
6
|
+
"newVersion": "1.0.0",
|
|
7
7
|
"tagName": "latest",
|
|
8
8
|
"constraints": [
|
|
9
9
|
{
|
|
10
|
-
"impact": "
|
|
11
|
-
"reason": "Appears in changelog section :
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"impact": "patch",
|
|
15
|
-
"reason": "Appears in changelog section :bug: Bug Fix"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"impact": "patch",
|
|
19
|
-
"reason": "Appears in changelog section :memo: Documentation"
|
|
10
|
+
"impact": "major",
|
|
11
|
+
"reason": "Appears in changelog section :boom: Breaking Change"
|
|
20
12
|
},
|
|
21
13
|
{
|
|
22
|
-
"impact": "
|
|
23
|
-
"reason": "Appears in changelog section :
|
|
14
|
+
"impact": "minor",
|
|
15
|
+
"reason": "Appears in changelog section :rocket: Enhancement"
|
|
24
16
|
}
|
|
25
17
|
],
|
|
26
18
|
"pkgJSONPath": "./package.json"
|
|
27
19
|
},
|
|
28
20
|
"@nullvoxpopuli/ember-build-tooling-utils": {
|
|
29
|
-
"
|
|
30
|
-
"oldVersion": "1.0.0",
|
|
31
|
-
"newVersion": "1.1.0",
|
|
32
|
-
"tagName": "latest",
|
|
33
|
-
"constraints": [
|
|
34
|
-
{
|
|
35
|
-
"impact": "minor",
|
|
36
|
-
"reason": "Appears in changelog section :rocket: Enhancement"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"impact": "patch",
|
|
40
|
-
"reason": "Appears in changelog section :bug: Bug Fix"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"impact": "patch",
|
|
44
|
-
"reason": "Appears in changelog section :memo: Documentation"
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"pkgJSONPath": "./packages/build-tooling-utils/package.json"
|
|
21
|
+
"oldVersion": "1.1.0"
|
|
48
22
|
},
|
|
49
23
|
"@nullvoxpopuli/ember-rolldown": {
|
|
50
|
-
"impact": "
|
|
51
|
-
"oldVersion": "1.
|
|
52
|
-
"newVersion": "
|
|
24
|
+
"impact": "major",
|
|
25
|
+
"oldVersion": "1.1.0",
|
|
26
|
+
"newVersion": "2.0.0",
|
|
53
27
|
"tagName": "latest",
|
|
54
28
|
"constraints": [
|
|
55
29
|
{
|
|
56
|
-
"impact": "
|
|
57
|
-
"reason": "
|
|
30
|
+
"impact": "major",
|
|
31
|
+
"reason": "Appears in changelog section :boom: Breaking Change"
|
|
58
32
|
},
|
|
59
33
|
{
|
|
60
34
|
"impact": "minor",
|
|
61
35
|
"reason": "Appears in changelog section :rocket: Enhancement"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"impact": "patch",
|
|
65
|
-
"reason": "Appears in changelog section :bug: Bug Fix"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"impact": "patch",
|
|
69
|
-
"reason": "Appears in changelog section :memo: Documentation"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"impact": "patch",
|
|
73
|
-
"reason": "Appears in changelog section :house: Internal"
|
|
74
36
|
}
|
|
75
37
|
],
|
|
76
38
|
"pkgJSONPath": "./packages/rolldown/package.json"
|
|
77
39
|
},
|
|
78
40
|
"@nullvoxpopuli/ember-vite": {
|
|
79
|
-
"
|
|
80
|
-
"oldVersion": "1.0.3",
|
|
81
|
-
"newVersion": "1.1.0",
|
|
82
|
-
"tagName": "latest",
|
|
83
|
-
"constraints": [
|
|
84
|
-
{
|
|
85
|
-
"impact": "minor",
|
|
86
|
-
"reason": "Appears in changelog section :rocket: Enhancement"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"impact": "patch",
|
|
90
|
-
"reason": "Has dependency `workspace:*` on @nullvoxpopuli/ember-build-tooling-utils"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"impact": "patch",
|
|
94
|
-
"reason": "Appears in changelog section :bug: Bug Fix"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"impact": "patch",
|
|
98
|
-
"reason": "Appears in changelog section :house: Internal"
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
"pkgJSONPath": "./packages/vite/package.json"
|
|
41
|
+
"oldVersion": "1.1.0"
|
|
102
42
|
}
|
|
103
43
|
},
|
|
104
|
-
"description": "## Release (2026-07-
|
|
44
|
+
"description": "## Release (2026-07-18)\n\n* ember.nvp 1.0.0 (major)\n* @nullvoxpopuli/ember-rolldown 2.0.0 (major)\n\n#### :boom: Breaking Change\n* `@nullvoxpopuli/ember-rolldown`, `ember.nvp`\n * [#86](https://github.com/NullVoxPopuli/ember.nvp/pull/86) Remove defineConfig ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### :rocket: Enhancement\n* `@nullvoxpopuli/ember-rolldown`, `ember.nvp`\n * [#84](https://github.com/NullVoxPopuli/ember.nvp/pull/84) Create config plugin for rolldown ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### Committers: 1\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n"
|
|
105
45
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Release (2026-07-18)
|
|
4
|
+
|
|
5
|
+
* ember.nvp 1.0.0 (major)
|
|
6
|
+
* @nullvoxpopuli/ember-rolldown 2.0.0 (major)
|
|
7
|
+
|
|
8
|
+
#### :boom: Breaking Change
|
|
9
|
+
* `@nullvoxpopuli/ember-rolldown`, `ember.nvp`
|
|
10
|
+
* [#86](https://github.com/NullVoxPopuli/ember.nvp/pull/86) Remove defineConfig ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
11
|
+
|
|
12
|
+
#### :rocket: Enhancement
|
|
13
|
+
* `@nullvoxpopuli/ember-rolldown`, `ember.nvp`
|
|
14
|
+
* [#84](https://github.com/NullVoxPopuli/ember.nvp/pull/84) Create config plugin for rolldown ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
15
|
+
|
|
16
|
+
#### Committers: 1
|
|
17
|
+
- [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
18
|
+
|
|
3
19
|
## Release (2026-07-17)
|
|
4
20
|
|
|
5
21
|
* ember.nvp 0.7.0 (minor)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember.nvp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
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",
|
|
@@ -20,10 +20,15 @@ modern TypeScript when type-checking: 6+ with `lib` covering `es2025` (e.g.
|
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
|
+
Import `defineConfig` from the bundler you're using — `tsdown` or `rolldown` —
|
|
24
|
+
so it carries that tool's own config types; `@nullvoxpopuli/ember-rolldown`
|
|
25
|
+
provides `ember()` (the defaults travel with the plugin, not `defineConfig`).
|
|
26
|
+
|
|
23
27
|
In your `tsdown.config.js` (recommended — emits declarations):
|
|
24
28
|
|
|
25
29
|
```js
|
|
26
|
-
import { defineConfig
|
|
30
|
+
import { defineConfig } from "tsdown";
|
|
31
|
+
import { ember } from "@nullvoxpopuli/ember-rolldown";
|
|
27
32
|
|
|
28
33
|
export default defineConfig({
|
|
29
34
|
entry: ["./src/index.ts"],
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { Plugin } from "rolldown";
|
|
2
2
|
|
|
3
3
|
import { emberBabel, type BabelOptions } from "./src/babel.ts";
|
|
4
|
+
import { emberConfig } from "./src/config.ts";
|
|
4
5
|
import { emberExternals } from "./src/externals.ts";
|
|
5
6
|
import { emberIsolatedDeclarations } from "./src/isolated-declarations.ts";
|
|
6
7
|
import { emberTransform } from "./src/transform.ts";
|
|
7
8
|
|
|
8
|
-
export { defineConfig } from "./src/define-config.ts";
|
|
9
|
-
|
|
10
9
|
interface Config {
|
|
11
10
|
/**
|
|
12
11
|
* Options for the babel step; see `BabelOptions`.
|
|
@@ -21,6 +20,9 @@ interface Config {
|
|
|
21
20
|
* It bundles everything needed to compile `.gts`/`.gjs` and template-tag
|
|
22
21
|
* (`<template>`) source into publishable output:
|
|
23
22
|
*
|
|
23
|
+
* - `emberConfig()` — applies sensible tsdown defaults for a library build
|
|
24
|
+
* (sourcemaps, `clean`, `dts`, `.js`/`.d.ts` extensions, quiet logging);
|
|
25
|
+
* anything you set explicitly still wins.
|
|
24
26
|
* - `emberIsolatedDeclarations()` — errors when a tsconfig.json is present
|
|
25
27
|
* without `isolatedDeclarations: true` (required: it is the only
|
|
26
28
|
* declaration pipeline that can see compiled template-tag modules).
|
|
@@ -34,20 +36,22 @@ interface Config {
|
|
|
34
36
|
* native transform. The library's own `babel.config.js` is used when it
|
|
35
37
|
* exists; no config file is required.
|
|
36
38
|
*
|
|
37
|
-
* Usage in `tsdown.config.js`
|
|
39
|
+
* Usage in `tsdown.config.js` (import `defineConfig` from `tsdown` — or from
|
|
40
|
+
* `rolldown` for a `rolldown.config.js` — so it carries the correct types):
|
|
38
41
|
*
|
|
39
42
|
* ```js
|
|
43
|
+
* import { defineConfig } from "tsdown";
|
|
40
44
|
* import { ember } from "@nullvoxpopuli/ember-rolldown";
|
|
41
45
|
*
|
|
42
46
|
* export default defineConfig({
|
|
43
47
|
* entry: ["./src/index.ts"],
|
|
44
|
-
* dts: true,
|
|
45
48
|
* plugins: [ember()],
|
|
46
49
|
* });
|
|
47
50
|
* ```
|
|
48
51
|
*/
|
|
49
52
|
export function ember(config: Config = {}): Plugin[] {
|
|
50
53
|
return [
|
|
54
|
+
emberConfig(),
|
|
51
55
|
emberIsolatedDeclarations(),
|
|
52
56
|
emberExternals(),
|
|
53
57
|
emberTransform(),
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { TsdownPlugin, UserConfig } from "tsdown";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sensible defaults for an Ember v2 library, applied through plugin hooks so
|
|
5
|
+
* they travel with `ember()` — you get them whether you use this package's
|
|
6
|
+
* `defineConfig`, tsdown's, or a plain `tsdown.config.js` / `rolldown.config.js`.
|
|
7
|
+
*
|
|
8
|
+
* Every value is applied with `??=`, so anything you set explicitly wins.
|
|
9
|
+
*
|
|
10
|
+
* Under tsdown, the full set applies via the `tsdownConfig` hook (analogous to
|
|
11
|
+
* Vite's `config` hook):
|
|
12
|
+
*
|
|
13
|
+
* - `sourcemap` — emit sourcemaps alongside the output.
|
|
14
|
+
* - `clean` — wipe `dist/` between builds.
|
|
15
|
+
* - `dts` — emit `.d.ts` declarations (via isolated declarations).
|
|
16
|
+
* - `outExtensions` — `.js`/`.d.ts` rather than tsdown's default `.mjs`/`.d.mts`,
|
|
17
|
+
* since exports maps conventionally point at `.js`/`.d.ts`.
|
|
18
|
+
* - `report` — off; the size report is noise for a library build.
|
|
19
|
+
* - `deps.neverBundle` — leave node builtins and the ember virtual packages to
|
|
20
|
+
* the consuming app (`emberExternals()` handles the rest).
|
|
21
|
+
*
|
|
22
|
+
* A plain rolldown build has no notion of `clean`/`dts`/`outExtensions`/`report`
|
|
23
|
+
* (those are tsdown-level concepts), so only the options with rolldown
|
|
24
|
+
* equivalents are applied there, via rolldown's own `outputOptions` hook:
|
|
25
|
+
*
|
|
26
|
+
* - `output.sourcemap` — on (output option).
|
|
27
|
+
*
|
|
28
|
+
* Externals are handled by `emberExternals()` (a `resolveId` hook) in both cases.
|
|
29
|
+
*/
|
|
30
|
+
export function emberConfig(): TsdownPlugin {
|
|
31
|
+
return {
|
|
32
|
+
name: "ember:config",
|
|
33
|
+
|
|
34
|
+
tsdownConfig(config: UserConfig) {
|
|
35
|
+
config.sourcemap ??= true;
|
|
36
|
+
config.clean ??= true;
|
|
37
|
+
config.dts ??= true;
|
|
38
|
+
config.outExtensions ??= () => ({ js: ".js", dts: ".d.ts" });
|
|
39
|
+
config.report ??= false;
|
|
40
|
+
|
|
41
|
+
config.deps ??= {};
|
|
42
|
+
config.deps.neverBundle ??= ["node:*", "@ember/*", "@glimmer/*"];
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
outputOptions(options) {
|
|
46
|
+
options.sourcemap ??= true;
|
|
47
|
+
return options;
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, beforeAll, afterAll, expect } from "vitest";
|
|
2
|
-
import { generate, mktemp } from "#test-helpers";
|
|
2
|
+
import { generate, mktemp, pinYukuParser } from "#test-helpers";
|
|
3
3
|
import { writeLibrarySource } from "./library-src-fixtures.ts";
|
|
4
4
|
import { execa } from "execa";
|
|
5
5
|
import { mkdir, readdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
@@ -29,6 +29,8 @@ async function read(project: Project, filePath: string): Promise<string> {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
async function installAndBuild(project: Project) {
|
|
32
|
+
await pinYukuParser(project);
|
|
33
|
+
|
|
32
34
|
let install = await execa("pnpm install", { cwd: project.directory, shell: true });
|
|
33
35
|
expect(install.exitCode).toBe(0);
|
|
34
36
|
|
|
@@ -86,7 +88,8 @@ describe("base: minimal-library", () => {
|
|
|
86
88
|
expect(JSON.stringify(manifest.exports)).not.toContain("types");
|
|
87
89
|
|
|
88
90
|
expect(await read(project, "tsdown.config.js")).toMatchInlineSnapshot(`
|
|
89
|
-
"import { defineConfig
|
|
91
|
+
"import { defineConfig } from "tsdown";
|
|
92
|
+
import { ember } from "@nullvoxpopuli/ember-rolldown";
|
|
90
93
|
|
|
91
94
|
export default defineConfig({
|
|
92
95
|
entry: ["./src/index.js"],
|
|
@@ -169,6 +172,7 @@ describe("base: minimal-library", () => {
|
|
|
169
172
|
|
|
170
173
|
it("type checks", async () => {
|
|
171
174
|
await writeLibrarySource(project, "typescript");
|
|
175
|
+
await pinYukuParser(project);
|
|
172
176
|
|
|
173
177
|
let install = await execa("pnpm install", { cwd: project.directory, shell: true });
|
|
174
178
|
expect(install.exitCode).toBe(0);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, beforeAll, afterAll, expect } from "vitest";
|
|
2
|
-
import { generate } from "#test-helpers";
|
|
2
|
+
import { generate, pinYukuParser } from "#test-helpers";
|
|
3
3
|
import { execa } from "execa";
|
|
4
4
|
import { readFile, rm } from "node:fs/promises";
|
|
5
5
|
import { join } from "node:path";
|
|
@@ -41,12 +41,15 @@ describe("layers: publint + are-the-types-wrong", () => {
|
|
|
41
41
|
|
|
42
42
|
it("wires both checks into the build", async () => {
|
|
43
43
|
expect(await read(project, "tsdown.config.js")).toMatchInlineSnapshot(`
|
|
44
|
-
"import { defineConfig
|
|
44
|
+
"import { defineConfig } from "tsdown";
|
|
45
|
+
import { ember } from "@nullvoxpopuli/ember-rolldown";
|
|
45
46
|
export default defineConfig({ entry: ["./src/index.ts"], plugins: [ember()], attw: { profile: "esm-only" }, publint: true })"
|
|
46
47
|
`);
|
|
47
48
|
});
|
|
48
49
|
|
|
49
50
|
it("both checks run and pass in the build", async () => {
|
|
51
|
+
await pinYukuParser(project);
|
|
52
|
+
|
|
50
53
|
let install = await execa("pnpm install", { cwd: project.directory, shell: true });
|
|
51
54
|
expect(install.exitCode).toBe(0);
|
|
52
55
|
|
|
@@ -78,12 +81,15 @@ describe("layers: publint + are-the-types-wrong", () => {
|
|
|
78
81
|
|
|
79
82
|
it("wires publint only (no declarations to check)", async () => {
|
|
80
83
|
expect(await read(project, "tsdown.config.js")).toMatchInlineSnapshot(`
|
|
81
|
-
"import { defineConfig
|
|
84
|
+
"import { defineConfig } from "tsdown";
|
|
85
|
+
import { ember } from "@nullvoxpopuli/ember-rolldown";
|
|
82
86
|
export default defineConfig({ entry: ["./src/index.js"], dts: false, plugins: [ember()], publint: true })"
|
|
83
87
|
`);
|
|
84
88
|
});
|
|
85
89
|
|
|
86
90
|
it("publint runs and passes in the build", async () => {
|
|
91
|
+
await pinYukuParser(project);
|
|
92
|
+
|
|
87
93
|
let install = await execa("pnpm install", { cwd: project.directory, shell: true });
|
|
88
94
|
expect(install.exitCode).toBe(0);
|
|
89
95
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, beforeAll, afterAll, expect } from "vitest";
|
|
2
|
-
import { generate } from "#test-helpers";
|
|
2
|
+
import { generate, pinYukuParser } from "#test-helpers";
|
|
3
3
|
import { writeLibrarySource } from "./library-src-fixtures.ts";
|
|
4
4
|
import { execa } from "execa";
|
|
5
5
|
import { mkdir, readdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
@@ -23,6 +23,8 @@ async function read(project: Project, filePath: string): Promise<string> {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
async function installAndTest(project: Project) {
|
|
26
|
+
await pinYukuParser(project);
|
|
27
|
+
|
|
26
28
|
let install = await execa("pnpm install", { cwd: project.directory, shell: true });
|
|
27
29
|
expect(install.exitCode).toBe(0);
|
|
28
30
|
|
|
@@ -275,7 +277,8 @@ describe("layer: qunit", () => {
|
|
|
275
277
|
|
|
276
278
|
it("leaves the publish build config alone", async () => {
|
|
277
279
|
expect(await read(project, "tsdown.config.js")).toMatchInlineSnapshot(`
|
|
278
|
-
"import { defineConfig
|
|
280
|
+
"import { defineConfig } from "tsdown";
|
|
281
|
+
import { ember } from "@nullvoxpopuli/ember-rolldown";
|
|
279
282
|
|
|
280
283
|
export default defineConfig({
|
|
281
284
|
entry: ["./src/index.ts"],
|
|
@@ -365,7 +368,8 @@ describe("layer: qunit", () => {
|
|
|
365
368
|
"
|
|
366
369
|
`);
|
|
367
370
|
expect(await read(project, "tsdown.config.js")).toMatchInlineSnapshot(`
|
|
368
|
-
"import { defineConfig
|
|
371
|
+
"import { defineConfig } from "tsdown";
|
|
372
|
+
import { ember } from "@nullvoxpopuli/ember-rolldown";
|
|
369
373
|
|
|
370
374
|
export default defineConfig({
|
|
371
375
|
entry: ["./src/index.js"],
|
package/test/test-helpers.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { execa } from "execa";
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { styleText } from "node:util";
|
|
4
4
|
import { Readable, Writable } from "node:stream";
|
|
5
|
-
import { mkdtemp } from "node:fs/promises";
|
|
5
|
+
import { mkdtemp, readFile, writeFile } from "node:fs/promises";
|
|
6
6
|
import { tmpdir } from "node:os";
|
|
7
7
|
import { generateProject, Project } from "ember.nvp";
|
|
8
8
|
import { discoverLayers } from "#layers";
|
|
@@ -67,6 +67,31 @@ export async function mktemp(name = "ember.nvp_test-") {
|
|
|
67
67
|
return await mkdtemp(join(tmpdir(), `${name}-`));
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
/**
|
|
71
|
+
* Temporary: `rolldown-plugin-dts` (used by tsdown for `.d.ts` generation)
|
|
72
|
+
* imports `walk` from `yuku-parser`, but yuku-parser >= 0.6.6 moved `walk` to
|
|
73
|
+
* `yuku-ast`. Its dependency range still floats to the broken versions, so a
|
|
74
|
+
* fresh install of a generated library crashes when tsdown builds.
|
|
75
|
+
*
|
|
76
|
+
* The yuku toolchain publishes in lockstep on a shared `@yuku-toolchain/types`,
|
|
77
|
+
* so `yuku-parser` and `yuku-codegen` must be pinned together (pinning only one
|
|
78
|
+
* splits the toolchain and the dts/publint pipeline silently bails). Pin the
|
|
79
|
+
* last working set before install -- here in the test harness only, so the
|
|
80
|
+
* generated blueprint stays override-free. Remove once the plugin is fixed:
|
|
81
|
+
* https://github.com/sxzz/rolldown-plugin-dts/issues/277
|
|
82
|
+
*/
|
|
83
|
+
export async function pinYukuParser(project: Project): Promise<void> {
|
|
84
|
+
const manifestPath = join(project.directory, "package.json");
|
|
85
|
+
const manifest = JSON.parse(await readFile(manifestPath, "utf-8"));
|
|
86
|
+
|
|
87
|
+
manifest.pnpm ??= {};
|
|
88
|
+
manifest.pnpm.overrides ??= {};
|
|
89
|
+
manifest.pnpm.overrides["yuku-parser"] = "0.6.5";
|
|
90
|
+
manifest.pnpm.overrides["yuku-codegen"] = "0.6.5";
|
|
91
|
+
|
|
92
|
+
await writeFile(manifestPath, JSON.stringify(manifest, null, 2));
|
|
93
|
+
}
|
|
94
|
+
|
|
70
95
|
export async function reapply(project: Project, layers: string[]) {
|
|
71
96
|
return await generate({
|
|
72
97
|
directory: project.directory,
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { UserConfig } from "tsdown";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* tsdown's config, set up for an Ember v2 library: builds your entry to
|
|
5
|
-
* `dist/*.js` and `dist/*.d.ts` with sourcemaps, cleaning `dist/` between
|
|
6
|
-
* builds and leaving the ember virtual packages to the consuming app.
|
|
7
|
-
*
|
|
8
|
-
* You choose the `entry` and the `plugins` (e.g. `ember()`); any tsdown
|
|
9
|
-
* option you pass wins.
|
|
10
|
-
*
|
|
11
|
-
* ```js
|
|
12
|
-
* import { defineConfig, ember } from "@nullvoxpopuli/ember-rolldown";
|
|
13
|
-
*
|
|
14
|
-
* export default defineConfig({
|
|
15
|
-
* entry: ["./src/index.ts"],
|
|
16
|
-
* plugins: [ember()],
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export function defineConfig(config: UserConfig): UserConfig {
|
|
21
|
-
return {
|
|
22
|
-
sourcemap: true,
|
|
23
|
-
clean: true,
|
|
24
|
-
dts: true,
|
|
25
|
-
// tsdown's extensions are .mjs/.d.mts otherwise, even in type-module
|
|
26
|
-
// packages; exports maps conventionally point at .js/.d.ts
|
|
27
|
-
outExtensions: () => ({ js: ".js", dts: ".d.ts" }),
|
|
28
|
-
// provided by the consuming app
|
|
29
|
-
neverBundle: ["node:*", "@ember/*", "@glimmer/*"],
|
|
30
|
-
...config,
|
|
31
|
-
};
|
|
32
|
-
}
|