Closed Bubblyworld closed 1 year ago
By the way, there's a rare race condition in tests/html/multi.test.js
that seems to have been around for at least since 41bcad4
. Causes intermittent failures, haven't managed to isolate the root cause yet.
Here's a case that isn't working for this:
package.json
{
"name": "app",
"exports": "./app.js",
"dependencies": {
"es-module-lexer": "^1"
}
}
importmap.json
{
"imports": {
"es-module-lexer": "https://ga.jspm.io/npm:es-module-lexer@0.10.5/dist/lexer.js"
}
}
Then running node ../jspm.js link app -o sub/test.html
gives the HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JSPM example</title>
<script async src="https://ga.jspm.io/npm:es-module-shims@1.6.3/dist/es-module-shims.js" crossorigin="anonymous"></script>
<script type="importmap">
{
"imports": {
"app": "file:///C:/Users/Guy/Projects/jspm/a/app.js"
},
"scopes": {
"file:///": {
"es-module-lexer": "https://ga.jspm.io/npm:es-module-lexer@1.1.1/dist/lexer.js"
}
}
}
</script>
</head>
<body>
</body>
</html>
This surfaces a couple of issues:
extractMap
/ getMap
calls to the output map mapURL.
When resolving a package in
generator.install(...)
, if there are no version constraints then the constraints in thepackage.json
are used, rather than the current behaviour which is to use the latest version.Also fixes a bug where
InstallTarget
s were being put in the installer's constraint map instead ofPackageTarget
s, which caused a crash during my local testing.