Skip to content

Conversation

JounQin
Copy link
Member

@JounQin JounQin commented May 20, 2025

Also removed buggy module-sync: nodejs/node#57869


Important

Migrated from @pkgr/rollup to tsdown, removed module-sync export, updated dependencies, and modified build scripts.

  • Migration:
    • Migrated from @pkgr/rollup to tsdown.
    • Added build:tsdown script in package.json for generating CommonJS type declarations.
  • Bug Fix:
    • Removed module-sync export from package.json due to a bug.
  • Dependency Management:
    • Updated devDependencies in package.json, including @1stg/common-config, @changesets/cli, and others.
    • Updated .renovaterc to ignore mvdan-sh.
  • Code Changes:
    • Updated _dirname initialization in src/index.ts for clarity.
    • Removed index.d.cts file and its references in package.json.

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


Summary by CodeRabbit

  • Chores
    • Updated configuration files for dependency management and streamlined type declaration paths.
    • Removed redundant type declaration files and exports.
    • Added a new build script for generating CommonJS type declarations.
    • Upgraded several development dependencies.
    • Improved internal code clarity without affecting user-facing functionality.

@JounQin JounQin requested a review from Copilot May 20, 2025 07:53
@JounQin JounQin self-assigned this May 20, 2025
@JounQin JounQin added internal Hidden internal changes dependencies labels May 20, 2025
Copy link
Contributor

coderabbitai bot commented May 20, 2025

Walkthrough

The changes update the Renovate configuration to reference a schema and ignore a specific dependency, remove a TypeScript declaration file, adjust type declaration paths and scripts in the package configuration, and refactor a variable assignment in the source code for clarity. Several development dependencies are also upgraded.

Changes

File(s) Change Summary
.renovaterc Added $schema property, properly closed extends array, and introduced ignoreDeps to exclude "mvdan-sh" from updates.
index.d.cts Deleted. Previously re-exported all exports from ./lib/index.js under the namespace shSyntax.
package.json Updated type declaration paths, removed redundant exports, added new build script, removed/added dependencies, upgraded devDeps.
src/index.ts Introduced importMetaUrl constant and updated _dirname assignment to use it for clarity.
.changeset/ninety-lizards-cross.md Added patch changeset removing problematic exports field from module-sync configuration.

Poem

In the warren of code, a change hops through,
Configs are tidied, dependencies few.
Types find new homes, scripts learn new tricks,
With carrots for bugs and clever refix.
A bunny applauds with a soft little cheer,
For clean, nimble code, and a hoppier year! 🥕

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.

src/index.ts

Oops! Something went wrong! :(

ESLint: 9.27.0

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@1stg/eslint-config' imported from /eslint.config.js
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:799:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:723:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:706:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:307:38)
at #link (node:internal/modules/esm/module_job:163:49)


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 2d0ac3f and 211a416.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (5)
  • .changeset/ninety-lizards-cross.md (1 hunks)
  • .renovaterc (1 hunks)
  • index.d.cts (0 hunks)
  • package.json (4 hunks)
  • src/index.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • index.d.cts
✅ Files skipped from review due to trivial changes (1)
  • .changeset/ninety-lizards-cross.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • .renovaterc
  • src/index.ts
  • package.json
⏰ Context from checks skipped due to timeout of 90000ms (11)
  • GitHub Check: Lint and Test with Node.js 18 on macos-latest
  • GitHub Check: Lint and Test with Node.js 22 on macos-latest
  • GitHub Check: Lint and Test with Node.js 18 on windows-latest
  • GitHub Check: Lint and Test with Node.js 22 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 on windows-latest
  • GitHub Check: Lint and Test with Node.js 20 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 on macos-latest
  • GitHub Check: Lint and Test with Node.js 22 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 on windows-latest
  • GitHub Check: Lint and Test with Node.js 20 on windows-latest
✨ 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.
    • 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
Contributor

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

Pull Request Overview

This PR migrates the build system from using @pkgr/rollup to tsdown and removes the buggy module-sync export while updating related configuration and dependency versions.

  • Replaces inline use of import.meta.url with a dedicated constant for clarity in src/index.ts
  • Updates package.json to change module/type paths, remove module-sync exports, and update dependencies
  • Removes the index.d.cts file and revises .renovaterc configuration

Reviewed Changes

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

File Description
src/index.ts Uses a constant for import.meta.url for clarity
package.json Adjusts paths, removes module-sync, updates deps
index.d.cts Removed as part of the migration
.renovaterc Updated configuration with schema and ignores

Copy link

codesandbox-ci bot commented May 20, 2025

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

codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (2916ad8) to head (211a416).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #124   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines           76        77    +1     
  Branches        29        29           
=========================================
+ Hits            76        77    +1     

☔ 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

