codebase-snapshot 0.9.0 → 4.5.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/CHANGELOG.md CHANGED
@@ -4,7 +4,7 @@ All notable changes to `codebase-snapshot`.
4
4
 
5
5
  ---
6
6
 
7
- ## 0.9.0
7
+ ## 4.5.0
8
8
 
9
9
  ### The package is now `codebase-snapshot`, unscoped
10
10
 
@@ -14,13 +14,13 @@ The old name is **deprecated, not unpublished**, so existing instructions keep w
14
14
 
15
15
  ```bash
16
16
  npx @ankurhalder/codebase-snapshot generate # still resolves, now prints a deprecation notice
17
- npx codebase-snapshot generate # the supported name from 0.9.0
17
+ npx codebase-snapshot generate # the supported name from 4.5.0
18
18
  ```
19
19
 
20
20
  Why: npm's search index ranks on text match rather than downloads — a package with a few thousand
21
21
  weekly downloads outranks one with a hundred million when the query matches its name better — so a
22
22
  name that *is* the phrase people search is the strongest free signal available. Doing this at
23
- version 0.9.0 with no dependents costs one migration; doing it after documentation, articles and
23
+ version 4.5.0 with no dependents costs one migration; doing it after documentation, articles and
24
24
  tutorials all point at the scoped name costs far more.
25
25
 
26
26
  The rename is not cosmetic. The package name is written into every ownership marker and every
package/README.md CHANGED
@@ -50,7 +50,7 @@ npx codebase-snapshot generate # no install, one-off
50
50
  npm install -D codebase-snapshot # or add it to a project
51
51
  ```
52
52
 
53
- This is a **0.x** release. Version numbers follow semver's 0.x conventions, so the CLI surface may change in a minor release until 1.0.0 — pin an exact version if you need a fixed surface today.`n`nAny npm-compatible client works — npm, yarn (classic and Berry with strict PnP), pnpm and bun —
53
+ Any npm-compatible client works — npm, yarn (classic and Berry with strict PnP), pnpm and bun —
54
54
  each verified against the packed tarball before release. Requires **Node.js 18+**.
55
55
 
56
56
  Published from GitHub Actions with [build provenance](https://docs.npmjs.com/generating-provenance-statements): npm shows the tarball was built from this repository at a tagged commit, and `npm audit signatures` verifies it.
package/dist/bin.js CHANGED
@@ -4294,7 +4294,7 @@ function gitignorePath(cwd, filePath) {
4294
4294
 
4295
4295
  // src/version.ts
4296
4296
  var GENERATOR_NAME = "codebase-snapshot";
4297
- var GENERATOR_VERSION = "0.9.0";
4297
+ var GENERATOR_VERSION = "4.5.0";
4298
4298
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
4299
4299
  function isOurGeneratorName(name) {
4300
4300
  if (typeof name !== "string") return false;
@@ -8136,7 +8136,7 @@ function buildAgentContract() {
8136
8136
  bins: ["codebase-snapshot", "snap"],
8137
8137
  notes: [
8138
8138
  `The bare package name also works: npx ${PACKAGE_NAME} <command>.`,
8139
- "Pin an exact version \u2014 for example `codebase-snapshot@0.9.0` \u2014 when you need the same build on every machine. A major range is not enough before 1.0: npm's caret on a 0.x version pins the minor, and 0.x minors are breaking by convention.",
8139
+ "Pin @latest (or @4) when you need the exact same version on every machine.",
8140
8140
  "Both bin names point at the same file. npm resolves a package by its bin entries, so they must stay aliases of one executable.",
8141
8141
  "Human progress goes to stderr. With --format json the payload on stdout is pure JSON.",
8142
8142
  "A failing run also writes pure JSON to stdout: { error: { message, exitCode } }. The exit code and the stderr line are unchanged."
@@ -8151,7 +8151,7 @@ function buildAgentContract() {
8151
8151
  // floating tag may print 4.0.7 today and 4.0.9 next week, and an agent
8152
8152
  // must not conclude that a working tool is broken because of a patch.
8153
8153
  expect: `prints v${MAJOR_VERSION} or newer on stdout and exits 0 (this build is v${GENERATOR_VERSION}: compare the major version, not the patch)`,
8154
- notes: `If it prints an older major than this contract's, the @latest tag is behind the release: pin the exact version with \`npx ${PACKAGE_NAME}@${GENERATOR_VERSION} --version\` instead of retrying @latest. If it prints nothing, clear the npm cache and retry, or use \`npx -p <pkg> codebase-snapshot\`.`
8154
+ notes: `If it prints an older major than this contract's, the @latest tag is behind the release: pin the major with \`npx ${PACKAGE_NAME}@${MAJOR_VERSION} --version\` instead of retrying @latest. If it prints nothing, clear the npm cache and retry, or use \`npx -p <pkg> codebase-snapshot\`.`
8155
8155
  },
