middy icon indicating copy to clipboard operation
middy copied to clipboard

newly imported dependency @silverbucket/ajv-formats-draft2019 breaks projects mixed of CJS and ESM such as Jest

Open Ys-Zhou opened this issue 4 months ago • 3 comments

Describe the bug @silverbucket/ajv-formats-draft2019 is not well packaged It's an ESM project without "type": "module" in package.json which breaks projects mixed of CJS and ESM such as Jest

Ex. https://jestjs.io/docs/ecmascript-modules

  1. Beyond that, we attempt to follow node's logic for activating "ESM mode" (such as looking at type in package.json or .mjs files), see their docs for details.

I have reported. See: https://github.com/silverbucket/ajv-formats-draft2019/issues/8

To Reproduce Update from 6.4.1 to 6.4.3 then run jest.

Expected behaviour No bulider and jest error

Environment (please complete the following information):

  • Node.js: [e.g. 22]
  • Middy: [e.g. 6.4.3]
  • AWS SDK [e.g. 3.859.0]

Ys-Zhou avatar Aug 18 '25 01:08 Ys-Zhou

Thanks for reporting! We'll be sure to update once they publish a new version.

willfarrell avatar Aug 18 '25 11:08 willfarrell

Up!

keepitsimple avatar Aug 27 '25 16:08 keepitsimple

It seems that the project is abandoned, any alternative routes in mind?

mikaelsn avatar Oct 15 '25 06:10 mikaelsn