Update CHANGELOG.md for breaking changes, remove outdated comments from test file.

This commit is contained in:
David Anson 2024-12-05 23:00:55 -08:00
parent 2449163ffb
commit 6e52643f8c
2 changed files with 2 additions and 3 deletions

View file

@ -2,9 +2,10 @@
## 0.37.0 ## 0.37.0
- Convert to ECMAScript module, for guidance see: - Convert module to ECMAScript (breaking change)
- <https://nodejs.org/docs/latest/api/esm.html> - <https://nodejs.org/docs/latest/api/esm.html>
- <https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c> - <https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c>
- Convert module to named exports (breaking change)
## 0.36.1 ## 0.36.1

View file

@ -1386,13 +1386,11 @@ test("exportMappings", (t) => {
); );
}); });
// const commonJsRe = /\.js$/u;
const jsonRe = /\.json$/u; const jsonRe = /\.json$/u;
const importOptionsJson = { "with": { "type": "json" } }; const importOptionsJson = { "with": { "type": "json" } };
for (const [ exportName, exportPath ] of exportMappings) { for (const [ exportName, exportPath ] of exportMappings) {
test(exportName, async(t) => { test(exportName, async(t) => {
// const commonJs = !commonJsRe.test(exportPath);
const json = jsonRe.test(exportPath); const json = jsonRe.test(exportPath);
const importOptions = json ? importOptionsJson : undefined; const importOptions = json ? importOptionsJson : undefined;
const importExportName = await import(exportName.replace(/^\./u, packageJson.name), importOptions); const importExportName = await import(exportName.replace(/^\./u, packageJson.name), importOptions);