8156
8156
  {
8157
8157
  step: 2,
@@ -8551,7 +8551,7 @@ another model, and reading files one by one would not fit in context.
8551
8551
  This tool is a Node CLI. It needs **Node.js 18 or newer**. You do not need to install it
8552
8552
  globally, and you do not need to clone anything.
8553
8553
 
8554
- **Pin a version** \u2014 \`npx ${PACKAGE_NAME2}@${GENERATOR_VERSION} <command>\` \u2014 when you
8554
+ **Pin a version** \u2014 \`npx ${PACKAGE_NAME2}@${MAJOR_VERSION2} <command>\` (or an exact release) \u2014 when you
8555
8555
  need the same version on every machine. The bare package name works too: this package ships
8556
8556
  one executable file, published under two names (\`codebase-snapshot\` and \`snap\`), which is what
8557
8557
  lets npm pick it. If a command exits 0 printing nothing,
@@ -8562,8 +8562,8 @@ is broken.
8562
8562
 
8563
8563
  1. **Verify the tool.** Run \`npx ${PACKAGE_NAME2}@latest --version\`. Expect \`v${MAJOR_VERSION2}\` or
8564
8564
  newer on stdout \u2014 compare the major version, not the patch, because the
8565
- \`@latest\` tag can lag this release. If what it prints is older, pin the exact
8566
- release (\`@${GENERATOR_VERSION}\`) instead of retrying. Empty output means you hit the
8565
+ \`@latest\` tag can lag this release. If the printed major is older, pin the
8566
+ major (\`@${MAJOR_VERSION2}\`) instead of retrying. Empty output means you hit the
8567
8567
  bare-spec problem above.
8568
8568
 
8569
8569
  2. **Read the contract, not the prose.** Run
@@ -5421,7 +5421,7 @@ function validateSnapshot(configInput) {
5421
5421
 
5422
5422
  // src/version.ts
5423
5423
  var GENERATOR_NAME = "codebase-snapshot";
5424
- var GENERATOR_VERSION = "0.9.0";
5424
+ var GENERATOR_VERSION = "4.5.0";
5425
5425
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
5426
5426
  function isOurGeneratorName(name) {
5427
5427
  if (typeof name !== "string") return false;
@@ -7881,5 +7881,5 @@ async function generateSnapshotAsync(configInput, options) {
7881
7881
  }
7882
7882
 
7883
7883
  export { ARTIFACT_NAMES, DEFAULT_ANSWERS, DEFAULT_SECRET_PATTERNS, GENERATOR_NAME, GENERATOR_VERSION, LANGUAGE_PROFILES, MIN_MAX_PART_BYTES, PRESETS, PromptCancelled, SCHEMA_VERSION, anchorForPath, appendGitignoreEntries, assertReplaceable, assertUsableConfigInput, collectFiles, compareManifests, countInvalidUtf8Bytes, countLines, decodeText, defineConfig, describeManifestShapeProblem, detectLanguage, detectPreset, escapeControls, explainPath, fenceForContent, fenceForText, formatNumber, generateProjectTree, generateSnapshot, generateSnapshotAsync, getPreset, gitignorePath, globToRegExp, isBinaryBuffer, isBinaryExtension, isBinaryFile, isDiscoveryMode, isInteractive, isResolvedConfig, isSensitivePath, listPresetNames, loadConfigFile, loadConfigFileDetailed, loadManifest, markResolvedConfig, matchRule, matchesExclude, normalizeResolvedConfig, parseByteSize, partitionFiles, profileForPath, renderConfig, renderDiffText, renderExplainText, renumberParts, resolveConfig, resolveSafeOutputDirs, runInit, scanAndRedactSecrets, stripJsonComments, summarizeJson, summarizeMarkdown, summarizeTypeScriptSource, summarizeWithProfile, supportsTypeScriptImports, truncatePreview, truncateToBytes, unknownPresetMessage, validateSnapshot };
7884
- //# sourceMappingURL=chunk-FJ4RQYY2.js.map
7885
- //# sourceMappingURL=chunk-FJ4RQYY2.js.map
7884
+ //# sourceMappingURL=chunk-SSCFLILW.js.map
7885
+ //# sourceMappingURL=chunk-SSCFLILW.js.map
package/dist/cli.cjs CHANGED
@@ -4286,7 +4286,7 @@ function gitignorePath(cwd, filePath) {
4286
4286
 
4287
4287
  // src/version.ts
4288
4288
  var GENERATOR_NAME = "codebase-snapshot";
4289
- var GENERATOR_VERSION = "0.9.0";
4289
+ var GENERATOR_VERSION = "4.5.0";
4290
4290
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
4291
4291
  function isOurGeneratorName(name) {
4292
4292
  if (typeof name !== "string") return false;
@@ -8107,7 +8107,7 @@ function buildAgentContract() {
8107
8107
  bins: ["codebase-snapshot", "snap"],
8108
8108
  notes: [
8109
8109
  `The bare package name also works: npx ${PACKAGE_NAME} <command>.`,
8110
- "Pin an exact version \u2014 for example `codebase-snapshot@0.9.0` \u2014 when you need the same build on every machine. A major range is not enough before 1.0: npm's caret on a 0.x version pins the minor, and 0.x minors are breaking by convention.",
8110
+ "Pin @latest (or @4) when you need the exact same version on every machine.",
8111
8111
  "Both bin names point at the same file. npm resolves a package by its bin entries, so they must stay aliases of one executable.",
8112
8112
  "Human progress goes to stderr. With --format json the payload on stdout is pure JSON.",
8113
8113
  "A failing run also writes pure JSON to stdout: { error: { message, exitCode } }. The exit code and the stderr line are unchanged."
@@ -8122,7 +8122,7 @@ function buildAgentContract() {
8122
8122
  // floating tag may print 4.0.7 today and 4.0.9 next week, and an agent
8123
8123
  // must not conclude that a working tool is broken because of a patch.
8124
8124
  expect: `prints v${MAJOR_VERSION} or newer on stdout and exits 0 (this build is v${GENERATOR_VERSION}: compare the major version, not the patch)`,
8125
- notes: `If it prints an older major than this contract's, the @latest tag is behind the release: pin the exact version with \`npx ${PACKAGE_NAME}@${GENERATOR_VERSION} --version\` instead of retrying @latest. If it prints nothing, clear the npm cache and retry, or use \`npx -p <pkg> codebase-snapshot\`.`
8125
+ notes: `If it prints an older major than this contract's, the @latest tag is behind the release: pin the major with \`npx ${PACKAGE_NAME}@${MAJOR_VERSION} --version\` instead of retrying @latest. If it prints nothing, clear the npm cache and retry, or use \`npx -p <pkg> codebase-snapshot\`.`
8126
8126
  },
