Skip to content

Commit ae0268e

Browse files
authored
Merge pull request #1137 from microsoft/robo/fix_ci_0_31
ci: move zeromq.js setup into postinstall
2 parents 15f3fe6 + 5fe8221 commit ae0268e

File tree

3 files changed

+22
-143
lines changed

3 files changed

+22
-143
lines changed

package-lock.json

Lines changed: 1 addition & 141 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4091,8 +4091,7 @@
40914091
"vscode-languageserver-protocol": "^3.17.5",
40924092
"vscode-languageserver-textdocument": "^1.0.12",
40934093
"vscode-languageserver-types": "^3.17.5",
4094-
"yaml": "^2.8.0",
4095-
"zeromq": "github:rebornix/zeromq.js#a19e8e373b3abc677f91b936d3f00d49b1b61792"
4094+
"yaml": "^2.8.0"
40964095
},
40974096
"dependencies": {
40984097
"@anthropic-ai/claude-code": "1.0.93",

script/postinstall.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { downloadZMQ } from '@vscode/zeromq';
7+
import { execSync } from 'child_process';
78
import * as fs from 'fs';
89
import * as path from 'path';
910
import { compressTikToken } from './build/compressTikToken';
@@ -62,6 +63,22 @@ const treeSitterGrammars: ITreeSitterGrammar[] = [
6263

6364
const REPO_ROOT = path.join(__dirname, '..');
6465

66+
/**
67+
* Clones the zeromq.js repository from a specific commit into node_modules/zeromq
68+
* @param commit The git commit hash to checkout
69+
*/
70+
function cloneZeroMQ(commit: string) {
71+
const zeromqPath = path.join(REPO_ROOT, 'node_modules', 'zeromq');
72+
73+
// Remove existing zeromq directory if it exists
74+
if (fs.existsSync(zeromqPath)) {
75+
fs.rmSync(zeromqPath, { recursive: true, force: true });
76+
}
77+
78+
execSync(`git clone https://github.com/rebornix/zeromq.js.git ${zeromqPath}`, { stdio: 'inherit', cwd: REPO_ROOT });
79+
execSync(`git checkout ${commit}`, { stdio: 'inherit', cwd: zeromqPath });
80+
}
81+
6582
async function main() {
6683
await fs.promises.mkdir(path.join(REPO_ROOT, '.build'), { recursive: true });
6784

@@ -77,6 +94,9 @@ async function main() {
7794
'node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter.wasm',
7895
], 'dist');
7996

97+
// Clone zeromq.js from specific commit
98+
cloneZeroMQ('1cbebce3e17801bea63a4dcc975b982923cb4592');
99+
80100
await downloadZMQ();
81101

82102
// Check if the base cache file exists

0 commit comments

Comments
 (0)