@savvy-web/silk-effects 7.3.1 → 7.4.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.
|
@@ -52,7 +52,12 @@ const ResolvedVersionFileSchema = Schema.Struct({
|
|
|
52
52
|
const ResolvedPackageScopeSchema = Schema.Struct({
|
|
53
53
|
name: Schema.String,
|
|
54
54
|
workspaceDir: Schema.String,
|
|
55
|
-
|
|
55
|
+
/**
|
|
56
|
+
* The package's declared version, absent when its manifest carries none — legal for a private
|
|
57
|
+
* package and the ordinary shape for a private monorepo root. A scope with no version has
|
|
58
|
+
* nothing to stamp into its `versionFiles` targets, so `VersionFiles.applyScopes` skips it.
|
|
59
|
+
*/
|
|
60
|
+
version: Schema.optional(Schema.String),
|
|
56
61
|
additionalScopes: Schema.Array(Schema.String),
|
|
57
62
|
additionalScopeFiles: Schema.Array(Schema.String),
|
|
58
63
|
versionFiles: Schema.Array(ResolvedVersionFileSchema)
|
|
@@ -368,11 +368,15 @@ var VersionFiles = class VersionFiles {
|
|
|
368
368
|
static processResolvedVersionFiles(scopes, dryRun = false) {
|
|
369
369
|
return Effect.gen(function* () {
|
|
370
370
|
const updates = [];
|
|
371
|
-
for (const scope of scopes)
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
371
|
+
for (const scope of scopes) {
|
|
372
|
+
if (scope.version === void 0) continue;
|
|
373
|
+
const version = scope.version;
|
|
374
|
+
for (const vf of scope.versionFiles) {
|
|
375
|
+
const jsonPaths = vf.paths.length > 0 ? vf.paths : ["$.version"];
|
|
376
|
+
for (const filePath of vf.matchedFiles) {
|
|
377
|
+
const result = yield* VersionFiles.applyOne(filePath, jsonPaths, version, dryRun);
|
|
378
|
+
if (result) updates.push(result);
|
|
379
|
+
}
|
|
376
380
|
}
|
|
377
381
|
}
|
|
378
382
|
return updates;
|
package/index.d.ts
CHANGED
|
@@ -2959,7 +2959,12 @@ type ResolvedVersionFile = typeof ResolvedVersionFileSchema.Type;
|
|
|
2959
2959
|
declare const ResolvedPackageScopeSchema: Schema.Struct<{
|
|
2960
2960
|
readonly name: Schema.String;
|
|
2961
2961
|
readonly workspaceDir: Schema.String;
|
|
2962
|
-
|
|
2962
|
+
/**
|
|
2963
|
+
* The package's declared version, absent when its manifest carries none — legal for a private
|
|
2964
|
+
* package and the ordinary shape for a private monorepo root. A scope with no version has
|
|
2965
|
+
* nothing to stamp into its `versionFiles` targets, so `VersionFiles.applyScopes` skips it.
|
|
2966
|
+
*/
|
|
2967
|
+
readonly version: Schema.optional<Schema.String>;
|
|
2963
2968
|
readonly additionalScopes: Schema.$Array<Schema.String>;
|
|
2964
2969
|
readonly additionalScopeFiles: Schema.$Array<Schema.String>;
|
|
2965
2970
|
readonly versionFiles: Schema.$Array<Schema.Struct<{
|
|
@@ -2981,7 +2986,12 @@ declare const InspectedConfigSchema: Schema.Struct<{
|
|
|
2981
2986
|
readonly packages: Schema.$Array<Schema.Struct<{
|
|
2982
2987
|
readonly name: Schema.String;
|
|
2983
2988
|
readonly workspaceDir: Schema.String;
|
|
2984
|
-
|
|
2989
|
+
/**
|
|
2990
|
+
* The package's declared version, absent when its manifest carries none — legal for a private
|
|
2991
|
+
* package and the ordinary shape for a private monorepo root. A scope with no version has
|
|
2992
|
+
* nothing to stamp into its `versionFiles` targets, so `VersionFiles.applyScopes` skips it.
|
|
2993
|
+
*/
|
|
2994
|
+
readonly version: Schema.optional<Schema.String>;
|
|
2985
2995
|
readonly additionalScopes: Schema.$Array<Schema.String>;
|
|
2986
2996
|
readonly additionalScopeFiles: Schema.$Array<Schema.String>;
|
|
2987
2997
|
readonly versionFiles: Schema.$Array<Schema.Struct<{
|
|
@@ -9102,7 +9112,7 @@ declare const RepoDrift_base: Schema.Class<RepoDrift, Schema.Struct<{
|
|
|
9102
9112
|
readonly observedValue: Schema.optionalKey<Schema.String>;
|
|
9103
9113
|
}>, {}>;
|
|
9104
9114
|
/**
|
|
9105
|
-
* One detected disagreement between two (or more) of the
|
|
9115
|
+
* One detected disagreement between two (or more) of the five authorities
|
|
9106
9116
|
* for a single vendored repo.
|
|
9107
9117
|
*
|
|
9108
9118
|
* @remarks
|
|
@@ -9983,7 +9993,7 @@ declare class SilkPublishConfig extends SilkPublishConfig_base {}
|
|
|
9983
9993
|
declare const AnalyzedWorkspace_base: Schema.Class<AnalyzedWorkspace, Schema.TaggedStruct<"AnalyzedWorkspace", {
|
|
9984
9994
|
readonly name: Schema.String;
|
|
9985
9995
|
readonly version: Schema.Struct<{
|
|
9986
|
-
readonly current: Schema.String
|
|
9996
|
+
readonly current: Schema.optional<Schema.String>;
|
|
9987
9997
|
}>;
|
|
9988
9998
|
readonly path: Schema.String;
|
|
9989
9999
|
readonly root: Schema.Boolean;
|
|
@@ -10366,7 +10376,12 @@ interface RawPackageJson {
|
|
|
10366
10376
|
*/
|
|
10367
10377
|
interface PublishablePackage {
|
|
10368
10378
|
readonly name: string;
|
|
10369
|
-
|
|
10379
|
+
/**
|
|
10380
|
+
* The declared version, absent when the manifest carries none. Publishability is decided by
|
|
10381
|
+
* `publishConfig`, not by `version`, so a version-less package can still resolve targets —
|
|
10382
|
+
* it simply has no version to publish under until one is declared.
|
|
10383
|
+
*/
|
|
10384
|
+
readonly version: string | undefined;
|
|
10370
10385
|
readonly path: string;
|
|
10371
10386
|
readonly targetCount: number;
|
|
10372
10387
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/silk-effects",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared Effect library for Silk Suite conventions",
|
|
6
6
|
"homepage": "https://github.com/savvy-web/systems/tree/main/packages/silk-effects",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@effected/github-references": "^0.1.0",
|
|
38
38
|
"@effected/glob": "^0.4.0",
|
|
39
39
|
"@effected/jsonc": "^0.8.1",
|
|
40
|
-
"@effected/markdown": "^0.8.
|
|
40
|
+
"@effected/markdown": "^0.8.1",
|
|
41
41
|
"@effected/package-json": "^0.13.0",
|
|
42
42
|
"@effected/templates": "^0.4.0",
|
|
43
43
|
"@effected/walker": "^0.5.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@effected/commands": "^0.5.0",
|
|
58
58
|
"@effected/git": "^0.10.0",
|
|
59
|
-
"@effected/workspaces": "^0.
|
|
59
|
+
"@effected/workspaces": "^0.19.0",
|
|
60
60
|
"effect": "4.0.0-rc.109"
|
|
61
61
|
}
|
|
62
62
|
}
|
package/repos/schemas/drift.js
CHANGED
|
@@ -20,7 +20,7 @@ const DriftKind = Schema.Literals([
|
|
|
20
20
|
"nestedSubmoduleDivergence"
|
|
21
21
|
]);
|
|
22
22
|
/**
|
|
23
|
-
* One detected disagreement between two (or more) of the
|
|
23
|
+
* One detected disagreement between two (or more) of the five authorities
|
|
24
24
|
* for a single vendored repo.
|
|
25
25
|
*
|
|
26
26
|
* @remarks
|
|
@@ -45,7 +45,13 @@ const KNOWN_REGISTRIES = {
|
|
|
45
45
|
* carries (binding-driven, placeholder, or access-branch fallback).
|
|
46
46
|
*/
|
|
47
47
|
const sameRegistry = (a, b) => trimTrailingSlashes(a) === trimTrailingSlashes(b);
|
|
48
|
-
|
|
48
|
+
/**
|
|
49
|
+
* The package's declared version. `current` is absent for a member whose manifest carries no
|
|
50
|
+
* `version` — legal for a private package and the ordinary shape for a private monorepo root,
|
|
51
|
+
* which `@effected/workspaces` discovers as a member rather than rejecting (its `missingVersion`
|
|
52
|
+
* failure kind was retired in 0.19.0). Such a package has no version to bump, tag or stamp.
|
|
53
|
+
*/
|
|
54
|
+
const WorkspaceVersion = Schema.Struct({ current: Schema.optional(Schema.String) });
|
|
49
55
|
/**
|
|
50
56
|
* A fully analyzed workspace with publish targets, versioning status,
|
|
51
57
|
* and release group membership.
|
|
@@ -101,7 +107,7 @@ var AnalyzedWorkspace = class AnalyzedWorkspace extends Schema.TaggedClass()("An
|
|
|
101
107
|
return Hash.optimize(Hash.combine(Hash.hash(this.name), Hash.hash(this.path)));
|
|
102
108
|
}
|
|
103
109
|
toString() {
|
|
104
|
-
return `${this.name}@${this.version.current}`;
|
|
110
|
+
return this.version.current === void 0 ? this.name : `${this.name}@${this.version.current}`;
|
|
105
111
|
}
|
|
106
112
|
toJSON() {
|
|
107
113
|
return {
|