@savvy-web/silk 1.3.7 → 1.3.9
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/changesets-changelog.cjs +70165 -72721
- package/changesets-changelog.d.cts +1130 -938
- package/changesets-changelog.d.ts +1130 -938
- package/changesets-markdownlint.cjs +70165 -72721
- package/changesets-markdownlint.d.cts +1130 -938
- package/changesets-markdownlint.d.ts +1130 -938
- package/package.json +4 -4
- package/packages/silk-effects/dist/dev/pkg/changesets/errors.cjs +45 -0
- package/packages/silk-effects/dist/dev/pkg/changesets/errors.js +44 -1
- package/packages/silk-effects/dist/dev/pkg/changesets/index.cjs +16 -21
- package/packages/silk-effects/dist/dev/pkg/changesets/index.js +8 -11
- package/packages/silk-effects/dist/dev/pkg/changesets/services/branch-analyzer.cjs +2 -1
- package/packages/silk-effects/dist/dev/pkg/changesets/services/branch-analyzer.js +2 -1
- package/packages/silk-effects/dist/dev/pkg/changesets/services/config-inspector.cjs +7 -7
- package/packages/silk-effects/dist/dev/pkg/changesets/services/config-inspector.js +4 -4
- package/packages/silk-effects/dist/dev/pkg/changesets/services/deps-regen.cjs +159 -115
- package/packages/silk-effects/dist/dev/pkg/changesets/services/deps-regen.js +157 -113
- package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.cjs +105 -81
- package/packages/silk-effects/dist/dev/pkg/changesets/services/release-planner.js +105 -81
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/dep-diff.cjs +81 -47
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/dep-diff.js +81 -47
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/git.cjs +51 -0
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/git.js +51 -0
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/publishability.cjs +16 -4
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/publishability.js +15 -3
- package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfig.cjs +2 -1
- package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfig.js +1 -1
- package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfigReader.cjs +2 -1
- package/packages/silk-effects/dist/dev/pkg/services/ChangesetConfigReader.js +1 -1
- package/packages/silk-effects/dist/dev/pkg/services/SilkPublishability.cjs +20 -13
- package/packages/silk-effects/dist/dev/pkg/services/SilkPublishability.js +10 -4
- package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/silk-effects/dist/dev/pkg/changesets/services/workspace-snapshot.cjs +0 -162
- package/packages/silk-effects/dist/dev/pkg/changesets/services/workspace-snapshot.js +0 -160
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/worktree-snapshot.cjs +0 -144
- package/packages/silk-effects/dist/dev/pkg/changesets/utils/worktree-snapshot.js +0 -142
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_PublishabilityDetector = require('../../../../../../../node_modules/.pnpm/workspaces-effect@2.0.1_@effect_platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/PublishabilityDetector.cjs');
|
|
2
2
|
let effect = require("effect");
|
|
3
3
|
|
|
4
4
|
//#region ../silk-effects/dist/dev/pkg/changesets/utils/publishability.js
|
|
@@ -20,16 +20,28 @@ let effect = require("effect");
|
|
|
20
20
|
* Uses the currently-active {@link SilkPublishability} — wire the
|
|
21
21
|
* {@link SilkPublishabilityDetectorLive} layer to get silk semantics.
|
|
22
22
|
*
|
|
23
|
+
* `root` is passed through verbatim to `detector.detect(pkg, root)` for every
|
|
24
|
+
* package — it must be the project root (the directory containing
|
|
25
|
+
* `.changeset/`), NOT the individual package's directory. The vanilla
|
|
26
|
+
* `PublishabilityDetectorLive` and plain `SilkPublishabilityDetectorLive`
|
|
27
|
+
* both ignore this argument, but the ignore/mode-aware
|
|
28
|
+
* `PublishabilityDetectorAdaptiveLive` reads `.changeset/config.json`
|
|
29
|
+
* relative to it, so passing a package subdirectory silently makes every
|
|
30
|
+
* package resolve to "not publishable". Mirrors
|
|
31
|
+
* {@link SilkPublishability.listPublishable}, which takes the same
|
|
32
|
+
* single-root parameter for the same reason.
|
|
33
|
+
*
|
|
23
34
|
* @param packages - The workspace packages to evaluate
|
|
35
|
+
* @param root - Absolute path to the project root containing `.changeset/`
|
|
24
36
|
* @returns An Effect yielding a `Set` of publishable package names
|
|
25
37
|
*
|
|
26
38
|
* @public
|
|
27
39
|
*/
|
|
28
|
-
function listPublishablePackageNames(packages) {
|
|
40
|
+
function listPublishablePackageNames(packages, root) {
|
|
29
41
|
return effect.Effect.gen(function* () {
|
|
30
|
-
const detector = yield*
|
|
42
|
+
const detector = yield* require_PublishabilityDetector.PublishabilityDetector;
|
|
31
43
|
const names = /* @__PURE__ */ new Set();
|
|
32
|
-
for (const pkg of packages) if ((yield* detector.detect(pkg,
|
|
44
|
+
for (const pkg of packages) if ((yield* detector.detect(pkg, root)).length > 0) names.add(pkg.name);
|
|
33
45
|
return names;
|
|
34
46
|
});
|
|
35
47
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PublishabilityDetector } from "../../../../../../../node_modules/.pnpm/workspaces-effect@
|
|
1
|
+
import { PublishabilityDetector } from "../../../../../../../node_modules/.pnpm/workspaces-effect@2.0.1_@effect_platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/PublishabilityDetector.js";
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
|
|
4
4
|
//#region ../silk-effects/dist/dev/pkg/changesets/utils/publishability.js
|
|
@@ -20,16 +20,28 @@ import { Effect } from "effect";
|
|
|
20
20
|
* Uses the currently-active {@link SilkPublishability} — wire the
|
|
21
21
|
* {@link SilkPublishabilityDetectorLive} layer to get silk semantics.
|
|
22
22
|
*
|
|
23
|
+
* `root` is passed through verbatim to `detector.detect(pkg, root)` for every
|
|
24
|
+
* package — it must be the project root (the directory containing
|
|
25
|
+
* `.changeset/`), NOT the individual package's directory. The vanilla
|
|
26
|
+
* `PublishabilityDetectorLive` and plain `SilkPublishabilityDetectorLive`
|
|
27
|
+
* both ignore this argument, but the ignore/mode-aware
|
|
28
|
+
* `PublishabilityDetectorAdaptiveLive` reads `.changeset/config.json`
|
|
29
|
+
* relative to it, so passing a package subdirectory silently makes every
|
|
30
|
+
* package resolve to "not publishable". Mirrors
|
|
31
|
+
* {@link SilkPublishability.listPublishable}, which takes the same
|
|
32
|
+
* single-root parameter for the same reason.
|
|
33
|
+
*
|
|
23
34
|
* @param packages - The workspace packages to evaluate
|
|
35
|
+
* @param root - Absolute path to the project root containing `.changeset/`
|
|
24
36
|
* @returns An Effect yielding a `Set` of publishable package names
|
|
25
37
|
*
|
|
26
38
|
* @public
|
|
27
39
|
*/
|
|
28
|
-
function listPublishablePackageNames(packages) {
|
|
40
|
+
function listPublishablePackageNames(packages, root) {
|
|
29
41
|
return Effect.gen(function* () {
|
|
30
42
|
const detector = yield* PublishabilityDetector;
|
|
31
43
|
const names = /* @__PURE__ */ new Set();
|
|
32
|
-
for (const pkg of packages) if ((yield* detector.detect(pkg,
|
|
44
|
+
for (const pkg of packages) if ((yield* detector.detect(pkg, root)).length > 0) names.add(pkg.name);
|
|
33
45
|
return names;
|
|
34
46
|
});
|
|
35
47
|
}
|
|
@@ -105,4 +105,5 @@ const ChangesetConfigReaderLive = effect.Layer.effect(ChangesetConfigReader, eff
|
|
|
105
105
|
}));
|
|
106
106
|
|
|
107
107
|
//#endregion
|
|
108
|
-
exports.ChangesetConfigReader = ChangesetConfigReader;
|
|
108
|
+
exports.ChangesetConfigReader = ChangesetConfigReader;
|
|
109
|
+
exports.ChangesetConfigReaderLive = ChangesetConfigReaderLive;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
const require_ChangesetConfig = require('./ChangesetConfig.cjs');
|
|
2
|
-
const
|
|
2
|
+
const require_WorkspaceDiscovery = require('../../../../../../node_modules/.pnpm/workspaces-effect@2.0.1_@effect_platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/WorkspaceDiscovery.cjs');
|
|
3
|
+
const require_publish = require('../../../../../../node_modules/.pnpm/workspaces-effect@2.0.1_@effect_platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/publish.cjs');
|
|
4
|
+
const require_PublishabilityDetector = require('../../../../../../node_modules/.pnpm/workspaces-effect@2.0.1_@effect_platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/PublishabilityDetector.cjs');
|
|
5
|
+
const require_PublishabilityDetectorLive = require('../../../../../../node_modules/.pnpm/workspaces-effect@2.0.1_@effect_platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/PublishabilityDetectorLive.cjs');
|
|
3
6
|
let effect = require("effect");
|
|
4
|
-
let node_path = require("node:path");
|
|
5
7
|
let _effect_platform = require("@effect/platform");
|
|
8
|
+
let node_path = require("node:path");
|
|
6
9
|
|
|
7
10
|
//#region ../silk-effects/dist/dev/pkg/services/SilkPublishability.js
|
|
8
11
|
const NPM_DEFAULT = "https://registry.npmjs.org/";
|
|
@@ -74,7 +77,7 @@ var SilkPublishability = class {
|
|
|
74
77
|
const access = pc?.access ?? "public";
|
|
75
78
|
if (binding) {
|
|
76
79
|
const dirByGroup = new Map(binding.groups.map((g) => [g.id, g.dir]));
|
|
77
|
-
return binding.targets.map((t) => new
|
|
80
|
+
return binding.targets.map((t) => new require_publish.PublishTarget({
|
|
78
81
|
name: t.name,
|
|
79
82
|
registry: t.registry,
|
|
80
83
|
directory: dirByGroup.get(t.group) ?? `dist/prod/${t.group}/pkg`,
|
|
@@ -84,7 +87,7 @@ var SilkPublishability = class {
|
|
|
84
87
|
}
|
|
85
88
|
return Object.entries(targets).map(([id, target]) => {
|
|
86
89
|
const registry = typeof target === "object" && target !== null && typeof target.registry === "string" ? target.registry : DEFAULT_REGISTRIES[id] ?? pc?.registry ?? NPM_DEFAULT;
|
|
87
|
-
return new
|
|
90
|
+
return new require_publish.PublishTarget({
|
|
88
91
|
name: pkgName,
|
|
89
92
|
registry,
|
|
90
93
|
directory: `dist/prod/${id}/pkg`,
|
|
@@ -95,7 +98,7 @@ var SilkPublishability = class {
|
|
|
95
98
|
}
|
|
96
99
|
if (pc && (pc.access === "public" || pc.access === "restricted")) {
|
|
97
100
|
const registry = pc.registry ?? NPM_DEFAULT;
|
|
98
|
-
return [new
|
|
101
|
+
return [new require_publish.PublishTarget({
|
|
99
102
|
name: pkgName,
|
|
100
103
|
registry,
|
|
101
104
|
directory: pc.directory ?? ".",
|
|
@@ -105,7 +108,7 @@ var SilkPublishability = class {
|
|
|
105
108
|
}
|
|
106
109
|
if (raw.private !== true) {
|
|
107
110
|
const registry = pc?.registry ?? NPM_DEFAULT;
|
|
108
|
-
return [new
|
|
111
|
+
return [new require_publish.PublishTarget({
|
|
109
112
|
name: pkgName,
|
|
110
113
|
registry,
|
|
111
114
|
directory: pc?.directory ?? ".",
|
|
@@ -122,11 +125,14 @@ var SilkPublishability = class {
|
|
|
122
125
|
*/
|
|
123
126
|
static resolveTargets(pkg, root) {
|
|
124
127
|
return effect.Effect.gen(function* () {
|
|
125
|
-
const detector = yield*
|
|
128
|
+
const detector = yield* require_PublishabilityDetector.PublishabilityDetector;
|
|
126
129
|
const fs = yield* _effect_platform.FileSystem.FileSystem;
|
|
127
130
|
const targets = yield* detector.detect(pkg, root);
|
|
128
131
|
const kept = [];
|
|
129
|
-
for (const t of targets)
|
|
132
|
+
for (const t of targets) {
|
|
133
|
+
const dir = (0, node_path.isAbsolute)(t.directory) ? t.directory : (0, node_path.join)(pkg.path, t.directory);
|
|
134
|
+
if (!(yield* isTargetPrivate(fs, dir))) kept.push(t);
|
|
135
|
+
}
|
|
130
136
|
return kept;
|
|
131
137
|
});
|
|
132
138
|
}
|
|
@@ -136,8 +142,8 @@ var SilkPublishability = class {
|
|
|
136
142
|
*/
|
|
137
143
|
static listPublishable(root) {
|
|
138
144
|
return effect.Effect.gen(function* () {
|
|
139
|
-
const discovery = yield*
|
|
140
|
-
const detector = yield*
|
|
145
|
+
const discovery = yield* require_WorkspaceDiscovery.WorkspaceDiscovery;
|
|
146
|
+
const detector = yield* require_PublishabilityDetector.PublishabilityDetector;
|
|
141
147
|
const packages = yield* discovery.listPackages().pipe(effect.Effect.orDie);
|
|
142
148
|
const out = [];
|
|
143
149
|
for (const pkg of packages) {
|
|
@@ -189,7 +195,7 @@ const readTargetsBinding = (fs, pkgPath) => fs.readFileString((0, node_path.join
|
|
|
189
195
|
* @since 0.4.0
|
|
190
196
|
* @public
|
|
191
197
|
*/
|
|
192
|
-
const SilkPublishabilityDetectorLive = effect.Layer.effect(
|
|
198
|
+
const SilkPublishabilityDetectorLive = effect.Layer.effect(require_PublishabilityDetector.PublishabilityDetector, effect.Effect.gen(function* () {
|
|
193
199
|
const fs = yield* _effect_platform.FileSystem.FileSystem;
|
|
194
200
|
return { detect: (pkg, _root) => effect.Effect.gen(function* () {
|
|
195
201
|
const raw = yield* readRaw(fs, pkg.packageJsonPath);
|
|
@@ -208,10 +214,10 @@ const SilkPublishabilityDetectorLive = effect.Layer.effect(require_index.Publish
|
|
|
208
214
|
* @since 0.4.0
|
|
209
215
|
* @public
|
|
210
216
|
*/
|
|
211
|
-
const PublishabilityDetectorAdaptiveLive = effect.Layer.effect(
|
|
217
|
+
const PublishabilityDetectorAdaptiveLive = effect.Layer.effect(require_PublishabilityDetector.PublishabilityDetector, effect.Effect.gen(function* () {
|
|
212
218
|
const fs = yield* _effect_platform.FileSystem.FileSystem;
|
|
213
219
|
const config = yield* require_ChangesetConfig.ChangesetConfig;
|
|
214
|
-
const vanilla = yield* effect.Effect.provide(
|
|
220
|
+
const vanilla = yield* effect.Effect.provide(require_PublishabilityDetector.PublishabilityDetector, require_PublishabilityDetectorLive.PublishabilityDetectorLive);
|
|
215
221
|
return { detect: (pkg, root) => effect.Effect.gen(function* () {
|
|
216
222
|
if (yield* config.isIgnored(pkg.name, root)) return [];
|
|
217
223
|
const mode = yield* config.mode(root);
|
|
@@ -227,5 +233,6 @@ const PublishabilityDetectorAdaptiveLive = effect.Layer.effect(require_index.Pub
|
|
|
227
233
|
}));
|
|
228
234
|
|
|
229
235
|
//#endregion
|
|
236
|
+
exports.PublishabilityDetectorAdaptiveLive = PublishabilityDetectorAdaptiveLive;
|
|
230
237
|
exports.SilkPublishability = SilkPublishability;
|
|
231
238
|
exports.readTargetsBinding = readTargetsBinding;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ChangesetConfig } from "./ChangesetConfig.js";
|
|
2
|
-
import {
|
|
2
|
+
import { WorkspaceDiscovery } from "../../../../../../node_modules/.pnpm/workspaces-effect@2.0.1_@effect_platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/WorkspaceDiscovery.js";
|
|
3
|
+
import { PublishTarget } from "../../../../../../node_modules/.pnpm/workspaces-effect@2.0.1_@effect_platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/publish.js";
|
|
4
|
+
import { PublishabilityDetector } from "../../../../../../node_modules/.pnpm/workspaces-effect@2.0.1_@effect_platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/PublishabilityDetector.js";
|
|
5
|
+
import { PublishabilityDetectorLive } from "../../../../../../node_modules/.pnpm/workspaces-effect@2.0.1_@effect_platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/PublishabilityDetectorLive.js";
|
|
3
6
|
import { Effect, Layer } from "effect";
|
|
4
|
-
import { isAbsolute, join } from "node:path";
|
|
5
7
|
import { FileSystem } from "@effect/platform";
|
|
8
|
+
import { isAbsolute, join } from "node:path";
|
|
6
9
|
|
|
7
10
|
//#region ../silk-effects/dist/dev/pkg/services/SilkPublishability.js
|
|
8
11
|
const NPM_DEFAULT = "https://registry.npmjs.org/";
|
|
@@ -126,7 +129,10 @@ var SilkPublishability = class {
|
|
|
126
129
|
const fs = yield* FileSystem.FileSystem;
|
|
127
130
|
const targets = yield* detector.detect(pkg, root);
|
|
128
131
|
const kept = [];
|
|
129
|
-
for (const t of targets)
|
|
132
|
+
for (const t of targets) {
|
|
133
|
+
const dir = isAbsolute(t.directory) ? t.directory : join(pkg.path, t.directory);
|
|
134
|
+
if (!(yield* isTargetPrivate(fs, dir))) kept.push(t);
|
|
135
|
+
}
|
|
130
136
|
return kept;
|
|
131
137
|
});
|
|
132
138
|
}
|
|
@@ -227,4 +233,4 @@ const PublishabilityDetectorAdaptiveLive = Layer.effect(PublishabilityDetector,
|
|
|
227
233
|
}));
|
|
228
234
|
|
|
229
235
|
//#endregion
|
|
230
|
-
export { SilkPublishability, readTargetsBinding };
|
|
236
|
+
export { PublishabilityDetectorAdaptiveLive, SilkPublishability, readTargetsBinding };
|