fastify/benchmarks

Chalk v5 requiers ESM

matijagaspar opened this issue · 0 comments

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the regression has not already been reported

Last working version

1.0

Stopped working in version

current master

Node.js version

16

Operating system

Windows

Operating system version (i.e. 20.04, 11.3, 10)

10

💥 Regression Report

Version of chalk was bumped to 5, but chalk 5 requiers use of ESM. So benchmark-compare.js throws an error:

Error [ERR_REQUIRE_ESM]: require() of ES Module benchmarks\node_modules\chalk\source\index.js from benchmarks\benchmark-compare.js not supported.
Instead change the require of index.js in benchmarks\benchmark-compare.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (benchmarks\benchmark-compare.js:8:15) {
  code: 'ERR_REQUIRE_ESM'
}

Steps to Reproduce

npm run compare

Expected Behavior

To not throw an error