pal-code 0.0.6 → 0.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pal-code",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "A terminal coding agent with BYOK, tool use, and extensions",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -49,7 +49,8 @@
49
49
  "publish:agents": "cd packages/agents && npm publish",
50
50
  "publish:mcp": "cd packages/mcp && npm publish",
51
51
  "preinstall": "node scripts/preinstall.js",
52
- "postinstall": "node scripts/postinstall.js"
52
+ "postinstall": "node scripts/postinstall.js",
53
+ "prepublishOnly": "node scripts/sync-version.js"
53
54
  },
54
55
  "keywords": [
55
56
  "ai",
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Single source of truth for versioning.
3
+ * Reads version.json and updates all package.json files.
4
+ * Usage: node scripts/sync-version.js
5
+ */
6
+ const fs = require('fs');
7
+ const path = require('path');
8
+
9
+ const root = path.resolve(__dirname, '..');
10
+ const { version } = JSON.parse(fs.readFileSync(path.join(root, 'version.json'), 'utf-8'));
11
+
12
+ const targets = [
13
+ 'package.json',
14
+ 'packages/cli/package.json',
15
+ 'packages/core/package.json',
16
+ 'packages/agents/package.json',
17
+ 'packages/mcp/package.json',
18
+ 'packages/web-search/package.json',
19
+ ];
20
+
21
+ for (const rel of targets) {
22
+ const file = path.join(root, rel);
23
+ const pkg = JSON.parse(fs.readFileSync(file, 'utf-8'));
24
+ pkg.version = version;
25
+
26
+ // Update @pal/core dependency in extensions
27
+ if (pkg.dependencies && pkg.dependencies['@pal/core']) {
28
+ pkg.dependencies['@pal/core'] = version;
29
+ }
30
+
31
+ fs.writeFileSync(file, JSON.stringify(pkg, null, 2) + '\n');
32
+ console.log(`${rel} → ${version}`);
33
+ }
34
+
35
+ console.log(`\nAll packages synced to v${version}`);