You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate the extension version from package.json for trace metadata and validate it during checks.
Document the release process updates for generated version metadata.
Copy file name to clipboardExpand all lines: AGENTS.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ When working in this repo, optimize for:
28
28
- This repo is managed by [mise](https://mise.jdx.dev/) using `.tool-versions`; prefer that as the toolchain source of truth.
29
29
- Preserve package identity in `package.json` as a pi package.
30
30
- Keep the extension entrypoint at `src/index.ts` unless there is a strong reason to change it.
31
+
- Keep `src/version.ts` generated from `package.json`; do not edit it by hand. After a package version bump, run `pnpm run sync:version` and commit the generated change.
31
32
- Prefer evolving the current design over rewriting it.
32
33
- Tracing must be best-effort: log failures and continue.
33
34
- Preserve the intended trace hierarchy unless there is a strong reason to change it:
@@ -73,9 +74,11 @@ If the change affects extension lifecycle behavior, session persistence/restore,
73
74
pnpm run test:integration
74
75
```
75
76
76
-
If packaging changes were made, also run:
77
+
If packaging changes or release version bumps were made, also run:
constcontent=`// This file is generated by scripts/sync-version.mjs. Do not edit by hand.\nexport const EXTENSION_VERSION = ${JSON.stringify(version)};\n`;
14
+
15
+
if(check){
16
+
constcurrent=readFileSync(target,"utf8");
17
+
if(current!==content){
18
+
console.error("src/version.ts is out of sync with package.json. Run `pnpm run sync:version`.");
0 commit comments