Skip to content

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

@Ys-Zhou

Description

@Ys-Zhou

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: silverbucket/ajv-formats-draft2019#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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions