install-module-linked-compat 0.2.0 → 0.2.1

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.
@@ -1,9 +1,10 @@
1
1
  import type { CleanOptions, InstallCallback, InstallOptions } from 'install-module-linked';
2
- import { install, parseInstallString } from 'install-module-linked';
2
+ import { parseInstallString } from 'install-module-linked';
3
3
  export type * from 'install-module-linked';
4
4
  export default function installModule(installString: string, nodeModulesPath: string, callback: InstallCallback): void;
5
5
  export default function installModule(installString: string, nodeModulesPath: string, options: InstallOptions, callback: InstallCallback): void;
6
6
  export default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions): Promise<string>;
7
7
  export declare function sync(installString: string, nodeModulesPath: string, options?: InstallOptions): string | undefined;
8
8
  export declare function clear(options?: CleanOptions): void;
9
- export { install, parseInstallString };
9
+ export declare function install(specifier: string, dest: string, options: InstallOptions, callback: InstallCallback): void;
10
+ export { parseInstallString };
@@ -1,9 +1,10 @@
1
1
  import type { CleanOptions, InstallCallback, InstallOptions } from 'install-module-linked';
2
- import { install, parseInstallString } from 'install-module-linked';
2
+ import { parseInstallString } from 'install-module-linked';
3
3
  export type * from 'install-module-linked';
4
4
  export default function installModule(installString: string, nodeModulesPath: string, callback: InstallCallback): void;
5
5
  export default function installModule(installString: string, nodeModulesPath: string, options: InstallOptions, callback: InstallCallback): void;
6
6
  export default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions): Promise<string>;
7
7
  export declare function sync(installString: string, nodeModulesPath: string, options?: InstallOptions): string | undefined;
8
8
  export declare function clear(options?: CleanOptions): void;
