@savvy-web/cli 1.3.2 → 1.3.4

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/cli/index.js CHANGED
@@ -57,7 +57,7 @@ const rootCommand = Command.make("savvy").pipe(Command.withSubcommands([
57
57
  ]));
58
58
  const cli = Command.run(rootCommand, {
59
59
  name: "savvy",
60
- version: "1.3.2"
60
+ version: "1.3.4"
61
61
  });
62
62
  /**
63
63
  * Shared base layer: workspace services, the changeset config reader, and the
@@ -60,4 +60,4 @@ function runConfigValidate(dir) {
60
60
  const configValidateCommand = Command.make("validate", { dir: dirArg }, ({ dir }) => runConfigValidate(dir)).pipe(Command.withDescription("Validate .changeset/config.json without rendering it"));
61
61
 
62
62
  //#endregion
63
- export { configValidateCommand };
63
+ export { configValidateCommand, runConfigValidate };
@@ -100,4 +100,4 @@ const depsDetectCommand = Command.make("detect", {
100
100
  }, ({ from, to, cwd, package: pkg, json, markdown }) => runDepsDetect(cwd, from, to, pkg, json, markdown)).pipe(Command.withDescription("Compute the dependency diff between two refs"));
101
101
 
102
102
  //#endregion
103
- export { depsDetectCommand };
103
+ export { depsDetectCommand, renderMarkdownBlocks, runDepsDetect };
@@ -274,4 +274,4 @@ const depsRegenCommand = Command.make("regen", {
274
274
  }, ({ cwd, base, package: pkg, dryRun, json }) => runDepsRegen(cwd, base, pkg, dryRun, json)).pipe(Command.withDescription("Delete pure dependency changesets and regenerate them from the current diff"));
275
275
 
276
276
  //#endregion
277
- export { depsRegenCommand };
277
+ export { depsRegenCommand, isPureDependencyChangeset, runDepsRegen };
@@ -615,4 +615,4 @@ function runChangesetInit(opts) {
615
615
  }
616
616
 
617
617
  //#endregion
618
- export { runChangesetInit };
618
+ export { InitError, InitErrorBase, checkBaseMarkdownlint, checkChangesetDir, checkChangesetMarkdownlint, checkConfig, detectGitHubRepo, detectLegacyVersionFiles, ensureChangesetDir, findMarkdownlintConfig, handleBaseMarkdownlint, handleChangesetMarkdownlint, handleConfig, legacyVersionFilesWarning, resolveWorkspaceRoot, runChangesetInit, warnIfLegacyVersionFiles };
@@ -59,4 +59,4 @@ const lintCommand = Command.make("lint", {
59
59
  }, ({ dir, quiet }) => runLint(dir, quiet)).pipe(Command.withDescription("Validate changeset files"));
60
60
 
61
61
  //#endregion
62
- export { lintCommand };
62
+ export { lintCommand, runLint };
@@ -85,4 +85,4 @@ const transformCommand = Command.make("transform", {
85
85
  }, ({ file, dryRun, check }) => runTransform(file, dryRun, check)).pipe(Command.withDescription("Post-process CHANGELOG.md"));
86
86
 
87
87
  //#endregion
88
- export { transformCommand };
88
+ export { runTransform, transformCommand };
@@ -49,4 +49,4 @@ function runValidateFile(filePath) {
49
49
  const validateFileCommand = Command.make("validate-file", { file: fileArg }, ({ file }) => runValidateFile(file)).pipe(Command.withDescription("Validate a single changeset file"));
50
50
 
51
51
  //#endregion
52
- export { validateFileCommand };
52
+ export { runValidateFile, validateFileCommand };
@@ -42,4 +42,4 @@ function runVersion(dryRun) {
42
42
  const versionCommand = Command.make("version", { dryRun: dryRunOption }, ({ dryRun }) => runVersion(dryRun)).pipe(Command.withDescription("Apply pending changesets: bump versions and transform CHANGELOGs"));
43
43
 
44
44
  //#endregion
45
- export { versionCommand };
45
+ export { runVersion, versionCommand };
@@ -33,4 +33,4 @@ const _changesetCommand = Command.make("changeset").pipe(Command.withSubcommands
33
33
  const changesetCommand = _changesetCommand;
34
34
 
35
35
  //#endregion
36
- export { changesetCommand };
36
+ export { changesetCommand, runChangesetCheck, runChangesetInit };
package/commands/clean.js CHANGED
@@ -183,4 +183,4 @@ const _cleanCommand = Command.make("clean", {
183
183
  const cleanCommand = _cleanCommand;
184
184
 
185
185
  //#endregion
186
- export { cleanCommand };
186
+ export { CleanError, cleanCommand, collectTargets, parseGlobs, removeTargets, runClean };
@@ -118,4 +118,4 @@ const postCommitVerifyCommand = Command.make("post-commit-verify", {}, () => Eff
118
118
  }).pipe(Effect.provide(Commitlint.HookSilencer))).pipe(Command.withDescription("Verify the most recent commit (commitlint replay + signature + closes trailer)"));
119
119
 
120
120
  //#endregion
121
- export { postCommitVerifyCommand };
121
+ export { buildCommitlintInvocation, buildPostCommitAdvice, postCommitVerifyCommand };
@@ -61,4 +61,4 @@ async function readStdin() {
61
61
  }
62
62
 
63
63
  //#endregion
64
- export { preCommitMessageCommand };
64
+ export { evaluateMessage, preCommitMessageCommand };
@@ -17,4 +17,4 @@ const _commitCommand = Command.make("commit").pipe(Command.withSubcommands([hook
17
17
  const commitCommand = _commitCommand;
18
18
 
19
19
  //#endregion
20
- export { commitCommand };
20
+ export { commitCommand, runCommitCheck, runCommitInit };
@@ -0,0 +1,25 @@
1
+ //#region src/commands/lint/biome-version.ts
2
+ /**
3
+ * Pinned Biome version targeted by the lint schema-sync commands.
4
+ *
5
+ * @internal
6
+ */
7
+ /**
8
+ * The Biome release whose JSON schema URL `savvy lint`/`savvy check` write into and
9
+ * validate against the repo's `biome.json`/`biome.jsonc` files.
10
+ *
11
+ * @remarks
12
+ * Hardcoded on purpose. `@biomejs/biome` is an optional peer dependency of
13
+ * `@savvy-web/silk`, so there is no reliable runtime source for the consumer's
14
+ * installed Biome version, and the `$schema` URL must point at a concrete release.
15
+ *
16
+ * Keep this in lockstep with the `@biomejs/biome` peer-dependency range in
17
+ * `packages/silk/package.json` whenever Biome is upgraded — bump this to the exact
18
+ * release and the peer range to its minor line.
19
+ *
20
+ * @internal
21
+ */
22
+ const BIOME_VERSION = "2.5.1";
23
+
24
+ //#endregion
25
+ export { BIOME_VERSION };
@@ -1,3 +1,4 @@
1
+ import { BIOME_VERSION } from "./biome-version.js";
1
2
  import { CheckResult, ConfigDiscovery, Lint, ManagedSection, SavvyBaseSection, SavvyHooksSection, ToolDefinition, ToolDiscovery, savvyBasePreamble, savvyHooksHygiene } from "@savvy-web/silk-effects";
