Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
31 changes: 23 additions & 8 deletions script/postinstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>) | 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;
/**
Expand Down Expand Up @@ -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');
Expand Down
14 changes: 12 additions & 2 deletions test/simulation/notebookValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 ---
}
}

Expand Down
Loading