8127
8127
  {
8128
8128
  step: 2,
@@ -8518,7 +8518,7 @@ another model, and reading files one by one would not fit in context.
8518
8518
  This tool is a Node CLI. It needs **Node.js 18 or newer**. You do not need to install it
8519
8519
  globally, and you do not need to clone anything.
8520
8520
 
8521
- **Pin a version** \u2014 \`npx ${PACKAGE_NAME2}@${GENERATOR_VERSION} <command>\` \u2014 when you
8521
+ **Pin a version** \u2014 \`npx ${PACKAGE_NAME2}@${MAJOR_VERSION2} <command>\` (or an exact release) \u2014 when you
8522
8522
  need the same version on every machine. The bare package name works too: this package ships
8523
8523
  one executable file, published under two names (\`codebase-snapshot\` and \`snap\`), which is what
8524
8524
  lets npm pick it. If a command exits 0 printing nothing,
@@ -8529,8 +8529,8 @@ is broken.
8529
8529
 
8530
8530
  1. **Verify the tool.** Run \`npx ${PACKAGE_NAME2}@latest --version\`. Expect \`v${MAJOR_VERSION2}\` or
8531
8531
  newer on stdout \u2014 compare the major version, not the patch, because the
8532
- \`@latest\` tag can lag this release. If what it prints is older, pin the exact
8533
- release (\`@${GENERATOR_VERSION}\`) instead of retrying. Empty output means you hit the
8532
+ \`@latest\` tag can lag this release. If the printed major is older, pin the
8533
+ major (\`@${MAJOR_VERSION2}\`) instead of retrying. Empty output means you hit the
8534
8534
  bare-spec problem above.
8535
8535
 
8536
8536
  2. **Read the contract, not the prose.** Run
package/dist/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GENERATOR_VERSION, loadConfigFileDetailed, resolveConfig, validateSnapshot, describeManifestShapeProblem, explainPath, compareManifests, loadManifest, renderDiffText, generateSnapshot, formatNumber, isDiscoveryMode, ARTIFACT_NAMES, getPreset, unknownPresetMessage, GENERATOR_NAME, runInit, PromptCancelled, MIN_MAX_PART_BYTES, SCHEMA_VERSION, PRESETS, parseByteSize, gitignorePath, appendGitignoreEntries, escapeControls, renderExplainText } from './chunk-FJ4RQYY2.js';
1
+ import { GENERATOR_VERSION, loadConfigFileDetailed, resolveConfig, validateSnapshot, describeManifestShapeProblem, explainPath, compareManifests, loadManifest, renderDiffText, generateSnapshot, formatNumber, isDiscoveryMode, ARTIFACT_NAMES, getPreset, unknownPresetMessage, GENERATOR_NAME, runInit, PromptCancelled, MIN_MAX_PART_BYTES, SCHEMA_VERSION, PRESETS, parseByteSize, gitignorePath, appendGitignoreEntries, escapeControls, renderExplainText } from './chunk-SSCFLILW.js';
2
2
  import { spawnSync } from 'child_process';
3
3
  import * as fs from 'fs';
4
4
  import * as path2 from 'path';
@@ -228,7 +228,7 @@ function buildAgentContract() {
228
228
  bins: ["codebase-snapshot", "snap"],
229
229
  notes: [
230
230
  `The bare package name also works: npx ${PACKAGE_NAME} <command>.`,
231
- "Pin an exact version \u2014 for example `codebase-snapshot@0.9.0` \u2014 when you need the same build on every machine. A major range is not enough before 1.0: npm's caret on a 0.x version pins the minor, and 0.x minors are breaking by convention.",
231
+ "Pin @latest (or @4) when you need the exact same version on every machine.",
232
232
  "Both bin names point at the same file. npm resolves a package by its bin entries, so they must stay aliases of one executable.",
233
233
  "Human progress goes to stderr. With --format json the payload on stdout is pure JSON.",
234
234
  "A failing run also writes pure JSON to stdout: { error: { message, exitCode } }. The exit code and the stderr line are unchanged."
@@ -243,7 +243,7 @@ function buildAgentContract() {
243
243
  // floating tag may print 4.0.7 today and 4.0.9 next week, and an agent
244
244
  // must not conclude that a working tool is broken because of a patch.
245
245
  expect: `prints v${MAJOR_VERSION} or newer on stdout and exits 0 (this build is v${GENERATOR_VERSION}: compare the major version, not the patch)`,
246
- notes: `If it prints an older major than this contract's, the @latest tag is behind the release: pin the exact version with \`npx ${PACKAGE_NAME}@${GENERATOR_VERSION} --version\` instead of retrying @latest. If it prints nothing, clear the npm cache and retry, or use \`npx -p <pkg> codebase-snapshot\`.`
246
+ notes: `If it prints an older major than this contract's, the @latest tag is behind the release: pin the major with \`npx ${PACKAGE_NAME}@${MAJOR_VERSION} --version\` instead of retrying @latest. If it prints nothing, clear the npm cache and retry, or use \`npx -p <pkg> codebase-snapshot\`.`
247
247
  },
