install-module-linked-compat 0.2.0 → 0.2.2
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/index.d.cts +3 -2
- package/dist/cjs/index.d.ts +3 -2
- package/dist/cjs/index.js +6 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.d.ts +3 -2
- package/dist/esm/index.js +10 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { CleanOptions, InstallCallback, InstallOptions } from 'install-module-linked';
|
|
2
|
-
import {
|
|
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
|
|
9
|
+
export declare function install(specifier: string, dest: string, options: InstallOptions, callback: InstallCallback): void;
|
|
10
|
+
export { parseInstallString };
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { CleanOptions, InstallCallback, InstallOptions } from 'install-module-linked';
|
|
2
|
-
import {
|
|
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
|
|
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
|
|
19
|
+
return install;
|
|
20
20
|
},
|
|
21
21
|
get parseInstallString () {
|
|
22
22
|
return _installmodulelinked.parseInstallString;
|
|
@@ -101,4 +101,9 @@ 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
|
+
callback = typeof options === 'function' ? options : callback;
|
|
106
|
+
options = typeof options === 'function' ? {} : options || {};
|
|
107
|
+
(0, _installmodulelinked.install)(specifier, dest, _object_spread({}, _compatts.default, options), callback);
|
|
108
|
+
}
|
|
104
109
|
/* 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; }
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -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
|
|
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;\nexport function install(specifier: string, dest: string, options?: InstallOptions, callback?: InstallCallback): void {\n callback = typeof options === 'function' ? options : (callback as InstallCallback);\n options = typeof options === 'function' ? {} : ((options || {}) as InstallOptions);\n\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;;QAiBRC;eAAAA;;QAOPC;eAAAA,uCAAkB;;QAhBXC;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;AAGO,SAASL,QAAQc,SAAiB,EAAEC,IAAY,EAAEV,OAAwB,EAAEC,QAA0B;IAC3GA,WAAW,OAAOD,YAAY,aAAaA,UAAWC;IACtDD,UAAU,OAAOA,YAAY,aAAa,CAAC,IAAMA,WAAW,CAAC;IAE7DW,IAAAA,4BAAW,EAACF,WAAWC,MAAM,mBAAKL,iBAAO,EAAKL,UAAWC;AAC3D"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { CleanOptions, InstallCallback, InstallOptions } from 'install-module-linked';
|
|
2
|
-
import {
|
|
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
|
|
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,12 @@ export function clear(options) {
|
|
|
22
22
|
...options
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
export
|
|
25
|
+
export function install(specifier, dest, options, callback) {
|
|
26
|
+
callback = typeof options === 'function' ? options : callback;
|
|
27
|
+
options = typeof options === 'function' ? {} : options || {};
|
|
28
|
+
installCore(specifier, dest, {
|
|
29
|
+
...overlay,
|
|
30
|
+
...options
|
|
31
|
+
}, callback);
|
|
32
|
+
}
|
|
33
|
+
export { parseInstallString };
|
package/dist/esm/index.js.map
CHANGED
|
@@ -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
|
|
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;\nexport function install(specifier: string, dest: string, options?: InstallOptions, callback?: InstallCallback): void {\n callback = typeof options === 'function' ? options : (callback as InstallCallback);\n options = typeof options === 'function' ? {} : ((options || {}) as InstallOptions);\n\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;AAGA,OAAO,SAAST,QAAQc,SAAiB,EAAEC,IAAY,EAAEN,OAAwB,EAAEC,QAA0B;IAC3GA,WAAW,OAAOD,YAAY,aAAaA,UAAWC;IACtDD,UAAU,OAAOA,YAAY,aAAa,CAAC,IAAMA,WAAW,CAAC;IAE7DR,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.
|
|
3
|
+
"version": "0.2.2",
|
|
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.
|
|
60
|
+
"install-module-linked": "^2.0.4",
|
|
61
61
|
"mkdirp-classic": "^0.5.2",
|
|
62
62
|
"node-version-call-local": "^1.0.0"
|
|
63
63
|
},
|