9
- export { install, parseInstallString };
9
+ export declare function install(specifier: string, dest: string, options: InstallOptions, callback: InstallCallback): void;
10
+ export { parseInstallString };
package/dist/cjs/index.js CHANGED
@@ -16,7 +16,7 @@ _export(exports, {
16
16
  return installModule;
17
17
  },
18
18
  get install () {
19
- return _installmodulelinked.install;
19
+ return install;
20
20
  },
21
21
  get parseInstallString () {
22
22
  return _installmodulelinked.parseInstallString;
@@ -101,4 +101,7 @@ function sync(installString, nodeModulesPath, options) {
101
101
  function clear(options) {
102
102
  (0, _installmodulelinked.clear)(_object_spread({}, _compatts.default, options));
103
103
  }
104
+ function install(specifier, dest, options, callback) {
105
+ (0, _installmodulelinked.install)(specifier, dest, _object_spread({}, _compatts.default, options), callback);
106
+ }
104
107
  /* 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/install-module-linked-compat/src/index.ts"],"sourcesContent":["import type { CleanOptions, InstallCallback, InstallOptions } from 'install-module-linked';\nimport installModuleCore, { clear as clearCore, install, parseInstallString, sync as syncCore } from 'install-module-linked';\nimport overlay from './compat.ts';\n\nexport type * from 'install-module-linked';\n\n// Identical API to install-module-linked; the overlay supplies the shims the\n// running node lacks (empty on Node >= 18), and user options always win.\n\nexport default function installModule(installString: string, nodeModulesPath: string, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options: InstallOptions, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions): Promise<string>;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions | InstallCallback, callback?: InstallCallback): void | Promise<string> {\n const userOptions = typeof options === 'function' ? {} : options || {};\n const userCallback = typeof options === 'function' ? options : callback;\n const merged = { ...overlay, ...userOptions };\n if (typeof userCallback === 'function') return installModuleCore(installString, nodeModulesPath, merged, userCallback);\n return installModuleCore(installString, nodeModulesPath, merged);\n}\n\nexport function sync(installString: string, nodeModulesPath: string, options?: InstallOptions): string | undefined {\n return syncCore(installString, nodeModulesPath, { ...overlay, ...options });\n}\n\nexport function clear(options?: CleanOptions): void {\n clearCore({ ...overlay, ...options });\n}\n\nexport { install, parseInstallString };\n"],"names":["clear","installModule","install","parseInstallString","sync","installString","nodeModulesPath","options","callback","userOptions","userCallback","merged","overlay","installModuleCore","syncCore","clearCore"],"mappings":";;;;;;;;;;;QAwBgBA;eAAAA;;QAZhB;eAAwBC;;QAgBfC;eAAAA,4BAAO;;QAAEC;eAAAA,uCAAkB;;QARpBC;eAAAA;;;2EAnBqF;+DACjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUL,SAASH,cAAcI,aAAqB,EAAEC,eAAuB,EAAEC,OAA0C,EAAEC,QAA0B;IAC1J,IAAMC,cAAc,OAAOF,YAAY,aAAa,CAAC,IAAIA,WAAW,CAAC;IACrE,IAAMG,eAAe,OAAOH,YAAY,aAAaA,UAAUC;IAC/D,IAAMG,SAAS,mBAAKC,iBAAO,EAAKH;IAChC,IAAI,OAAOC,iBAAiB,YAAY,OAAOG,IAAAA,4BAAiB,EAACR,eAAeC,iBAAiBK,QAAQD;IACzG,OAAOG,IAAAA,4BAAiB,EAACR,eAAeC,iBAAiBK;AAC3D;AAEO,SAASP,KAAKC,aAAqB,EAAEC,eAAuB,EAAEC,OAAwB;IAC3F,OAAOO,IAAAA,yBAAQ,EAACT,eAAeC,iBAAiB,mBAAKM,iBAAO,EAAKL;AACnE;AAEO,SAASP,MAAMO,OAAsB;IAC1CQ,IAAAA,0BAAS,EAAC,mBAAKH,iBAAO,EAAKL;AAC7B"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/install-module-linked-compat/src/index.ts"],"sourcesContent":["import type { CleanOptions, InstallCallback, InstallOptions } from 'install-module-linked';\nimport installModuleCore, { clear as clearCore, install as installCore, parseInstallString, sync as syncCore } from 'install-module-linked';\nimport overlay from './compat.ts';\n\nexport type * from 'install-module-linked';\n\n// Identical API to install-module-linked; the overlay supplies the shims the\n// running node lacks (empty on Node >= 18), and user options always win.\n\nexport default function installModule(installString: string, nodeModulesPath: string, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options: InstallOptions, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions): Promise<string>;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions | InstallCallback, callback?: InstallCallback): void | Promise<string> {\n const userOptions = typeof options === 'function' ? {} : options || {};\n const userCallback = typeof options === 'function' ? options : callback;\n const merged = { ...overlay, ...userOptions };\n if (typeof userCallback === 'function') return installModuleCore(installString, nodeModulesPath, merged, userCallback);\n return installModuleCore(installString, nodeModulesPath, merged);\n}\n\nexport function sync(installString: string, nodeModulesPath: string, options?: InstallOptions): string | undefined {\n return syncCore(installString, nodeModulesPath, { ...overlay, ...options });\n}\n\nexport function clear(options?: CleanOptions): void {\n clearCore({ ...overlay, ...options });\n}\n\nexport function install(specifier: string, dest: string, options: InstallOptions, callback: InstallCallback): void {\n installCore(specifier, dest, { ...overlay, ...options }, callback);\n}\n\nexport { parseInstallString };\n"],"names":["clear","installModule","install","parseInstallString","sync","installString","nodeModulesPath","options","callback","userOptions","userCallback","merged","overlay","installModuleCore","syncCore","clearCore","specifier","dest","installCore"],"mappings":";;;;;;;;;;;QAwBgBA;eAAAA;;QAZhB;eAAwBC;;QAgBRC;eAAAA;;QAIPC;eAAAA,uCAAkB;;QAZXC;eAAAA;;;2EAnBoG;+DAChG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUL,SAASH,cAAcI,aAAqB,EAAEC,eAAuB,EAAEC,OAA0C,EAAEC,QAA0B;IAC1J,IAAMC,cAAc,OAAOF,YAAY,aAAa,CAAC,IAAIA,WAAW,CAAC;IACrE,IAAMG,eAAe,OAAOH,YAAY,aAAaA,UAAUC;IAC/D,IAAMG,SAAS,mBAAKC,iBAAO,EAAKH;IAChC,IAAI,OAAOC,iBAAiB,YAAY,OAAOG,IAAAA,4BAAiB,EAACR,eAAeC,iBAAiBK,QAAQD;IACzG,OAAOG,IAAAA,4BAAiB,EAACR,eAAeC,iBAAiBK;AAC3D;AAEO,SAASP,KAAKC,aAAqB,EAAEC,eAAuB,EAAEC,OAAwB;IAC3F,OAAOO,IAAAA,yBAAQ,EAACT,eAAeC,iBAAiB,mBAAKM,iBAAO,EAAKL;AACnE;AAEO,SAASP,MAAMO,OAAsB;IAC1CQ,IAAAA,0BAAS,EAAC,mBAAKH,iBAAO,EAAKL;AAC7B;AAEO,SAASL,QAAQc,SAAiB,EAAEC,IAAY,EAAEV,OAAuB,EAAEC,QAAyB;IACzGU,IAAAA,4BAAW,EAACF,WAAWC,MAAM,mBAAKL,iBAAO,EAAKL,UAAWC;AAC3D"}
@@ -1,9 +1,10 @@
1
1
  import type { CleanOptions, InstallCallback, InstallOptions } from 'install-module-linked';
2
- import { install, parseInstallString } from 'install-module-linked';
2
+ import { parseInstallString } from 'install-module-linked';
3
3
  export type * from 'install-module-linked';
4
4
  export default function installModule(installString: string, nodeModulesPath: string, callback: InstallCallback): void;
5
5
  export default function installModule(installString: string, nodeModulesPath: string, options: InstallOptions, callback: InstallCallback): void;
6
6
  export default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions): Promise<string>;
7
7
  export declare function sync(installString: string, nodeModulesPath: string, options?: InstallOptions): string | undefined;
8
8
  export declare function clear(options?: CleanOptions): void;
9
- export { install, parseInstallString };
9
+ export declare function install(specifier: string, dest: string, options: InstallOptions, callback: InstallCallback): void;
10
+ export { parseInstallString };
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import installModuleCore, { clear as clearCore, install, parseInstallString, sync as syncCore } from 'install-module-linked';
1
+ import installModuleCore, { clear as clearCore, install as installCore, parseInstallString, sync as syncCore } from 'install-module-linked';
2
2
  import overlay from './compat.js';
3
3
  export default function installModule(installString, nodeModulesPath, options, callback) {
4
4
  const userOptions = typeof options === 'function' ? {} : options || {};
@@ -22,4 +22,10 @@ export function clear(options) {
22
22
  ...options
23
23
  });
24
24
  }
25
- export { install, parseInstallString };
25
+ export function install(specifier, dest, options, callback) {
26
+ installCore(specifier, dest, {
27
+ ...overlay,
28
+ ...options
29
+ }, callback);
30
+ }
31
+ export { parseInstallString };
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/install-module-linked-compat/src/index.ts"],"sourcesContent":["import type { CleanOptions, InstallCallback, InstallOptions } from 'install-module-linked';\nimport installModuleCore, { clear as clearCore, install, parseInstallString, sync as syncCore } from 'install-module-linked';\nimport overlay from './compat.ts';\n\nexport type * from 'install-module-linked';\n\n// Identical API to install-module-linked; the overlay supplies the shims the\n// running node lacks (empty on Node >= 18), and user options always win.\n\nexport default function installModule(installString: string, nodeModulesPath: string, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options: InstallOptions, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions): Promise<string>;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions | InstallCallback, callback?: InstallCallback): void | Promise<string> {\n const userOptions = typeof options === 'function' ? {} : options || {};\n const userCallback = typeof options === 'function' ? options : callback;\n const merged = { ...overlay, ...userOptions };\n if (typeof userCallback === 'function') return installModuleCore(installString, nodeModulesPath, merged, userCallback);\n return installModuleCore(installString, nodeModulesPath, merged);\n}\n\nexport function sync(installString: string, nodeModulesPath: string, options?: InstallOptions): string | undefined {\n return syncCore(installString, nodeModulesPath, { ...overlay, ...options });\n}\n\nexport function clear(options?: CleanOptions): void {\n clearCore({ ...overlay, ...options });\n}\n\nexport { install, parseInstallString };\n"],"names":["installModuleCore","clear","clearCore","install","parseInstallString","sync","syncCore","overlay","installModule","installString","nodeModulesPath","options","callback","userOptions","userCallback","merged"],"mappings":"AACA,OAAOA,qBAAqBC,SAASC,SAAS,EAAEC,OAAO,EAAEC,kBAAkB,EAAEC,QAAQC,QAAQ,QAAQ,wBAAwB;AAC7H,OAAOC,aAAa,cAAc;AAUlC,eAAe,SAASC,cAAcC,aAAqB,EAAEC,eAAuB,EAAEC,OAA0C,EAAEC,QAA0B;IAC1J,MAAMC,cAAc,OAAOF,YAAY,aAAa,CAAC,IAAIA,WAAW,CAAC;IACrE,MAAMG,eAAe,OAAOH,YAAY,aAAaA,UAAUC;IAC/D,MAAMG,SAAS;QAAE,GAAGR,OAAO;QAAE,GAAGM,WAAW;IAAC;IAC5C,IAAI,OAAOC,iBAAiB,YAAY,OAAOd,kBAAkBS,eAAeC,iBAAiBK,QAAQD;IACzG,OAAOd,kBAAkBS,eAAeC,iBAAiBK;AAC3D;AAEA,OAAO,SAASV,KAAKI,aAAqB,EAAEC,eAAuB,EAAEC,OAAwB;IAC3F,OAAOL,SAASG,eAAeC,iBAAiB;QAAE,GAAGH,OAAO;QAAE,GAAGI,OAAO;IAAC;AAC3E;AAEA,OAAO,SAASV,MAAMU,OAAsB;IAC1CT,UAAU;QAAE,GAAGK,OAAO;QAAE,GAAGI,OAAO;IAAC;AACrC;AAEA,SAASR,OAAO,EAAEC,kBAAkB,GAAG"}
1
+ {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/install-module-linked-compat/src/index.ts"],"sourcesContent":["import type { CleanOptions, InstallCallback, InstallOptions } from 'install-module-linked';\nimport installModuleCore, { clear as clearCore, install as installCore, parseInstallString, sync as syncCore } from 'install-module-linked';\nimport overlay from './compat.ts';\n\nexport type * from 'install-module-linked';\n\n// Identical API to install-module-linked; the overlay supplies the shims the\n// running node lacks (empty on Node >= 18), and user options always win.\n\nexport default function installModule(installString: string, nodeModulesPath: string, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options: InstallOptions, callback: InstallCallback): void;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions): Promise<string>;\nexport default function installModule(installString: string, nodeModulesPath: string, options?: InstallOptions | InstallCallback, callback?: InstallCallback): void | Promise<string> {\n const userOptions = typeof options === 'function' ? {} : options || {};\n const userCallback = typeof options === 'function' ? options : callback;\n const merged = { ...overlay, ...userOptions };\n if (typeof userCallback === 'function') return installModuleCore(installString, nodeModulesPath, merged, userCallback);\n return installModuleCore(installString, nodeModulesPath, merged);\n}\n\nexport function sync(installString: string, nodeModulesPath: string, options?: InstallOptions): string | undefined {\n return syncCore(installString, nodeModulesPath, { ...overlay, ...options });\n}\n\nexport function clear(options?: CleanOptions): void {\n clearCore({ ...overlay, ...options });\n}\n\nexport function install(specifier: string, dest: string, options: InstallOptions, callback: InstallCallback): void {\n installCore(specifier, dest, { ...overlay, ...options }, callback);\n}\n\nexport { parseInstallString };\n"],"names":["installModuleCore","clear","clearCore","install","installCore","parseInstallString","sync","syncCore","overlay","installModule","installString","nodeModulesPath","options","callback","userOptions","userCallback","merged","specifier","dest"],"mappings":"AACA,OAAOA,qBAAqBC,SAASC,SAAS,EAAEC,WAAWC,WAAW,EAAEC,kBAAkB,EAAEC,QAAQC,QAAQ,QAAQ,wBAAwB;AAC5I,OAAOC,aAAa,cAAc;AAUlC,eAAe,SAASC,cAAcC,aAAqB,EAAEC,eAAuB,EAAEC,OAA0C,EAAEC,QAA0B;IAC1J,MAAMC,cAAc,OAAOF,YAAY,aAAa,CAAC,IAAIA,WAAW,CAAC;IACrE,MAAMG,eAAe,OAAOH,YAAY,aAAaA,UAAUC;IAC/D,MAAMG,SAAS;QAAE,GAAGR,OAAO;QAAE,GAAGM,WAAW;IAAC;IAC5C,IAAI,OAAOC,iBAAiB,YAAY,OAAOf,kBAAkBU,eAAeC,iBAAiBK,QAAQD;IACzG,OAAOf,kBAAkBU,eAAeC,iBAAiBK;AAC3D;AAEA,OAAO,SAASV,KAAKI,aAAqB,EAAEC,eAAuB,EAAEC,OAAwB;IAC3F,OAAOL,SAASG,eAAeC,iBAAiB;QAAE,GAAGH,OAAO;QAAE,GAAGI,OAAO;IAAC;AAC3E;AAEA,OAAO,SAASX,MAAMW,OAAsB;IAC1CV,UAAU;QAAE,GAAGM,OAAO;QAAE,GAAGI,OAAO;IAAC;AACrC;AAEA,OAAO,SAAST,QAAQc,SAAiB,EAAEC,IAAY,EAAEN,OAAuB,EAAEC,QAAyB;IACzGT,YAAYa,WAAWC,MAAM;QAAE,GAAGV,OAAO;QAAE,GAAGI,OAAO;IAAC,GAAGC;AAC3D;AAEA,SAASR,kBAAkB,GAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "install-module-linked-compat",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Installs and symlinks a module into node_modules",
5
5
  "keywords": [
6
6
  "npm",
@@ -57,7 +57,7 @@
57
57
  "get-file-compat": "^2.0.0",
58
58
  "getopts-compat": "^2.2.5",
59
59
  "homedir-polyfill": "^1.0.3",
60
- "install-module-linked": "^2.0.1",
60
+ "install-module-linked": "^2.0.2",
61
61
  "mkdirp-classic": "^0.5.2",
62
62
  "node-version-call-local": "^1.0.0"
63
63
  },