rolldown-pnpm-config 0.7.9 → 0.7.11
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/bin/rolldown-pnpm-config.js +1 -1
- package/cli/workspace-resolve.js +19 -8
- package/index.d.ts +2 -2
- package/package.json +7 -7
- package/runtime.d.ts +11 -12
|
@@ -12,7 +12,7 @@ const root = Command.make("rolldown-pnpm-config").pipe(Command.withSubcommands([
|
|
|
12
12
|
exportCommand,
|
|
13
13
|
previewCommand
|
|
14
14
|
]));
|
|
15
|
-
Command.run(root, { version: "0.7.
|
|
15
|
+
Command.run(root, { version: "0.7.11" }).pipe(Effect.provide(NodeServices.layer), NodeRuntime.runMain);
|
|
16
16
|
|
|
17
17
|
//#endregion
|
|
18
18
|
export { };
|
package/cli/workspace-resolve.js
CHANGED
|
@@ -26,19 +26,30 @@ const FRONTMATTER_LINE_RE = /^\s*["']?([^"':\s]+)["']?\s*:\s*(major|minor|patch)
|
|
|
26
26
|
* is already an explicit choice in the consuming config.
|
|
27
27
|
*
|
|
28
28
|
* The sync discovery facade is total by contract — an unreadable or malformed
|
|
29
|
-
* manifest
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* manifest is skipped, never raised — which is exactly this resolver's
|
|
30
|
+
* degrade-don't-fail contract; the Effect surface (`WorkspaceDiscovery`)
|
|
31
|
+
* instead fails typed on any unusable member.
|
|
32
|
+
*
|
|
33
|
+
* Since `@effected/workspaces` 0.19, that enumeration yields the **root
|
|
34
|
+
* package first** and carries a member whose manifest declares no `version`
|
|
35
|
+
* (`WorkspacePackage.version` is an optional key) rather than dropping it —
|
|
36
|
+
* a private, version-less monorepo root being the ordinary shape. Such a
|
|
37
|
+
* member is filtered out here: this resolver maps a name to a concrete
|
|
38
|
+
* version, and an entry with no version has nothing to resolve to.
|
|
32
39
|
*
|
|
33
40
|
* @internal
|
|
34
41
|
*/
|
|
35
42
|
function readManifests(rootDir) {
|
|
36
43
|
const out = /* @__PURE__ */ new Map();
|
|
37
|
-
for (const pkg of getWorkspacePackagesSync(rootDir, nodeSyncOps))
|
|
38
|
-
|
|
39
|
-
version
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
for (const pkg of getWorkspacePackagesSync(rootDir, nodeSyncOps)) {
|
|
45
|
+
const version = pkg.version;
|
|
46
|
+
if (version === void 0) continue;
|
|
47
|
+
out.set(pkg.name, {
|
|
48
|
+
name: pkg.name,
|
|
49
|
+
version,
|
|
50
|
+
peerDependencies: pkg.peerDependencies
|
|
51
|
+
});
|
|
52
|
+
}
|
|
42
53
|
return out;
|
|
43
54
|
}
|
|
44
55
|
/**
|
package/index.d.ts
CHANGED
|
@@ -418,7 +418,7 @@ interface PluginConfig {
|
|
|
418
418
|
*
|
|
419
419
|
* @public
|
|
420
420
|
*/
|
|
421
|
-
declare function PnpmConfigPlugin(config: PluginConfig): Plugin;
|
|
421
|
+
export declare function PnpmConfigPlugin(config: PluginConfig): Plugin;
|
|
422
422
|
//#endregion
|
|
423
|
-
export {
|
|
423
|
+
export type { AllowedVersionsFromCatalogs, CatalogDeclaration, CatalogPackageSpec, Enforcement, FieldInput, LocalDirective, PeerStrategy, PluginConfig, VersionSource };
|
|
424
424
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown-pnpm-config",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A dogfooding example of our plugin",
|
|
6
6
|
"repository": {
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"rolldown-pnpm-config": "bin/rolldown-pnpm-config.js"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@effect/platform-node": "4.0.0-rc.
|
|
39
|
-
"@effected/npm": "^0.
|
|
40
|
-
"@effected/semver": "^0.
|
|
41
|
-
"@effected/workspaces": "^0.
|
|
42
|
-
"@effected/yaml": "^0.
|
|
43
|
-
"effect": "4.0.0-rc.
|
|
38
|
+
"@effect/platform-node": "4.0.0-rc.112",
|
|
39
|
+
"@effected/npm": "^0.13.0",
|
|
40
|
+
"@effected/semver": "^0.6.0",
|
|
41
|
+
"@effected/workspaces": "^0.20.0",
|
|
42
|
+
"@effected/yaml": "^0.13.0",
|
|
43
|
+
"effect": "4.0.0-rc.112",
|
|
44
44
|
"ink": "^7.1.1",
|
|
45
45
|
"ink-tab": "^5.2.0",
|
|
46
46
|
"oxc-parser": "^0.148.0",
|
package/runtime.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
interface PnpmConfig {
|
|
7
|
+
export interface PnpmConfig {
|
|
8
8
|
/** Named catalogs injected into pnpm's workspace configuration. */
|
|
9
9
|
catalogs?: Record<string, Record<string, string>>;
|
|
10
10
|
[key: string]: unknown;
|
|
@@ -14,7 +14,7 @@ interface PnpmConfig {
|
|
|
14
14
|
*
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
|
-
interface PnpmHooks {
|
|
17
|
+
export interface PnpmHooks {
|
|
18
18
|
/** Merges the frozen, managed config into the consumer's pnpm config. */
|
|
19
19
|
updateConfig(config: PnpmConfig): PnpmConfig;
|
|
20
20
|
}
|
|
@@ -24,7 +24,7 @@ interface PnpmHooks {
|
|
|
24
24
|
*
|
|
25
25
|
* @internal
|
|
26
26
|
*/
|
|
27
|
-
interface Divergence {
|
|
27
|
+
export interface Divergence {
|
|
28
28
|
readonly setting: string;
|
|
29
29
|
readonly managedValue: string;
|
|
30
30
|
readonly localValue: string;
|
|
@@ -36,7 +36,7 @@ interface Divergence {
|
|
|
36
36
|
*
|
|
37
37
|
* @internal
|
|
38
38
|
*/
|
|
39
|
-
interface RuntimeCtx {
|
|
39
|
+
export interface RuntimeCtx {
|
|
40
40
|
readonly rootName: string | undefined;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
@@ -45,7 +45,7 @@ interface RuntimeCtx {
|
|
|
45
45
|
*
|
|
46
46
|
* @internal
|
|
47
47
|
*/
|
|
48
|
-
interface StrategyResult {
|
|
48
|
+
export interface StrategyResult {
|
|
49
49
|
readonly merged: unknown;
|
|
50
50
|
readonly divergences: readonly Divergence[];
|
|
51
51
|
}
|
|
@@ -55,7 +55,7 @@ interface StrategyResult {
|
|
|
55
55
|
*
|
|
56
56
|
* @internal
|
|
57
57
|
*/
|
|
58
|
-
type Strategy = (base: unknown, local: unknown, ctx: RuntimeCtx) => StrategyResult;
|
|
58
|
+
export type Strategy = (base: unknown, local: unknown, ctx: RuntimeCtx) => StrategyResult;
|
|
59
59
|
/**
|
|
60
60
|
* How a field's divergences are enforced: silent, console warning, or a thrown
|
|
61
61
|
* error that fails the install. Part of the public authoring API via
|
|
@@ -63,7 +63,7 @@ type Strategy = (base: unknown, local: unknown, ctx: RuntimeCtx) => StrategyResu
|
|
|
63
63
|
*
|
|
64
64
|
* @public
|
|
65
65
|
*/
|
|
66
|
-
type Enforcement = "absent" | "warn" | "error";
|
|
66
|
+
export type Enforcement = "absent" | "warn" | "error";
|
|
67
67
|
/**
|
|
68
68
|
* One field's manifest entry: which strategy merges it, how it is enforced, and
|
|
69
69
|
* any strategy-specific options (e.g. a refine table). Part of the public
|
|
@@ -71,7 +71,7 @@ type Enforcement = "absent" | "warn" | "error";
|
|
|
71
71
|
*
|
|
72
72
|
* @public
|
|
73
73
|
*/
|
|
74
|
-
interface ManifestEntry {
|
|
74
|
+
export interface ManifestEntry {
|
|
75
75
|
readonly strategy: string;
|
|
76
76
|
readonly enforcement: Enforcement;
|
|
77
77
|
readonly options?: Record<string, unknown>;
|
|
@@ -82,14 +82,14 @@ interface ManifestEntry {
|
|
|
82
82
|
*
|
|
83
83
|
* @public
|
|
84
84
|
*/
|
|
85
|
-
type Manifest = Record<string, ManifestEntry>;
|
|
85
|
+
export type Manifest = Record<string, ManifestEntry>;
|
|
86
86
|
/**
|
|
87
87
|
* The field → frozen value base emitted at build time and consumed by the
|
|
88
88
|
* public `createHooks`.
|
|
89
89
|
*
|
|
90
90
|
* @public
|
|
91
91
|
*/
|
|
92
|
-
type Base = Record<string, unknown>;
|
|
92
|
+
export type Base = Record<string, unknown>;
|
|
93
93
|
//#endregion
|
|
94
94
|
//#region src/runtime/index.d.ts
|
|
95
95
|
/**
|
|
@@ -105,7 +105,6 @@ type Base = Record<string, unknown>;
|
|
|
105
105
|
*
|
|
106
106
|
* @public
|
|
107
107
|
*/
|
|
108
|
-
declare function createHooks(base: Base, manifest: Manifest, name: string): PnpmHooks;
|
|
108
|
+
export declare function createHooks(base: Base, manifest: Manifest, name: string): PnpmHooks;
|
|
109
109
|
//#endregion
|
|
110
|
-
export { Base, Divergence, Enforcement, Manifest, ManifestEntry, PnpmConfig, PnpmHooks, RuntimeCtx, Strategy, StrategyResult, createHooks };
|
|
111
110
|
//# sourceMappingURL=runtime.d.ts.map
|