Skip to content

fix: cleanup constants#423

Merged
JounQin merged 1 commit intomasterfrom
fix/cleanup
Jul 19, 2025
Merged

fix: cleanup constants#423
JounQin merged 1 commit intomasterfrom
fix/cleanup

Conversation

@JounQin
Copy link
Member

@JounQin JounQin commented Jul 19, 2025

close #420
close #421

related rollup/rollup#6021 and un-ts/synckit#252

Summary by CodeRabbit

  • Chores
    • Upgraded multiple development and runtime dependencies to newer versions for improved stability and compatibility.
    • Updated GitHub Actions workflow to use a newer version of the autofix action.
  • Refactor
    • Replaced usage of a removed constant with direct calls to process.cwd() across various modules for determining the current working directory.
  • New Features
    • None.
  • Bug Fixes
    • None.

Important

Refactor to replace CWD constant with process.cwd() and update dependencies and GitHub Actions workflow.

  • Refactor:
    • Remove CWD constant from constants.ts and replace with process.cwd() in helpers.ts, config.ts, and helpers.ts in utils.
  • Chores:
    • Update autofix.yml to use autofix-ci/action@v1.3.2.
    • Upgrade various dependencies in package.json, browser/package.json, and rollup/package.json.

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

@JounQin JounQin requested a review from Copilot July 19, 2025 07:01
@JounQin JounQin self-assigned this Jul 19, 2025
@JounQin JounQin added the bug Something isn't working label Jul 19, 2025
@changeset-bot
Copy link

changeset-bot bot commented Jul 19, 2025

🦋 Changeset detected

Latest commit: eb630d5

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

This PR includes changesets to release 2 packages
Name Type
@pkgr/core Patch
@pkgr/rollup 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

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 removes the CWD constant and other unused imports from the codebase, replacing them with direct process.cwd() calls, and updates various dependency versions.

  • Removes the CWD constant from @pkgr/core and replaces its usage with process.cwd() throughout the codebase
  • Simplifies the cjsRequire implementation and removes unused EVAL_FILENAMES constant
  • Updates multiple dependencies to their latest versions across package.json files

Reviewed Changes

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

Show a summary per file
File Description
packages/utils/src/helpers.ts Removes CWD import and uses process.cwd() directly in tryGlob function
packages/rollup/src/config.ts Removes CWD import and replaces usage with process.cwd() calls
packages/rollup/package.json Updates rollup dependencies to newer versions
packages/core/src/helpers.ts Removes CWD import and uses process.cwd() in function defaults
packages/core/src/constants.ts Removes CWD constant definition and simplifies cjsRequire implementation
packages/browser/package.json Updates open dependency version
package.json Updates multiple dev dependencies to latest versions
.github/workflows/autofix.yml Updates autofix-ci action to a newer version with specific commit hash

@coderabbitai
Copy link

coderabbitai bot commented Jul 19, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update removes the CWD constant from the codebase, replacing its usage with direct calls to process.cwd(). It also eliminates the EVAL_FILENAMES constant and refines the cjsRequire export logic. Several package dependencies are updated, and the autofix GitHub Action is bumped to a newer version.

Changes

File(s) Change Summary
.github/workflows/autofix.yml Updated autofix-ci/action to a newer commit/version.
package.json, packages/rollup/package.json, packages/browser/package.json Bumped various dependencies and devDependencies to newer versions.
packages/core/src/constants.ts Removed CWD and EVAL_FILENAMES; refactored cjsRequire export logic.
packages/core/src/helpers.ts, packages/rollup/src/config.ts, packages/utils/src/helpers.ts Replaced CWD usage with process.cwd(); removed related imports.

Sequence Diagram(s)

sequenceDiagram
    participant Module
    participant NodeProcess

    Module->>NodeProcess: Call process.cwd()
    NodeProcess-->>Module: Return current working directory
    Note right of Module: Uses process.cwd() instead of CWD constant
Loading

Possibly related PRs

Poem

A hop and a skip, the CWD is gone,
Now process.cwd() leads us on!
EVAL_FILENAMES, you’re history too,
With cleaner code, there’s less to rue.
Dependencies fresh, the future is bright—
This bunny’s code is feeling light! 🐇✨

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/core/src/constants.ts

