@savvy-web/silk-core 0.5.3 → 0.6.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/index.js +1 -1
- package/package.json +5 -5
- package/pr-body/body.js +1 -1
- package/pr-body/diagnostics.js +1 -1
- package/pr-body/index.js +4 -4
- package/pr-body/references.js +1 -1
- package/schemas/WorkspaceAnalysisSchemas.js +6 -12
- package/tsdoc-metadata.json +1 -1
package/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { LIFECYCLE_SCRIPTS_CONFIG_KEY, SavvyInstallSection, publishesBuiltLinkDi
|
|
|
11
11
|
import { SavvyOkfSection, savvyOkfBlock, savvyOkfSync } from "./schemas/SavvyOkfSection.js";
|
|
12
12
|
import { SavvyBaseSection, SavvyHooksSection, SavvyToolchainSection, savvyBasePreamble, savvyHooksHygiene, savvyToolSection, savvyToolchainCheck } from "./schemas/SavvySections.js";
|
|
13
13
|
import { ChangesetConfigFile, SilkChangesetConfigFile } from "./schemas/VersioningSchemas.js";
|
|
14
|
-
import { trimTrailingSlashes } from "./utils/TrailingSlash.js";
|
|
15
14
|
import { AnalyzedWorkspace, SilkPublishConfig, WorkspaceAnalysis } from "./schemas/WorkspaceAnalysisSchemas.js";
|
|
15
|
+
import { trimTrailingSlashes } from "./utils/TrailingSlash.js";
|
|
16
16
|
|
|
17
17
|
export { AnalyzedWorkspace, BiomeSyncError, BiomeSyncOptions, BiomeSyncResult, ChangesetConfigError, ChangesetConfigFile, ConfigDiscoveryOptions, ConfigLocation, ConfigNotFoundError, ConfigSource, LIFECYCLE_SCRIPTS_CONFIG_KEY, pr_body_exports as PrBody, PublishTargetBindingError, ReleaseChannelError, SavvyBaseSection, SavvyHooksSection, SavvyInstallSection, SavvyOkfSection, SavvyToolchainSection, SilkChangesetConfigFile, SilkPublishConfig, WorkspaceAnalysis, WorkspaceAnalysisError, publishesBuiltLinkDirectory, savvyBasePreamble, savvyHooksHygiene, savvyInstallBlock, savvyInstallDeps, savvyOkfBlock, savvyOkfSync, savvyToolSection, savvyToolchainCheck, trimTrailingSlashes };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/silk-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Platform-free domain core of the Silk Suite: schemas, tagged errors, and the PR-body contract",
|
|
6
6
|
"homepage": "https://github.com/savvy-web/systems/tree/main/packages/silk-core",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"./package.json": "./package.json"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@effected/github-references": "^0.
|
|
32
|
+
"@effected/github-references": "^0.13.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@effected/templates": "^0.
|
|
36
|
-
"@effected/workspaces": "^0.
|
|
37
|
-
"effect": "
|
|
35
|
+
"@effected/templates": "^0.16.0",
|
|
36
|
+
"@effected/workspaces": "^0.41.0",
|
|
37
|
+
"effect": "~4.1.1"
|
|
38
38
|
}
|
|
39
39
|
}
|
package/pr-body/body.js
CHANGED
package/pr-body/diagnostics.js
CHANGED
package/pr-body/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { Region } from "./region.js";
|
|
3
|
-
import { Markers } from "./markers.js";
|
|
4
|
-
import { LinkedIssueRef } from "./linked-issue.js";
|
|
5
|
-
import { ClosingReferences, OwnedAttribute } from "./references.js";
|
|
6
2
|
import { ManagedPrBody } from "./body.js";
|
|
7
3
|
import { PrBodyDiagnostic, PrBodyDiagnosticCode } from "./diagnostics.js";
|
|
4
|
+
import { LinkedIssueRef } from "./linked-issue.js";
|
|
5
|
+
import { Markers } from "./markers.js";
|
|
6
|
+
import { ClosingReferences, OwnedAttribute } from "./references.js";
|
|
7
|
+
import { Region } from "./region.js";
|
|
8
8
|
|
|
9
9
|
// src/pr-body/index.ts
|
|
10
10
|
var pr_body_exports = /* @__PURE__ */ __exportAll({
|
package/pr-body/references.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ChangesetConfigFile, SilkChangesetConfigFile } from "./VersioningSchemas.js";
|
|
2
1
|
import { trimTrailingSlashes } from "../utils/TrailingSlash.js";
|
|
3
|
-
import {
|
|
2
|
+
import { ChangesetConfigFile, SilkChangesetConfigFile } from "./VersioningSchemas.js";
|
|
3
|
+
import { Array, Effect, Equal, Function, Hash, Schema } from "effect";
|
|
4
4
|
import { PublishConfig, PublishTarget, TagStyle, VersioningStrategy } from "@effected/workspaces";
|
|
5
5
|
|
|
6
6
|
// src/schemas/WorkspaceAnalysisSchemas.ts
|
|
@@ -96,8 +96,7 @@ var AnalyzedWorkspace = class AnalyzedWorkspace extends Schema.TaggedClass()("An
|
|
|
96
96
|
return registry !== void 0 && this.publishesTo(registry);
|
|
97
97
|
}
|
|
98
98
|
targetFor(registry) {
|
|
99
|
-
|
|
100
|
-
return found ? Option.some(found) : Option.none();
|
|
99
|
+
return Array.findFirst(this.targets, (t) => sameRegistry(t.registry, registry));
|
|
101
100
|
}
|
|
102
101
|
[Equal.symbol](that) {
|
|
103
102
|
if (!(that instanceof AnalyzedWorkspace)) return false;
|
|
@@ -133,10 +132,7 @@ var AnalyzedWorkspace = class AnalyzedWorkspace extends Schema.TaggedClass()("An
|
|
|
133
132
|
/** Pretty-print an AnalyzedWorkspace instance. */
|
|
134
133
|
static pretty;
|
|
135
134
|
};
|
|
136
|
-
AnalyzedWorkspace.findByName = Function.dual(2, (workspaces, name) =>
|
|
137
|
-
const found = workspaces.find((w) => w.name === name);
|
|
138
|
-
return found ? Option.some(found) : Option.none();
|
|
139
|
-
});
|
|
135
|
+
AnalyzedWorkspace.findByName = Function.dual(2, (workspaces, name) => Array.findFirst(workspaces, (w) => w.name === name));
|
|
140
136
|
AnalyzedWorkspace.pretty = Schema.toFormatter(AnalyzedWorkspace);
|
|
141
137
|
const PackageManagerInfo = Schema.Struct({
|
|
142
138
|
type: Schema.Literals([
|
|
@@ -164,12 +160,10 @@ var WorkspaceAnalysis = class WorkspaceAnalysis extends Schema.TaggedClass()("Wo
|
|
|
164
160
|
tagStrategy: Schema.NullOr(TagStyle)
|
|
165
161
|
}) {
|
|
166
162
|
findWorkspace(name) {
|
|
167
|
-
|
|
168
|
-
return found ? Option.some(found) : Option.none();
|
|
163
|
+
return Array.findFirst(this.workspaces, (w) => w.name === name);
|
|
169
164
|
}
|
|
170
165
|
get rootWorkspace() {
|
|
171
|
-
|
|
172
|
-
return root ? Option.some(root) : Option.none();
|
|
166
|
+
return Array.findFirst(this.workspaces, (w) => w.root);
|
|
173
167
|
}
|
|
174
168
|
get publishableWorkspaces() {
|
|
175
169
|
return this.workspaces.filter((w) => w.publishable);
|