web icon indicating copy to clipboard operation
web copied to clipboard

chore: replace `@esm-bundle/chai` with regular `chai` package

Open jonkoops opened this issue 1 year ago • 4 comments

Closes #2633

jonkoops avatar Feb 03 '24 22:02 jonkoops

⚠️ No Changeset found

Latest commit: edd07e725d0fd094ea33d8e393b9966b7e14eabd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

changeset-bot[bot] avatar Feb 03 '24 22:02 changeset-bot[bot]

Looks good to me! I couldn't get this working without converting the package to ESM first so I'm surprised that this is working. If CI is green I'll merge it :)

koddsson avatar Feb 07 '24 10:02 koddsson

Looks good to me! I couldn't get this working without converting the package to ESM first so I'm surprised that this is working.

We're using the regular package in Leaflet, but we are using plain import maps rather than --node-resolve, not sure if that affects things.

jonkoops avatar Feb 07 '24 10:02 jonkoops

Tests are failing, looks like the path to chai is re-written to node_modules/chai/index.js, but this is not correct. The main entry of chai is supposed to resolve to node_modules/chai/chai.js. Looks like this might be a bug in the Node.js-style resolution?

Note that Node.js' resolution mechanism is documented extensively.

jonkoops avatar Feb 07 '24 11:02 jonkoops