You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Node.js 22 strip-only loader regression in mocha setup (#1740)
* fix(tests): update import syntax for Node.js 22 compatibility
Updates import syntax in test files to be compatible with the new experimental TypeScript loader enabled by default in Node.js v22.18.0+.
Starting in v22.18.0, Node.js enables a "strip-only" mode for TypeScript files by default. This new loader is stricter and does not support certain TypeScript-specific syntax, such as `import = require()` declarations, which were previously handled by a separate transpiler.
This change caused `TypeError` and `SyntaxError` exceptions during test runs. This commit replaces the incompatible syntax with standard ES module imports to resolve the test failures.
* fix(tests): normalize mocha setup imports for node compatibility
* lint: run formatter
* fix(tests): normalize bin mocha setup imports
* fix(tests): normalize js-yaml import for bin tests
* fix(tests): swap bin manifest parser to yaml
* fix linter issue.
* Update mocha/setup.ts
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
0 commit comments