socket-security bot commented May 20, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​unrs/​resolver-binding-linux-riscv64-musl@​1.7.21001003788100
Updatednpm/​@​unrs/​resolver-binding-darwin-arm64@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​unrs/​resolver-binding-darwin-x64@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​unrs/​resolver-binding-freebsd-x64@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​unrs/​resolver-binding-linux-arm-gnueabihf@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​unrs/​resolver-binding-linux-arm-musleabihf@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​unrs/​resolver-binding-linux-arm64-gnu@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​unrs/​resolver-binding-linux-arm64-musl@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​unrs/​resolver-binding-linux-ppc64-gnu@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​unrs/​resolver-binding-linux-riscv64-gnu@​1.6.1 ⏵ 1.7.21001003791 +1100
Updatednpm/​@​unrs/​resolver-binding-linux-s390x-gnu@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​unrs/​resolver-binding-linux-x64-gnu@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​unrs/​resolver-binding-linux-x64-musl@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​unrs/​resolver-binding-win32-arm64-msvc@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​unrs/​resolver-binding-win32-ia32-msvc@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​unrs/​resolver-binding-win32-x64-msvc@​1.6.1 ⏵ 1.7.21001003792 +1100
Updatednpm/​@​1stg/​common-config@​13.0.1 ⏵ 14.0.050 -410050 -195 +2100
Updatednpm/​@​babel/​plugin-transform-react-jsx-development@​7.25.9 ⏵ 7.27.11001005792100
Addednpm/​@​changesets/​should-skip-package@​0.1.21001005988100
Addednpm/​@​changesets/​changelog-git@​0.2.11001006087100
Updatednpm/​@​babel/​plugin-transform-dotall-regex@​7.25.9 ⏵ 7.27.11001006192100
Updatednpm/​@​babel/​plugin-transform-regexp-modifiers@​7.26.0 ⏵ 7.27.11001006189100
Updatednpm/​@​babel/​plugin-transform-unicode-regex@​7.25.9 ⏵ 7.27.11001006192100
Updatednpm/​@​babel/​plugin-syntax-import-source@​7.25.9 ⏵ 7.27.171 +41006293 +2100
Addednpm/​@​changesets/​get-version-range-type@​0.4.01001006286100
Updatednpm/​@​babel/​plugin-syntax-record-and-tuple@​7.25.9 ⏵ 7.27.178 -31006292 -2100
See 165 more rows in the dashboard

View full report

Copy link
Contributor

github-actions bot commented May 20, 2025

size-limit report 📦

Path Size
lib/browser.js 121 B (0%)
lib/index.js 369 B (0%)

Copy link

pkg-pr-new bot commented May 20, 2025

Open in StackBlitz

npm i https://pkg.pr.new/sh-syntax@124

commit: 211a416

Copy link
Contributor

github-actions bot commented May 20, 2025

📊 Package size report   0.3%↑

File Before After
index.d.cts 62 B
lib/index.cjs 8.7 kB -10.7%↓7.8 kB
lib/index.d.cts 3.4 kB
lib/index.js 801 B 4%↑836 B
lib/index.js.map 955 B 1%↑966 B
package.json 3.6 kB -1.79%↓3.6 kB
Total (Includes all files) 842.1 kB 0.3%↑844.5 kB
Tarball size 306.8 kB 0.3%↑307.6 kB
Unchanged files
File Size
lib/browser.d.ts 95 B
lib/browser.js 130 B
lib/browser.js.map 171 B
lib/index.d.ts 709 B
lib/processor.d.ts 950 B
lib/processor.js 3.6 kB
lib/processor.js.map 3.8 kB
lib/shim.d.ts 11 B
lib/shim.js 279 B
lib/shim.js.map 342 B
lib/types.d.ts 7.0 kB
lib/types.js 157 B
lib/types.js.map 243 B
LICENSE 1.1 kB
main.wasm 785.7 kB
README.md 7.5 kB
vendors/wasm_exec.cjs 16.0 kB
vendors/wasm_exec.d.cts 98 B

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

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 2d0ac3f in 1 minute and 4 seconds. Click for details.
  • Reviewed 136 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 6 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. .renovaterc:2
  • Draft comment:
    Added $schema for Renovate config validation.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. package.json:15
  • Draft comment:
    Updated 'types' path to './lib/index.d.cts'; ensure consumers adjust if needed.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. package.json:24
  • Draft comment:
    Removed 'module-sync' export block; confirm its removal is intended.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. package.json:47
  • Draft comment:
    Replaced the 'build:r' script with 'build:tsdown'; verify build output remains as expected.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
5. package.json:87
  • Draft comment:
    Migrated from @pkgr/rollup to tsdown in devDependencies; ensure behavior aligns with expectations.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
6. src/index.ts:11
  • Draft comment:
    Refactored _dirname calculation using the importMetaUrl variable for clarity.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_qqBkEp7yu3pTyU3x

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

Copy link

changeset-bot bot commented May 20, 2025

🦋 Changeset detected

Latest commit: 211a416

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

This PR includes changesets to release 1 package
Name Type
sh-syntax 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

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 211a416 in 1 minute and 40 seconds. Click for details.
  • Reviewed 145 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 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. .changeset/ninety-lizards-cross.md:5
  • Draft comment:
    Changelog entry is clear and documents the removal of the buggy 'module-sync' export.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. .renovaterc:2
  • Draft comment:
    Including the $schema key improves configuration validation for Renovate.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. package.json:15
  • Draft comment:
    Updated the 'types' path to './lib/index.d.cts'. Please verify that the generated declaration files are indeed output to the lib directory.
  • 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 output path of generated declaration files, which falls under asking the author to double-check or ensure something. This violates the rule against asking the PR author to confirm or ensure behavior.
4. package.json:27
  • Draft comment:
    The removal of the 'module-sync' export block is noted. Ensure that no external consumers depend on 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 ensure that no external consumers depend on the removed export. This falls under asking the author to double-check things, which is against the rules.
5. package.json:47
  • Draft comment:
    New 'build:tsdown' script added. Confirm that the external path '../vendors/wasm_exec.cjs' is correctly resolved relative to the output directory.
  • 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 the resolution of an external path, which is not allowed according to the rules. It doesn't provide a specific suggestion or point out a clear issue with the code.
6. src/index.ts:11
  • Draft comment:
    Refactored _dirname assignment by storing import.meta.url in a variable. This improves clarity—consider if the __dirname fallback is necessary in a pure ESM context.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_0XZa1I0gfbRmorRl

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

@JounQin JounQin merged commit a000d0a into main May 20, 2025
37 checks passed
@JounQin JounQin deleted the chore/tsdown branch May 20, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies internal Hidden internal changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant