Skip to content

Fix chokidar v5 ESM-only compatibility issues - #5735

Merged
mark-wiemer merged 5 commits into
renovate/chokidar-5.xfrom
copilot/sub-pr-5734
Feb 20, 2026
Merged

mark-wiemer merged 5 commits into
renovate/chokidar-5.xfrom
copilot/sub-pr-5734

Conversation

Copilot AI commented Feb 17, 2026 •

Copy link
Copy Markdown
Contributor

Chokidar v5 transitioned to ESM-only, breaking TypeScript compilation and an integration test that uses an ESM loader.

Changes

  • TypeScript import fix: Added with { "resolution-mode": "import" } attribute to chokidar import in lib/types.d.ts. Required for Node16 module resolution when importing ESM from CommonJS context.

  • ESM loader test fix: Simplified loader-that-recognizes-ts.mjs by removing unused fileURLToPath() call that was throwing ERR_INVALID_URL_SCHEME for bare module specifiers before the expected ERR_MODULE_NOT_FOUND could occur.

  • Lint cleanup: Removed obsolete eslint-disable directive in mocha.mjs that became unnecessary with the chokidar update.

// Before
import type { FSWatcher, MatchFunction } from "chokidar";

// After
import type { FSWatcher, MatchFunction } from "chokidar" with {
  "resolution-mode": "import",
};

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Feb 17, 2026 •

Copy link
Copy Markdown

CLA Not Signed

Copilot AI and others added 3 commits February 17, 2026 00:08
Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>
Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>
Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix update dependency chokidar to v5 Fix chokidar v5 ESM-only compatibility issues Feb 17, 2026
Copilot AI requested a review from mark-wiemer February 17, 2026 00:13
@mark-wiemer

Copy link
Copy Markdown
Member

@mark-wiemer

Copy link
Copy Markdown
Member

Tests pass except for lint lol, silly bot keeps removing an ESLint directive.

Comment thread mocha.mjs Resolved
@mark-wiemer
mark-wiemer marked this pull request as ready for review February 20, 2026 01:46
@mark-wiemer
mark-wiemer merged commit 36a5be0 into renovate/chokidar-5.x Feb 20, 2026
0 of 2 checks passed
@mark-wiemer
mark-wiemer deleted the copilot/sub-pr-5734 branch February 20, 2026 01:47
mark-wiemer added a commit that referenced this pull request Feb 21, 2026
* fix(deps): update dependency chokidar to v5

* Fix chokidar v5 ESM-only compatibility issues (#5735)

* Initial plan

* Fix chokidar v5 upgrade issues: TypeScript and ESM loader

Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>

* Fix linting and formatting issues

Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>

* Simplify ESM loader by removing unused code

Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>

* Restore necessary directive

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>
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