Skip to content

Conversation

JounQin
Copy link
Member

@JounQin JounQin commented Apr 14, 2025

close #391


Important

Remove module-sync entries, replace lint-staged with nano-staged, update dependencies, and adjust documentation and comments.

  • Package Management:
    • Remove module-sync entries from package.json in browser, core, es-modules, imagemin, umd-globals, and utils.
    • Replace lint-staged with nano-staged in package.json.
  • Dependency Updates:
    • Update @1stg/common-config to ^13.0.1, @changesets/cli to ^2.29.0, @shikijs/rehype to ^3.2.2, @swc/core to ^1.11.21, @types/node to ^22.14.1, @types/react to ^19.1.1, @types/web to ^0.0.217, jsox to ^1.2.123, and rollup to ^4.40.0 in package.json.
  • Documentation:
    • Update README files to consolidate "Sponsors and Backers" sections.
  • Code Comments:
    • Adjust comments in index.ts in es-modules and helpers.ts in utils for clarity.

This description was created by Ellipsis for 0b6349d. It will automatically update as commits are pushed.

Summary by CodeRabbit

  • Documentation

    • Reorganized and renamed sponsor/backer sections in user documentation to enhance clarity and navigation, making it easier to identify support information.
  • Bug Fixes

    • Removed problematic module synchronization entries to improve overall package stability.
  • Chores

    • Updated dependency versions, funding URLs, and legacy configuration details across packages.
    • Streamlined commit hook setup to enhance the development workflow and system consistency.

@JounQin JounQin requested a review from Copilot April 14, 2025 14:12
Copy link

changeset-bot bot commented Apr 14, 2025

🦋 Changeset detected

Latest commit: fa58406

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@pkgr/browser Patch
@pkgr/core Patch
@pkgr/es-modules Patch
@pkgr/imagemin Patch
@pkgr/rollup Patch
@pkgr/umd-globals Patch
@pkgr/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

coderabbitai bot commented Apr 14, 2025

Walkthrough

This PR introduces a changeset file that patches several packages by removing buggy module-sync export entries—an issue suspected to cause require cycle errors. It replaces the previous lint-staged setup with nano-staged for pre-commit TypeScript checks, updates dependency versions and funding URLs across multiple package manifests, and refactors documentation by reorganizing sponsor/backers sections. Minor comment formatting improvements are also applied to several source files.

Changes

File(s) Change Summary
.changeset/real-dots-obey.md Added new changeset specifying patch entries for multiple packages with note on removing buggy module-sync entries.
.lintstagedrc.js, .nano-staged.js, root package.json Removed .lintstagedrc.js and added .nano-staged.js; replaced the lint-staged dependency with nano-staged in the devDependencies.
README.md, packages/.../README.md (es-modules, umd-globals) Renamed and reorganized sponsor/backers sections for improved clarity and hierarchical structure.
packages/browser/package.json, packages/core/package.json, packages/es-modules/package.json, packages/imagemin/package.json, packages/umd-globals/package.json, packages/utils/package.json Updated funding URLs and removed the module-sync export entries from the exports configuration.
packages/rollup/package.json Updated funding URL and bumped dependency versions (jsox and rollup).
Root package.json Upgraded various devDependencies (e.g., @1stg/common-config, @changesets/cli, etc.) and removed the resolution entry for es5-ext.
packages/browser/index.ts, packages/es-modules/index.ts, packages/rollup/src/config.ts, packages/utils/src/helpers.ts Revised comment formatting for consistency and clarity without altering functional code.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Hook as Pre-commit Hook
    participant NS as Nano-staged
    Dev->>Hook: Initiate commit
    Hook->>NS: Run TypeScript checks
    NS-->>Hook: Return check result
    Hook-->>Dev: Commit accepted/rejected
Loading

Assessment against linked issues

