Skip to content

Conversation

@JounQin
Copy link
Member

@JounQin JounQin commented Jun 11, 2025

close #147

Summary by CodeRabbit

  • Bug Fixes

    • Ensured the correct handling of the napi property in the installation process to support post-install scripts.
  • Chores

    • Updated version numbers to 1.8.1 across relevant files.
    • Adjusted internal scripts to align with the new version and maintain compatibility.

Important

Fix bug by retaining napi property in package.json and update version to 1.8.1.

  • Bug Fix:
    • Retain napi property in package.json for napi-postinstall script.
  • Version Update:
    • Update version to 1.8.1 in Cargo.toml, Cargo.lock, and package.json.

This description was created by Ellipsis for 7f6d229. You can customize this summary. It will automatically update as commits are pushed.

@JounQin JounQin self-assigned this Jun 11, 2025
@JounQin JounQin added the bug Something isn't working label Jun 11, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 11, 2025

Walkthrough

The changes increment the version of the project to 1.8.1 across Cargo.toml, package.json, and CHANGELOG.md. The package.json scripts are updated to ensure the napi property is retained during publishing, addressing a bug related to missing NAPI configuration required by napi-postinstall.

Changes

File(s) Change Summary
CHANGELOG.md Added 1.8.1 release entry describing a bug fix for retaining the napi property in package.json.
Cargo.toml Updated unrs_resolver version from 1.8.0 to 1.8.1 in [package] and [workspace.dependencies].
package.json Bumped version to 1.8.1; updated "postinstall" script; modified "prepublishOnly" to retain napi key.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant npm
    participant package.json
    participant napi-postinstall

    Developer->>npm: npm install [email protected]
    npm->>package.json: Read package.json
    package.json->>napi-postinstall: Provide napi configuration
    napi-postinstall-->>npm: Validate NAPI fields present
    npm-->>Developer: Installation completes successfully
Loading

Assessment against linked issues

Objective Addressed Explanation
Ensure NAPI configuration is retained in package.json for napi-postinstall (147)
Update version to reflect bug fix release (147)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes found.

Poem

A bunny hopped with nimble feet,
To fix a bug and make things neat.
NAPI fields now safe and sound,
Installation woes no longer found.
With version bumped and scripts in line,
The package builds just fine!
🐇✨


📜 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 46cbe4d and 7f6d229.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • Cargo.toml (1 hunks)
  • package.json (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md

18-18: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Test (windows-latest)
  • GitHub Check: Benchmark
🔇 Additional comments (6)
package.json (2)

3-3: Bump package version to 1.8.1
Version updated correctly to align with the new release.


24-25: Update install and publish scripts for NAPI fix
The postinstall script version and prepublishOnly flag -k napi are correctly adjusted to retain the napi property.

CHANGELOG.md (2)

10-15: Add 1.8.1 release entry
The new version heading and bug fix description are accurate and reference PR #148.


18-18: Credit @JounQin as contributor
The contributor list correctly includes @JounQin for this fix.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

18-18: Unordered list style
Expected: dash; Actual: asterisk

(MD004, ul-style)

Cargo.toml (2)

19-19: Update workspace dependency to 1.8.1
The workspace dependency version is in sync with the release bump.


23-23: Bump package version to 1.8.1
The [package] version correctly reflects the new release.


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.

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.17%. Comparing base (46cbe4d) to head (7f6d229).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #148   +/-   ##
=======================================
  Coverage   92.17%   92.17%           
=======================================
  Files          13       13           
  Lines        3053     3053           
=======================================
  Hits         2814     2814           
  Misses        239      239           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JounQin JounQin changed the title keep napi property in package.json for napi-postinstall fix: keep napi property in package.json for napi-postinstall Jun 11, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Jun 11, 2025

CodSpeed Performance Report

Merging #148 will not alter performance

Comparing fix/keep_napi (7f6d229) with main (46cbe4d)

Summary

✅ 3 untouched benchmarks

@JounQin JounQin merged commit e02a6bd into main Jun 11, 2025
23 checks passed
@JounQin JounQin deleted the fix/keep_napi branch June 11, 2025 10:35
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 7f6d229 in 58 minutes and 28 seconds. Click for details.
  • Reviewed 75 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. package.json:46
  • Draft comment:
    Good: The reintroduction of the 'napi' property with its proper configuration (binaryName, packageName, wasm config, and targets) ensures compatibility with napi-postinstall.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. package.json:24
  • Draft comment:
    The postinstall script now references version 1.8.1, matching the updated package version.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. Cargo.toml:22
  • Draft comment:
    Version bump to 1.8.1 is consistent across Cargo.toml; this supports the npm package version.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. Cargo.lock:1240
  • Draft comment:
    Cargo.lock reflects the version update to 1.8.1; this is consistent with the new release.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_ukjBAklE52CeCG78

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 7f6d229 in 130 minutes and 18 seconds. Click for details.
  • Reviewed 75 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. package.json:46
  • Draft comment:
    Good: The new 'napi' block (lines 46–73) is added with binaryName, packageName, wasm config, and targets. This satisfies the napi-postinstall requirements and should resolve the installation issue.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. package.json:24
  • Draft comment:
    Note: The 'postinstall' script now uses 'napi-postinstall unrs-resolver 1.8.1 check'. Ensure that all version numbers remain consistent.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. Cargo.toml:22
  • Draft comment:
    The package version is bumped to 1.8.1, matching the new release and npm 'postinstall' script version. This maintains consistency across the build.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_ukjBAklE52CeCG78

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Missing NAPI configuration in package.json causes npm install failure in v1.8.0

2 participants