diff --git a/package-lock.json b/package-lock.json index 53e0ed2557..a81fba36a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -74,7 +74,6 @@ "@vscode/test-electron": "^2.5.2", "@vscode/test-web": "^0.0.71", "@vscode/vsce": "3.6.0", - "@vscode/zeromq": "0.2.7", "copyfiles": "^2.4.1", "csv-parse": "^6.0.0", "dotenv": "^17.2.0", @@ -6805,13 +6804,6 @@ "node": "*" } }, - "node_modules/@vscode/zeromq": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@vscode/zeromq/-/zeromq-0.2.7.tgz", - "integrity": "sha512-lbnfCMoVe6O7aHL0TkQJSU+yd5Hs1A6mpr/zG/C+ibFXlhGq7rUEIHt4krf6P9gn0rgoAYJceJkvLHnvDWk5/A==", - "dev": true, - "license": "MIT" - }, "node_modules/@xterm/headless": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@xterm/headless/-/headless-5.5.0.tgz", diff --git a/package.json b/package.json index 2f0c0b64d6..62342bc368 100644 --- a/package.json +++ b/package.json @@ -4018,7 +4018,6 @@ "@vscode/test-electron": "^2.5.2", "@vscode/test-web": "^0.0.71", "@vscode/vsce": "3.6.0", - "@vscode/zeromq": "0.2.7", "copyfiles": "^2.4.1", "csv-parse": "^6.0.0", "dotenv": "^17.2.0", diff --git a/script/postinstall.ts b/script/postinstall.ts index 7e7f0937b9..b81de31bc5 100644 --- a/script/postinstall.ts +++ b/script/postinstall.ts @@ -3,17 +3,28 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { downloadZMQ } from '@vscode/zeromq'; +// --- Start Positron --- +// zeromq dependency removed - tests that depend on it will be skipped +// import { downloadZMQ } from '@vscode/zeromq'; +let downloadZMQ: (() => Promise) | undefined; +try { + // Check if the package exists before trying to require it + const zeromqPath = require.resolve('@vscode/zeromq'); + if (zeromqPath) { + downloadZMQ = require('@vscode/zeromq').downloadZMQ; + } +} catch (e) { + // @vscode/zeromq not available, skip ZMQ download + downloadZMQ = undefined; +} +// --- End Positron --- + import { spawn } from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; import { compressTikToken } from './build/compressTikToken'; import { copyStaticAssets } from './build/copyStaticAssets'; -// --- Start Positron --- -import { spawn } from 'child_process'; -// --- End Positron --- - export interface ITreeSitterGrammar { name: string; /** @@ -157,10 +168,14 @@ async function main() { 'node_modules/@vscode/tree-sitter-wasm/wasm/tree-sitter.wasm', ], 'dist'); - // Clone zeromq.js from specific commit - await cloneZeroMQ('1cbebce3e17801bea63a4dcc975b982923cb4592'); - await downloadZMQ(); + if (downloadZMQ) { + // Clone zeromq.js from specific commit + await cloneZeroMQ('1cbebce3e17801bea63a4dcc975b982923cb4592'); + await downloadZMQ(); + } else { + console.log('Skipping ZMQ download - zeromq dependency not available (tests requiring zeromq will be skipped)'); + } // Check if the base cache file exists const baseCachePath = path.join('test', 'simulation', 'cache', 'base.sqlite'); diff --git a/test/simulation/notebookValidator.ts b/test/simulation/notebookValidator.ts index 19f37e74d5..fd2cef38fb 100644 --- a/test/simulation/notebookValidator.ts +++ b/test/simulation/notebookValidator.ts @@ -11,7 +11,14 @@ import { promises as fs } from 'fs'; import { tmpdir } from 'os'; import { join } from 'path'; import type * as vscode from 'vscode'; -import type { Dealer, Push, Socket, Subscriber } from 'zeromq'; +// --- Start Positron --- +// import type { Dealer, Push, Socket, Subscriber } from 'zeromq'; +// zeromq dependency removed - import types conditionally +type Dealer = any; +type Push = any; +type Socket = any; +type Subscriber = any; +// --- End Positron --- import { ITestingServicesAccessor } from '../../src/platform/test/node/services'; import { createSha256Hash } from '../../src/util/common/crypto'; import { ExtHostNotebookDocumentData, translateDisplayDataOutput, translateErrorOutput, translateStreamOutput } from '../../src/util/common/test/shims/notebookDocument'; @@ -120,7 +127,10 @@ export function getZeroMQ(): typeof import('zeromq') { const zmq = require(`${'zeromq'}`); return zmq; } catch (e) { - throw e; + // --- Start Positron --- + // throw e; + throw new Error('zeromq dependency is not available. Tests requiring zeromq functionality have been disabled.'); + // --- End Positron --- } }