Oops! Something went wrong! :(

ESLint: 9.31.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:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)

packages/core/src/helpers.ts

Oops! Something went wrong! :(

ESLint: 9.31.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:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)

packages/rollup/src/config.ts

Oops! Something went wrong! :(

ESLint: 9.31.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:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:202:49)

  • 1 others

📜 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 12109ab and eb630d5.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (9)
  • .changeset/deep-candles-start.md (1 hunks)
  • .github/workflows/autofix.yml (1 hunks)
  • package.json (1 hunks)
  • packages/browser/package.json (1 hunks)
  • packages/core/src/constants.ts (1 hunks)
  • packages/core/src/helpers.ts (3 hunks)
  • packages/rollup/package.json (1 hunks)
  • packages/rollup/src/config.ts (2 hunks)
  • packages/utils/src/helpers.ts (2 hunks)
✨ 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.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 19, 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.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 19, 2025

📊 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 921 B
.github/workflows/ci.yml 1.7 kB
.github/workflows/pkg-pr-new.yml 645 B
.github/workflows/pkg-size.yml 727 B
.github/workflows/release.yml 1.5 kB
.github/workflows/vercel.yml 1.0 kB
.markuplintrc 43 B
.nano-staged.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.1.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 302 B
index.html 402 B
LICENSE 1.1 kB
package.json 3.0 kB
packages/browser/CHANGELOG.md 1.7 kB
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 998 B
packages/browser/tsconfig.json 139 B
packages/core/CHANGELOG.md 3.5 kB
packages/core/index.d.cts 54 B
packages/core/package.json 945 B
packages/core/src/constants.ts 538 B
packages/core/src/helpers.ts 2.8 kB
packages/core/src/index.ts 60 B
packages/core/tsconfig.json 154 B
packages/es-modules/CHANGELOG.md 5.2 kB
packages/es-modules/index.d.cts 64 B
packages/es-modules/index.ts 1.4 kB
packages/es-modules/package.json 1.0 kB
packages/es-modules/README.md 3.7 kB
packages/es-modules/test/test.spec.ts 936 B
packages/es-modules/tsconfig.json 139 B
packages/imagemin/CHANGELOG.md 9.2 kB
packages/imagemin/index.d.cts 57 B
packages/imagemin/package.json 1.3 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 22.4 kB
packages/rollup/package.json 1.5 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 6.2 kB
packages/umd-globals/index.d.cts 66 B
packages/umd-globals/index.ts 1.8 kB
packages/umd-globals/package.json 919 B
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 12.7 kB
packages/utils/index.d.cts 51 B
packages/utils/package.json 961 B
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 172 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

@codecov
Copy link

codecov bot commented Jul 19, 2025

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 9.74%. Comparing base (9f17804) to head (eb630d5).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
packages/core/src/helpers.ts 0.00% 4 Missing ⚠️
packages/rollup/src/config.ts 0.00% 2 Missing ⚠️
packages/core/src/constants.ts 0.00% 1 Missing ⚠️
packages/utils/src/helpers.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           master    #423      +/-   ##
=========================================
+ Coverage    9.67%   9.74%   +0.06%     
=========================================
  Files          12      12              
  Lines         434     431       -3     
  Branches      191     187       -4     
=========================================
  Hits           42      42              
+ Misses        392     389       -3     

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

@socket-security
Copy link

