gdx 0.4.4 → 0.4.6

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.
@@ -0,0 +1 @@
1
+ import{parentPort as g,workerData as q}from"node:worker_threads";Object.assign(process.env,q.env);function j(f){return f instanceof Error?{message:f.message,stack:f.stack}:{message:String(f)}}(async()=>{for(let requirement of q.requirements){if(requirement.kind==="import"){globalThis[requirement.name]=await import(requirement.source);continue}globalThis[requirement.name]=eval("("+requirement.source+")")}g?.on("message",async(message)=>{try{let task=eval("("+message.taskSource+")"),result=await task(...message.args);g?.postMessage({id:message.id,result})}catch(f){g?.postMessage({id:message.id,error:j(f)})}}),g?.postMessage({type:"ready"})})().catch((f)=>{g?.postMessage({type:"ready",error:j(f)})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdx",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "Git, but with better DX. The raw power of Git, aligned with human workflows.",
5
5
  "homepage": "https://github.com/Type-Delta/gdx#readme",
6
6
  "bugs": {
@@ -24,6 +24,7 @@
24
24
  },
25
25
  "files": [
26
26
  "dist/*.js",
27
+ "dist/workers/*.js",
27
28
  "scripts/postinstall.cjs",
28
29
  "scripts/launcher.cjs",
29
30
  "README.md",
@@ -41,7 +42,7 @@
41
42
  "test": "bun test",
42
43
  "build": "bun run transpile-esm && bun build ./src/index.ts --outfile=./bin/gdx --compile --bytecode --production --keep-names",
43
44
  "ts-check": "bunx tsc --noEmit",
44
- "package:node": "bun run transpile-esm && bun build ./src/index.ts --outdir=./dist --target=node --external=keytar --external=cspell-lib --external=@shikijs/cli --external=yaml --external=openai --external=fflate --format=esm --production --keep-names",
45
+ "package:node": "bun run transpile-esm && bun build ./src/index.ts --outdir=./dist --target=node --external=keytar --external=cspell-lib --external=@shikijs/cli --external=shiki --external=yaml --external=openai --external=fflate --external=diff --format=esm --production --keep-names && bun build ./src/workers/generic.worker.ts --outfile=./dist/workers/generic.worker.min.js --target=node --external=@shikijs/cli --format=esm --production --minify --keep-names",
45
46
  "prepack": "bun run package:node",
46
47
  "postinstall": "node scripts/postinstall.cjs",
47
48
  "prettier": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"./*.md\"",
@@ -53,36 +54,43 @@
53
54
  "devDependencies": {
54
55
  "@babel/cli": "^7.28.6",
55
56
  "@babel/core": "^7.29.0",
56
- "@babel/preset-env": "^7.29.2",
57
+ "@babel/preset-env": "^7.29.5",
57
58
  "@babel/preset-typescript": "^7.28.5",
58
59
  "@eslint/js": "^9.39.4",
59
60
  "@sinclair/typebox": "^0.34.49",
60
61
  "@types/chai": "^5.2.3",
61
62
  "@types/ini": "^4.1.1",
62
- "@typescript-eslint/eslint-plugin": "^8.57.1",
63
- "@typescript-eslint/parser": "^8.57.1",
63
+ "@types/which": "^3.0.4",
64
+ "@typescript-eslint/eslint-plugin": "^8.59.4",
65
+ "@typescript-eslint/parser": "^8.59.4",
64
66
  "bun-types": "latest",
65
67
  "chai": "^6.2.2",
66
68
  "dedent": "^1.7.2",
67
- "eslint": "^10.0.3",
69
+ "eslint": "^10.4.0",
68
70
  "execa": "^9.6.1",
69
- "ini": "^6.0.0",
70
- "jiti": "^2.6.1",
71
- "prettier": "^3.8.1",
72
- "smol-toml": "^1.6.0",
73
- "tinybench": "^6.0.0",
74
- "tsx": "^4.21.0",
75
- "typescript": "^5.9.3",
76
- "typescript-eslint": "^8.57.1",
77
- "unicode-animations": "^1.0.3"
71
+ "ini": "^7.0.0",
72
+ "jiti": "^2.7.0",
73
+ "prettier": "^3.8.3",
74
+ "smol-toml": "^1.6.1",
75
+ "tinybench": "^6.0.2",
76
+ "tsx": "^4.22.3",
77
+ "tty-strings": "^1.5.2",
78
+ "typescript": "^6.0.3",
79
+ "typescript-eslint": "^8.59.4",
80
+ "unicode-animations": "^1.0.3",
81
+ "which": "2.0.2"
78
82
  },
79
83
  "dependencies": {
80
- "@shikijs/cli": "^4.0.2",
81
- "openai": "^6.32.0",
82
- "cspell-lib": "9.4.0",
83
- "diff": "^8.0.4",
84
- "fflate": "^0.8.2",
84
+ "@shikijs/cli": "^4.1.0",
85
+ "cspell-lib": "10.0.0",
86
+ "diff": "^9.0.0",
87
+ "fflate": "^0.8.3",
85
88
  "keytar": "^7.9.0",
86
- "yaml": "^2.8.2"
89
+ "openai": "^6.38.0",
90
+ "yaml": "^2.9.0"
91
+ },
92
+ "patchedDependencies": {
93
+ "tty-strings@1.5.2": "patches/tty-strings@1.5.2.patch",
94
+ "execa@9.6.1": "patches/execa@9.6.1.patch"
87
95
  }
88
96
  }
@@ -8,12 +8,16 @@ const { spawn } = require('child_process');
8
8
 
9
9
  const DIST_DIR = path.join(__dirname, '../dist');
10
10
  const NATIVE_DIR = path.join(DIST_DIR, 'native');
11
- const isWin = process.platform === 'win32';
12
- const binaryName = isWin ? 'gdx.exe' : 'gdx';
13
- const binaryPath = path.join(NATIVE_DIR, binaryName);
14
-
15
- // Check if native binary exists
16
- if (fs.existsSync(binaryPath)) {
11
+ const isWin = process.platform === 'win32';
12
+ const binaryName = isWin ? 'gdx.exe' : 'gdx';
13
+ const binaryPath = path.join(NATIVE_DIR, binaryName);
14
+
15
+ if (process.env.GDX_NODE_SHIM === '1' && process.argv[2] === '--') {
16
+ process.argv.splice(2, 1);
17
+ }
18
+
19
+ // Check if native binary exists
20
+ if (fs.existsSync(binaryPath)) {
17
21
  const child = spawn(binaryPath, process.argv.slice(2), {
18
22
  stdio: 'inherit'
19
23
  });