-
Notifications
You must be signed in to change notification settings - Fork 1
Merge dev changes #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 PR merges development changes that improve the build system for dual CommonJS/ESM package distribution. The changes focus on correcting import paths, enhancing build scripts to handle JSON files, and expanding package exports to support subpath exports for readingStore and globals modules.
- Corrected import paths in both source and test files to use proper relative paths
- Enhanced build scripts to handle JSON files during the build process
- Added
cpxtool for copying JSON files to distribution directories - Expanded package.json exports to enable subpath imports
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/src/index.test.ts | Fixed import paths to use correct relative paths (../../src/) |
| src/index.ts | Fixed import paths to remove redundant src/ prefix in relative imports |
| scripts/rename-cjs-files.cjs | Added JSON file exclusion logic when updating require statements |
| scripts/generate-exports.cjs | Enhanced with singleFiles parameter and improved export path generation |
| package.json | Added module field, copy-json script, cpx dependency, and subpath exports |
| package-lock.json | Added cpx dependency and its transitive dependencies |
Comments suppressed due to low confidence (1)
src/index.ts:9
- Unused imports TENDENCY, TREND.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| let content = fs.readFileSync(newFullPath, "utf8"); | ||
| content = content.replace(/require\(['"](\..*?)['"]\)/g, (match, p1) => { | ||
| if (!p1.endsWith(".cjs")) { | ||
| if(p1.endsWith(".json")) { |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after if keyword on line 23. For consistency with the existing codebase style (line 26 has else if with space), line 23 should be if (p1.endsWith(".json")) with a space between if and the opening parenthesis.
| if(p1.endsWith(".json")) { | |
| if (p1.endsWith(".json")) { |
|
|
||
| if(directory !== null) { | ||
| // Define paths | ||
| if (directory !== null) { |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This guard always evaluates to false.
| if (directory !== null) { | |
| if (directory) { |
No description provided.