socket-security bot commented Jul 19, 2025

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​unrs/​resolver-binding-android-arm-eabi@​1.11.11001003790100
Added@​unrs/​resolver-binding-android-arm64@​1.11.11001003790100
Updated@​unrs/​resolver-binding-darwin-arm64@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-darwin-x64@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-freebsd-x64@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-linux-arm-gnueabihf@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-linux-arm-musleabihf@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-linux-arm64-gnu@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-linux-arm64-musl@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-linux-ppc64-gnu@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-linux-riscv64-gnu@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-linux-riscv64-musl@​1.7.8 ⏵ 1.11.11001003793 +1100
Updated@​unrs/​resolver-binding-linux-s390x-gnu@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-linux-x64-gnu@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-linux-x64-musl@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-win32-arm64-msvc@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-win32-ia32-msvc@​1.7.8 ⏵ 1.11.11001003794 +1100
Updated@​unrs/​resolver-binding-win32-x64-msvc@​1.7.8 ⏵ 1.11.11001003794 +1100
Addednode-releases@​2.0.191001004178100
Updated@​1stg/​common-config@​14.0.0 ⏵ 14.3.052 +11005194 +2100
Updated@​1stg/​simple-git-hooks@​2.0.1 ⏵ 2.1.0731006283100
Addednpm-normalize-package-bin@​3.0.11001006583100
Updated@​1stg/​commitlint-config@​5.0.6 ⏵ 5.1.076 -111006684100
Updated@​unrs/​resolver-binding-wasm32-wasi@​1.7.8 ⏵ 1.11.1100 +110066 +194 +1100
Addedremark-cjk-friendly-gfm-strikethrough@​1.2.0671009682100
Addedshebang-regex@​3.0.01001006776100
Updated@​typescript-eslint/​visitor-keys@​8.33.0 ⏵ 8.37.01001006897100
Updated@​1stg/​remark-preset@​3.1.1 ⏵ 3.1.2691007184100
Updated@​1stg/​nano-staged@​0.1.2 ⏵ 0.3.069 -11007390 +2100
Updated@​typescript-eslint/​parser@​8.33.0 ⏵ 8.37.01001006997100
Addednodent-transform@​3.2.9981006976100
Updated@​1stg/​markuplint-config@​4.0.6 ⏵ 4.0.769 -31007184 -4100
Updated@​typescript-eslint/​project-service@​8.33.0 ⏵ 8.37.01001006997 +1100
See 363 more rows in the dashboard

View full report

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jul 19, 2025

Open in StackBlitz

@pkgr/browser

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

@pkgr/core

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

@pkgr/es-modules

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

@pkgr/imagemin

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

@pkgr/rollup

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

@pkgr/umd-globals

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

@pkgr/utils

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

commit: eb630d5

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.

Important

Looks good to me! 👍

Reviewed everything up to 12109ab in 46 seconds. Click for details.
  • Reviewed 235 lines of code in 8 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. .github/workflows/autofix.yml:34
  • Draft comment:
    Updated autofix-ci/action commit to v1.3.2 looks correct.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. package.json:78
  • Draft comment:
    The 'resolutions' field for prettier is still set to '^3.5.3' while devDependencies uses '^3.6.2'. Consider updating for consistency.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. packages/core/src/constants.ts:9
  • Draft comment:
    Removal of the CWD constant is correctly done. Dynamic calls to process.cwd() should now reflect any directory changes.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. packages/core/src/helpers.ts:35
  • Draft comment:
    Default parameter updated to process.cwd() ensures dynamic resolution instead of using a stale CWD constant.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
5. packages/rollup/src/config.ts:223
  • Draft comment:
    Replaced use of CWD with process.cwd() in the monorepo resolution; this change is consistent with the removal of CWD.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
6. packages/utils/src/helpers.ts:39
  • Draft comment:
    Default 'baseDir' is now set to process.cwd() instead of the removed CWD constant, ensuring it reflects any change in working directory.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_Ky30wD5ywnaHz0v5

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 19, 2025

