Skip to content

Update npm dependencies#3108

Open
joao-boechat wants to merge 7 commits intomainfrom
joaoboechat/update-npm-dependencies
Open

Update npm dependencies#3108
joao-boechat wants to merge 7 commits intomainfrom
joaoboechat/update-npm-dependencies

Conversation

@joao-boechat
Copy link
Copy Markdown
Contributor

@joao-boechat joao-boechat commented Apr 10, 2026

  • Updated npm dependencies to their latest possible versions without introducing bugs
  • Resolved vulnerabilities in the dependencies
  • Fixed breaking changes introduced by the new dependencies

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the repo’s JavaScript/TypeScript toolchain and package dependencies (including JupyterLab and VS Code-related tooling), with follow-up code adjustments for new runtime/platform baselines and updated error-handling behavior.

Changes:

  • Bumped multiple dependency versions and refreshed lockfiles (notably under source/jupyterlab/ and the workspace root).
  • Raised TypeScript/libs and esbuild compilation targets to ES2022 across several packages.
  • Updated error creation to preserve underlying errors via Error({ cause }), plus small JSX/CSS cleanups and snapshot refreshes.

Reviewed changes

Copilot reviewed 48 out of 50 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Workspace devDependency updates and new overrides for transitive deps.
source/widgets/js/tsconfig.json Raise TS target/lib baseline to ES2022 for widgets JS.
source/vscode/tsconfig.json Raise TS target/lib baseline to ES2022 for the VS Code extension.
source/vscode/build.mjs Raise esbuild output target to ES2022 for extension bundling.
source/vscode/test/buildTests.mjs Raise esbuild output target to ES2022 for test bundle.
source/vscode/src/webview/tsconfig.json Raise webview TS target/lib baseline to ES2022.
source/vscode/src/webviewPanel.ts Preserve original errors by attaching cause when rethrowing.
source/vscode/src/projectSystem.ts Attach cause to errors thrown on failed GitHub raw fetch parsing.
source/vscode/src/estimate.ts Attach cause to errors thrown from resource estimation failures.
source/vscode/src/createProject.ts Minor refactor of manifest parsing variable initialization.
source/vscode/src/circuitEditor.ts Minor cleanup plus attach cause on circuit expression generation failures.
source/vscode/src/azure/treeView.ts Formatting-only change to class declaration.
source/vscode/src/azure/networkRequests.ts Attach cause to errors thrown from Azure/storage request helpers.
source/playground/src/tsconfig.json Raise TS module/target/lib baseline to ES2022 for playground.
source/playground/build.js Raise esbuild output target to ES2022 for playground bundles.
source/playground/src/tabs.tsx JSX attribute casing fix (readOnly).
source/playground/src/main.css CSS formatting change (multiline font-family).
source/npm/qsharp/src/tsconfig.json Raise TS target/lib baseline to ES2022 for qsharp-lang sources.
source/npm/qsharp/src/utils.ts Minor local variable initialization cleanup.
source/npm/qsharp/src/data-structures/legacyCircuitUpdate.ts Attach cause to conversion errors for better debugging.
source/npm/qsharp/generate_katas_content.js Attach cause to thrown errors; minor variable initialization cleanup.
source/npm/qsharp/generate_docs.js Minor variable initialization cleanup.
source/npm/qsharp/ux/tsconfig.json Add rootDir and raise TS target/lib baseline to ES2022 for UX build.
source/npm/qsharp/ux/saveImage.tsx Minor refactor to const for DOM child collection.
source/npm/qsharp/ux/resultsTable.tsx Replace invalid width/height attrs with a style attribute.
source/npm/qsharp/ux/report.ts Minor variable initialization cleanup in generated report code.
source/npm/qsharp/ux/circuit-vis/sqore.ts Move renderDepth initialization into constructor.
source/npm/qsharp/ux/circuit-vis/draggable.ts Minor variable initialization cleanup (dropzone).
source/npm/qsharp/test/circuits.js Attach cause to JSON parse errors in tests.
source/npm/qsharp/test/state-viz-cases/state_viz_snapshot_-_threshold_aggregates_to_Others.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/state-viz-cases/state_viz_snapshot_-_superposition_with_phase.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/state-viz-cases/state_viz_snapshot_-_single_basis_state.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/two-qubit-gates.qs.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/qubit-reuse.qs.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/ops-with-gap-ranges.qs.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/nested-callables.qs.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/loops.qs.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/lambda.qs.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/intrinsics.qs.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/intersecting-wires.qs.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/if-else.qs.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/gate-and-measure.qsc.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/functors.qs.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/empty.qsc.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/conditionals.qs.snapshot.html Snapshot refresh (doctype normalization).
source/npm/qsharp/test/circuits-cases/bell-pair.qs.snapshot.html Snapshot refresh (doctype normalization).
source/jupyterlab/tsconfig.json Raise TS emit target to ES2022 for JupyterLab extension build.
source/jupyterlab/package.json JupyterLab dependency updates plus overrides for a transitive vulnerability fix.
source/jupyterlab/package-lock.json Lockfile refresh reflecting updated JupyterLab dependency graph.

