jspm 4.1.2 → 4.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +8 -13
  2. package/package.json +3 -3
package/dist/cli.js CHANGED
@@ -2295,7 +2295,7 @@ async function writeOutput(generator, pins, env2, flags, silent = false) {
2295
2295
  return writeStdoutOutput(generator, pins);
2296
2296
  const mapFile = getOutputPath(flags);
2297
2297
  if (mapFile.endsWith(".html")) {
2298
- return writeHtmlOutput(mapFile, generator, pins, env2, flags, silent);
2298
+ return writeHtmlOutput(mapFile, generator, pins || [], env2, flags, silent);
2299
2299
  } else if (mapFile.endsWith(".js")) {
2300
2300
  return writeJsOutput(mapFile, generator, pins, env2, flags, silent);
2301
2301
  }
@@ -2421,7 +2421,7 @@ async function getGenerator(flags, configOverride = null, inputMap) {
2421
2421
  }
2422
2422
  function findJsMap(input, mapPath) {
2423
2423
  try {
2424
- const jspmMapRegex = /({(?:\s*"env"\s*:\s*\[[^\]]*\],)?(?:\s*"imports"\s*:\s*{[^{}]*(?:{[^{}]*}[^{}]*)*})(?:\s*,\s*"scopes"\s*:\s*{[^{}]*(?:{[^{}]*}[^{}]*)*})?(?:\s*,\s*"integrity"\s*:\s*{[^{}]*})?(?:\s*,\s*"env"\s*:\s*\[[^\]]*\])?\s*})/;
2424
+ const jspmMapRegex = /({(?:\s*"env"\s*:\s*\[[^\]]*\],)?(?:\s*"imports"\s*:\s*{[^{}]*(?:{[^{}]*}[^{}]*)*})?(?:\s*(?:,\s*)?"scopes"\s*:\s*{[^{}]*(?:{[^{}]*}[^{}]*)*})?(?:\s*(?:,\s*)?"integrity"\s*:\s*{[^{}]*})?(?:\s*(?:,\s*)?"env"\s*:\s*\[[^\]]*\])?\s*})/;
2425
2425
  const mapMatch = jspmMapRegex.exec(input);
2426
2426
  if (mapMatch && mapMatch[1]) {
2427
2427
  try {
@@ -3033,7 +3033,6 @@ var init_utils = __esm({
3033
3033
  "nodemodules",
3034
3034
  "deno",
3035
3035
  "jsdelivr",
3036
- "skypack",
3037
3036
  "unpkg",
3038
3037
  "esm.sh",
3039
3038
  "jspm.io#system"
@@ -28731,7 +28730,7 @@ var dist_default = cac;
28731
28730
  import c from "picocolors";
28732
28731
  import { clearCache as _clearCache } from "@jspm/generator";
28733
28732
  async function clearCache(flags) {
28734
- _clearCache();
28733
+ await _clearCache();
28735
28734
  !flags.quiet && console.warn(`${c.green("Ok:")} Cache cleared successfully`);
28736
28735
  }
28737
28736
 
@@ -28796,11 +28795,10 @@ async function link(modules, flags) {
28796
28795
  log2(`Flags: ${JSON.stringify(flags)}`);
28797
28796
  const fallbackMap = !modules[0] || isJsExtension(extname(modules[0])) ? void 0 : modules[0];
28798
28797
  const env2 = await getEnv(flags);
28799
- const inputMapPath = getInputPath(flags, fallbackMap);
28800
- const outputMapPath = getOutputPath(flags);
28801
- const generator = await getGenerator(flags);
28802
- let pins;
28798
+ const generator = await getGenerator(flags, { scopedLink: true });
28799
+ let pins = null;
28803
28800
  if (modules.length === 0) {
28801
+ console.log("no modules");
28804
28802
  if (!flags.quiet) {
28805
28803
  startSpinner(`Linking import map`);
28806
28804
  }
@@ -28843,12 +28841,9 @@ async function link(modules, flags) {
28843
28841
  } finally {
28844
28842
  stopSpinner();
28845
28843
  }
28844
+ pins = allPins.concat(pins);
28846
28845
  }
28847
- if (inputMapPath !== outputMapPath && modules.length !== 0) {
28848
- return await writeOutput(generator, pins, env2, flags, flags.quiet);
28849
- } else {
28850
- return await writeOutput(generator, null, env2, flags, flags.quiet);
28851
- }
28846
+ return await writeOutput(generator, pins, env2, flags, flags.quiet);
28852
28847
  }
28853
28848
  async function resolveModule(p, inlinePins, generator) {
28854
28849
  const log2 = withType("link/resolveModule");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jspm",
3
3
  "type": "module",
4
- "version": "4.1.2",
4
+ "version": "4.1.4",
5
5
  "description": "Import Map Package Manager",
6
6
  "license": "Apache-2.0",
7
7
  "bin": {
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@babel/core": "^7.24.7",
20
- "@jspm/generator": "^2.6.4",
20
+ "@jspm/generator": "^2.7.3",
21
21
  "@jspm/plugin-rollup": "^1.2.4",
22
22
  "ora": "^8.2.0",
23
23
  "picocolors": "^1.1.1"
@@ -28,7 +28,7 @@
28
28
  "amaro": "^0.5.3",
29
29
  "cac": "^6.7.14",
30
30
  "esbuild": "^0.16.17",
31
- "eslint": "^8.38.0",
31
+ "eslint": "^9.34.0",
32
32
  "eslint-config-prettier": "^8.8.0",
33
33
  "mime": "^4.0.7",
34
34
  "minimatch": "^10.0.1",