Deploy preview for pkgr ready!

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

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

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

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9f17804 and 12109ab.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (8)
  • .github/workflows/autofix.yml (1 hunks)
  • package.json (1 hunks)
  • packages/browser/package.json (1 hunks)
  • packages/core/src/constants.ts (1 hunks)
  • packages/core/src/helpers.ts (3 hunks)
  • packages/rollup/package.json (1 hunks)
  • packages/rollup/src/config.ts (2 hunks)
  • packages/utils/src/helpers.ts (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
packages/rollup/package.json (1)
Learnt from: JounQin
PR: un-ts/pkgr#408
File: .changeset/poor-walls-arrive.md:2-3
Timestamp: 2025-06-01T05:58:16.903Z
Learning: The @pkgr/core package is still in 0.x versions (pre-1.0). For 0.x versions, breaking changes should use minor version bumps, not major ones, following semantic versioning rules for pre-release versions.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 22 on windows-latest
  • GitHub Check: Lint and Test with Node.js 20 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 on windows-latest
🔇 Additional comments (11)
packages/browser/package.json (1)

34-34: LGTM! Standard dependency update.

The minor version bump for the "open" package follows semantic versioning and should be backward compatible.

packages/rollup/package.json (1)

38-38: LGTM! Standard dependency updates.

These minor and patch version bumps follow semantic versioning and should maintain backward compatibility.

Also applies to: 43-43, 45-45, 48-48

package.json (1)

34-75: LGTM! Comprehensive devDependency updates.

These development dependency updates follow semantic versioning and are part of regular maintenance. Since they're devDependencies, they don't impact production runtime.

packages/rollup/src/config.ts (2)

224-224: LGTM! Good refactoring to use direct Node.js API.

Replacing the CWD constant with process.cwd() makes the code more direct and reduces import dependencies while maintaining the same functionality.


236-236: LGTM! Consistent with the CWD constant cleanup.

This change aligns with the PR objective to remove the CWD constant and use the native Node.js API directly.

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

3-3: LGTM! CWD import removal aligns with cleanup objective.

Removing the CWD import is consistent with the PR's goal to eliminate the CWD constant across the codebase.


39-39: LGTM! Clean replacement of CWD constant.

Using process.cwd() directly as the default value maintains the same functionality while eliminating the need for the imported CWD constant.

packages/core/src/helpers.ts (3)

4-4: LGTM: Clean removal of CWD import.

The import statement correctly removes the CWD constant reference, aligning with the constants cleanup objective.


35-35: LGTM: Correct replacement of CWD with process.cwd().

The default parameter change maintains the same functionality while removing dependency on the CWD constant.


97-102: LGTM: Improved destructuring with correct CWD replacement.

The destructuring format is cleaner and more readable, while correctly replacing CWD with process.cwd() to maintain the same default behavior.

packages/core/src/constants.ts (1)

9-10: LGTM: Improved cjsRequire logic with clearer environment detection.

The refactored logic is more explicit and direct - checking for the existence of require as a function is clearer than the previous import.meta.url truthiness check. This maintains the same functionality while being more readable.

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.

Important

Looks good to me! 👍

Reviewed eb630d5 in 1 minute and 26 seconds. Click for details.
  • Reviewed 247 lines of code in 9 files
  • Skipped 0 files when reviewing.
  • Skipped posting 8 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/deep-candles-start.md:1
  • Draft comment:
    Changeset entry correctly documents patch releases for @pkgr/core and @pkgr/rollup.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. .github/workflows/autofix.yml:33
  • Draft comment:
    Updated autofix.ci action to a specific commit (v1.3.2); change appears correct.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. package.json:77
  • Draft comment:
    The 'prettier' devDependency is updated to '^3.6.2' while resolutions still pin it to '^3.5.3'; verify if this mismatch is intentional.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% Version mismatches in package.json can cause issues, but this is a dependency-related comment. The rules explicitly state not to comment on dependency changes or versions. Even though there is a real discrepancy, we should trust that the author knows what they're doing with dependency management. The version mismatch could potentially cause build or dependency resolution issues. The resolutions field exists for a reason and this might be unintentional. While true, the rules are very clear about not commenting on dependency versions or dependency-related issues. We must assume the author has a reason for this configuration. Delete the comment as it violates the rule about not commenting on dependency changes or version-related issues.
4. packages/browser/package.json:33
  • Draft comment:
    Dependency 'open' was updated to '^10.2.0'; the change is appropriate.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
5. packages/core/src/constants.ts:8
  • Draft comment:
    Removed the 'CWD' and 'EVAL_FILENAMES' constants in favor of dynamic process.cwd() usage; this cleanup avoids stale working directory issues.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
6. packages/core/src/helpers.ts:35
  • Draft comment:
    Replaced the default 'base' parameter from using CWD to process.cwd(), ensuring dynamic resolution of the current working directory.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
7. packages/rollup/src/config.ts:221
  • Draft comment:
    Replaced usage of the CWD constant with process.cwd() for monorepo resolution; change is consistent with other modules.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
8. packages/utils/src/helpers.ts:38
  • Draft comment:
    Updated the default 'baseDir' in tryGlob to use process.cwd(), ensuring consistency in dynamic working directory resolution.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_RqDmEHAWdgAxkRl1

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

@JounQin JounQin merged commit 539c650 into master Jul 19, 2025
34 of 36 checks passed
@JounQin JounQin deleted the fix/cleanup branch July 19, 2025 07:10
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

2 participants