| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
- Added package.json in dist/setup to specify module type as ESM. - Updated jest.config.js to support ESM with ts-jest and added moduleNameMapper for .js extensions. - Created jest.setup.js to ensure Jest globals are available in ESM mode. - Modified test script in package.json to use node with experimental VM modules for Jest. - Updated imports in various distribution files to include .js extensions for ESM compatibility. - Adjusted tsconfig.json to exclude __tests__ directory and maintain ESM settings. - Updated package-lock.json to include new dependencies and their versions.
There was a problem hiding this comment.
This PR migrates the project from CommonJS to ES modules (ESM) and upgrades node-fetch from version 2.x to 3.x. The changes enable modern JavaScript module syntax and fetch API compatibility.
Copilot reviewed 30 out of 40 changed files in this pull request and generated 1 comment.
Show a summary per file| File | Description |
|---|---|
| package.json | Added ESM module type and updated test script for experimental VM modules |
| jest.setup.js | Created Jest setup file to ensure globals are available in ESM mode |
| src/**/*.ts | Updated import statements to include .js extensions for ESM compatibility |
| tests/**/*.ts | Updated test imports and added ESM compatibility utilities |
| .licenses/npm/*.dep.yml | Updated dependency license files for node-fetch v3.x and related packages |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Sorry, something went wrong.
| let cnSpy: any; | ||
| let logSpy: any; | ||
| let dbgSpy: any; |
There was a problem hiding this comment.
Using 'any' type defeats TypeScript's type safety. Consider using proper Jest spy types like 'jest.SpyInstance' or importing the specific types from '@jest/globals'.
| let cnSpy: any; | |
| let logSpy: any; | |
| let dbgSpy: any; | |
| let cnSpy: jest.SpyInstance; | |
| let logSpy: jest.SpyInstance; | |
| let dbgSpy: jest.SpyInstance; |
Sorry, something went wrong.
…as a dev dependency
|
Closing this PR as a duplicate of #1574. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description:
Describe your changes.
Related issue:
Add link to the related issue.
Check list: