node-install-release 1.15.7 → 1.15.8

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.
package/dist/cjs/cli.js CHANGED
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "default", {
8
8
  return _default;
9
9
  }
10
10
  });
11
- var _exit = /*#__PURE__*/ _interop_require_default(require("exit"));
11
+ var _exitcompat = /*#__PURE__*/ _interop_require_default(require("exit-compat"));
12
12
  var _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
13
13
  var _getoptscompat = /*#__PURE__*/ _interop_require_default(require("getopts-compat"));
14
14
  var _path = /*#__PURE__*/ _interop_require_default(require("path"));
@@ -66,18 +66,18 @@ var _default = function(argv, name) {
66
66
  });
67
67
  if (options.version) {
68
68
  console.log(getPackageVersion());
69
- (0, _exit.default)(0);
69
+ (0, _exitcompat.default)(0);
70
70
  return;
71
71
  }
72
72
  if (options.help) {
73
73
  printHelp(cliName);
74
- (0, _exit.default)(0);
74
+ (0, _exitcompat.default)(0);
75
75
  return;
76
76
  }
77
77
  var args = options._;
78
78
  if (args.length < 1) {
79
79
  console.log("Missing command. Example usage: ".concat(cliName, " <version> [directory]"));
80
- (0, _exit.default)(ERROR_CODE);
80
+ (0, _exitcompat.default)(ERROR_CODE);
81
81
  return;
82
82
  }
83
83
  (0, _indexts.default)(args[0], options, function(err, result) {
@@ -87,7 +87,7 @@ var _default = function(argv, name) {
87
87
  else console.log("".concat(result.version, " installed in: ").concat(result.installPath));
88
88
  console.log('======================');
89
89
  }
90
- (0, _exit.default)(err ? ERROR_CODE : 0);
90
+ (0, _exitcompat.default)(err ? ERROR_CODE : 0);
91
91
  });
92
92
  };
