|
3 | 3 | * Licensed under the MIT License. See License.txt in the project root for license information. |
4 | 4 | *--------------------------------------------------------------------------------------------*/ |
5 | 5 |
|
6 | | -import { downloadZMQ } from '@vscode/zeromq'; |
| 6 | +// --- Start Positron --- |
| 7 | +// zeromq dependency removed - tests that depend on it will be skipped |
| 8 | +// import { downloadZMQ } from '@vscode/zeromq'; |
| 9 | +let downloadZMQ: (() => Promise<void>) | undefined; |
| 10 | +try { |
| 11 | + // Check if the package exists before trying to require it |
| 12 | + const zeromqPath = require.resolve('@vscode/zeromq'); |
| 13 | + if (zeromqPath) { |
| 14 | + downloadZMQ = require('@vscode/zeromq').downloadZMQ; |
| 15 | + } |
| 16 | +} catch (e) { |
| 17 | + // @vscode/zeromq not available, skip ZMQ download |
| 18 | + downloadZMQ = undefined; |
| 19 | +} |
| 20 | +// --- End Positron --- |
| 21 | + |
7 | 22 | import { spawn } from 'child_process'; |
8 | 23 | import * as fs from 'fs'; |
9 | 24 | import * as path from 'path'; |
10 | 25 | import { compressTikToken } from './build/compressTikToken'; |
11 | 26 | import { copyStaticAssets } from './build/copyStaticAssets'; |
12 | 27 |
|
13 | | -// --- Start Positron --- |
14 | | -import { spawn } from 'child_process'; |
15 | | -// --- End Positron --- |
16 | | - |
17 | 28 | export interface ITreeSitterGrammar { |
18 | 29 | name: string; |
19 | 30 | /** |
@@ -157,10 +168,14 @@ async function main() { |
157 | 168 | 'node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter.wasm', |
158 | 169 | ], 'dist'); |
159 | 170 |
|
160 | | - // Clone zeromq.js from specific commit |
161 | | - await cloneZeroMQ('1cbebce3e17801bea63a4dcc975b982923cb4592'); |
162 | 171 |
|
163 | | - await downloadZMQ(); |
| 172 | + if (downloadZMQ) { |
| 173 | + // Clone zeromq.js from specific commit |
| 174 | + await cloneZeroMQ('1cbebce3e17801bea63a4dcc975b982923cb4592'); |
| 175 | + await downloadZMQ(); |
| 176 | + } else { |
| 177 | + console.log('Skipping ZMQ download - zeromq dependency not available (tests requiring zeromq will be skipped)'); |
| 178 | + } |
164 | 179 |
|
165 | 180 | // Check if the base cache file exists |
166 | 181 | const baseCachePath = path.join('test', 'simulation', 'cache', 'base.sqlite'); |
|
0 commit comments