Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jan 3, 2026

This PR contains the following updates:

Package Change Age Confidence
chokidar ^4.0.1^5.0.0 age confidence

Release Notes

paulmillr/chokidar (chokidar)

v5.0.0

Compare Source

  • Make the package ESM-only. Reduces on-disk package size from ~150kb to ~80kb
  • Increase minimum node.js version to v20.19. The versions starting from it support loading esm files from cjs
  • fix: Make types more precise #​1424
  • perf: re-use double slash regex #​1435
  • Update readdirp to ESM-only v5
  • Lots of minor improvements in tests
  • Increase security of NPM releases. Switch to token-less Trusted Publishing, with help of jsbt
  • Switch compilation mode to isolatedDeclaration-based typescript for simplified auto-generated docs

New Contributors

Full Changelog: paulmillr/chokidar@4.0.3...5.0.0


Configuration

📅 Schedule: Branch creation - "every weekday after 2:00 am before 6:00 am,every weekend" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot assigned hdiniz Jan 3, 2026
@@ -163,7 +163,7 @@
"chai-sorted": "^0.2.0",
"chai-subset": "^1.6.0",
"cheerio": "^1.1.2",
Copy link

Choose a reason for hiding this comment

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

Bug: The upgrade to chokidar v5, an ESM-only package, will cause the mail:preview script to crash because the project uses CommonJS require() after transpilation.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The project is configured as CommonJS ("type": "commonjs"), but the chokidar dependency has been upgraded to v5, which is an ESM-only package. A development script, scripts/dev/dev-email-preview.ts, uses a static import chokidar from 'chokidar'. When this script is run via npm run mail:preview, Babel transpiles the import into a CommonJS require('chokidar') call. At runtime, Node.js will throw an ERR_REQUIRE_ESM error when it attempts to load the ESM-only chokidar module using require(). This will cause the email preview development script to crash immediately upon startup.

💡 Suggested Fix

Revert chokidar to a CommonJS-compatible version (e.g., v4). Alternatively, update the dev-email-preview.ts script to use a dynamic import() expression, which can correctly load ESM modules within a CommonJS environment.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L165

Potential issue: The project is configured as CommonJS (`"type": "commonjs"`), but the
`chokidar` dependency has been upgraded to v5, which is an ESM-only package. A
development script, `scripts/dev/dev-email-preview.ts`, uses a static `import chokidar
from 'chokidar'`. When this script is run via `npm run mail:preview`, Babel transpiles
the import into a CommonJS `require('chokidar')` call. At runtime, Node.js will throw an
`ERR_REQUIRE_ESM` error when it attempts to load the ESM-only `chokidar` module using
`require()`. This will cause the email preview development script to crash immediately
upon startup.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8120984

@znarf
Copy link
Member

znarf commented Jan 5, 2026

esm only

@znarf znarf closed this Jan 5, 2026
@renovate
Copy link
Contributor Author

renovate bot commented Jan 5, 2026

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 5.x releases. But if you manually upgrade to 5.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/chokidar-5.x branch January 5, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants