-
Notifications
You must be signed in to change notification settings - Fork 0
Attempting to fix issue with ESM build output #2
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: master
Are you sure you want to change the base?
Conversation
|
""" WalkthroughThis update introduces the full GNU GPLv3 license text, updates TypeScript build configurations for clearer separation of CommonJS, ESM, and type declaration outputs, and revises the package metadata to reflect these changes. The package license changes from ISC to GPL-3.0-only, and the TypeScript dependency is updated. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant Script as bin/index.js
participant FS as File System
Dev->>Script: Run project initialization
Script->>FS: Generate tsconfig.json (base)
Script->>FS: Generate tsconfig.commonjs.json (CJS build)
Script->>FS: Generate tsconfig.esm.json (ESM build)
Script->>FS: Generate tsconfig.types.json (types only)
Script->>FS: Update package.json (scripts, fields)
Script->>FS: Add LICENSE (GPLv3)
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (8)
LICENSE(1 hunks)bin/index.js(8 hunks)package.json(4 hunks)tsconfig.commonjs.json(1 hunks)tsconfig.esm.json(1 hunks)tsconfig.json(4 hunks)tsconfig.test.json(2 hunks)tsconfig.types.json(1 hunks)
🔇 Additional comments (9)
LICENSE (1)
1-675: No review needed for license text
Adding the full GPL-3.0-only license content is intentional; no issues to flag here.tsconfig.test.json (1)
5-5: Align test compilation target to ES2017
Lowering the test target is consistent with the new build matrix. Confirm that no ES2020-specific syntax (e.g., nullish coalescing??, optional chaining?., etc.) remains in the test suite.tsconfig.commonjs.json (2)
6-6: Lower CommonJS build target to ES5
Targeting ES5 ensures wider runtime compatibility. Verify that any ES2019+ features are correctly down-leveled and tested in legacy environments.
8-9: Declaration emission moved to a dedicated config
Disabling"declaration"and"declarationMap"here is correct now thattsconfig.types.jsonhandles all type outputs.tsconfig.types.json (1)
1-9: New declaration-only tsconfig
This isolates.d.tsgeneration into./dist/typesand aligns with the build separation strategy. All options look correct.tsconfig.esm.json (2)
4-6: Updated ESM module & resolution settings
Switching to"module": "nodenext"with an ES2023 target fits modern ESM usage. Please verify import path/extension handling under Node’s ESM loader.
8-9: Disable declarations in ESM config
Declarations are now produced bytsconfig.types.json, so disabling them here is appropriate.package.json (1)
14-20: Build pipeline changes look good!The separation of type generation into its own build step with
build:typesand thepostbuildhook ensures proper build ordering. This aligns well with the PR objective of fixing ESM build output.bin/index.js (1)
133-133:⚠️ Potential issueFix typo in generated tsconfig exclude path.
The generated tsconfig will have the same typo. Should be
node_modules(plural).- "node_modules", + "node_modules",Likely an incorrect or invalid review comment.
Summary by CodeRabbit