- breaking: change params signature
mappingsForNodeResolution,mappingsForDevDependenciesandpackageUserConditionsmoves tonodeMappingsentryPoints,runtime,magicExtensionsmoves toimportResolution- node mappings enabled by default
- removeUnusedMappings enabled by default
6.0.0
import { writeImportmaps } from "@jsenv/importmap-node-module";
await writeImportmaps({
projectDirectoryUrl: new URL("./", import.meta.url),
importmaps: {
"demo.importmap": {
mappingsForNodeResolution: true,
mappingsForDevDependencies: true,
runtime: "browser",
packageUserConditions: ["browser"],
entryPoints: ["index.html"],
magicExtensions: [".js", "inherit"],
removeUnusedMappings: true,
},
},
});7.0.0
import { writeImportmaps } from "@jsenv/importmap-node-module";
await writeImportmaps({
projectDirectoryUrl: new URL("./", import.meta.url),
importmaps: {
"demo.importmap": {
nodeMappings: {
devDependencies: true,
packageUserConditions: ["browser"],
},
importResolution: {
runtime: "browser",
entryPoints: ["index.html"],
magicExtensions: [".js", "inherit"],
},
},
},
});- major:
writeImportMapFilesfunction renamedwriteImportmaps - major:
importMapFilesparam renamedimportmaps - major:
entryPointsToCheckparam renamedentryPoints - major:
manualImportMapoption renamedmanualImportmap - feat: Allow to write importmap into html files
- feat: warning when
bareSpecifierAutomappingis used withoutentryPoints - feat: allow to use options related to entry points without having to specify entry point when importmap is written to html. Both in CLI and API.
- feat: add --dir to CLI
- Add CLI
- Allow root package without names
- add
babelConfigFileUrlparam towriteImportMapFiles - Enable many parser plugins by default such as import assertions
- Update dependencies