2
3
  import { Effect } from "effect";
3
4
  import { parse } from "jsonc-effect";
@@ -95,7 +96,7 @@ function checkMarkdownlintConfig(content) {
95
96
  });
96
97
  }
97
98
  /**
98
- * Check biome config `$schema` URLs against the expected peer dependency version.
99
+ * Check biome config `$schema` URLs against the pinned {@link BIOME_VERSION}.
99
100
  *
100
101
  * @remarks
101
102
  * Uses `Lint.Biome.findAllConfigs()` for workspace-aware discovery, then validates
@@ -105,15 +106,10 @@ function checkMarkdownlintConfig(content) {
105
106
  */
106
107
  function checkBiomeSchemas() {
107
108
  return Effect.gen(function* () {
108
- const version = process.env.__BIOME_PEER_VERSION__;
109
109
  const statuses = [];
110
- if (!version) return {
111
- statuses,
112
- warnings: []
113
- };
114
110
  const fs = yield* FileSystem.FileSystem;
115
111
  const warnings = [];
116
- const expectedSchema = `https://biomejs.dev/schemas/${version}/schema.json`;
112
+ const expectedSchema = `https://biomejs.dev/schemas/${BIOME_VERSION}/schema.json`;
117
113
  const configPaths = Lint.Biome.findAllConfigs();
118
114
  for (const configPath of configPaths) if ((yield* parse(yield* fs.readFileString(configPath))).$schema === expectedSchema) statuses.push({
119
115
  path: configPath,
@@ -17,4 +17,4 @@ const _lintCommand = Command.make("lint").pipe(Command.withSubcommands([fmtComma
17
17
  const lintCommand = _lintCommand;
18
18
 
19
19
  //#endregion
20
- export { lintCommand };
20
+ export { lintCommand, runLintCheck, runLintInit };
@@ -1,3 +1,4 @@
1
+ import { BIOME_VERSION } from "./biome-version.js";
1
2
  import { BiomeSchemaSync, Lint, ManagedSection, SavvyBaseSection, SavvyHooksSection, savvyBasePreamble, savvyHooksHygiene } from "@savvy-web/silk-effects";
2
3
  import { Effect } from "effect";
3
4
  import { dirname } from "node:path";
@@ -115,15 +116,13 @@ function writeMarkdownlintConfig(fs, preset, force) {
115
116
  });
116
117
  }
117
118
  /**
118
- * Find and sync biome config `$schema` URLs to match the peer dependency version.
119
+ * Find and sync biome config `$schema` URLs to match the pinned {@link BIOME_VERSION}.
119
120
  *
120
121
  * @returns Effect that syncs biome schemas and logs results
121
122
  */
122
123
  function syncBiomeSchemas() {
123
124
  return Effect.gen(function* () {
124
- const version = process.env.__BIOME_PEER_VERSION__;
125
- if (!version) return;
126
- const result = yield* (yield* BiomeSchemaSync).sync(version);
125
+ const result = yield* (yield* BiomeSchemaSync).sync(BIOME_VERSION);
127
126
  for (const configPath of result.current) yield* Effect.log(`${CHECK_MARK} ${configPath}: biome $schema up-to-date`);
128
127
  for (const configPath of result.updated) yield* Effect.log(`${CHECK_MARK} Updated $schema in ${configPath}`);
129
128
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvy-web/cli",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "private": false,
5
5
  "description": "The savvy CLI — unified commit, changeset, and lint commands for the Silk Suite",
6
6
  "homepage": "https://github.com/savvy-web/systems/tree/main/packages/cli",
@@ -36,7 +36,7 @@
36
36
  "@effect/platform-node": "^0.107.0",
37
37
  "@effect/rpc": "^0.75.1",
38
38
  "@effect/sql": "^0.51.1",
39
- "@savvy-web/silk-effects": "1.5.0",
39
+ "@savvy-web/silk-effects": "1.5.1",
40
40
  "effect": "^3.21.4",
41
41
  "jsonc-effect": "^0.2.1",
42
42
  "workspaces-effect": "^1.2.0",