* Return `.default` when Node.js 23 module feature is enabled * Add changelog * Add `ERR_REQUIRE_ASYNC_MODULE` to ignored error code
787 B
787 B
Fix loading ESM-style shared config file in Node.js 23 (#16857 by @sosukesuzuki)
In Prettier 3.3, attempting to load an ESM-style shared config file in Node.js 23 resulted in the following warnings, preventing the options from being loaded:
[warn] Ignored unknown option { __esModule: true }.
[warn] Ignored unknown option { default: { trailingComma: "es5", tabWidth: 4, singleQuote: true } }.
This issue was caused by a new module feature in Node.js 23, known as require(ESM). Prettier 3.4 resolves this problem, allowing the options to load correctly.
For more details, please see https://github.com/prettier/prettier/issues/16812.