93
93
  /* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.ts"],"sourcesContent":["import exit from 'exit';\nimport fs from 'fs';\nimport getopts from 'getopts-compat';\nimport path from 'path';\nimport url from 'url';\nimport install, { type InstallOptions } from './index.ts';\n\nconst ERROR_CODE = 9;\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\n\nfunction getPackageVersion(): string {\n const packagePath = path.join(__dirname, '..', '..', 'package.json');\n const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8'));\n return packageJson.version;\n}\n\nfunction printHelp(name: string): void {\n const version = getPackageVersion();\n console.log(`${name} v${version}`);\n console.log('');\n console.log(`Usage: ${name} <version> [options]`);\n console.log('');\n console.log('Arguments:');\n console.log(' version Node.js version to install (e.g., 18.0.0, lts, stable)');\n console.log('');\n console.log('Options:');\n console.log(' -p, --platform Target platform (default: current platform)');\n console.log(' -a, --arch Target architecture (default: current architecture)');\n console.log(' -f, --filename Specific filename to download');\n console.log(' -i, --installPath Installation directory');\n console.log(' -c, --storagePath Cache storage directory');\n console.log(' -si, --silent Suppress output');\n console.log(' -v, --version Show version number');\n console.log(' -h, --help Show this help message');\n}\n\nexport default (argv: string[], name?: string): undefined => {\n const cliName = name || 'nir';\n const options = getopts(argv, {\n alias: { platform: 'p', arch: 'a', filename: 'f', installPath: 'i', storagePath: 'c', silent: 'si', version: 'v', help: 'h' },\n boolean: ['silent', 'version', 'help'],\n });\n\n if (options.version) {\n console.log(getPackageVersion());\n exit(0);\n return;\n }\n\n if (options.help) {\n printHelp(cliName);\n exit(0);\n return;\n }\n\n const args = options._;\n if (args.length < 1) {\n console.log(`Missing command. Example usage: ${cliName} <version> [directory]`);\n exit(ERROR_CODE);\n return;\n }\n install(args[0], options as InstallOptions, (err, result) => {\n if (!options.silent) {\n console.log('\\n======================');\n if (err) console.log(`${args[0]} not installed. Error: ${err.message}`);\n else console.log(`${result.version} installed in: ${result.installPath}`);\n console.log('======================');\n }\n exit(err ? ERROR_CODE : 0);\n });\n};\n"],"names":["ERROR_CODE","__dirname","path","dirname","__filename","url","fileURLToPath","getPackageVersion","packagePath","join","packageJson","JSON","parse","fs","readFileSync","version","printHelp","name","console","log","argv","cliName","options","getopts","alias","platform","arch","filename","installPath","storagePath","silent","help","boolean","exit","args","_","length","install","err","result","message"],"mappings":";;;;+BAoCA;;;eAAA;;;2DApCiB;yDACF;oEACK;2DACH;0DACD;8DAC6B;;;;;;AAE7C,IAAMA,aAAa;AACnB,IAAMC,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaC,YAAG,CAACC,aAAa,CAAC;AAElG,SAASC;IACP,IAAMC,cAAcN,aAAI,CAACO,IAAI,CAACR,WAAW,MAAM,MAAM;IACrD,IAAMS,cAAcC,KAAKC,KAAK,CAACC,WAAE,CAACC,YAAY,CAACN,aAAa;IAC5D,OAAOE,YAAYK,OAAO;AAC5B;AAEA,SAASC,UAAUC,IAAY;IAC7B,IAAMF,UAAUR;IAChBW,QAAQC,GAAG,CAAC,AAAC,GAAWJ,OAATE,MAAK,MAAY,OAARF;IACxBG,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC,AAAC,UAAc,OAALF,MAAK;IAC3BC,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC;AACd;IAEA,WAAe,SAACC,MAAgBH;IAC9B,IAAMI,UAAUJ,QAAQ;IACxB,IAAMK,UAAUC,IAAAA,sBAAO,EAACH,MAAM;QAC5BI,OAAO;YAAEC,UAAU;YAAKC,MAAM;YAAKC,UAAU;YAAKC,aAAa;YAAKC,aAAa;YAAKC,QAAQ;YAAMf,SAAS;YAAKgB,MAAM;QAAI;QAC5HC,SAAS;YAAC;YAAU;YAAW;SAAO;IACxC;IAEA,IAAIV,QAAQP,OAAO,EAAE;QACnBG,QAAQC,GAAG,CAACZ;QACZ0B,IAAAA,aAAI,EAAC;QACL;IACF;IAEA,IAAIX,QAAQS,IAAI,EAAE;QAChBf,UAAUK;QACVY,IAAAA,aAAI,EAAC;QACL;IACF;IAEA,IAAMC,OAAOZ,QAAQa,CAAC;IACtB,IAAID,KAAKE,MAAM,GAAG,GAAG;QACnBlB,QAAQC,GAAG,CAAC,AAAC,mCAA0C,OAARE,SAAQ;QACvDY,IAAAA,aAAI,EAACjC;QACL;IACF;IACAqC,IAAAA,gBAAO,EAACH,IAAI,CAAC,EAAE,EAAEZ,SAA2B,SAACgB,KAAKC;QAChD,IAAI,CAACjB,QAAQQ,MAAM,EAAE;YACnBZ,QAAQC,GAAG,CAAC;YACZ,IAAImB,KAAKpB,QAAQC,GAAG,CAAC,AAAC,GAAmCmB,OAAjCJ,IAAI,CAAC,EAAE,EAAC,2BAAqC,OAAZI,IAAIE,OAAO;iBAC/DtB,QAAQC,GAAG,CAAC,AAAC,GAAkCoB,OAAhCA,OAAOxB,OAAO,EAAC,mBAAoC,OAAnBwB,OAAOX,WAAW;YACtEV,QAAQC,GAAG,CAAC;QACd;QACAc,IAAAA,aAAI,EAACK,MAAMtC,aAAa;IAC1B;AACF"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.ts"],"sourcesContent":["import exit from 'exit-compat';\nimport fs from 'fs';\nimport getopts from 'getopts-compat';\nimport path from 'path';\nimport url from 'url';\nimport install, { type InstallOptions } from './index.ts';\n\nconst ERROR_CODE = 9;\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\n\nfunction getPackageVersion(): string {\n const packagePath = path.join(__dirname, '..', '..', 'package.json');\n const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8'));\n return packageJson.version;\n}\n\nfunction printHelp(name: string): void {\n const version = getPackageVersion();\n console.log(`${name} v${version}`);\n console.log('');\n console.log(`Usage: ${name} <version> [options]`);\n console.log('');\n console.log('Arguments:');\n console.log(' version Node.js version to install (e.g., 18.0.0, lts, stable)');\n console.log('');\n console.log('Options:');\n console.log(' -p, --platform Target platform (default: current platform)');\n console.log(' -a, --arch Target architecture (default: current architecture)');\n console.log(' -f, --filename Specific filename to download');\n console.log(' -i, --installPath Installation directory');\n console.log(' -c, --storagePath Cache storage directory');\n console.log(' -si, --silent Suppress output');\n console.log(' -v, --version Show version number');\n console.log(' -h, --help Show this help message');\n}\n\nexport default (argv: string[], name?: string): undefined => {\n const cliName = name || 'nir';\n const options = getopts(argv, {\n alias: { platform: 'p', arch: 'a', filename: 'f', installPath: 'i', storagePath: 'c', silent: 'si', version: 'v', help: 'h' },\n boolean: ['silent', 'version', 'help'],\n });\n\n if (options.version) {\n console.log(getPackageVersion());\n exit(0);\n return;\n }\n\n if (options.help) {\n printHelp(cliName);\n exit(0);\n return;\n }\n\n const args = options._;\n if (args.length < 1) {\n console.log(`Missing command. Example usage: ${cliName} <version> [directory]`);\n exit(ERROR_CODE);\n return;\n }\n install(args[0], options as InstallOptions, (err, result) => {\n if (!options.silent) {\n console.log('\\n======================');\n if (err) console.log(`${args[0]} not installed. Error: ${err.message}`);\n else console.log(`${result.version} installed in: ${result.installPath}`);\n console.log('======================');\n }\n exit(err ? ERROR_CODE : 0);\n });\n};\n"],"names":["ERROR_CODE","__dirname","path","dirname","__filename","url","fileURLToPath","getPackageVersion","packagePath","join","packageJson","JSON","parse","fs","readFileSync","version","printHelp","name","console","log","argv","cliName","options","getopts","alias","platform","arch","filename","installPath","storagePath","silent","help","boolean","exit","args","_","length","install","err","result","message"],"mappings":";;;;+BAoCA;;;eAAA;;;iEApCiB;yDACF;oEACK;2DACH;0DACD;8DAC6B;;;;;;AAE7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UK;QACVY,IAAAA,mBAAI,EAAC;QACL;IACF;IAEA,IAAMC,OAAOZ,QAAQa,CAAC;IACtB,IAAID,KAAKE,MAAM,GAAG,GAAG;QACnBlB,QAAQC,GAAG,CAAC,AAAC,mCAA0C,OAARE,SAAQ;QACvDY,IAAAA,mBAAI,EAACjC;QACL;IACF;IACAqC,IAAAA,gBAAO,EAACH,IAAI,CAAC,EAAE,EAAEZ,SAA2B,SAACgB,KAAKC;QAChD,IAAI,CAACjB,QAAQQ,MAAM,EAAE;YACnBZ,QAAQC,GAAG,CAAC;YACZ,IAAImB,KAAKpB,QAAQC,GAAG,CAAC,AAAC,GAAmCmB,OAAjCJ,IAAI,CAAC,EAAE,EAAC,2BAAqC,OAAZI,IAAIE,OAAO;iBAC/DtB,QAAQC,GAAG,CAAC,AAAC,GAAkCoB,OAAhCA,OAAOxB,OAAO,EAAC,mBAAoC,OAAnBwB,OAAOX,WAAW;YACtEV,QAAQC,GAAG,CAAC;QACd;QACAc,IAAAA,mBAAI,EAACK,MAAMtC,aAAa;IAC1B;AACF"}
package/dist/esm/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- import exit from 'exit';
1
+ import exit from 'exit-compat';
2
2
  import fs from 'fs';
3
3
  import getopts from 'getopts-compat';
4
4
  import path from 'path';
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.ts"],"sourcesContent":["import exit from 'exit';\nimport fs from 'fs';\nimport getopts from 'getopts-compat';\nimport path from 'path';\nimport url from 'url';\nimport install, { type InstallOptions } from './index.ts';\n\nconst ERROR_CODE = 9;\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\n\nfunction getPackageVersion(): string {\n const packagePath = path.join(__dirname, '..', '..', 'package.json');\n const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8'));\n return packageJson.version;\n}\n\nfunction printHelp(name: string): void {\n const version = getPackageVersion();\n console.log(`${name} v${version}`);\n console.log('');\n console.log(`Usage: ${name} <version> [options]`);\n console.log('');\n console.log('Arguments:');\n console.log(' version Node.js version to install (e.g., 18.0.0, lts, stable)');\n console.log('');\n console.log('Options:');\n console.log(' -p, --platform Target platform (default: current platform)');\n console.log(' -a, --arch Target architecture (default: current architecture)');\n console.log(' -f, --filename Specific filename to download');\n console.log(' -i, --installPath Installation directory');\n console.log(' -c, --storagePath Cache storage directory');\n console.log(' -si, --silent Suppress output');\n console.log(' -v, --version Show version number');\n console.log(' -h, --help Show this help message');\n}\n\nexport default (argv: string[], name?: string): undefined => {\n const cliName = name || 'nir';\n const options = getopts(argv, {\n alias: { platform: 'p', arch: 'a', filename: 'f', installPath: 'i', storagePath: 'c', silent: 'si', version: 'v', help: 'h' },\n boolean: ['silent', 'version', 'help'],\n });\n\n if (options.version) {\n console.log(getPackageVersion());\n exit(0);\n return;\n }\n\n if (options.help) {\n printHelp(cliName);\n exit(0);\n return;\n }\n\n const args = options._;\n if (args.length < 1) {\n console.log(`Missing command. Example usage: ${cliName} <version> [directory]`);\n exit(ERROR_CODE);\n return;\n }\n install(args[0], options as InstallOptions, (err, result) => {\n if (!options.silent) {\n console.log('\\n======================');\n if (err) console.log(`${args[0]} not installed. Error: ${err.message}`);\n else console.log(`${result.version} installed in: ${result.installPath}`);\n console.log('======================');\n }\n exit(err ? ERROR_CODE : 0);\n });\n};\n"],"names":["exit","fs","getopts","path","url","install","ERROR_CODE","__dirname","dirname","__filename","fileURLToPath","getPackageVersion","packagePath","join","packageJson","JSON","parse","readFileSync","version","printHelp","name","console","log","argv","cliName","options","alias","platform","arch","filename","installPath","storagePath","silent","help","boolean","args","_","length","err","result","message"],"mappings":"AAAA,OAAOA,UAAU,OAAO;AACxB,OAAOC,QAAQ,KAAK;AACpB,OAAOC,aAAa,iBAAiB;AACrC,OAAOC,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AACtB,OAAOC,aAAsC,aAAa;AAE1D,MAAMC,aAAa;AACnB,MAAMC,Y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V,QAAQW,CAAC;IACtB,IAAID,KAAKE,MAAM,GAAG,GAAG;QACnBhB,QAAQC,GAAG,CAAC,CAAC,gCAAgC,EAAEE,QAAQ,sBAAsB,CAAC;QAC9ExB,KAAKM;QACL;IACF;IACAD,QAAQ8B,IAAI,CAAC,EAAE,EAAEV,SAA2B,CAACa,KAAKC;QAChD,IAAI,CAACd,QAAQO,MAAM,EAAE;YACnBX,QAAQC,GAAG,CAAC;YACZ,IAAIgB,KAAKjB,QAAQC,GAAG,CAAC,GAAGa,IAAI,CAAC,EAAE,CAAC,uBAAuB,EAAEG,IAAIE,OAAO,EAAE;iBACjEnB,QAAQC,GAAG,CAAC,GAAGiB,OAAOrB,OAAO,CAAC,eAAe,EAAEqB,OAAOT,WAAW,EAAE;YACxET,QAAQC,GAAG,CAAC;QACd;QACAtB,KAAKsC,MAAMhC,aAAa;IAC1B;AACF,CAAA,EAAE"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-install-release/src/cli.ts"],"sourcesContent":["import exit from 'exit-compat';\nimport fs from 'fs';\nimport getopts from 'getopts-compat';\nimport path from 'path';\nimport url from 'url';\nimport install, { type InstallOptions } from './index.ts';\n\nconst ERROR_CODE = 9;\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\n\nfunction getPackageVersion(): string {\n const packagePath = path.join(__dirname, '..', '..', 'package.json');\n const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8'));\n return packageJson.version;\n}\n\nfunction printHelp(name: string): void {\n const version = getPackageVersion();\n console.log(`${name} v${version}`);\n console.log('');\n console.log(`Usage: ${name} <version> [options]`);\n console.log('');\n console.log('Arguments:');\n console.log(' version Node.js version to install (e.g., 18.0.0, lts, stable)');\n console.log('');\n console.log('Options:');\n console.log(' -p, --platform Target platform (default: current platform)');\n console.log(' -a, --arch Target architecture (default: current architecture)');\n console.log(' -f, --filename Specific filename to download');\n console.log(' -i, --installPath Installation directory');\n console.log(' -c, --storagePath Cache storage directory');\n console.log(' -si, --silent Suppress output');\n console.log(' -v, --version Show version number');\n console.log(' -h, --help Show this help message');\n}\n\nexport default (argv: string[], name?: string): undefined => {\n const cliName = name || 'nir';\n const options = getopts(argv, {\n alias: { platform: 'p', arch: 'a', filename: 'f', installPath: 'i', storagePath: 'c', silent: 'si', version: 'v', help: 'h' },\n boolean: ['silent', 'version', 'help'],\n });\n\n if (options.version) {\n console.log(getPackageVersion());\n exit(0);\n return;\n }\n\n if (options.help) {\n printHelp(cliName);\n exit(0);\n return;\n }\n\n const args = options._;\n if (args.length < 1) {\n console.log(`Missing command. Example usage: ${cliName} <version> [directory]`);\n exit(ERROR_CODE);\n return;\n }\n install(args[0], options as InstallOptions, (err, result) => {\n if (!options.silent) {\n console.log('\\n======================');\n if (err) console.log(`${args[0]} not installed. Error: ${err.message}`);\n else console.log(`${result.version} installed in: ${result.installPath}`);\n console.log('======================');\n }\n exit(err ? ERROR_CODE : 0);\n });\n};\n"],"names":["exit","fs","getopts","path","url","install","ERROR_CODE","__dirname","dirname","__filename","fileURLToPath","getPackageVersion","packagePath","join","packageJson","JSON","parse","readFileSync","version","printHelp","name","console","log","argv","cliName","options","alias","platform","arch","filename","installPath","storagePath","silent","help","boolean","args","_","length","err","result","message"],"mappings":"AAAA,OAAOA,UAAU,cAAc;AAC/B,OAAOC,QAAQ,KAAK;AACpB,OAAOC,aAAa,iBAAiB;AACrC,OAAOC,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AACtB,OAAOC,aAAsC,aAAa;AAE1D,MAAMC,aAAa;AACnB,MAAMC,YAAYJ,KAAKK,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaL,IAAIM,aAAa,CAAC,YAAYN,GAAG;AAEjH,SAASO;IACP,MAAMC,cAAcT,KAAKU,IAAI,CAACN,WAAW,MAAM,MAAM;IACrD,MAAMO,cAAcC,KAAKC,KAAK,CAACf,GAAGgB,YAAY,CAACL,aAAa;IAC5D,OAAOE,YAAY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,EAAE;YACnBX,QAAQC,GAAG,CAAC;YACZ,IAAIgB,KAAKjB,QAAQC,GAAG,CAAC,GAAGa,IAAI,CAAC,EAAE,CAAC,uBAAuB,EAAEG,IAAIE,OAAO,EAAE;iBACjEnB,QAAQC,GAAG,CAAC,GAAGiB,OAAOrB,OAAO,CAAC,eAAe,EAAEqB,OAAOT,WAAW,EAAE;YACxET,QAAQC,GAAG,CAAC;QACd;QACAtB,KAAKsC,MAAMhC,aAAa;IAC1B;AACF,CAAA,EAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-install-release",
3
- "version": "1.15.7",
3
+ "version": "1.15.8",
4
4
  "description": "Cross-platform solution for installing releases of Node.js",
5
5
  "keywords": [
6
6
  "node",
@@ -44,34 +44,34 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "cpu-arch": "^1.0.4",
47
- "cross-spawn-cb": "*",
48
- "exit": "*",
49
- "fast-extract": "*",
50
- "fs-copy-compat": "*",
51
- "fs-remove-compat": "*",
52
- "get-remote": "*",
53
- "getopts-compat": "*",
54
- "homedir-polyfill": "*",
55
- "is-version": "*",
56
- "lodash.keys": "*",
57
- "mkdirp-classic": "*",
58
- "node-filename-to-dist-paths": "*",
59
- "node-resolve-versions": "*",
60
- "on-one": "*",
61
- "queue-cb": "*"
47
+ "cross-spawn-cb": "^2.4.10",
48
+ "exit-compat": "^1.0.0",
49
+ "fast-extract": "^1.8.13",
50
+ "fs-copy-compat": "^0.1.3",
51
+ "fs-remove-compat": "^0.2.1",
52
+ "get-remote": "^2.3.0",
53
+ "getopts-compat": "^2.2.6",
54
+ "homedir-polyfill": "^1.0.3",
55
+ "is-version": "^1.0.7",
56
+ "lodash.keys": "^4.2.0",
57
+ "mkdirp-classic": "^0.5.3",
58
+ "node-filename-to-dist-paths": "^1.3.11",
59
+ "node-resolve-versions": "^1.3.11",
60
+ "on-one": "^1.0.8",
61
+ "queue-cb": "^1.6.1"
62
62
  },
63
63
  "devDependencies": {
64
- "@types/mocha": "*",
65
- "@types/node": "*",
66
- "cr": "*",
67
- "lodash.find": "*",
68
- "lodash.values": "*",
69
- "node-version-compare": "*",
70
- "node-version-use": "*",
71
- "node-version-utils": "*",
72
- "pinkie-promise": "*",
73
- "ts-dev-stack": "*",
74
- "tsds-config": "*"
64
+ "@types/mocha": "^10.0.10",
65
+ "@types/node": "^25.0.0",
66
+ "cr": "^0.1.0",
67
+ "lodash.find": "^4.6.0",
68
+ "lodash.values": "^4.3.0",
69
+ "node-version-compare": "^1.0.3",
70
+ "node-version-use": "^2.1.0",
71
+ "node-version-utils": "^1.3.15",
72
+ "pinkie-promise": "^2.0.1",
73
+ "ts-dev-stack": "^1.21.2",
74
+ "tsds-config": "^0.2.0"
75
75
  },
76
76
  "engines": {
77
77
  "node": ">=0.8"