248
248
  {
249
249
  step: 2,
@@ -639,7 +639,7 @@ another model, and reading files one by one would not fit in context.
639
639
  This tool is a Node CLI. It needs **Node.js 18 or newer**. You do not need to install it
640
640
  globally, and you do not need to clone anything.
641
641
 
642
- **Pin a version** \u2014 \`npx ${PACKAGE_NAME2}@${GENERATOR_VERSION} <command>\` \u2014 when you
642
+ **Pin a version** \u2014 \`npx ${PACKAGE_NAME2}@${MAJOR_VERSION2} <command>\` (or an exact release) \u2014 when you
643
643
  need the same version on every machine. The bare package name works too: this package ships
644
644
  one executable file, published under two names (\`codebase-snapshot\` and \`snap\`), which is what
645
645
  lets npm pick it. If a command exits 0 printing nothing,
@@ -650,8 +650,8 @@ is broken.
650
650
 
651
651
  1. **Verify the tool.** Run \`npx ${PACKAGE_NAME2}@latest --version\`. Expect \`v${MAJOR_VERSION2}\` or
652
652
  newer on stdout \u2014 compare the major version, not the patch, because the
653
- \`@latest\` tag can lag this release. If what it prints is older, pin the exact
654
- release (\`@${GENERATOR_VERSION}\`) instead of retrying. Empty output means you hit the
653
+ \`@latest\` tag can lag this release. If the printed major is older, pin the
654
+ major (\`@${MAJOR_VERSION2}\`) instead of retrying. Empty output means you hit the
655
655
  bare-spec problem above.
656
656
 
657
657
  2. **Read the contract, not the prose.** Run
package/dist/index.cjs CHANGED
@@ -5450,7 +5450,7 @@ function validateSnapshot(configInput) {
5450
5450
 
5451
5451
  // src/version.ts
5452
5452
  var GENERATOR_NAME = "codebase-snapshot";
5453
- var GENERATOR_VERSION = "0.9.0";
5453
+ var GENERATOR_VERSION = "4.5.0";
5454
5454
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
5455
5455
  function isOurGeneratorName(name) {
5456
5456
  if (typeof name !== "string") return false;
package/dist/index.d.cts CHANGED
@@ -398,7 +398,7 @@ declare function validateSnapshot(configInput: ResolvedSnapshotConfig | Snapshot
398
398
  * `package.json` carries the same version; `npm run verify` compares the two.
399
399
  */
400
400
  declare const GENERATOR_NAME = "codebase-snapshot";
401
- declare const GENERATOR_VERSION = "0.9.0";
401
+ declare const GENERATOR_VERSION = "4.5.0";
402
402
 
403
403
  declare const DEFAULT_SECRET_PATTERNS: SecretRule[];
404
404
 
package/dist/index.d.ts CHANGED
@@ -398,7 +398,7 @@ declare function validateSnapshot(configInput: ResolvedSnapshotConfig | Snapshot
398
398
  * `package.json` carries the same version; `npm run verify` compares the two.
399
399
  */
400
400
  declare const GENERATOR_NAME = "codebase-snapshot";
401
- declare const GENERATOR_VERSION = "0.9.0";
401
+ declare const GENERATOR_VERSION = "4.5.0";
402
402
 
403
403
  declare const DEFAULT_SECRET_PATTERNS: SecretRule[];
404
404
 
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { ARTIFACT_NAMES, DEFAULT_ANSWERS, DEFAULT_SECRET_PATTERNS, GENERATOR_NAME, GENERATOR_VERSION, LANGUAGE_PROFILES, MIN_MAX_PART_BYTES, PRESETS, PromptCancelled, SCHEMA_VERSION, anchorForPath, assertReplaceable, assertUsableConfigInput, collectFiles, compareManifests, countInvalidUtf8Bytes, countLines, decodeText, defineConfig, detectLanguage, detectPreset, explainPath, fenceForContent, fenceForText, generateProjectTree, generateSnapshot, generateSnapshotAsync, getPreset, globToRegExp, isBinaryBuffer, isBinaryExtension, isBinaryFile, isInteractive, isResolvedConfig, isSensitivePath, listPresetNames, loadConfigFile, loadConfigFileDetailed, loadManifest, markResolvedConfig, matchRule, matchesExclude, normalizeResolvedConfig, parseByteSize, partitionFiles, profileForPath, renderConfig, renderDiffText, renderExplainText, renumberParts, resolveConfig, resolveSafeOutputDirs, runInit, scanAndRedactSecrets, stripJsonComments, summarizeJson, summarizeMarkdown, summarizeTypeScriptSource, summarizeWithProfile, supportsTypeScriptImports, truncatePreview, truncateToBytes, validateSnapshot } from './chunk-FJ4RQYY2.js';
1
+ export { ARTIFACT_NAMES, DEFAULT_ANSWERS, DEFAULT_SECRET_PATTERNS, GENERATOR_NAME, GENERATOR_VERSION, LANGUAGE_PROFILES, MIN_MAX_PART_BYTES, PRESETS, PromptCancelled, SCHEMA_VERSION, anchorForPath, assertReplaceable, assertUsableConfigInput, collectFiles, compareManifests, countInvalidUtf8Bytes, countLines, decodeText, defineConfig, detectLanguage, detectPreset, explainPath, fenceForContent, fenceForText, generateProjectTree, generateSnapshot, generateSnapshotAsync, getPreset, globToRegExp, isBinaryBuffer, isBinaryExtension, isBinaryFile, isInteractive, isResolvedConfig, isSensitivePath, listPresetNames, loadConfigFile, loadConfigFileDetailed, loadManifest, markResolvedConfig, matchRule, matchesExclude, normalizeResolvedConfig, parseByteSize, partitionFiles, profileForPath, renderConfig, renderDiffText, renderExplainText, renumberParts, resolveConfig, resolveSafeOutputDirs, runInit, scanAndRedactSecrets, stripJsonComments, summarizeJson, summarizeMarkdown, summarizeTypeScriptSource, summarizeWithProfile, supportsTypeScriptImports, truncatePreview, truncateToBytes, validateSnapshot } from './chunk-SSCFLILW.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
package/docs/agent.md CHANGED
@@ -19,7 +19,7 @@ npx codebase-snapshot generate
19
19
  npx codebase-snapshot validate
20
20
  ```
21
21
 
22
- The bare package name works; pin an exact version (`npx codebase-snapshot --version` prints the current one) when the same version must run on every
22
+ The bare package name works; pin `@latest` or `@4` when the same version must run on every
23
23
  machine.
24
24
 
25
25
  ## The contract
package/docs/install.md CHANGED
@@ -28,7 +28,7 @@ Pin the version when you need the same build on every machine:
28
28
 
29
29
  ```bash
30
30
  npx codebase-snapshot@latest generate
31
- npx codebase-snapshot@0.9.0 generate
31
+ npx codebase-snapshot@4 generate
32
32
  ```
33
33
 
34
34
  **Why the bare name works.** npm resolves which binary to run from the package's `bin`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebase-snapshot",
3
- "version": "0.9.0",
3
+ "version": "4.5.0",
4
4
  "description": "Turn a codebase into token-efficient, size-budgeted Markdown parts for an LLM: an AST partitioner, snapshot generator, secret auditor and drift validator for ChatGPT, Claude and Cursor.",
5
5
  "keywords": [
6
6
  "codebase",