Skip to content

Conversation

@jabez007
Copy link
Member

@jabez007 jabez007 commented Jun 6, 2025

Summary by CodeRabbit

  • Chores
    • Updated TypeScript configurations for improved module compatibility and type declaration output.
    • Added a dedicated build script for generating type declaration files.
    • Updated package metadata: version bump to 0.4.0, license changed to GPL-3.0-only, and TypeScript dependency updated.
    • Updated GitHub Actions workflows to use the latest checkout action version.
  • Documentation
    • Added the full text of the GNU General Public License version 3 (GPLv3) to the project.

@jabez007 jabez007 self-assigned this Jun 6, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 6, 2025

"""

Walkthrough

This 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

File(s) Change Summary
LICENSE Added full text of GNU General Public License version 3 (GPLv3).
bin/index.js Updated project initialization logic to generate revised tsconfig files and package.json scripts.
package.json Version bumped to 0.4.0, license switched to GPL-3.0-only, TypeScript updated, new build scripts, and types/exports fields adjusted.
tsconfig.commonjs.json, tsconfig.esm.json Refactored for clearer CommonJS and ESM build separation; targets, declaration options, and modules updated.
tsconfig.json Target raised to ES2019, module changed to Node18, import rewriting enabled, formatting improved.
tsconfig.test.json Compilation target lowered from ES2020 to ES2017.
tsconfig.types.json New config for generating type declarations only, outputting to ./dist/types.
.github/workflows/publish.yml, .github/workflows/test.yml, bin/github/workflows/publish.yml, bin/github/workflows/test.yml Updated GitHub Actions workflows to use actions/checkout@v4 and changed tag pattern quoting style.

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)
Loading

Poem

🐇
A license hops in, bold and free,
GPLv3 for all to see!
Types and builds now neatly split,
With scripts and configs that truly fit.
Version bumped, the code refined—
This bunny’s proud of what you’ll find!
📝✨
"""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 473650b and f3c3d72.

📒 Files selected for processing (4)
  • .github/workflows/publish.yml (3 hunks)
  • .github/workflows/test.yml (1 hunks)
  • bin/github/workflows/publish.yml (3 hunks)
  • bin/github/workflows/test.yml (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • .github/workflows/test.yml
  • bin/github/workflows/test.yml
  • bin/github/workflows/publish.yml
  • .github/workflows/publish.yml

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between a812867 and 6f3bea7.

⛔ Files ignored due to path filters (1)
  • package-lock.json is 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 that tsconfig.types.json handles all type outputs.

tsconfig.types.json (1)

1-9: New declaration-only tsconfig
This isolates .d.ts generation into ./dist/types and 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 by tsconfig.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:types and the postbuild hook ensures proper build ordering. This aligns well with the PR objective of fixing ESM build output.

bin/index.js (1)

133-133: ⚠️ Potential issue

Fix 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.

@jabez007 jabez007 changed the title Attempting to fix issue to ESM build output Attempting to fix issue with ESM build output Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants