@savvy-web/silk 1.3.5 → 1.3.7
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 +780 -451
- package/changesets-changelog.d.cts +555 -92
- package/changesets-changelog.d.ts +555 -92
- package/changesets-markdownlint.cjs +780 -451
- package/changesets-markdownlint.d.cts +555 -92
- package/changesets-markdownlint.d.ts +555 -92
- package/package.json +4 -4
- package/packages/silk-effects/dist/dev/pkg/changesets/api/linter.cjs +12 -10
- package/packages/silk-effects/dist/dev/pkg/changesets/api/linter.js +9 -7
- package/packages/silk-effects/dist/dev/pkg/changesets/index.cjs +23 -10
- package/packages/silk-effects/dist/dev/pkg/changesets/index.js +17 -10
- package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/dependency-table-format.cjs +3 -3
- package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/dependency-table-format.js +1 -1
- package/packages/silk-effects/dist/dev/pkg/changesets/remark/presets.cjs +1 -1
- package/packages/silk-effects/dist/dev/pkg/changesets/remark/presets.js +1 -1
- package/packages/silk-effects/dist/dev/pkg/changesets/schemas/dependency-table.cjs +12 -1
- package/packages/silk-effects/dist/dev/pkg/changesets/schemas/dependency-table.js +12 -2
- package/packages/silk-effects/dist/dev/pkg/changesets/services/deps-regen.cjs +331 -0
- package/packages/silk-effects/dist/dev/pkg/changesets/services/deps-regen.js +327 -0
- package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/silk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The single Silk Suite dev-tooling package — changeset, commitlint, lint, and biome conventions",
|
|
6
6
|
"homepage": "https://github.com/savvy-web/systems/tree/main/packages/silk",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@effect/platform": "^0.96.2",
|
|
69
|
-
"@savvy-web/silk-effects": "1.
|
|
69
|
+
"@savvy-web/silk-effects": "1.6.0",
|
|
70
70
|
"effect": "^3.21.4",
|
|
71
71
|
"semver": "^7.8.5"
|
|
72
72
|
},
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"@changesets/cli": "^2.31.0",
|
|
76
76
|
"@commitlint/cli": "^21.1.0",
|
|
77
77
|
"@commitlint/config-conventional": "^21.1.0",
|
|
78
|
-
"@savvy-web/cli": "1.3.
|
|
79
|
-
"@savvy-web/mcp": "1.
|
|
78
|
+
"@savvy-web/cli": "1.3.6",
|
|
79
|
+
"@savvy-web/mcp": "1.5.0",
|
|
80
80
|
"@types/node": "^26.0.0",
|
|
81
81
|
"@typescript/native-preview": "^7.0.0-dev.20260612.1",
|
|
82
82
|
"commitizen": "^4.3.0",
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
const require_index = require('../../../../../../../node_modules/.pnpm/remark-
|
|
2
|
-
const require_index$1 = require('../../../../../../../node_modules/.pnpm/remark-
|
|
3
|
-
const require_index$2 = require('../../../../../../../node_modules/.pnpm/
|
|
1
|
+
const require_index = require('../../../../../../../node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.cjs');
|
|
2
|
+
const require_index$1 = require('../../../../../../../node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.cjs');
|
|
3
|
+
const require_index$2 = require('../../../../../../../node_modules/.pnpm/remark-stringify@11.0.0/node_modules/remark-stringify/lib/index.cjs');
|
|
4
|
+
const require_index$3 = require('../../../../../../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.cjs');
|
|
4
5
|
const require_content_structure = require('../remark/rules/content-structure.cjs');
|
|
6
|
+
const require_dependency_table_format = require('../remark/rules/dependency-table-format.cjs');
|
|
5
7
|
const require_heading_hierarchy = require('../remark/rules/heading-hierarchy.cjs');
|
|
6
8
|
const require_required_sections = require('../remark/rules/required-sections.cjs');
|
|
7
9
|
const require_uncategorized_content = require('../remark/rules/uncategorized-content.cjs');
|
|
@@ -13,7 +15,7 @@ let node_fs = require("node:fs");
|
|
|
13
15
|
/**
|
|
14
16
|
* Class-based API wrapper for changeset linting.
|
|
15
17
|
*
|
|
16
|
-
* Provides a static class interface that runs all remark-lint rules
|
|
18
|
+
* Provides a static class interface that runs all five remark-lint rules
|
|
17
19
|
* against changeset markdown files and returns structured diagnostics.
|
|
18
20
|
*
|
|
19
21
|
* @internal
|
|
@@ -21,9 +23,9 @@ let node_fs = require("node:fs");
|
|
|
21
23
|
/**
|
|
22
24
|
* Static class for linting changeset markdown files.
|
|
23
25
|
*
|
|
24
|
-
* Runs the
|
|
25
|
-
* content-structure, uncategorized-content) against
|
|
26
|
-
* and returns structured {@link LintMessage} diagnostics.
|
|
26
|
+
* Runs the five remark-lint rules (heading-hierarchy, required-sections,
|
|
27
|
+
* content-structure, dependency-table-format, uncategorized-content) against
|
|
28
|
+
* changeset markdown and returns structured {@link LintMessage} diagnostics.
|
|
27
29
|
*
|
|
28
30
|
* @remarks
|
|
29
31
|
* This class implements the pre-validation layer of the three-layer
|
|
@@ -109,7 +111,7 @@ var ChangesetLinter = class ChangesetLinter {
|
|
|
109
111
|
*
|
|
110
112
|
* @remarks
|
|
111
113
|
* Reads the file synchronously, strips YAML frontmatter, and runs all
|
|
112
|
-
*
|
|
114
|
+
* five lint rules. The file path is preserved in each returned
|
|
113
115
|
* {@link LintMessage} for error reporting.
|
|
114
116
|
*
|
|
115
117
|
* @param filePath - Absolute or relative path to the changeset `.md` file
|
|
@@ -123,7 +125,7 @@ var ChangesetLinter = class ChangesetLinter {
|
|
|
123
125
|
* Validate a markdown string directly.
|
|
124
126
|
*
|
|
125
127
|
* @remarks
|
|
126
|
-
* Strips YAML frontmatter (if present) and runs all
|
|
128
|
+
* Strips YAML frontmatter (if present) and runs all five lint rules
|
|
127
129
|
* against the remaining content. This method is useful for validating
|
|
128
130
|
* changeset content that is already in memory, such as in test suites
|
|
129
131
|
* or editor integrations.
|
|
@@ -135,7 +137,7 @@ var ChangesetLinter = class ChangesetLinter {
|
|
|
135
137
|
*/
|
|
136
138
|
static validateContent(content, filePath = "<input>") {
|
|
137
139
|
const body = require_strip_frontmatter.stripFrontmatter(content);
|
|
138
|
-
return require_index$
|
|
140
|
+
return require_index$3.unified().use(require_index$1.default).use(require_index.default).use(require_index$2.default).use(require_heading_hierarchy.HeadingHierarchyRule).use(require_required_sections.RequiredSectionsRule).use(require_content_structure.ContentStructureRule).use(require_dependency_table_format.DependencyTableFormatRule).use(require_uncategorized_content.UncategorizedContentRule).processSync(body).messages.map((msg) => ({
|
|
139
141
|
file: filePath,
|
|
140
142
|
/* v8 ignore next 3 -- ruleId/line/column fallbacks; remark-lint always provides these */
|
|
141
143
|
rule: msg.ruleId ?? msg.source ?? "unknown",
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import remarkGfm from "../../../../../../../node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js";
|
|
1
2
|
import remarkParse from "../../../../../../../node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.js";
|
|
2
3
|
import remarkStringify from "../../../../../../../node_modules/.pnpm/remark-stringify@11.0.0/node_modules/remark-stringify/lib/index.js";
|
|
3
4
|
import { unified } from "../../../../../../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.js";
|
|
4
5
|
import { ContentStructureRule } from "../remark/rules/content-structure.js";
|
|
6
|
+
import { DependencyTableFormatRule } from "../remark/rules/dependency-table-format.js";
|
|
5
7
|
import { HeadingHierarchyRule } from "../remark/rules/heading-hierarchy.js";
|
|
6
8
|
import { RequiredSectionsRule } from "../remark/rules/required-sections.js";
|
|
7
9
|
import { UncategorizedContentRule } from "../remark/rules/uncategorized-content.js";
|
|
@@ -13,7 +15,7 @@ import { readFileSync, readdirSync } from "node:fs";
|
|
|
13
15
|
/**
|
|
14
16
|
* Class-based API wrapper for changeset linting.
|
|
15
17
|
*
|
|
16
|
-
* Provides a static class interface that runs all remark-lint rules
|
|
18
|
+
* Provides a static class interface that runs all five remark-lint rules
|
|
17
19
|
* against changeset markdown files and returns structured diagnostics.
|
|
18
20
|
*
|
|
19
21
|
* @internal
|
|
@@ -21,9 +23,9 @@ import { readFileSync, readdirSync } from "node:fs";
|
|
|
21
23
|
/**
|
|
22
24
|
* Static class for linting changeset markdown files.
|
|
23
25
|
*
|
|
24
|
-
* Runs the
|
|
25
|
-
* content-structure, uncategorized-content) against
|
|
26
|
-
* and returns structured {@link LintMessage} diagnostics.
|
|
26
|
+
* Runs the five remark-lint rules (heading-hierarchy, required-sections,
|
|
27
|
+
* content-structure, dependency-table-format, uncategorized-content) against
|
|
28
|
+
* changeset markdown and returns structured {@link LintMessage} diagnostics.
|
|
27
29
|
*
|
|
28
30
|
* @remarks
|
|
29
31
|
* This class implements the pre-validation layer of the three-layer
|
|
@@ -109,7 +111,7 @@ var ChangesetLinter = class ChangesetLinter {
|
|
|
109
111
|
*
|
|
110
112
|
* @remarks
|
|
111
113
|
* Reads the file synchronously, strips YAML frontmatter, and runs all
|
|
112
|
-
*
|
|
114
|
+
* five lint rules. The file path is preserved in each returned
|
|
113
115
|
* {@link LintMessage} for error reporting.
|
|
114
116
|
*
|
|
115
117
|
* @param filePath - Absolute or relative path to the changeset `.md` file
|
|
@@ -123,7 +125,7 @@ var ChangesetLinter = class ChangesetLinter {
|
|
|
123
125
|
* Validate a markdown string directly.
|
|
124
126
|
*
|
|
125
127
|
* @remarks
|
|
126
|
-
* Strips YAML frontmatter (if present) and runs all
|
|
128
|
+
* Strips YAML frontmatter (if present) and runs all five lint rules
|
|
127
129
|
* against the remaining content. This method is useful for validating
|
|
128
130
|
* changeset content that is already in memory, such as in test suites
|
|
129
131
|
* or editor integrations.
|
|
@@ -135,7 +137,7 @@ var ChangesetLinter = class ChangesetLinter {
|
|
|
135
137
|
*/
|
|
136
138
|
static validateContent(content, filePath = "<input>") {
|
|
137
139
|
const body = stripFrontmatter(content);
|
|
138
|
-
return unified().use(remarkParse).use(remarkStringify).use(HeadingHierarchyRule).use(RequiredSectionsRule).use(ContentStructureRule).use(UncategorizedContentRule).processSync(body).messages.map((msg) => ({
|
|
140
|
+
return unified().use(remarkParse).use(remarkGfm).use(remarkStringify).use(HeadingHierarchyRule).use(RequiredSectionsRule).use(ContentStructureRule).use(DependencyTableFormatRule).use(UncategorizedContentRule).processSync(body).messages.map((msg) => ({
|
|
139
141
|
file: filePath,
|
|
140
142
|
/* v8 ignore next 3 -- ruleId/line/column fallbacks; remark-lint always provides these */
|
|
141
143
|
rule: msg.ruleId ?? msg.source ?? "unknown",
|
|
@@ -14,6 +14,7 @@ const require_index = require('./changelog/index.cjs');
|
|
|
14
14
|
const require_changelog = require('./api/changelog.cjs');
|
|
15
15
|
const require_dependency_table$2 = require('./api/dependency-table.cjs');
|
|
16
16
|
const require_content_structure = require('./remark/rules/content-structure.cjs');
|
|
17
|
+
const require_dependency_table_format = require('./remark/rules/dependency-table-format.cjs');
|
|
17
18
|
const require_heading_hierarchy = require('./remark/rules/heading-hierarchy.cjs');
|
|
18
19
|
const require_required_sections = require('./remark/rules/required-sections.cjs');
|
|
19
20
|
const require_uncategorized_content = require('./remark/rules/uncategorized-content.cjs');
|
|
@@ -28,24 +29,24 @@ const require_transformer = require('./api/transformer.cjs');
|
|
|
28
29
|
const require_config_inspector = require('./services/config-inspector.cjs');
|
|
29
30
|
const require_branch_analyzer = require('./services/branch-analyzer.cjs');
|
|
30
31
|
const require_changelog$1 = require('./services/changelog.cjs');
|
|
32
|
+
const require_dep_diff = require('./utils/dep-diff.cjs');
|
|
33
|
+
const require_publishability = require('./utils/publishability.cjs');
|
|
34
|
+
const require_worktree_snapshot = require('./utils/worktree-snapshot.cjs');
|
|
35
|
+
const require_workspace_snapshot = require('./services/workspace-snapshot.cjs');
|
|
36
|
+
const require_deps_regen = require('./services/deps-regen.cjs');
|
|
31
37
|
const require_version_files$1 = require('./utils/version-files.cjs');
|
|
32
38
|
const require_release_planner = require('./services/release-planner.cjs');
|
|
33
|
-
const require_workspace_snapshot = require('./services/workspace-snapshot.cjs');
|
|
34
39
|
const require_types = require('./categories/types.cjs');
|
|
35
40
|
const require_git = require('./schemas/git.cjs');
|
|
36
41
|
const require_changeset = require('./schemas/changeset.cjs');
|
|
37
42
|
const require_release_plan = require('./schemas/release-plan.cjs');
|
|
38
|
-
const require_dep_diff = require('./utils/dep-diff.cjs');
|
|
39
|
-
const require_publishability = require('./utils/publishability.cjs');
|
|
40
|
-
const require_worktree_snapshot = require('./utils/worktree-snapshot.cjs');
|
|
41
43
|
const require_content_structure$1 = require('./markdownlint/rules/content-structure.cjs');
|
|
42
|
-
const require_dependency_table_format = require('./markdownlint/rules/dependency-table-format.cjs');
|
|
44
|
+
const require_dependency_table_format$1 = require('./markdownlint/rules/dependency-table-format.cjs');
|
|
43
45
|
const require_heading_hierarchy$1 = require('./markdownlint/rules/heading-hierarchy.cjs');
|
|
44
46
|
const require_required_sections$1 = require('./markdownlint/rules/required-sections.cjs');
|
|
45
47
|
const require_uncategorized_content$1 = require('./markdownlint/rules/uncategorized-content.cjs');
|
|
46
48
|
const require_index$1 = require('./markdownlint/index.cjs');
|
|
47
49
|
const require_aggregate_dependency_tables = require('./remark/plugins/aggregate-dependency-tables.cjs');
|
|
48
|
-
const require_dependency_table_format$1 = require('./remark/rules/dependency-table-format.cjs');
|
|
49
50
|
const require_presets = require('./remark/presets.cjs');
|
|
50
51
|
|
|
51
52
|
//#region ../silk-effects/dist/dev/pkg/changesets/index.js
|
|
@@ -84,12 +85,15 @@ var changesets_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
84
85
|
DeduplicateItemsPlugin: () => require_deduplicate_items.DeduplicateItemsPlugin,
|
|
85
86
|
DependencyActionSchema: () => require_dependency_table.DependencyActionSchema,
|
|
86
87
|
DependencyTable: () => require_dependency_table$2.DependencyTable,
|
|
87
|
-
DependencyTableFormatRule: () => require_dependency_table_format
|
|
88
|
+
DependencyTableFormatRule: () => require_dependency_table_format.DependencyTableFormatRule,
|
|
88
89
|
DependencyTableRowSchema: () => require_dependency_table.DependencyTableRowSchema,
|
|
89
90
|
DependencyTableSchema: () => require_dependency_table.DependencyTableSchema,
|
|
90
91
|
DependencyTableTypeSchema: () => require_dependency_table.DependencyTableTypeSchema,
|
|
91
92
|
DependencyTypeSchema: () => require_changeset.DependencyTypeSchema,
|
|
92
93
|
DependencyUpdateSchema: () => require_changeset.DependencyUpdateSchema,
|
|
94
|
+
DepsRegen: () => require_deps_regen.DepsRegen,
|
|
95
|
+
DepsRegenBase: () => require_deps_regen.DepsRegenBase,
|
|
96
|
+
DepsRegenLive: () => require_deps_regen.DepsRegenLive,
|
|
93
97
|
FileStatusSchema: () => require_branch_analyzer.FileStatusSchema,
|
|
94
98
|
GitError: () => require_errors.GitError,
|
|
95
99
|
GitErrorBase: () => require_errors.GitErrorBase,
|
|
@@ -113,7 +117,7 @@ var changesets_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
113
117
|
MarkdownService: () => require_markdown.MarkdownService,
|
|
114
118
|
MarkdownServiceBase: () => require_markdown.MarkdownServiceBase,
|
|
115
119
|
MarkdownlintContentStructureRule: () => require_content_structure$1.ContentStructureRule,
|
|
116
|
-
MarkdownlintDependencyTableFormatRule: () => require_dependency_table_format.DependencyTableFormatRule,
|
|
120
|
+
MarkdownlintDependencyTableFormatRule: () => require_dependency_table_format$1.DependencyTableFormatRule,
|
|
117
121
|
MarkdownlintHeadingHierarchyRule: () => require_heading_hierarchy$1.HeadingHierarchyRule,
|
|
118
122
|
MarkdownlintRequiredSectionsRule: () => require_required_sections$1.RequiredSectionsRule,
|
|
119
123
|
MarkdownlintUncategorizedContentRule: () => require_uncategorized_content$1.UncategorizedContentRule,
|
|
@@ -142,6 +146,7 @@ var changesets_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
142
146
|
UncategorizedContentRule: () => require_uncategorized_content.UncategorizedContentRule,
|
|
143
147
|
UrlOrMarkdownLinkSchema: () => require_github$1.UrlOrMarkdownLinkSchema,
|
|
144
148
|
UsernameSchema: () => require_github$1.UsernameSchema,
|
|
149
|
+
VERSION_RE: () => require_dependency_table.VERSION_RE,
|
|
145
150
|
VersionFileConfigSchema: () => require_version_files.VersionFileConfigSchema,
|
|
146
151
|
VersionFileError: () => require_errors.VersionFileError,
|
|
147
152
|
VersionFileErrorBase: () => require_errors.VersionFileErrorBase,
|
|
@@ -156,11 +161,13 @@ var changesets_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
156
161
|
changelogFunctions: () => require_index.default,
|
|
157
162
|
computeWorkspaceDependencyDiffs: () => require_dep_diff.computeWorkspaceDependencyDiffs,
|
|
158
163
|
gitMergeBase: () => require_worktree_snapshot.gitMergeBase,
|
|
164
|
+
isPureDependencyChangeset: () => require_deps_regen.isPureDependencyChangeset,
|
|
159
165
|
listPublishablePackageNames: () => require_publishability.listPublishablePackageNames,
|
|
160
166
|
makeBranchAnalyzerTest: () => require_branch_analyzer.makeBranchAnalyzerTest,
|
|
161
167
|
makeConfigInspectorTest: () => require_config_inspector.makeConfigInspectorTest,
|
|
162
168
|
makeGitHubTest: () => require_github.makeGitHubTest,
|
|
163
169
|
makeReleasePlannerTest: () => require_release_planner.makeReleasePlannerTest,
|
|
170
|
+
resolveDiffRows: () => require_deps_regen.resolveDiffRows,
|
|
164
171
|
serializeDependencyTableToMarkdown: () => require_dependency_table$1.serializeDependencyTableToMarkdown,
|
|
165
172
|
snapshotFromWorktree: () => require_worktree_snapshot.snapshotFromWorktree
|
|
166
173
|
});
|
|
@@ -200,12 +207,15 @@ exports.ContributorFootnotesPlugin = require_contributor_footnotes.ContributorFo
|
|
|
200
207
|
exports.DeduplicateItemsPlugin = require_deduplicate_items.DeduplicateItemsPlugin;
|
|
201
208
|
exports.DependencyActionSchema = require_dependency_table.DependencyActionSchema;
|
|
202
209
|
exports.DependencyTable = require_dependency_table$2.DependencyTable;
|
|
203
|
-
exports.DependencyTableFormatRule = require_dependency_table_format
|
|
210
|
+
exports.DependencyTableFormatRule = require_dependency_table_format.DependencyTableFormatRule;
|
|
204
211
|
exports.DependencyTableRowSchema = require_dependency_table.DependencyTableRowSchema;
|
|
205
212
|
exports.DependencyTableSchema = require_dependency_table.DependencyTableSchema;
|
|
206
213
|
exports.DependencyTableTypeSchema = require_dependency_table.DependencyTableTypeSchema;
|
|
207
214
|
exports.DependencyTypeSchema = require_changeset.DependencyTypeSchema;
|
|
208
215
|
exports.DependencyUpdateSchema = require_changeset.DependencyUpdateSchema;
|
|
216
|
+
exports.DepsRegen = require_deps_regen.DepsRegen;
|
|
217
|
+
exports.DepsRegenBase = require_deps_regen.DepsRegenBase;
|
|
218
|
+
exports.DepsRegenLive = require_deps_regen.DepsRegenLive;
|
|
209
219
|
exports.FileStatusSchema = require_branch_analyzer.FileStatusSchema;
|
|
210
220
|
exports.GitError = require_errors.GitError;
|
|
211
221
|
exports.GitErrorBase = require_errors.GitErrorBase;
|
|
@@ -229,7 +239,7 @@ exports.MarkdownParseErrorBase = require_errors.MarkdownParseErrorBase;
|
|
|
229
239
|
exports.MarkdownService = require_markdown.MarkdownService;
|
|
230
240
|
exports.MarkdownServiceBase = require_markdown.MarkdownServiceBase;
|
|
231
241
|
exports.MarkdownlintContentStructureRule = require_content_structure$1.ContentStructureRule;
|
|
232
|
-
exports.MarkdownlintDependencyTableFormatRule = require_dependency_table_format.DependencyTableFormatRule;
|
|
242
|
+
exports.MarkdownlintDependencyTableFormatRule = require_dependency_table_format$1.DependencyTableFormatRule;
|
|
233
243
|
exports.MarkdownlintHeadingHierarchyRule = require_heading_hierarchy$1.HeadingHierarchyRule;
|
|
234
244
|
exports.MarkdownlintRequiredSectionsRule = require_required_sections$1.RequiredSectionsRule;
|
|
235
245
|
exports.MarkdownlintUncategorizedContentRule = require_uncategorized_content$1.UncategorizedContentRule;
|
|
@@ -258,6 +268,7 @@ exports.SilkChangesetsRules = require_index$1.default;
|
|
|
258
268
|
exports.UncategorizedContentRule = require_uncategorized_content.UncategorizedContentRule;
|
|
259
269
|
exports.UrlOrMarkdownLinkSchema = require_github$1.UrlOrMarkdownLinkSchema;
|
|
260
270
|
exports.UsernameSchema = require_github$1.UsernameSchema;
|
|
271
|
+
exports.VERSION_RE = require_dependency_table.VERSION_RE;
|
|
261
272
|
exports.VersionFileConfigSchema = require_version_files.VersionFileConfigSchema;
|
|
262
273
|
exports.VersionFileError = require_errors.VersionFileError;
|
|
263
274
|
exports.VersionFileErrorBase = require_errors.VersionFileErrorBase;
|
|
@@ -273,10 +284,12 @@ exports.changelogFunctions = require_index.default;
|
|
|
273
284
|
exports.changesets_exports = changesets_exports;
|
|
274
285
|
exports.computeWorkspaceDependencyDiffs = require_dep_diff.computeWorkspaceDependencyDiffs;
|
|
275
286
|
exports.gitMergeBase = require_worktree_snapshot.gitMergeBase;
|
|
287
|
+
exports.isPureDependencyChangeset = require_deps_regen.isPureDependencyChangeset;
|
|
276
288
|
exports.listPublishablePackageNames = require_publishability.listPublishablePackageNames;
|
|
277
289
|
exports.makeBranchAnalyzerTest = require_branch_analyzer.makeBranchAnalyzerTest;
|
|
278
290
|
exports.makeConfigInspectorTest = require_config_inspector.makeConfigInspectorTest;
|
|
279
291
|
exports.makeGitHubTest = require_github.makeGitHubTest;
|
|
280
292
|
exports.makeReleasePlannerTest = require_release_planner.makeReleasePlannerTest;
|
|
293
|
+
exports.resolveDiffRows = require_deps_regen.resolveDiffRows;
|
|
281
294
|
exports.serializeDependencyTableToMarkdown = require_dependency_table$1.serializeDependencyTableToMarkdown;
|
|
282
295
|
exports.snapshotFromWorktree = require_worktree_snapshot.snapshotFromWorktree;
|
|
@@ -7,13 +7,14 @@ import { ChangesetOptionsSchema, RepoSchema } from "./schemas/options.js";
|
|
|
7
7
|
import { GitHubLive, GitHubService, GitHubServiceBase, makeGitHubTest } from "./services/github.js";
|
|
8
8
|
import { MarkdownLive, MarkdownService, MarkdownServiceBase } from "./services/markdown.js";
|
|
9
9
|
import { NonEmptyString, PositiveInteger } from "./schemas/primitives.js";
|
|
10
|
-
import { DependencyActionSchema, DependencyTableRowSchema, DependencyTableSchema, DependencyTableTypeSchema, VersionOrEmptySchema } from "./schemas/dependency-table.js";
|
|
10
|
+
import { DependencyActionSchema, DependencyTableRowSchema, DependencyTableSchema, DependencyTableTypeSchema, VERSION_RE, VersionOrEmptySchema } from "./schemas/dependency-table.js";
|
|
11
11
|
import { serializeDependencyTableToMarkdown } from "./utils/dependency-table.js";
|
|
12
12
|
import { GitHubInfoSchema, IssueNumberSchema, UrlOrMarkdownLinkSchema, UsernameSchema } from "./schemas/github.js";
|
|
13
13
|
import changelogFunctions from "./changelog/index.js";
|
|
14
14
|
import { Changelog } from "./api/changelog.js";
|
|
15
15
|
import { DependencyTable } from "./api/dependency-table.js";
|
|
16
16
|
import { ContentStructureRule } from "./remark/rules/content-structure.js";
|
|
17
|
+
import { DependencyTableFormatRule } from "./remark/rules/dependency-table-format.js";
|
|
17
18
|
import { HeadingHierarchyRule } from "./remark/rules/heading-hierarchy.js";
|
|
18
19
|
import { RequiredSectionsRule } from "./remark/rules/required-sections.js";
|
|
19
20
|
import { UncategorizedContentRule } from "./remark/rules/uncategorized-content.js";
|
|
@@ -28,24 +29,24 @@ import { ChangelogTransformer } from "./api/transformer.js";
|
|
|
28
29
|
import { ClassificationReasonSchema, ClassificationSchema, ConfigInspector, ConfigInspectorBase, ConfigInspectorLive, InspectedConfigSchema, ResolvedPackageScopeSchema, ResolvedVersionFileSchema, makeConfigInspectorTest } from "./services/config-inspector.js";
|
|
29
30
|
import { BranchAnalysisSchema, BranchAnalyzer, BranchAnalyzerBase, BranchAnalyzerLive, BranchFileEntrySchema, FileStatusSchema, makeBranchAnalyzerTest } from "./services/branch-analyzer.js";
|
|
30
31
|
import { ChangelogService, ChangelogServiceBase } from "./services/changelog.js";
|
|
32
|
+
import { computeWorkspaceDependencyDiffs } from "./utils/dep-diff.js";
|
|
33
|
+
import { listPublishablePackageNames } from "./utils/publishability.js";
|
|
34
|
+
import { gitMergeBase, snapshotFromWorktree } from "./utils/worktree-snapshot.js";
|
|
35
|
+
import { WorkspaceSnapshotReader, WorkspaceSnapshotReaderBase, WorkspaceSnapshotReaderLive } from "./services/workspace-snapshot.js";
|
|
36
|
+
import { DepsRegen, DepsRegenBase, DepsRegenLive, isPureDependencyChangeset, resolveDiffRows } from "./services/deps-regen.js";
|
|
31
37
|
import { VersionFiles } from "./utils/version-files.js";
|
|
32
38
|
import { ReleasePlanner, ReleasePlannerBase, ReleasePlannerLive, makeReleasePlannerTest } from "./services/release-planner.js";
|
|
33
|
-
import { WorkspaceSnapshotReader, WorkspaceSnapshotReaderBase, WorkspaceSnapshotReaderLive } from "./services/workspace-snapshot.js";
|
|
34
39
|
import { SectionCategorySchema } from "./categories/types.js";
|
|
35
40
|
import { CommitHashSchema, VersionTypeSchema } from "./schemas/git.js";
|
|
36
41
|
import { ChangesetSchema, ChangesetSummarySchema, DependencyTypeSchema, DependencyUpdateSchema } from "./schemas/changeset.js";
|
|
37
42
|
import { AppliedReleaseEntrySchema, AppliedReleaseSchema, BumpTypeSchema, ChangesetPreviewSchema, PendingChangesetSchema, PreviewReleaseSchema, VersionFileUpdateRecordSchema } from "./schemas/release-plan.js";
|
|
38
|
-
import { computeWorkspaceDependencyDiffs } from "./utils/dep-diff.js";
|
|
39
|
-
import { listPublishablePackageNames } from "./utils/publishability.js";
|
|
40
|
-
import { gitMergeBase, snapshotFromWorktree } from "./utils/worktree-snapshot.js";
|
|
41
43
|
import { ContentStructureRule as ContentStructureRule$1 } from "./markdownlint/rules/content-structure.js";
|
|
42
|
-
import { DependencyTableFormatRule } from "./markdownlint/rules/dependency-table-format.js";
|
|
44
|
+
import { DependencyTableFormatRule as DependencyTableFormatRule$1 } from "./markdownlint/rules/dependency-table-format.js";
|
|
43
45
|
import { HeadingHierarchyRule as HeadingHierarchyRule$1 } from "./markdownlint/rules/heading-hierarchy.js";
|
|
44
46
|
import { RequiredSectionsRule as RequiredSectionsRule$1 } from "./markdownlint/rules/required-sections.js";
|
|
45
47
|
import { UncategorizedContentRule as UncategorizedContentRule$1 } from "./markdownlint/rules/uncategorized-content.js";
|
|
46
48
|
import SilkChangesetsRules from "./markdownlint/index.js";
|
|
47
49
|
import { AggregateDependencyTablesPlugin } from "./remark/plugins/aggregate-dependency-tables.js";
|
|
48
|
-
import { DependencyTableFormatRule as DependencyTableFormatRule$1 } from "./remark/rules/dependency-table-format.js";
|
|
49
50
|
import { SilkChangesetPreset, SilkChangesetTransformPreset } from "./remark/presets.js";
|
|
50
51
|
|
|
51
52
|
//#region ../silk-effects/dist/dev/pkg/changesets/index.js
|
|
@@ -84,12 +85,15 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
|
|
|
84
85
|
DeduplicateItemsPlugin: () => DeduplicateItemsPlugin,
|
|
85
86
|
DependencyActionSchema: () => DependencyActionSchema,
|
|
86
87
|
DependencyTable: () => DependencyTable,
|
|
87
|
-
DependencyTableFormatRule: () => DependencyTableFormatRule
|
|
88
|
+
DependencyTableFormatRule: () => DependencyTableFormatRule,
|
|
88
89
|
DependencyTableRowSchema: () => DependencyTableRowSchema,
|
|
89
90
|
DependencyTableSchema: () => DependencyTableSchema,
|
|
90
91
|
DependencyTableTypeSchema: () => DependencyTableTypeSchema,
|
|
91
92
|
DependencyTypeSchema: () => DependencyTypeSchema,
|
|
92
93
|
DependencyUpdateSchema: () => DependencyUpdateSchema,
|
|
94
|
+
DepsRegen: () => DepsRegen,
|
|
95
|
+
DepsRegenBase: () => DepsRegenBase,
|
|
96
|
+
DepsRegenLive: () => DepsRegenLive,
|
|
93
97
|
FileStatusSchema: () => FileStatusSchema,
|
|
94
98
|
GitError: () => GitError,
|
|
95
99
|
GitErrorBase: () => GitErrorBase,
|
|
@@ -113,7 +117,7 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
|
|
|
113
117
|
MarkdownService: () => MarkdownService,
|
|
114
118
|
MarkdownServiceBase: () => MarkdownServiceBase,
|
|
115
119
|
MarkdownlintContentStructureRule: () => ContentStructureRule$1,
|
|
116
|
-
MarkdownlintDependencyTableFormatRule: () => DependencyTableFormatRule,
|
|
120
|
+
MarkdownlintDependencyTableFormatRule: () => DependencyTableFormatRule$1,
|
|
117
121
|
MarkdownlintHeadingHierarchyRule: () => HeadingHierarchyRule$1,
|
|
118
122
|
MarkdownlintRequiredSectionsRule: () => RequiredSectionsRule$1,
|
|
119
123
|
MarkdownlintUncategorizedContentRule: () => UncategorizedContentRule$1,
|
|
@@ -142,6 +146,7 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
|
|
|
142
146
|
UncategorizedContentRule: () => UncategorizedContentRule,
|
|
143
147
|
UrlOrMarkdownLinkSchema: () => UrlOrMarkdownLinkSchema,
|
|
144
148
|
UsernameSchema: () => UsernameSchema,
|
|
149
|
+
VERSION_RE: () => VERSION_RE,
|
|
145
150
|
VersionFileConfigSchema: () => VersionFileConfigSchema,
|
|
146
151
|
VersionFileError: () => VersionFileError,
|
|
147
152
|
VersionFileErrorBase: () => VersionFileErrorBase,
|
|
@@ -156,14 +161,16 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
|
|
|
156
161
|
changelogFunctions: () => changelogFunctions,
|
|
157
162
|
computeWorkspaceDependencyDiffs: () => computeWorkspaceDependencyDiffs,
|
|
158
163
|
gitMergeBase: () => gitMergeBase,
|
|
164
|
+
isPureDependencyChangeset: () => isPureDependencyChangeset,
|
|
159
165
|
listPublishablePackageNames: () => listPublishablePackageNames,
|
|
160
166
|
makeBranchAnalyzerTest: () => makeBranchAnalyzerTest,
|
|
161
167
|
makeConfigInspectorTest: () => makeConfigInspectorTest,
|
|
162
168
|
makeGitHubTest: () => makeGitHubTest,
|
|
163
169
|
makeReleasePlannerTest: () => makeReleasePlannerTest,
|
|
170
|
+
resolveDiffRows: () => resolveDiffRows,
|
|
164
171
|
serializeDependencyTableToMarkdown: () => serializeDependencyTableToMarkdown,
|
|
165
172
|
snapshotFromWorktree: () => snapshotFromWorktree
|
|
166
173
|
});
|
|
167
174
|
|
|
168
175
|
//#endregion
|
|
169
|
-
export { AggregateDependencyTablesPlugin, AppliedReleaseEntrySchema, AppliedReleaseSchema, BranchAnalysisSchema, BranchAnalyzer, BranchAnalyzerBase, BranchAnalyzerLive, BranchFileEntrySchema, BumpTypeSchema, Categories, Changelog, ChangelogService, ChangelogServiceBase, ChangelogTransformer, ChangesetLinter, ChangesetOptionsSchema, ChangesetPreviewSchema, ChangesetSchema, ChangesetSummarySchema, ChangesetValidationError, ChangesetValidationErrorBase, ClassificationReasonSchema, ClassificationSchema, CommitHashSchema, ConfigInspector, ConfigInspectorBase, ConfigInspectorLive, ConfigurationError, ConfigurationErrorBase, ContentStructureRule, ContributorFootnotesPlugin, DeduplicateItemsPlugin, DependencyActionSchema, DependencyTable, DependencyTableFormatRule
|
|
176
|
+
export { AggregateDependencyTablesPlugin, AppliedReleaseEntrySchema, AppliedReleaseSchema, BranchAnalysisSchema, BranchAnalyzer, BranchAnalyzerBase, BranchAnalyzerLive, BranchFileEntrySchema, BumpTypeSchema, Categories, Changelog, ChangelogService, ChangelogServiceBase, ChangelogTransformer, ChangesetLinter, ChangesetOptionsSchema, ChangesetPreviewSchema, ChangesetSchema, ChangesetSummarySchema, ChangesetValidationError, ChangesetValidationErrorBase, ClassificationReasonSchema, ClassificationSchema, CommitHashSchema, ConfigInspector, ConfigInspectorBase, ConfigInspectorLive, ConfigurationError, ConfigurationErrorBase, ContentStructureRule, ContributorFootnotesPlugin, DeduplicateItemsPlugin, DependencyActionSchema, DependencyTable, DependencyTableFormatRule, DependencyTableRowSchema, DependencyTableSchema, DependencyTableTypeSchema, DependencyTypeSchema, DependencyUpdateSchema, DepsRegen, DepsRegenBase, DepsRegenLive, FileStatusSchema, GitError, GitErrorBase, GitHubApiError, GitHubApiErrorBase, GitHubInfoSchema, GitHubLive, GitHubService, GitHubServiceBase, GlobSchema, HeadingHierarchyRule, InspectedConfigSchema, IssueLinkRefsPlugin, IssueNumberSchema, JsonPathSchema, LegacyVersionFileConfigSchema, LegacyVersionFilesSchema, MarkdownLive, MarkdownParseError, MarkdownParseErrorBase, MarkdownService, MarkdownServiceBase, ContentStructureRule$1 as MarkdownlintContentStructureRule, DependencyTableFormatRule$1 as MarkdownlintDependencyTableFormatRule, HeadingHierarchyRule$1 as MarkdownlintHeadingHierarchyRule, RequiredSectionsRule$1 as MarkdownlintRequiredSectionsRule, UncategorizedContentRule$1 as MarkdownlintUncategorizedContentRule, MergeSectionsPlugin, NonEmptyString, NormalizeFormatPlugin, PackageScopeSchema, PackagesRecordSchema, PendingChangesetSchema, PositiveInteger, PreviewReleaseSchema, ReleasePlanError, ReleasePlanErrorBase, ReleasePlanner, ReleasePlannerBase, ReleasePlannerLive, ReorderSectionsPlugin, RepoSchema, RequiredSectionsRule, ResolvedPackageScopeSchema, ResolvedVersionFileSchema, SectionCategorySchema, SilkChangesetPreset, SilkChangesetTransformPreset, SilkChangesetsRules, UncategorizedContentRule, UrlOrMarkdownLinkSchema, UsernameSchema, VERSION_RE, VersionFileConfigSchema, VersionFileError, VersionFileErrorBase, VersionFileUpdateRecordSchema, VersionFiles, VersionFilesSchema, VersionOrEmptySchema, VersionTypeSchema, WorkspaceSnapshotReader, WorkspaceSnapshotReaderBase, WorkspaceSnapshotReaderLive, changelogFunctions, changesets_exports, computeWorkspaceDependencyDiffs, gitMergeBase, isPureDependencyChangeset, listPublishablePackageNames, makeBranchAnalyzerTest, makeConfigInspectorTest, makeGitHubTest, makeReleasePlannerTest, resolveDiffRows, serializeDependencyTableToMarkdown, snapshotFromWorktree };
|
package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/dependency-table-format.cjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const require_dependency_table = require('../../schemas/dependency-table.cjs');
|
|
1
2
|
const require_constants = require('../../constants.cjs');
|
|
2
3
|
const require_utils = require('./utils.cjs');
|
|
3
4
|
|
|
@@ -23,7 +24,6 @@ const EXPECTED_HEADERS = [
|
|
|
23
24
|
"from",
|
|
24
25
|
"to"
|
|
25
26
|
];
|
|
26
|
-
const VERSION_RE = /^(\u2014|[~^]?\d+\.\d+\.\d+(?:[-+.][\w.+-]*)?)$/;
|
|
27
27
|
/**
|
|
28
28
|
* Extract text from a `tableHeader` or `tableData` cell token.
|
|
29
29
|
*
|
|
@@ -145,11 +145,11 @@ const DependencyTableFormatRule = {
|
|
|
145
145
|
lineNumber: row.startLine,
|
|
146
146
|
detail: `Invalid dependency action '${action}'. Valid actions are: ${[...VALID_ACTIONS].join(", ")}. See: ${require_constants.RULE_DOCS.CSH005}`
|
|
147
147
|
});
|
|
148
|
-
if (from && !VERSION_RE.test(from)) onError({
|
|
148
|
+
if (from && !require_dependency_table.VERSION_RE.test(from)) onError({
|
|
149
149
|
lineNumber: row.startLine,
|
|
150
150
|
detail: `Invalid 'from' value '${from}'. Must be a semver string or em dash (\u2014). See: ${require_constants.RULE_DOCS.CSH005}`
|
|
151
151
|
});
|
|
152
|
-
if (to && !VERSION_RE.test(to)) onError({
|
|
152
|
+
if (to && !require_dependency_table.VERSION_RE.test(to)) onError({
|
|
153
153
|
lineNumber: row.startLine,
|
|
154
154
|
detail: `Invalid 'to' value '${to}'. Must be a semver string or em dash (\u2014). See: ${require_constants.RULE_DOCS.CSH005}`
|
|
155
155
|
});
|
package/packages/silk-effects/dist/dev/pkg/changesets/markdownlint/rules/dependency-table-format.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VERSION_RE } from "../../schemas/dependency-table.js";
|
|
1
2
|
import { RULE_DOCS } from "../../constants.js";
|
|
2
3
|
import { getHeadingLevel, getHeadingText } from "./utils.js";
|
|
3
4
|
|
|
@@ -23,7 +24,6 @@ const EXPECTED_HEADERS = [
|
|
|
23
24
|
"from",
|
|
24
25
|
"to"
|
|
25
26
|
];
|
|
26
|
-
const VERSION_RE = /^(\u2014|[~^]?\d+\.\d+\.\d+(?:[-+.][\w.+-]*)?)$/;
|
|
27
27
|
/**
|
|
28
28
|
* Extract text from a `tableHeader` or `tableData` cell token.
|
|
29
29
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_content_structure = require('./rules/content-structure.cjs');
|
|
2
|
+
const require_dependency_table_format = require('./rules/dependency-table-format.cjs');
|
|
2
3
|
const require_heading_hierarchy = require('./rules/heading-hierarchy.cjs');
|
|
3
4
|
const require_required_sections = require('./rules/required-sections.cjs');
|
|
4
5
|
const require_uncategorized_content = require('./rules/uncategorized-content.cjs');
|
|
@@ -9,7 +10,6 @@ const require_merge_sections = require('./plugins/merge-sections.cjs');
|
|
|
9
10
|
const require_normalize_format = require('./plugins/normalize-format.cjs');
|
|
10
11
|
const require_reorder_sections = require('./plugins/reorder-sections.cjs');
|
|
11
12
|
const require_aggregate_dependency_tables = require('./plugins/aggregate-dependency-tables.cjs');
|
|
12
|
-
const require_dependency_table_format = require('./rules/dependency-table-format.cjs');
|
|
13
13
|
|
|
14
14
|
//#region ../silk-effects/dist/dev/pkg/changesets/remark/presets.js
|
|
15
15
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ContentStructureRule } from "./rules/content-structure.js";
|
|
2
|
+
import { DependencyTableFormatRule } from "./rules/dependency-table-format.js";
|
|
2
3
|
import { HeadingHierarchyRule } from "./rules/heading-hierarchy.js";
|
|
3
4
|
import { RequiredSectionsRule } from "./rules/required-sections.js";
|
|
4
5
|
import { UncategorizedContentRule } from "./rules/uncategorized-content.js";
|
|
@@ -9,7 +10,6 @@ import { MergeSectionsPlugin } from "./plugins/merge-sections.js";
|
|
|
9
10
|
import { NormalizeFormatPlugin } from "./plugins/normalize-format.js";
|
|
10
11
|
import { ReorderSectionsPlugin } from "./plugins/reorder-sections.js";
|
|
11
12
|
import { AggregateDependencyTablesPlugin } from "./plugins/aggregate-dependency-tables.js";
|
|
12
|
-
import { DependencyTableFormatRule } from "./rules/dependency-table-format.js";
|
|
13
13
|
|
|
14
14
|
//#region ../silk-effects/dist/dev/pkg/changesets/remark/presets.js
|
|
15
15
|
/**
|
|
@@ -68,6 +68,16 @@ const DependencyActionSchema = effect.Schema.Literal("added", "updated", "remove
|
|
|
68
68
|
*/
|
|
69
69
|
const DependencyTableTypeSchema = effect.Schema.Literal("dependency", "devDependency", "peerDependency", "optionalDependency", "workspace", "config");
|
|
70
70
|
/**
|
|
71
|
+
* The canonical accepted-value pattern for a dependency-table From/To cell:
|
|
72
|
+
* the em-dash sentinel (U+2014), a bare/`~`/`^` semver, or — as a last-resort
|
|
73
|
+
* fallback when a `catalog:`/`workspace:` specifier could not be resolved to a
|
|
74
|
+
* concrete version — a pnpm protocol string. Non-overlapping alternatives keep
|
|
75
|
+
* this free of polynomial backtracking (CodeQL).
|
|
76
|
+
*
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
const VERSION_RE = /^(\u2014|[~^]?\d+\.\d+\.\d+(?:[-+.][\w.+-]+)?|(?:catalog|workspace|npm|jsr|file|link|portal):[^\s|]+)$/;
|
|
80
|
+
/**
|
|
71
81
|
* Version string or em dash (U+2014) sentinel for added/removed entries.
|
|
72
82
|
*
|
|
73
83
|
* @remarks
|
|
@@ -93,7 +103,7 @@ const DependencyTableTypeSchema = effect.Schema.Literal("dependency", "devDepend
|
|
|
93
103
|
*
|
|
94
104
|
* @public
|
|
95
105
|
*/
|
|
96
|
-
const VersionOrEmptySchema = effect.Schema.String.pipe(effect.Schema.pattern(
|
|
106
|
+
const VersionOrEmptySchema = effect.Schema.String.pipe(effect.Schema.pattern(VERSION_RE));
|
|
97
107
|
/**
|
|
98
108
|
* Schema for a single dependency table row.
|
|
99
109
|
*
|
|
@@ -189,4 +199,5 @@ exports.DependencyActionSchema = DependencyActionSchema;
|
|
|
189
199
|
exports.DependencyTableRowSchema = DependencyTableRowSchema;
|
|
190
200
|
exports.DependencyTableSchema = DependencyTableSchema;
|
|
191
201
|
exports.DependencyTableTypeSchema = DependencyTableTypeSchema;
|
|
202
|
+
exports.VERSION_RE = VERSION_RE;
|
|
192
203
|
exports.VersionOrEmptySchema = VersionOrEmptySchema;
|
|
@@ -68,6 +68,16 @@ const DependencyActionSchema = Schema.Literal("added", "updated", "removed");
|
|
|
68
68
|
*/
|
|
69
69
|
const DependencyTableTypeSchema = Schema.Literal("dependency", "devDependency", "peerDependency", "optionalDependency", "workspace", "config");
|
|
70
70
|
/**
|
|
71
|
+
* The canonical accepted-value pattern for a dependency-table From/To cell:
|
|
72
|
+
* the em-dash sentinel (U+2014), a bare/`~`/`^` semver, or — as a last-resort
|
|
73
|
+
* fallback when a `catalog:`/`workspace:` specifier could not be resolved to a
|
|
74
|
+
* concrete version — a pnpm protocol string. Non-overlapping alternatives keep
|
|
75
|
+
* this free of polynomial backtracking (CodeQL).
|
|
76
|
+
*
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
const VERSION_RE = /^(\u2014|[~^]?\d+\.\d+\.\d+(?:[-+.][\w.+-]+)?|(?:catalog|workspace|npm|jsr|file|link|portal):[^\s|]+)$/;
|
|
80
|
+
/**
|
|
71
81
|
* Version string or em dash (U+2014) sentinel for added/removed entries.
|
|
72
82
|
*
|
|
73
83
|
* @remarks
|
|
@@ -93,7 +103,7 @@ const DependencyTableTypeSchema = Schema.Literal("dependency", "devDependency",
|
|
|
93
103
|
*
|
|
94
104
|
* @public
|
|
95
105
|
*/
|
|
96
|
-
const VersionOrEmptySchema = Schema.String.pipe(Schema.pattern(
|
|
106
|
+
const VersionOrEmptySchema = Schema.String.pipe(Schema.pattern(VERSION_RE));
|
|
97
107
|
/**
|
|
98
108
|
* Schema for a single dependency table row.
|
|
99
109
|
*
|
|
@@ -185,4 +195,4 @@ const DependencyTableRowSchema = Schema.Struct({
|
|
|
185
195
|
const DependencyTableSchema = Schema.Array(DependencyTableRowSchema).pipe(Schema.minItems(1));
|
|
186
196
|
|
|
187
197
|
//#endregion
|
|
188
|
-
export { DependencyActionSchema, DependencyTableRowSchema, DependencyTableSchema, DependencyTableTypeSchema, VersionOrEmptySchema };
|
|
198
|
+
export { DependencyActionSchema, DependencyTableRowSchema, DependencyTableSchema, DependencyTableTypeSchema, VERSION_RE, VersionOrEmptySchema };
|