offline-npm-manager 1.0.5 → 1.0.6

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.cjs +3 -6
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -359,9 +359,7 @@ var require_install = __commonJS({
359
359
  packageName = parts[0];
360
360
  version2 = parts[1];
361
361
  }
362
- const baseName = packageName.includes("/") ? packageName.split("/").pop() : packageName;
363
- const tarballName = `${baseName}-${version2}.tgz`;
364
- return `https://registry.npmjs.org/${packageName}/-/${tarballName}`;
362
+ return `https://registry.npmjs.org/${packageName}/-/${packageName.includes("/") ? packageName.split("/").pop() : packageName}-${version2}.tgz`;
365
363
  }
366
364
  function sanitizePackageLock() {
367
365
  const lockFile = path.resolve("package-lock.json");
@@ -409,9 +407,8 @@ var require_install = __commonJS({
409
407
  pkgJson[section] = {};
410
408
  const current = pkgJson[section][name];
411
409
  if (typeof current === "string" && current.startsWith("file:")) {
412
- pkgJson[section][name] = version2;
410
+ pkgJson[section][name] = `^${version2}`;
413
411
  }
414
- console.log({ pkgJson });
415
412
  fs.writeFileSync(pkgJsonPath, JSON.stringify(pkgJson, null, 2), "utf-8");
416
413
  } catch (err) {
417
414
  log.warn(`Could not sanitize package.json (${name}): ${err.message}`);
@@ -624,7 +621,7 @@ var require_package = __commonJS({
624
621
  "package.json"(exports2, module2) {
625
622
  module2.exports = {
626
623
  name: "offline-npm-manager",
627
- version: "1.0.5",
624
+ version: "1.0.6",
628
625
  description: "Download npm packages online, install them offline later",
629
626
  bin: {
630
627
  "offline-npm": "./dist/cli.cjs"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "offline-npm-manager",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Download npm packages online, install them offline later",
5
5
  "bin": {
6
6
  "offline-npm": "./dist/cli.cjs"