node-install-release 1.15.6 → 1.15.7

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.
@@ -9,9 +9,9 @@ Object.defineProperty(exports, "default", {
9
9
  }
10
10
  });
11
11
  var _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
12
+ var _fsremovecompat = require("fs-remove-compat");
12
13
  var _path = /*#__PURE__*/ _interop_require_default(require("path"));
13
14
  var _queuecb = /*#__PURE__*/ _interop_require_default(require("queue-cb"));
14
- var _rimraf2 = /*#__PURE__*/ _interop_require_default(require("rimraf2"));
15
15
  var _constantsts = require("../constants.js");
16
16
  var _conditionalCachets = /*#__PURE__*/ _interop_require_default(require("../lib/conditionalCache.js"));
17
17
  var _conditionalExtractts = /*#__PURE__*/ _interop_require_default(require("../lib/conditionalExtract.js"));
@@ -44,9 +44,7 @@ function installCompressed(distPath, dest, options, callback) {
44
44
  // some compressed versions of node come with npm pre-installed, but we want to override with a specific version
45
45
  var libPath = platform === 'win32' ? dest : _path.default.join(dest, 'lib');
46
46
  var installPath = _path.default.join(libPath, 'node_modules', 'npm');
47
- (0, _rimraf2.default)(installPath, {
48
- disableGlob: true
49
- }, function() {
47
+ (0, _fsremovecompat.safeRm)(installPath, function() {
50
48
  return callback(err, checksum);
51
49
  });
52
50
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installCompressed.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport rimraf2 from 'rimraf2';\n\nimport { NODE_DIST_BASE_URL } from '../constants.ts';\nimport conditionalCache from '../lib/conditionalCache.ts';\nimport conditionalExtract from '../lib/conditionalExtract.ts';\nimport type { ChecksumCallback, ChecksumResult, InstallOptions } from '../types.ts';\nimport validateDownload from './validateDownload.ts';\n\nexport default function installCompressed(distPath: string, dest: string, options: InstallOptions, callback: ChecksumCallback): undefined {\n const platform = options.platform;\n const downloadPath = `${NODE_DIST_BASE_URL}/${distPath}`;\n const cachePath = path.join(options.cachePath, path.basename(downloadPath));\n\n fs.stat(dest, (err) => {\n if (!err) return callback(); // already exists\n\n let checksum: ChecksumResult | undefined;\n const queue = new Queue(1);\n queue.defer(conditionalCache.bind(null, downloadPath, cachePath));\n queue.defer((cb) => {\n validateDownload(distPath, cachePath, (err, result) => {\n checksum = result;\n cb(err);\n });\n });\n queue.defer(conditionalExtract.bind(null, cachePath, dest, { strip: 1, time: 1000 }));\n queue.await((err) => {\n // some compressed versions of node come with npm pre-installed, but we want to override with a specific version\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const installPath = path.join(libPath, 'node_modules', 'npm');\n rimraf2(installPath, { disableGlob: true }, () => callback(err, checksum));\n });\n });\n}\n"],"names":["installCompressed","distPath","dest","options","callback","platform","downloadPath","NODE_DIST_BASE_URL","cachePath","path","join","basename","fs","stat","err","checksum","queue","Queue","defer","conditionalCache","bind","cb","validateDownload","result","conditionalExtract","strip","time","await","libPath","installPath","rimraf2","disableGlob"],"mappings":";;;;+BAWA;;;eAAwBA;;;yDAXT;2DACE;8DACC;8DACE;2BAEe;yEACN;2EACE;yEAEF;;;;;;AAEd,SAASA,kBAAkBC,QAAgB,EAAEC,IAAY,EAAEC,OAAuB,EAAEC,QAA0B;IAC3H,IAAMC,WAAWF,QAAQE,QAAQ;IACjC,IAAMC,eAAe,AAAC,GAAwBL,OAAtBM,+BAAkB,EAAC,KAAY,OAATN;IAC9C,IAAMO,YAAYC,aAAI,CAACC,IAAI,CAACP,QAAQK,SAAS,EAAEC,aAAI,CAACE,QAAQ,CAACL;IAE7DM,WAAE,CAACC,IAAI,CAACX,MAAM,SAACY;QACb,IAAI,CAACA,KAAK,OAAOV,YAAY,iBAAiB;QAE9C,IAAIW;QACJ,IAAMC,QAAQ,IAAIC,gBAAK,CAAC;QACxBD,MAAME,KAAK,CAACC,2BAAgB,CAACC,IAAI,CAAC,MAAMd,cAAcE;QACtDQ,MAAME,KAAK,CAAC,SAACG;YACXC,IAAAA,2BAAgB,EAACrB,UAAUO,WAAW,SAACM,KAAKS;gBAC1CR,WAAWQ;gBACXF,GAAGP;YACL;QACF;QACAE,MAAME,KAAK,CAACM,6BAAkB,CAACJ,IAAI,CAAC,MAAMZ,WAAWN,MAAM;YAAEuB,OAAO;YAAGC,MAAM;QAAK;QAClFV,MAAMW,KAAK,CAAC,SAACb;YACX,gHAAgH;YAChH,IAAMc,UAAUvB,aAAa,UAAUH,OAAOO,aAAI,CAACC,IAAI,CAACR,MAAM;YAC9D,IAAM2B,cAAcpB,aAAI,CAACC,IAAI,CAACkB,SAAS,gBAAgB;YACvDE,IAAAA,gBAAO,EAACD,aAAa;gBAAEE,aAAa;YAAK,GAAG;uBAAM3B,SAASU,KAAKC;;QAClE;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installCompressed.ts"],"sourcesContent":["import fs from 'fs';\nimport { safeRm } from 'fs-remove-compat';\nimport path from 'path';\nimport Queue from 'queue-cb';\n\nimport { NODE_DIST_BASE_URL } from '../constants.ts';\nimport conditionalCache from '../lib/conditionalCache.ts';\nimport conditionalExtract from '../lib/conditionalExtract.ts';\nimport type { ChecksumCallback, ChecksumResult, InstallOptions } from '../types.ts';\nimport validateDownload from './validateDownload.ts';\n\nexport default function installCompressed(distPath: string, dest: string, options: InstallOptions, callback: ChecksumCallback): undefined {\n const platform = options.platform;\n const downloadPath = `${NODE_DIST_BASE_URL}/${distPath}`;\n const cachePath = path.join(options.cachePath, path.basename(downloadPath));\n\n fs.stat(dest, (err) => {\n if (!err) return callback(); // already exists\n\n let checksum: ChecksumResult | undefined;\n const queue = new Queue(1);\n queue.defer(conditionalCache.bind(null, downloadPath, cachePath));\n queue.defer((cb) => {\n validateDownload(distPath, cachePath, (err, result) => {\n checksum = result;\n cb(err);\n });\n });\n queue.defer(conditionalExtract.bind(null, cachePath, dest, { strip: 1, time: 1000 }));\n queue.await((err) => {\n // some compressed versions of node come with npm pre-installed, but we want to override with a specific version\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const installPath = path.join(libPath, 'node_modules', 'npm');\n safeRm(installPath, () => callback(err, checksum));\n });\n });\n}\n"],"names":["installCompressed","distPath","dest","options","callback","platform","downloadPath","NODE_DIST_BASE_URL","cachePath","path","join","basename","fs","stat","err","checksum","queue","Queue","defer","conditionalCache","bind","cb","validateDownload","result","conditionalExtract","strip","time","await","libPath","installPath","safeRm"],"mappings":";;;;+BAWA;;;eAAwBA;;;yDAXT;8BACQ;2DACN;8DACC;2BAEiB;yEACN;2EACE;yEAEF;;;;;;AAEd,SAASA,kBAAkBC,QAAgB,EAAEC,IAAY,EAAEC,OAAuB,EAAEC,QAA0B;IAC3H,IAAMC,WAAWF,QAAQE,QAAQ;IACjC,IAAMC,eAAe,AAAC,GAAwBL,OAAtBM,+BAAkB,EAAC,KAAY,OAATN;IAC9C,IAAMO,YAAYC,aAAI,CAACC,IAAI,CAACP,QAAQK,SAAS,EAAEC,aAAI,CAACE,QAAQ,CAACL;IAE7DM,WAAE,CAACC,IAAI,CAACX,MAAM,SAACY;QACb,IAAI,CAACA,KAAK,OAAOV,YAAY,iBAAiB;QAE9C,IAAIW;QACJ,IAAMC,QAAQ,IAAIC,gBAAK,CAAC;QACxBD,MAAME,KAAK,CAACC,2BAAgB,CAACC,IAAI,CAAC,MAAMd,cAAcE;QACtDQ,MAAME,KAAK,CAAC,SAACG;YACXC,IAAAA,2BAAgB,EAACrB,UAAUO,WAAW,SAACM,KAAKS;gBAC1CR,WAAWQ;gBACXF,GAAGP;YACL;QACF;QACAE,MAAME,KAAK,CAACM,6BAAkB,CAACJ,IAAI,CAAC,MAAMZ,WAAWN,MAAM;YAAEuB,OAAO;YAAGC,MAAM;QAAK;QAClFV,MAAMW,KAAK,CAAC,SAACb;YACX,gHAAgH;YAChH,IAAMc,UAAUvB,aAAa,UAAUH,OAAOO,aAAI,CAACC,IAAI,CAACR,MAAM;YAC9D,IAAM2B,cAAcpB,aAAI,CAACC,IAAI,CAACkB,SAAS,gBAAgB;YACvDE,IAAAA,sBAAM,EAACD,aAAa;uBAAMzB,SAASU,KAAKC;;QAC1C;IACF;AACF"}
@@ -9,8 +9,8 @@ Object.defineProperty(exports, "default", {
9
9
  }
10
10
  });
11
11
  var _fscopycompat = require("fs-copy-compat");
12
+ var _fsremovecompat = require("fs-remove-compat");
12
13
  var _queuecb = /*#__PURE__*/ _interop_require_default(require("queue-cb"));
13
- var _rimraf2 = /*#__PURE__*/ _interop_require_default(require("rimraf2"));
14
14
  var _ensureDestinationParentts = /*#__PURE__*/ _interop_require_default(require("./ensureDestinationParent.js"));
15
15
  function _interop_require_default(obj) {
16
16
  return obj && obj.__esModule ? obj : {
@@ -21,11 +21,7 @@ function safeCopyFile(src, dest, callback) {
21
21
  var queue = new _queuecb.default(1);
22
22
  queue.defer(_ensureDestinationParentts.default.bind(null, dest));
23
23
  queue.defer(function(callback) {
24
- (0, _rimraf2.default)(dest, {
25
- disableGlob: true
26
- }, function(err) {
27
- err && err.code !== 'EEXIST' ? callback(err) : callback();
28
- });
24
+ (0, _fsremovecompat.safeRm)(dest, callback);
29
25
  });
30
26
  queue.defer(_fscopycompat.copyFile.bind(null, src, dest));
31
27
  queue.await(callback);
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/copyFile.ts"],"sourcesContent":["import type { NoParamCallback } from 'fs';\nimport { copyFile } from 'fs-copy-compat';\nimport Queue from 'queue-cb';\nimport rimraf2 from 'rimraf2';\n\nimport ensureDestinationParent from './ensureDestinationParent.ts';\n\nexport default function safeCopyFile(src: string, dest: string, callback: NoParamCallback) {\n const queue = new Queue(1);\n\n queue.defer(ensureDestinationParent.bind(null, dest));\n queue.defer((callback) => {\n rimraf2(dest, { disableGlob: true }, (err) => {\n err && err.code !== 'EEXIST' ? callback(err) : callback();\n });\n });\n queue.defer(copyFile.bind(null, src, dest));\n queue.await(callback);\n}\n"],"names":["safeCopyFile","src","dest","callback","queue","Queue","defer","ensureDestinationParent","bind","rimraf2","disableGlob","err","code","copyFile","await"],"mappings":";;;;+BAOA;;;eAAwBA;;;4BANC;8DACP;8DACE;gFAEgB;;;;;;AAErB,SAASA,aAAaC,GAAW,EAAEC,IAAY,EAAEC,QAAyB;IACvF,IAAMC,QAAQ,IAAIC,gBAAK,CAAC;IAExBD,MAAME,KAAK,CAACC,kCAAuB,CAACC,IAAI,CAAC,MAAMN;IAC/CE,MAAME,KAAK,CAAC,SAACH;QACXM,IAAAA,gBAAO,EAACP,MAAM;YAAEQ,aAAa;QAAK,GAAG,SAACC;YACpCA,OAAOA,IAAIC,IAAI,KAAK,WAAWT,SAASQ,OAAOR;QACjD;IACF;IACAC,MAAME,KAAK,CAACO,sBAAQ,CAACL,IAAI,CAAC,MAAMP,KAAKC;IACrCE,MAAMU,KAAK,CAACX;AACd"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/copyFile.ts"],"sourcesContent":["import type { NoParamCallback } from 'fs';\nimport { copyFile } from 'fs-copy-compat';\nimport { safeRm } from 'fs-remove-compat';\nimport Queue from 'queue-cb';\n\nimport ensureDestinationParent from './ensureDestinationParent.ts';\n\nexport default function safeCopyFile(src: string, dest: string, callback: NoParamCallback) {\n const queue = new Queue(1);\n\n queue.defer(ensureDestinationParent.bind(null, dest));\n queue.defer((callback) => {\n safeRm(dest, callback);\n });\n queue.defer(copyFile.bind(null, src, dest));\n queue.await(callback);\n}\n"],"names":["safeCopyFile","src","dest","callback","queue","Queue","defer","ensureDestinationParent","bind","safeRm","copyFile","await"],"mappings":";;;;+BAOA;;;eAAwBA;;;4BANC;8BACF;8DACL;gFAEkB;;;;;;AAErB,SAASA,aAAaC,GAAW,EAAEC,IAAY,EAAEC,QAAyB;IACvF,IAAMC,QAAQ,IAAIC,gBAAK,CAAC;IAExBD,MAAME,KAAK,CAACC,kCAAuB,CAACC,IAAI,CAAC,MAAMN;IAC/CE,MAAME,KAAK,CAAC,SAACH;QACXM,IAAAA,sBAAM,EAACP,MAAMC;IACf;IACAC,MAAME,KAAK,CAACI,sBAAQ,CAACF,IAAI,CAAC,MAAMP,KAAKC;IACrCE,MAAMO,KAAK,CAACR;AACd"}
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs';
2
+ import { safeRm } from 'fs-remove-compat';
2
3
  import path from 'path';
3
4
  import Queue from 'queue-cb';
4
- import rimraf2 from 'rimraf2';
5
5
  import { NODE_DIST_BASE_URL } from '../constants.js';
6
6
  import conditionalCache from '../lib/conditionalCache.js';
7
7
  import conditionalExtract from '../lib/conditionalExtract.js';
@@ -29,9 +29,7 @@ export default function installCompressed(distPath, dest, options, callback) {
29
29
  // some compressed versions of node come with npm pre-installed, but we want to override with a specific version
30
30
  const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');
31
31
  const installPath = path.join(libPath, 'node_modules', 'npm');
32
- rimraf2(installPath, {
33
- disableGlob: true
34
- }, ()=>callback(err, checksum));
32
+ safeRm(installPath, ()=>callback(err, checksum));
35
33
  });
36
34
  });
37
35
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installCompressed.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport rimraf2 from 'rimraf2';\n\nimport { NODE_DIST_BASE_URL } from '../constants.ts';\nimport conditionalCache from '../lib/conditionalCache.ts';\nimport conditionalExtract from '../lib/conditionalExtract.ts';\nimport type { ChecksumCallback, ChecksumResult, InstallOptions } from '../types.ts';\nimport validateDownload from './validateDownload.ts';\n\nexport default function installCompressed(distPath: string, dest: string, options: InstallOptions, callback: ChecksumCallback): undefined {\n const platform = options.platform;\n const downloadPath = `${NODE_DIST_BASE_URL}/${distPath}`;\n const cachePath = path.join(options.cachePath, path.basename(downloadPath));\n\n fs.stat(dest, (err) => {\n if (!err) return callback(); // already exists\n\n let checksum: ChecksumResult | undefined;\n const queue = new Queue(1);\n queue.defer(conditionalCache.bind(null, downloadPath, cachePath));\n queue.defer((cb) => {\n validateDownload(distPath, cachePath, (err, result) => {\n checksum = result;\n cb(err);\n });\n });\n queue.defer(conditionalExtract.bind(null, cachePath, dest, { strip: 1, time: 1000 }));\n queue.await((err) => {\n // some compressed versions of node come with npm pre-installed, but we want to override with a specific version\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const installPath = path.join(libPath, 'node_modules', 'npm');\n rimraf2(installPath, { disableGlob: true }, () => callback(err, checksum));\n });\n });\n}\n"],"names":["fs","path","Queue","rimraf2","NODE_DIST_BASE_URL","conditionalCache","conditionalExtract","validateDownload","installCompressed","distPath","dest","options","callback","platform","downloadPath","cachePath","join","basename","stat","err","checksum","queue","defer","bind","cb","result","strip","time","await","libPath","installPath","disableGlob"],"mappings":"AAAA,OAAOA,QAAQ,KAAK;AACpB,OAAOC,UAAU,OAAO;AACxB,OAAOC,WAAW,WAAW;AAC7B,OAAOC,aAAa,UAAU;AAE9B,SAASC,kBAAkB,QAAQ,kBAAkB;AACrD,OAAOC,sBAAsB,6BAA6B;AAC1D,OAAOC,wBAAwB,+BAA+B;AAE9D,OAAOC,sBAAsB,wBAAwB;AAErD,eAAe,SAASC,kBAAkBC,QAAgB,EAAEC,IAAY,EAAEC,OAAuB,EAAEC,QAA0B;IAC3H,MAAMC,WAAWF,QAAQE,QAAQ;IACjC,MAAMC,eAAe,GAAGV,mBAAmB,CAAC,EAAEK,UAAU;IACxD,MAAMM,YAAYd,KAAKe,IAAI,CAACL,QAAQI,SAAS,EAAEd,KAAKgB,QAAQ,CAACH;IAE7Dd,GAAGkB,IAAI,CAACR,MAAM,CAACS;QACb,IAAI,CAACA,KAAK,OAAOP,YAAY,iBAAiB;QAE9C,IAAIQ;QACJ,MAAMC,QAAQ,IAAInB,MAAM;QACxBmB,MAAMC,KAAK,CAACjB,iBAAiBkB,IAAI,CAAC,MAAMT,cAAcC;QACtDM,MAAMC,KAAK,CAAC,CAACE;YACXjB,iBAAiBE,UAAUM,WAAW,CAACI,KAAKM;gBAC1CL,WAAWK;gBACXD,GAAGL;YACL;QACF;QACAE,MAAMC,KAAK,CAAChB,mBAAmBiB,IAAI,CAAC,MAAMR,WAAWL,MAAM;YAAEgB,OAAO;YAAGC,MAAM;QAAK;QAClFN,MAAMO,KAAK,CAAC,CAACT;YACX,gHAAgH;YAChH,MAAMU,UAAUhB,aAAa,UAAUH,OAAOT,KAAKe,IAAI,CAACN,MAAM;YAC9D,MAAMoB,cAAc7B,KAAKe,IAAI,CAACa,SAAS,gBAAgB;YACvD1B,QAAQ2B,aAAa;gBAAEC,aAAa;YAAK,GAAG,IAAMnB,SAASO,KAAKC;QAClE;IACF;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/installNode/installCompressed.ts"],"sourcesContent":["import fs from 'fs';\nimport { safeRm } from 'fs-remove-compat';\nimport path from 'path';\nimport Queue from 'queue-cb';\n\nimport { NODE_DIST_BASE_URL } from '../constants.ts';\nimport conditionalCache from '../lib/conditionalCache.ts';\nimport conditionalExtract from '../lib/conditionalExtract.ts';\nimport type { ChecksumCallback, ChecksumResult, InstallOptions } from '../types.ts';\nimport validateDownload from './validateDownload.ts';\n\nexport default function installCompressed(distPath: string, dest: string, options: InstallOptions, callback: ChecksumCallback): undefined {\n const platform = options.platform;\n const downloadPath = `${NODE_DIST_BASE_URL}/${distPath}`;\n const cachePath = path.join(options.cachePath, path.basename(downloadPath));\n\n fs.stat(dest, (err) => {\n if (!err) return callback(); // already exists\n\n let checksum: ChecksumResult | undefined;\n const queue = new Queue(1);\n queue.defer(conditionalCache.bind(null, downloadPath, cachePath));\n queue.defer((cb) => {\n validateDownload(distPath, cachePath, (err, result) => {\n checksum = result;\n cb(err);\n });\n });\n queue.defer(conditionalExtract.bind(null, cachePath, dest, { strip: 1, time: 1000 }));\n queue.await((err) => {\n // some compressed versions of node come with npm pre-installed, but we want to override with a specific version\n const libPath = platform === 'win32' ? dest : path.join(dest, 'lib');\n const installPath = path.join(libPath, 'node_modules', 'npm');\n safeRm(installPath, () => callback(err, checksum));\n });\n });\n}\n"],"names":["fs","safeRm","path","Queue","NODE_DIST_BASE_URL","conditionalCache","conditionalExtract","validateDownload","installCompressed","distPath","dest","options","callback","platform","downloadPath","cachePath","join","basename","stat","err","checksum","queue","defer","bind","cb","result","strip","time","await","libPath","installPath"],"mappings":"AAAA,OAAOA,QAAQ,KAAK;AACpB,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,UAAU,OAAO;AACxB,OAAOC,WAAW,WAAW;AAE7B,SAASC,kBAAkB,QAAQ,kBAAkB;AACrD,OAAOC,sBAAsB,6BAA6B;AAC1D,OAAOC,wBAAwB,+BAA+B;AAE9D,OAAOC,sBAAsB,wBAAwB;AAErD,eAAe,SAASC,kBAAkBC,QAAgB,EAAEC,IAAY,EAAEC,OAAuB,EAAEC,QAA0B;IAC3H,MAAMC,WAAWF,QAAQE,QAAQ;IACjC,MAAMC,eAAe,GAAGV,mBAAmB,CAAC,EAAEK,UAAU;IACxD,MAAMM,YAAYb,KAAKc,IAAI,CAACL,QAAQI,SAAS,EAAEb,KAAKe,QAAQ,CAACH;IAE7Dd,GAAGkB,IAAI,CAACR,MAAM,CAACS;QACb,IAAI,CAACA,KAAK,OAAOP,YAAY,iBAAiB;QAE9C,IAAIQ;QACJ,MAAMC,QAAQ,IAAIlB,MAAM;QACxBkB,MAAMC,KAAK,CAACjB,iBAAiBkB,IAAI,CAAC,MAAMT,cAAcC;QACtDM,MAAMC,KAAK,CAAC,CAACE;YACXjB,iBAAiBE,UAAUM,WAAW,CAACI,KAAKM;gBAC1CL,WAAWK;gBACXD,GAAGL;YACL;QACF;QACAE,MAAMC,KAAK,CAAChB,mBAAmBiB,IAAI,CAAC,MAAMR,WAAWL,MAAM;YAAEgB,OAAO;YAAGC,MAAM;QAAK;QAClFN,MAAMO,KAAK,CAAC,CAACT;YACX,gHAAgH;YAChH,MAAMU,UAAUhB,aAAa,UAAUH,OAAOR,KAAKc,IAAI,CAACN,MAAM;YAC9D,MAAMoB,cAAc5B,KAAKc,IAAI,CAACa,SAAS,gBAAgB;YACvD5B,OAAO6B,aAAa,IAAMlB,SAASO,KAAKC;QAC1C;IACF;AACF"}
@@ -1,16 +1,12 @@
1
1
  import { copyFile } from 'fs-copy-compat';
2
+ import { safeRm } from 'fs-remove-compat';
2
3
  import Queue from 'queue-cb';
3
- import rimraf2 from 'rimraf2';
4
4
  import ensureDestinationParent from './ensureDestinationParent.js';
5
5
  export default function safeCopyFile(src, dest, callback) {
6
6
  const queue = new Queue(1);
7
7
  queue.defer(ensureDestinationParent.bind(null, dest));
8
8
  queue.defer((callback)=>{
9
- rimraf2(dest, {
10
- disableGlob: true
11
- }, (err)=>{
12
- err && err.code !== 'EEXIST' ? callback(err) : callback();
13
- });
9
+ safeRm(dest, callback);
14
10
  });
15
11
  queue.defer(copyFile.bind(null, src, dest));
16
12
  queue.await(callback);
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/copyFile.ts"],"sourcesContent":["import type { NoParamCallback } from 'fs';\nimport { copyFile } from 'fs-copy-compat';\nimport Queue from 'queue-cb';\nimport rimraf2 from 'rimraf2';\n\nimport ensureDestinationParent from './ensureDestinationParent.ts';\n\nexport default function safeCopyFile(src: string, dest: string, callback: NoParamCallback) {\n const queue = new Queue(1);\n\n queue.defer(ensureDestinationParent.bind(null, dest));\n queue.defer((callback) => {\n rimraf2(dest, { disableGlob: true }, (err) => {\n err && err.code !== 'EEXIST' ? callback(err) : callback();\n });\n });\n queue.defer(copyFile.bind(null, src, dest));\n queue.await(callback);\n}\n"],"names":["copyFile","Queue","rimraf2","ensureDestinationParent","safeCopyFile","src","dest","callback","queue","defer","bind","disableGlob","err","code","await"],"mappings":"AACA,SAASA,QAAQ,QAAQ,iBAAiB;AAC1C,OAAOC,WAAW,WAAW;AAC7B,OAAOC,aAAa,UAAU;AAE9B,OAAOC,6BAA6B,+BAA+B;AAEnE,eAAe,SAASC,aAAaC,GAAW,EAAEC,IAAY,EAAEC,QAAyB;IACvF,MAAMC,QAAQ,IAAIP,MAAM;IAExBO,MAAMC,KAAK,CAACN,wBAAwBO,IAAI,CAAC,MAAMJ;IAC/CE,MAAMC,KAAK,CAAC,CAACF;QACXL,QAAQI,MAAM;YAAEK,aAAa;QAAK,GAAG,CAACC;YACpCA,OAAOA,IAAIC,IAAI,KAAK,WAAWN,SAASK,OAAOL;QACjD;IACF;IACAC,MAAMC,KAAK,CAACT,SAASU,IAAI,CAAC,MAAML,KAAKC;IACrCE,MAAMM,KAAK,CAACP;AACd"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/lib/copyFile.ts"],"sourcesContent":["import type { NoParamCallback } from 'fs';\nimport { copyFile } from 'fs-copy-compat';\nimport { safeRm } from 'fs-remove-compat';\nimport Queue from 'queue-cb';\n\nimport ensureDestinationParent from './ensureDestinationParent.ts';\n\nexport default function safeCopyFile(src: string, dest: string, callback: NoParamCallback) {\n const queue = new Queue(1);\n\n queue.defer(ensureDestinationParent.bind(null, dest));\n queue.defer((callback) => {\n safeRm(dest, callback);\n });\n queue.defer(copyFile.bind(null, src, dest));\n queue.await(callback);\n}\n"],"names":["copyFile","safeRm","Queue","ensureDestinationParent","safeCopyFile","src","dest","callback","queue","defer","bind","await"],"mappings":"AACA,SAASA,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,WAAW,WAAW;AAE7B,OAAOC,6BAA6B,+BAA+B;AAEnE,eAAe,SAASC,aAAaC,GAAW,EAAEC,IAAY,EAAEC,QAAyB;IACvF,MAAMC,QAAQ,IAAIN,MAAM;IAExBM,MAAMC,KAAK,CAACN,wBAAwBO,IAAI,CAAC,MAAMJ;IAC/CE,MAAMC,KAAK,CAAC,CAACF;QACXN,OAAOK,MAAMC;IACf;IACAC,MAAMC,KAAK,CAACT,SAASU,IAAI,CAAC,MAAML,KAAKC;IACrCE,MAAMG,KAAK,CAACJ;AACd"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-install-release",
3
- "version": "1.15.6",
3
+ "version": "1.15.7",
4
4
  "description": "Cross-platform solution for installing releases of Node.js",
5
5
  "keywords": [
6
6
  "node",
@@ -48,6 +48,7 @@
48
48
  "exit": "*",
49
49
  "fast-extract": "*",
50
50
  "fs-copy-compat": "*",
51
+ "fs-remove-compat": "*",
51
52
  "get-remote": "*",
52
53
  "getopts-compat": "*",
53
54
  "homedir-polyfill": "*",
@@ -57,8 +58,7 @@
57
58
  "node-filename-to-dist-paths": "*",
58
59
  "node-resolve-versions": "*",
59
60
  "on-one": "*",
60
- "queue-cb": "*",
61
- "rimraf2": "*"
61
+ "queue-cb": "*"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@types/mocha": "*",