Objective Addressed Explanation
Remove buggy module-sync entries to resolve ERR_REQUIRE_CYCLE_MODULE (#391)

Possibly related PRs

Poem

I'm a rabbit hopping with delight,
Buggy modules gone, everything's light.
Nano-staged now leads the pre-commit race,
Each dependency update falls into place.
With funding URLs and docs refined so neat,
I nibble on code, and my heart skips a beat!

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/es-modules/index.ts

Oops! Something went wrong! :(

ESLint: 9.24.0

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@1stg/eslint-config' imported from /eslint.config.js
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

packages/utils/src/helpers.ts

Oops! Something went wrong! :(

ESLint: 9.24.0

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@1stg/eslint-config' imported from /eslint.config.js
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

packages/rollup/src/config.ts

Oops! Something went wrong! :(

ESLint: 9.24.0

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@1stg/eslint-config' imported from /eslint.config.js
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

  • 2 others
✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 10 out of 18 changed files in this pull request and generated no comments.

Files not reviewed (8)
  • package.json: Language not supported
  • packages/browser/package.json: Language not supported
  • packages/core/package.json: Language not supported
  • packages/es-modules/package.json: Language not supported
  • packages/imagemin/package.json: Language not supported
  • packages/rollup/package.json: Language not supported
  • packages/umd-globals/package.json: Language not supported
  • packages/utils/package.json: Language not supported
Comments suppressed due to low confidence (2)

packages/utils/src/helpers.ts:60

  • [nitpick] Replacing the JSDoc block comment with an inline comment might affect automated documentation generation. If the project relies on JSDoc for docs or tooling, consider retaining the original format.
// Type guard for non-empty values

packages/es-modules/index.ts:23

  • [nitpick] The change from a JSDoc block comment to an inline comment could impact documentation if automated tools are used. Consider preserving the JSDoc style if documentation generation is necessary.
// `entries` option for `rollup-plugin-alias`

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link

pkg-pr-new bot commented Apr 14, 2025

Open in StackBlitz

@pkgr/browser

npm i https://pkg.pr.new/@pkgr/browser@392

@pkgr/core

npm i https://pkg.pr.new/@pkgr/core@392

@pkgr/es-modules

npm i https://pkg.pr.new/@pkgr/es-modules@392

@pkgr/imagemin

npm i https://pkg.pr.new/@pkgr/imagemin@392

@pkgr/rollup

npm i https://pkg.pr.new/@pkgr/rollup@392

@pkgr/utils

npm i https://pkg.pr.new/@pkgr/utils@392

@pkgr/umd-globals

npm i https://pkg.pr.new/@pkgr/umd-globals@392

commit: fa58406

Copy link
Contributor

📊 Package size report   No changes

File Before After
Total (Includes all files) 3.1 MB 3.1 MB
Tarball size 1.1 MB 1.1 MB
Unchanged files
File Size
.changeset/config.json 309 B
.changeset/README.md 510 B
.codesandbox/ci.json 76 B
.editorconfig 145 B
.gitattributes 35 B
.github/workflows/autofix.yml 917 B
.github/workflows/ci.yml 1.4 kB
.github/workflows/pkg-pr-new.yml 641 B
.github/workflows/pkg-size.yml 723 B
.github/workflows/release.yml 1.5 kB
.github/workflows/vercel.yml 1.0 kB
.lintstagedrc.js 48 B
.nvmrc 6 B
.prettierignore 6 B
.remarkrc 42 B
.renovaterc 49 B
.simple-git-hooks.js 49 B
.stylelintignore 99 B
.stylelintrc 42 B
.yarn/plugins/plugin-prepare-lifecycle.cjs 202 B
.yarn/releases/yarn-4.9.0.cjs 3.0 MB
.yarnrc.yml 397 B
CHANGELOG.md 486 B
docs/App.tsx 1.2 kB
docs/global.css 321 B
docs/index.tsx 299 B
eslint.config.js 258 B
index.html 402 B
LICENSE 1.1 kB
package.json 2.9 kB
packages/browser/CHANGELOG.md 878 B
packages/browser/index.d.cts 60 B
packages/browser/index.ts 4.7 kB
packages/browser/openChrome.applescript 2.5 kB
packages/browser/package.json 1.2 kB
packages/browser/tsconfig.json 139 B
packages/core/CHANGELOG.md 1.7 kB
packages/core/index.d.cts 54 B
packages/core/package.json 1.1 kB
packages/core/src/constants.ts 448 B
packages/core/src/helpers.ts 1.9 kB
packages/core/src/index.ts 60 B
packages/core/tsconfig.json 154 B
packages/es-modules/CHANGELOG.md 5.0 kB
packages/es-modules/index.d.cts 64 B
packages/es-modules/index.ts 1.4 kB
packages/es-modules/package.json 1.1 kB
packages/es-modules/README.md 3.6 kB
packages/es-modules/test/test.spec.ts 936 B
packages/es-modules/tsconfig.json 139 B
packages/imagemin/CHANGELOG.md 8.7 kB
packages/imagemin/index.d.cts 57 B
packages/imagemin/package.json 1.4 kB
packages/imagemin/src/cli.ts 508 B
packages/imagemin/src/index.ts 1.2 kB
packages/imagemin/tsconfig.json 154 B
packages/rollup/CHANGELOG.md 21.2 kB
packages/rollup/package.json 1.6 kB
packages/rollup/shim.d.ts 647 B
packages/rollup/src/cli.ts 4.0 kB
packages/rollup/src/config.ts 11.9 kB
packages/rollup/tsconfig.json 132 B
packages/umd-globals/CHANGELOG.md 5.9 kB
packages/umd-globals/index.d.cts 66 B
packages/umd-globals/index.ts 1.8 kB
packages/umd-globals/package.json 1.0 kB
packages/umd-globals/README.md 3.4 kB
packages/umd-globals/test/test.spec.ts 1.9 kB
packages/umd-globals/tsconfig.json 139 B
packages/utils/CHANGELOG.md 11.8 kB
packages/utils/index.d.cts 51 B
packages/utils/package.json 1.1 kB
packages/utils/src/constants.ts 497 B
packages/utils/src/helpers.ts 2.8 kB
packages/utils/src/index.ts 117 B
packages/utils/src/monorepo.ts 691 B
packages/utils/tsconfig.json 154 B
README.md 4.1 kB
test/global.d.ts 41 B
test/tsconfig.json 96 B
tsconfig.base.json 41 B
tsconfig.json 395 B
vercel.json 190 B
vite.config.ts 544 B
vitest.config.ts 342 B

🤖 This report was automatically generated by pkg-size-action

Copy link
Contributor

Deploy preview for pkgr ready!

✅ Preview
https://pkgr-5skw1evnc-1stg.vercel.app

Built with commit fa58406.
This pull request is being automatically deployed with vercel-action

Copy link

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub ↗.

Action Severity Alert (click for details)
Warn High
es5-ext@0.10.64 is Protestware or potentially unwanted behavior.

Note: This package prints a protestware console message on install regarding Ukraine for users with Russian language locale

Source: yarn.lock

ℹ Read more on: This package | This alert | What is protestware?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Consider that consuming this package may come along with functionality unrelated to its primary purpose.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/es5-ext@0.10.64. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
es5-ext@0.10.64 is Protestware or potentially unwanted behavior.

Note: The script attempts to run a local post-install script, which could potentially contain malicious code. The error handling suggests that it is designed to fail silently, which is a common tactic in malicious scripts.

Source: yarn.lock

ℹ Read more on: This package | This alert | What is protestware?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Consider that consuming this package may come along with functionality unrelated to its primary purpose.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/es5-ext@0.10.64. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report ↗

Copy link

codecov bot commented Apr 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 9.97%. Comparing base (269f89d) to head (fa58406).
Report is 1 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #392   +/-   ##
======================================
  Coverage    9.97%   9.97%           
======================================
  Files          12      12           
  Lines         421     421           
  Branches      187     184    -3     
======================================
  Hits           42      42           
  Misses        379     379           

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

Copy link
Contributor

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

👍 Looks good to me! Reviewed everything up to 0b6349d in 1 minute and 56 seconds

More details
  • Looked at 421 lines of code in 17 files
  • Skipped 1 files when reviewing.
  • Skipped posting 30 drafted comments based on config settings.
1. .lintstagedrc.js:1
  • Draft comment:
    Removal of the lintstaged config is clear and appropriate. Confirm that all tooling now uses nano-staged instead.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
2. .nano-staged.js:1
  • Draft comment:
    This new file re-exports nano-staged config. Verify that nano-staged’s behavior matches previous expectations.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
3. package.json:30
  • Draft comment:
    Dependency updates and replacement of lint-staged by nano-staged are good. Confirm that version bumps (e.g. @1stg/common-config, @changesets/cli, etc.) are compatible with your codebase.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
4. packages/browser/package.json:17
  • Draft comment:
    Removal of the 'module-sync' export block is a key fix. This removal should resolve the ERR_REQUIRE_CYCLE_MODULE error observed in #391.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. packages/core/package.json:20
  • Draft comment:
    Similarly, removal of 'module-sync' entries here avoids potential module cycles. Confirm that downstream tools do not rely on those exports.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is asking the PR author to confirm that downstream tools do not rely on the removed exports. This falls under asking the author to confirm their intention or to double-check things, which is against the rules.
6. packages/es-modules/package.json:16
  • Draft comment:
    The 'module-sync' removal in this package is consistent with other updates. Ensure that any consumers of @pkgr/es-modules don’t depend on the removed export.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    This comment is asking the author to ensure that consumers of a module don't depend on a removed export. This falls under asking the author to ensure behavior is intended or to double-check things, which is against the rules.
7. packages/imagemin/package.json:22
  • Draft comment:
    Removal of the 'module-sync' entry streamlines exports and should help avoid cycle issues. Verify functionality after this change.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is asking the PR author to verify functionality after a change, which is against the rules. It doesn't provide a specific suggestion or point out a specific issue with the code.
8. packages/umd-globals/package.json:16
  • Draft comment:
    The removal of 'module-sync' from this package is appropriate. Check that consumers only use the 'import' and 'require' fields.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is asking the PR author to check something, which violates the rule against asking the author to confirm or ensure something. It doesn't provide a specific code suggestion or point out a specific issue that needs addressing.
9. packages/utils/package.json:19
  • Draft comment:
    Removal of 'module-sync' entries here is consistent with other packages. Confirm that no parts of the code expect this export.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is asking the PR author to confirm that no parts of the code expect the 'module-sync' export, which violates the rule against asking for confirmation of intention or behavior. The comment does not provide a specific code suggestion or ask for a specific test to be written.
10. .lintstagedrc.js:1
  • Draft comment:
    Removed .lintstagedrc.js in favor of .nano-staged.js. Ensure the new nano-staged integration is fully tested.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
11. .nano-staged.js:1
  • Draft comment:
    New nano-staged config file added. Confirm that exporting from '@1stg/nano-staged/tsc' meets your requirements.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is asking the PR author to confirm if the new nano-staged config file meets their requirements. This is asking for confirmation, which is against the rules. The comment does not provide a specific code suggestion or point out a potential issue that needs addressing.
12. package.json:57
  • Draft comment:
    Swapped 'lint-staged' for 'nano-staged' in devDependencies. Verify that this dependency change is intentional and compatible with your workflow.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is asking the PR author to verify the intention behind a dependency change, which violates the rule against asking for confirmation of intention. It also touches on dependency changes, which should not be commented on unless there's a specific suggestion or issue identified.
13. packages/browser/package.json:20
  • Draft comment:
    Removed the 'module-sync' field which was causing circular require issues (ERR_REQUIRE_CYCLE_MODULE) as noted in issue #391.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    This comment is purely informative, explaining why a field was removed. It doesn't provide a suggestion, ask for confirmation, or point out a potential issue with the code. According to the rules, purely informative comments should be removed.
14. packages/core/package.json:20
  • Draft comment:
    The 'module-sync' field has been removed here to prevent cyclic dependency errors. This aligns with the fix for issue #391.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    This comment is purely informative, explaining why a field was removed and referencing an issue number. It doesn't provide a suggestion or ask for confirmation about the change.
15. packages/es-modules/package.json:16
  • Draft comment:
    Module-sync export has been removed consistently. This should help mitigate circular dependency issues.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    This comment is purely informative, as it simply states that a module-sync export has been removed and speculates on the potential benefits. It does not provide a suggestion, ask for confirmation, or point out a potential issue.
16. packages/imagemin/package.json:22
  • Draft comment:
    Removed the 'module-sync' entry to avoid require cycle errors. Confirm that this removal does not affect any downstream tooling.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment asks the PR author to confirm that the removal does not affect downstream tooling, which violates the rule against asking for confirmation of intention or effects. It does not provide a specific code suggestion or ask for a specific test to be written.
17. packages/umd-globals/package.json:16
  • Draft comment:
    Eliminated the 'module-sync' field and updated the funding URL. This removal is in line with fixing the cyclic module issue.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    This comment is purely informative, explaining what was done in the code without providing any actionable feedback or suggestions. It does not align with the rules for useful comments, as it doesn't ask for confirmation, suggest improvements, or highlight potential issues.
18. packages/utils/package.json:19
  • Draft comment:
    Removed the 'module-sync' field from the utils package for consistency and to prevent require cycle errors.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    This comment is purely informative, explaining why a field was removed. It doesn't suggest any changes or ask for confirmation on the intention. It violates the rule against making purely informative comments.
19. README.md:17
  • Draft comment:
    Refactored the Sponsors and Backers sections for improved clarity. Double-check that all sponsor/backer links remain correct.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    This comment is asking the PR author to double-check something, which violates the rule against asking for confirmation or double-checking. It doesn't provide a specific code suggestion or point out a specific issue.
20. packages/es-modules/index.ts:21
  • Draft comment:
    Changed JSDoc comments to inline comments for the alias configuration. This is a stylistic change and does not affect functionality.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
21. packages/rollup/src/config.ts:422
  • Draft comment:
    Minor editorial change: capitalized 'ES5' in the comment. Ensure that this note remains accurate regarding ES5 support limitations.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
22. packages/utils/src/helpers.ts:60
  • Draft comment:
    Updated block comments to inline comments for the type guard and arrayify helpers. This improves readability without altering behavior.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
23. README.md:39
  • Draft comment:
    There appears to be a formatting/typographical inconsistency on line 39 in the license attribution: "[MIT][] © [JounQin][]@[1stG.me][]". Consider adding a space around the '@' (e.g., "[JounQin][] @ [1stG.me][]") to improve clarity.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
24. package.json:2
  • Draft comment:
    Typo alert: The package name is currently "@unts/pkgr" but the repository owner is "un-ts". Consider verifying if the intended scope should be "@un-ts/pkgr" to maintain consistency.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
25. packages/browser/package.json:5
  • Draft comment:
    In the description, consider rephrasing "or any package else" to "or any other package" for improved clarity.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
26. packages/core/package.json:5
  • Draft comment:
    Consider revising the description at line 5: "Shared core module for @pkgr packages or any package else". A clearer phrasing might be "Shared core module for @pkgr packages or any other package".
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
27. packages/es-modules/package.json:8
  • Draft comment:
    There seems to be an inconsistency in the author field. The author's name is written as 'JounQin' and the URL is 'https://www.1stG.me' (with an uppercase 'G') while the email domain is '1stg.me' (lowercase 'g'). Please verify if 'JounQin' and the URL casing are intentional. Correcting these would improve consistency.
  • Reason this comment was not posted:
    Comment was on unchanged code.
28. packages/rollup/package.json:18
  • Draft comment:
    Typo alert: In the "files" array, the entry "index.d.cts" may be a typo. Typically, TypeScript declaration files use the .d.ts extension. Please verify if this is intentional or if it should be corrected to "index.d.ts".
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
29. packages/rollup/src/config.ts:455
  • Draft comment:
    Typo detected: In the console.assert message at line 455, the phrase "mark sure you've setup correctly" should likely be corrected to "make sure you've set up correctly" for clarity.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
30. packages/utils/package.json:5
  • Draft comment:
    Typographical suggestion: In the description, consider rephrasing "Shared utils for @pkgr packages or any package else" to something clearer, such as "Shared utils for @pkgr packages and any other package". This makes the intent more understandable.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_6Essm4dB6IPhZwAj


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

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: 0

🧹 Nitpick comments (1)
packages/rollup/src/config.ts (1)

423-424: Improved Comment Capitalization.

The comment has been updated from "es5" to "ES5", which follows conventional terminology and improves clarity. The added blank line also aids readability.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 269f89d and fa58406.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (18)
  • .changeset/real-dots-obey.md (1 hunks)
  • .lintstagedrc.js (0 hunks)
  • .nano-staged.js (1 hunks)
  • README.md (1 hunks)
  • package.json (2 hunks)
  • packages/browser/index.ts (1 hunks)
  • packages/browser/package.json (1 hunks)
  • packages/core/package.json (1 hunks)
  • packages/es-modules/README.md (3 hunks)
  • packages/es-modules/index.ts (2 hunks)
  • packages/es-modules/package.json (1 hunks)
  • packages/imagemin/package.json (1 hunks)
  • packages/rollup/package.json (2 hunks)
  • packages/rollup/src/config.ts (1 hunks)
  • packages/umd-globals/README.md (1 hunks)
  • packages/umd-globals/package.json (1 hunks)
  • packages/utils/package.json (1 hunks)
  • packages/utils/src/helpers.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • .lintstagedrc.js
🔇 Additional comments (36)
.nano-staged.js (1)

1-1: Clear Export Statement.

This new file succinctly re-exports the default export from @1stg/nano-staged/tsc, aligning with the migration from lint-staged to nano-staged.

packages/utils/src/helpers.ts (2)

60-61: Refined Comment for identify.

The block comment has been replaced with a concise, single-line comment ("// Type guard for non-empty values"), which improves readability without affecting functionality.


68-69: Concise Comment for arrayify.

Changing the multi-line comment to a single-line comment now clearly documents that the function flattens arrays and removes nullish values, enhancing clarity.

package.json (7)

33-35: Updated Dependency Versions (Part 1).

The version updates for "@1stg/common-config": "^13.0.1" and "@changesets/cli": "^2.29.0" ensure that the project leverages the latest enhancements and bug fixes. Please verify that these versions work seamlessly with the rest of the codebase.


38-39: Updated Dependency Versions (Part 2).

Bumping "@shikijs/rehype": "^3.2.2" and "@swc/core": "^1.11.21" should bring in performance improvements and security patches. Ensure to run integration tests to catch any unforeseen issues.


46-47: Enhanced Type Definitions.

The updates for "@types/node": "^22.14.1" and "@types/react": "^19.1.1" improve type accuracy with the latest APIs. A quick verification for any breaking type changes is recommended.


49-50: Minor Update to Web Types.

The update to "@types/web": "^0.0.217" addresses potential discrepancies in web API definitions. This change looks good.


57-57: Switch to Nano-Staged.

Replacing lint-staged with nano-staged (version ^0.8.0) is in line with the new pre-commit strategy. Confirm that the new staging tool behaves as expected during commits.


70-70: Vite Version Update.

Upgrading "vite" to ^6.2.6 should benefit the build process. Ensure compatibility with related tooling and documentation builds.


1-100: Overall Package Manifest Update.

The comprehensive dependency version bumps and configuration changes align with the PR objectives—including the removal of outdated module-sync configurations (across packages) and the introduction of nano-staged. It’s advisable to run full integration tests.

.changeset/real-dots-obey.md (2)

1-9: New Changeset for Module-Sync Removal.

This changeset file outlines patch entries for multiple packages (@pkgr/browser, @pkgr/core, @pkgr/es-modules, @pkgr/imagemin, @pkgr/rollup, @pkgr/umd-globals, and @pkgr/utils) and clearly signals the removal of buggy module-sync entries. This coordinated update simplifies the export structures.


11-12: Clear Patch Note.

The fix note "remove buggy module-sync entries" succinctly conveys the corrective action corresponding to the PR objectives.

packages/core/package.json (2)

9-9: Funding URL Update Verification
The funding URL has been updated to "https://opencollective.com/pkgr" as intended by the PR objectives. This change ensures consistency with the new funding source.


17-27: Module-Sync Export Removal Confirmation
The exports object now only contains the "import" and "require" keys. The removal of the "module-sync" entry simplifies the module resolution and aligns with the PR objectives.

packages/browser/package.json (2)

9-9: Funding URL Update Verification
The funding URL change to "https://opencollective.com/pkgr" correctly reflects the project's updated funding source.


17-26: Module-Sync Export Removal Confirmation
The exports section now only includes the "import" and "require" fields, indicating that the buggy "module-sync" entry has been successfully removed. This simplification should help prevent potential module-sync issues.

packages/imagemin/package.json (2)

9-9: Funding URL Update Verification
The funding URL has been updated to "https://opencollective.com/pkgr", which standardizes the funding configuration across packages.


20-29: Module-Sync Export Removal Confirmation
The exports block now omits the "module-sync" entry, retaining only the essential "import" and "require" configurations. This change meets the PR’s objective by eliminating the problematic export and streamlining module resolution.

packages/browser/index.ts (1)

139-142: Improved Function Documentation
The updated documentation for the openBrowser function now clearly explains its behavior and return values. This enhanced comment improves readability without altering functionality.

packages/es-modules/package.json (2)

9-9: Funding URL Update Verification
The funding URL is correctly updated to "https://opencollective.com/pkgr", ensuring a unified funding source across the packages.


14-23: Module-Sync Export Removal Confirmation
The removal of the "module-sync" entry is verified by the exports section, which now only contains the "import" and "require" keys. This aligns with the objective to eliminate buggy module synchronization entries.

packages/utils/package.json (2)

9-9: Funding URL Updated.
The funding URL is now updated to "https://opencollective.com/pkgr", ensuring the project points to the current funding source.


17-26: Clean Exports Structure with module-sync Removal.
The removal of the buggy "module-sync" entry from the exports object simplifies the package’s module interface by retaining only the standard "import" and "require" configurations.

packages/umd-globals/package.json (2)

9-9: Funding URL Updated.
The funding URL now correctly points to "https://opencollective.com/pkgr", aligning with the updated sponsorship information.


14-23: Streamlined Exports Configuration.
The removal of the "module-sync" export entry results in a cleaner and more maintainable exports setup, leaving only the necessary "import" and "require" keys.

packages/es-modules/index.ts (2)

23-23: Improved Comment Clarity for Rollup Alias Entries.
The update to a single-line comment for the entries option of rollup-plugin-alias enhances readability without impacting functionality.


51-51: Enhanced Comment Formatting for Webpack Alias Configuration.
The transition to a concise single-line comment for the alias option clarifies the purpose of the configuration for webpack, making the documentation inline with code style improvements.

packages/rollup/package.json (2)

9-9: Funding URL Corrected.
The funding URL is updated to "https://opencollective.com/pkgr", which reflects the new, accurate funding information for the project.


46-48: Updated Dependency Versions.
The versions for "jsox" and "rollup" have been bumped to "^1.2.123" and "^4.40.0", respectively, ensuring the package benefits from the latest fixes and features.

packages/umd-globals/README.md (1)

42-57: Consolidated Sponsorship Section in Documentation.
The README now consolidates and renames the sponsorship-related sections to "Sponsors and Backers". This reorganization improves clarity and aligns the documentation with similar updates in other packages.

🧰 Tools
🪛 LanguageTool

[style] ~56-~56: Using many exclamation marks might seem excessive (in this case: 8 exclamation marks for a text that’s 2665 characters long)
Context: ...----------------------------------- | | 1stG Open Collective backers | RxTS Open Collective backers | [![UnTS Open Collective backers](https://o...

(EN_EXCESSIVE_EXCLAMATION)

README.md (2)

17-20: Consolidated Sponsors Header Enhancement

The new "## Sponsors and Backers" header clearly consolidates sponsorship information into a single, unified section. This improves overall documentation clarity and supports consistent updates across the repo.


21-27: Structured Subsections for Sponsors and Backers

The addition of "### Sponsors" and "### Backers" subsections organizes the content effectively. The tables under each subsection are well formatted and provide clear distinctions between the sponsors and backers.

packages/es-modules/README.md (4)

12-16: Updated TOC Reflecting New Sections

The Table of Contents now includes the "Sponsors and Backers" section along with its sub-items. This update enhances navigation, ensuring readers quickly access sponsorship information.


47-48: Clarified Build Tool Comment

The change from // webpack to // webpack/rspack accurately reflects the intended usage and makes it clear that the configuration supports both webpack and rspack.


57-60: Consistent Sponsorship Banner Inclusion

The addition of the consolidated "## Sponsors and Backers" section, along with the sponsor image link, is consistent with the root README changes and sets a clear visual entry point for sponsorship details.


61-71: Well-Formatted Sponsorship and Backers Tables

The subsections "### Sponsors" and "### Backers" include tables that display the relevant images and links clearly. The formatting is neat and aligns with the project’s documentation standards.

🧰 Tools
🪛 LanguageTool

[style] ~71-~71: Using many exclamation marks might seem excessive (in this case: 8 exclamation marks for a text that’s 2746 characters long)
Context: ...----------------------------------- | | 1stG Open Collective backers | RxTS Open Collective backers | [![UnTS Open Collective backers](https://o...

(EN_EXCESSIVE_EXCLAMATION)

@JounQin JounQin merged commit cc36a0b into master Apr 14, 2025
36 checks passed
@JounQin JounQin deleted the chore/bump branch April 14, 2025 14:20
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.

Upgrading @pkgr/core from 0.2.1 → 0.2.2 causes ERR_REQUIRE_CYCLE_MODULE error
1 participant