"@types/mocha": "^10.0.10",
"@types/node": "^22.14",
"@types/vscode": "^1.99.1",
"@types/vscode": "^1.115.0",
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@types/vscode was bumped to ^1.115.0, but the extension manifest still declares support back to VS Code ^1.77.0 (see source/vscode/package.json engines). Building against newer API types makes it easy to accidentally rely on APIs/events introduced after 1.77, which would break users on older VS Code versions at runtime. Consider either (a) pinning @types/vscode to the minimum supported VS Code API version, or (b) bumping the extension's engines.vscode range to match the new API level (and documenting the new minimum).

Suggested change
"@types/vscode": "^1.115.0",
"@types/vscode": "1.77.0",

Copilot uses AI. Check for mistakes.
"@codemirror/legacy-modes": "^6.5.1",
"@jupyterlab/application": "^4.5.6",
"@jupyterlab/codemirror": "^4.5.6",
"@jupyterlab/notebook": "4.4.10"
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jupyterlab/notebook is pinned to 4.4.10 while the other @jupyterlab/* dependencies are on ^4.5.6. JupyterLab packages are typically released in lockstep and mixing minor versions can lead to duplicated Lumino/JupyterLab packages, peer dependency conflicts, or runtime incompatibilities. Consider aligning @jupyterlab/notebook to the same version family as the rest (or pinning all JupyterLab deps consistently if you need to stay on 4.4.x for a specific reason).

Suggested change
"@jupyterlab/notebook": "4.4.10"
"@jupyterlab/notebook": "^4.5.6"

Copilot uses AI. Check for mistakes.
Comment on lines 41 to 44
bundle: true,
platform: "browser",
target: ["es2020", "chrome64", "edge79", "firefox62", "safari11.1"],
target: ["es2022"],
define: { "import.meta.url": "document.URL" },
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The playground build target was simplified from an explicit browser/version list (e.g., Safari 11.1, Edge 79) to just es2022. This effectively drops the previous compatibility guarantees and can produce bundles that won’t run on older browsers that were explicitly supported before. If that broader compatibility is still required, consider keeping explicit targets (or switching to a browserslist-driven approach) and documenting any intentional minimum-browser bump.

Copilot uses AI. Check for mistakes.
"mocha": "^11.7.5",
"modern-normalize": "^3.0.1",
"monaco-editor": "^0.53.0",
"openai": "^6.34.0",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you're in here, can we get rid of openai? I accidentally left that in from an earlier feature that's long gone.

Suggested change
"openai": "^6.34.0",

Comment on lines +60 to +64
"overrides": {
"mocha": {
"serialize-javascript": "^7.0.4",
"diff": "^8.0.3"
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these overrides really necessary? On my dev box, I deleted these overrides, deleted package-lock.json and node_modules entirely, and just did a ./build.py and it ran clean. What if you did that to regenerate the package-lock?

"@jupyterlab/codemirror": "^4.5.6",
"@jupyterlab/notebook": "4.4.10"
},
"overrides": {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question about these overrides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants