Fix Tests (ubuntu-latest, 3.x, debugger): replace gulp-typescript with direct tsc in compileCore task#25998
Fix Tests (ubuntu-latest, 3.x, debugger): replace gulp-typescript with direct tsc in compileCore task#25998Copilot wants to merge 7 commits into
Conversation
- Bump eslint ^8.57.1 → ^10.0.0
- Add @eslint/js ^10.0.0 (now a required explicit dep for flat config)
- Bump @typescript-eslint/{eslint-plugin,parser} ^6.21.0 → ^8.61.0
- Bump eslint-config-prettier ^8.3.0 → ^10.1.8
- Bump typescript ~5.2 → ~5.9
- Replace eslint-plugin-import ^2 (no ESLint 10 support) with
eslint-plugin-import-x ^4.16.2 (drop-in fork with ESLint 10 support)
eslint.config.mjs:
- Update import to use eslint-plugin-import-x
- Remove prettier from plugins (eslint-config-prettier is not a plugin)
- Remove rules deleted in @typescript-eslint v8:
ban-types, no-loss-of-precision, no-extra-parens, no-var-requires
- Rename no-empty-interface → no-empty-object-type (v8 replacement)
- Turn off new v8 recommended rules to avoid flagging pre-existing code:
no-unsafe-function-type, no-wrapper-object-types,
no-unused-expressions
- Turn off new ESLint 10 recommended rules:
no-unassigned-vars, no-useless-assignment, preserve-caught-error
Source files: remove stale eslint-disable @typescript-eslint/ban-types
comments (rule removed in v8) from 11 files across src/client and src/test
tsconfig.json, tsconfig.extension.json, pythonExtensionApi/tsconfig.json:
- Add skipLibCheck: true to resolve type conflict between
@types/eslint-scope (webpack transitive dep) and ESLint 10 bundled types
|
@copilot Do not use skiplibcheck. Instead bump webpack. |
Webpack 5.107.0 dropped @types/eslint-scope as a dependency, which resolves the type conflict with ESLint 10's bundled TypeScript declarations. This avoids the need for skipLibCheck: true.
Done. Bumped webpack
Done in 456b4c6. Bumped webpack |
|
@copilot Fix peer dependency issues by upgrading or deleting outdated eslint helper dependencies. |
eslint-plugin-jsx-a11y, eslint-plugin-react, and eslint-plugin-react-hooks are not imported in eslint.config.mjs. eslint-plugin-jsx-a11y@6.x has no ESLint 10-compatible release, causing npm install to fail without --legacy-peer-deps. Removing all three resolves the conflict and allows clean installs.
Done in c975d3a. Removed |
|
@copilot Confirm where eslint-plugin-react was being used. Does the project contain React files? |
The project contains no React files — no
|
|
@copilot Upgrade vscode/test-electron package to ^3.0.0. |
Done. Upgraded |
Root Cause
The
compileCoregulp task usedgulp-typescriptv5.0.1, which has a bug when compiling TypeScript withmodule: "NodeNext"— it emits raw ESimportstatements in the.jsoutput instead of converting them to CJSrequire()calls.In Node.js v22.12+, when a
.jsfile contains ES module syntax but there is no"type": "module"in the nearestpackage.json, Node.js reparses the file as ESM. In ESM mode, relative imports require explicit.jsfile extensions — which the compiled output lacks — causing:Fix
Replaced the
compileCoregulp task ingulpfile.jsto invoketscdirectly using the project-local TypeScript binary (node_modules/typescript/bin/tsc), identical to how the existingcompileApitask already works. This produces correct CJS output withrequire()calls. The now-unusedgulp-typescriptandtypescriptimports were also removed.Testing
npx gulp prePublishNonBundlecompiles successfullytestBootstrap.jsuses CJSrequire()— no ESM reparsing warningnode ./out/test/testBootstrap.jsstarts withoutERR_MODULE_NOT_FOUNDOriginal prompt
Created from VS Code.