Skip to content

fix: bump dependency versions#112

Open
GordonSmith wants to merge 1 commit intomainfrom
BUMP_VERSION_BROKEN
Open

fix: bump dependency versions#112
GordonSmith wants to merge 1 commit intomainfrom
BUMP_VERSION_BROKEN

Conversation

@GordonSmith
Copy link
Owner

No description provided.

Signed-off-by: Gordon Smith<GordonJSmith@gmail.com>
Copy link

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

This pull request aims to bump dependency versions and migrate the test infrastructure from Mocha to Vitest. However, the dependency version updates contain numerous critical issues with non-existent package versions.

Changes:

  • Migration from Mocha to Vitest for testing framework
  • Test file reorganization from src/test/ to test/ directory
  • Build script changes from node esbuild.mjs to tsx esbuild.mts
  • Import path updates for @hpcc-js/observablehq-compiler to use /node subpath
  • Addition of R language support in notebook type mappings
  • Multiple dependency version bumps (many to non-existent versions)

Reviewed changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Updated build scripts to use tsx, migrated test scripts from Mocha to Vitest, bumped multiple dependencies (many to invalid versions)
vitest.config.ts New Vitest configuration for unit tests in src/ directory
tsconfig.test.json New TypeScript config for integration tests in test/ directory
test/runTest.ts New integration test runner using @vscode/test-electron with improved VS Code version detection
test/index.ts New simple integration test that verifies extension activation
test/helper.ts Test helper utilities (contains hardcoded reference to wrong extension ID)
test/diagnostics.test.ts Migrated from Mocha to Vitest with assertion updates
test/completion.test.ts Migrated from Mocha to Vitest with assertion updates
src/test/runTest.ts Removed old Mocha-based test runner
src/test/index.ts Removed old Mocha test index
src/ojs/meta.ts Updated import to use @hpcc-js/observablehq-compiler/node subpath
src/ojs/command.ts Updated import to use @hpcc-js/observablehq-compiler/node subpath
src/notebook-kit/common/types.ts Added "r" language mapping for R language support
esbuild.mts Renamed from .mjs, added explicit typing, added jsdomPatch plugin (unused), added console to externals
samples/test.ecl New ECL sample file
.gitignore Added /dist-test and /out directories
Comments suppressed due to low confidence (4)

test/completion.test.ts:41

  • The assertion migration from assert.strictEqual to expect().toStrictEqual() is semantically correct, but using toStrictEqual for simple equality checks is non-idiomatic. Vitest's toStrictEqual is meant for deep object comparisons. For primitive values and simple comparisons, use toBe instead. For example: expect(actualItem.label).toBe(expectedItem.label) and expect(actualItem.kind).toBe(expectedItem.kind).
    esbuild.mts:88
  • The jsdomPatch plugin is defined but never used in any of the build calls. It should either be added to the plugins array in the main function call for the node build (line 141) if it's needed for jsdom compatibility, or removed if it's not necessary.
    test/diagnostics.test.ts:39
  • The assertion migration from assert.strictEqual to expect().toStrictEqual() is semantically correct, but using toStrictEqual for simple equality checks is non-idiomatic. Vitest's toStrictEqual is meant for deep object comparisons. For primitive values like message strings and severity enums, use toBe instead. For the range object comparison on line 38, toStrictEqual is appropriate.
    esbuild.mts:68
  • Unused variable jsdomPatch.

Comment on lines +5 to +7
include: ["src/**/*.test.ts"],
exclude: [
"test/**",
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The vitest.config.ts is configured to include "src//*.test.ts" but the test files in this PR are located in the "test/" directory (test/completion.test.ts, test/diagnostics.test.ts). These integration tests won't be picked up by the "test-unit" script. Either move unit tests to src/ with the .test.ts extension, or update the vitest config to also include "test//*.test.ts" if you want vitest to run both unit and integration tests.

Suggested change
include: ["src/**/*.test.ts"],
exclude: [
"test/**",
include: ["src/**/*.test.ts", "test/**/*.test.ts"],
exclude: [

Copilot uses AI. Check for mistakes.
"@observablehq/notebook-kit": "1.4.1",
"@observablehq/runtime": "5.9.9",
"@observablehq/notebook-kit": "1.5.1",
"@observablehq/runtime": "6.0.0",
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The @observablehq/runtime version was bumped to 6.0.0, which appears to be a major version upgrade from 5.9.9. This is a significant breaking change. Ensure that all code using the runtime API has been tested and updated to work with v6 APIs, as major version bumps typically include breaking changes.

Suggested change
"@observablehq/runtime": "6.0.0",
"@observablehq/runtime": "5.9.9",

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +36
"build-ts": "tsx esbuild.mts --production",
"build-ts-dev": "tsx esbuild.mts --development",
"build-ts-watch": "tsx esbuild.mts --watch --development",
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The build script commands have been changed from "node esbuild.mjs" to "tsx esbuild.mts", but the file was renamed from .mjs to .mts. The instructions in the coding guidelines mention "Build is driven by esbuild.mjs" but the file is now esbuild.mts. While this change is correct (using tsx to run TypeScript directly), ensure that all documentation referencing esbuild.mjs is updated to esbuild.mts.

Copilot uses AI. Check for mistakes.
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.

1 participant