node-version-use 2.1.2 → 2.1.4
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/commands/setup.d.cts +3 -3
- package/dist/cjs/commands/setup.d.ts +3 -3
- package/dist/cjs/commands/setup.js +82 -3
- package/dist/cjs/commands/setup.js.map +1 -1
- package/dist/cjs/commands/which.js +11 -13
- package/dist/cjs/commands/which.js.map +1 -1
- package/dist/cjs/scripts/postinstall.d.cts +12 -0
- package/dist/cjs/scripts/postinstall.d.ts +12 -0
- package/dist/cjs/scripts/postinstall.js +428 -0
- package/dist/cjs/scripts/postinstall.js.map +1 -0
- package/dist/esm/commands/setup.d.ts +3 -3
- package/dist/esm/commands/setup.js +83 -4
- package/dist/esm/commands/setup.js.map +1 -1
- package/dist/esm/commands/which.js +13 -15
- package/dist/esm/commands/which.js.map +1 -1
- package/dist/esm/scripts/postinstall.d.ts +12 -0
- package/dist/esm/scripts/postinstall.js +418 -0
- package/dist/esm/scripts/postinstall.js.map +1 -0
- package/package.json +4 -4
- package/scripts/postinstall.cjs +6 -459
|
@@ -2,6 +2,7 @@ import exit from 'exit-compat';
|
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { storagePath } from '../constants.js';
|
|
5
|
+
import { findInstalledVersions } from '../lib/findInstalledVersions.js';
|
|
5
6
|
/**
|
|
6
7
|
* nvu which
|
|
7
8
|
*
|
|
@@ -20,23 +21,20 @@ import { storagePath } from '../constants.js';
|
|
|
20
21
|
exit(1);
|
|
21
22
|
return;
|
|
22
23
|
}
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
actualVersionPath = versionPathWithV;
|
|
33
|
-
} else if (fs.existsSync(versionPathWithoutV)) {
|
|
34
|
-
actualVersionPath = versionPathWithoutV;
|
|
24
|
+
// Resolve partial version to exact installed version
|
|
25
|
+
var versionsPath = path.join(storagePath, 'installed');
|
|
26
|
+
var matches = findInstalledVersions(versionsPath, version);
|
|
27
|
+
var resolvedVersion = matches.length > 0 ? matches[matches.length - 1] : null;
|
|
28
|
+
// Display version (show resolution if different)
|
|
29
|
+
if (resolvedVersion && resolvedVersion !== version && resolvedVersion !== `v${version}`) {
|
|
30
|
+
console.log(`Version: ${version} \u2192 ${resolvedVersion}`);
|
|
31
|
+
} else {
|
|
32
|
+
console.log(`Version: ${resolvedVersion || version}`);
|
|
35
33
|
}
|
|
36
|
-
console.log(`Version: ${version}`);
|
|
37
34
|
console.log(`Source: ${getVersionSource(cwd)}`);
|
|
38
|
-
if (
|
|
39
|
-
|
|
35
|
+
if (resolvedVersion) {
|
|
36
|
+
var actualVersionPath = path.join(versionsPath, resolvedVersion);
|
|
37
|
+
var nodePath = path.join(actualVersionPath, 'bin', 'node');
|
|
40
38
|
console.log(`Binary: ${nodePath}`);
|
|
41
39
|
if (fs.existsSync(nodePath)) {
|
|
42
40
|
console.log('Status: Installed');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-version-use/src/commands/which.ts"],"sourcesContent":["import exit from 'exit-compat';\nimport fs from 'fs';\nimport path from 'path';\nimport { storagePath } from '../constants.ts';\n\n/**\n * nvu which\n *\n * Show which Node binary would be used based on current directory.\n * This simulates what the nvu binary would do.\n */\nexport default function whichCmd(_args: string[]): void {\n const cwd = process.cwd();\n\n // Resolve version using the same logic as the nvu binary\n const version = resolveVersion(cwd);\n\n if (!version) {\n console.log('No Node version configured for this directory.');\n console.log('');\n console.log('To configure a version:');\n console.log(' nvu local <version> - Set version for this project');\n console.log(' nvu default <version> - Set global default');\n exit(1);\n return;\n }\n\n //
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-version-use/src/commands/which.ts"],"sourcesContent":["import exit from 'exit-compat';\nimport fs from 'fs';\nimport path from 'path';\nimport { storagePath } from '../constants.ts';\nimport { findInstalledVersions } from '../lib/findInstalledVersions.ts';\n\n/**\n * nvu which\n *\n * Show which Node binary would be used based on current directory.\n * This simulates what the nvu binary would do.\n */\nexport default function whichCmd(_args: string[]): void {\n const cwd = process.cwd();\n\n // Resolve version using the same logic as the nvu binary\n const version = resolveVersion(cwd);\n\n if (!version) {\n console.log('No Node version configured for this directory.');\n console.log('');\n console.log('To configure a version:');\n console.log(' nvu local <version> - Set version for this project');\n console.log(' nvu default <version> - Set global default');\n exit(1);\n return;\n }\n\n // Resolve partial version to exact installed version\n var versionsPath = path.join(storagePath, 'installed');\n var matches = findInstalledVersions(versionsPath, version);\n var resolvedVersion = matches.length > 0 ? matches[matches.length - 1] : null;\n\n // Display version (show resolution if different)\n if (resolvedVersion && resolvedVersion !== version && resolvedVersion !== `v${version}`) {\n console.log(`Version: ${version} \\u2192 ${resolvedVersion}`);\n } else {\n console.log(`Version: ${resolvedVersion || version}`);\n }\n console.log(`Source: ${getVersionSource(cwd)}`);\n\n if (resolvedVersion) {\n var actualVersionPath = path.join(versionsPath, resolvedVersion);\n var nodePath = path.join(actualVersionPath, 'bin', 'node');\n console.log(`Binary: ${nodePath}`);\n if (fs.existsSync(nodePath)) {\n console.log('Status: Installed');\n } else {\n console.log('Status: Directory exists but binary not found');\n }\n } else {\n console.log(`Status: Not installed (run: nvu install ${version})`);\n }\n\n exit(0);\n}\n\n/**\n * Resolve version from config files (mirrors nvu binary logic)\n */\nfunction resolveVersion(cwd: string): string | null {\n // Walk up directories looking for .nvurc or .nvmrc\n let dir = cwd;\n while (true) {\n // Check .nvurc first\n const nvurcPath = path.join(dir, '.nvurc');\n if (fs.existsSync(nvurcPath)) {\n return fs.readFileSync(nvurcPath, 'utf8').trim();\n }\n\n // Check .nvmrc\n const nvmrcPath = path.join(dir, '.nvmrc');\n if (fs.existsSync(nvmrcPath)) {\n return fs.readFileSync(nvmrcPath, 'utf8').trim();\n }\n\n // Move to parent\n const parent = path.dirname(dir);\n if (parent === dir) break;\n dir = parent;\n }\n\n // Check global default\n const defaultPath = path.join(storagePath, 'default');\n if (fs.existsSync(defaultPath)) {\n return fs.readFileSync(defaultPath, 'utf8').trim();\n }\n\n return null;\n}\n\n/**\n * Determine the source of the version (for display)\n */\nfunction getVersionSource(cwd: string): string {\n let dir = cwd;\n while (true) {\n const nvurcPath = path.join(dir, '.nvurc');\n if (fs.existsSync(nvurcPath)) {\n return nvurcPath;\n }\n\n const nvmrcPath = path.join(dir, '.nvmrc');\n if (fs.existsSync(nvmrcPath)) {\n return nvmrcPath;\n }\n\n const parent = path.dirname(dir);\n if (parent === dir) break;\n dir = parent;\n }\n\n const defaultPath = path.join(storagePath, 'default');\n if (fs.existsSync(defaultPath)) {\n return `${defaultPath} (global default)`;\n }\n\n return 'none';\n}\n"],"names":["exit","fs","path","storagePath","findInstalledVersions","whichCmd","_args","cwd","process","version","resolveVersion","console","log","versionsPath","join","matches","resolvedVersion","length","getVersionSource","actualVersionPath","nodePath","existsSync","dir","nvurcPath","readFileSync","trim","nvmrcPath","parent","dirname","defaultPath"],"mappings":"AAAA,OAAOA,UAAU,cAAc;AAC/B,OAAOC,QAAQ,KAAK;AACpB,OAAOC,UAAU,OAAO;AACxB,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,qBAAqB,QAAQ,kCAAkC;AAExE;;;;;CAKC,GACD,eAAe,SAASC,SAASC,KAAe;IAC9C,MAAMC,MAAMC,QAAQD,GAAG;IAEvB,yDAAyD;IACzD,MAAME,UAAUC,eAAeH;IAE/B,IAAI,CAACE,SAAS;QACZE,QAAQC,GAAG,CAAC;QACZD,QAAQC,GAAG,CAAC;QACZD,QAAQC,GAAG,CAAC;QACZD,QAAQC,GAAG,CAAC;QACZD,QAAQC,GAAG,CAAC;QACZZ,KAAK;QACL;IACF;IAEA,qDAAqD;IACrD,IAAIa,eAAeX,KAAKY,IAAI,CAACX,aAAa;IAC1C,IAAIY,UAAUX,sBAAsBS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;QACjB,MAAME,SAASzB,KAAK0B,OAAO,CAACN;QAC5B,IAAIK,WAAWL,KAAK;QACpBA,MAAMK;IACR;IAEA,uBAAuB;IACvB,MAAME,cAAc3B,KAAKY,IAAI,CAACX,aAAa;IAC3C,IAAIF,GAAGoB,UAAU,CAACQ,cAAc;QAC9B,OAAO5B,GAAGuB,YAAY,CAACK,aAAa,QAAQJ,IAAI;IAClD;IAEA,OAAO;AACT;AAEA;;CAEC,GACD,SAASP,iBAAiBX,GAAW;IACnC,IAAIe,MAAMf;IACV,MAAO,KAAM;QACX,MAAMgB,YAAYrB,KAAKY,IAAI,CAACQ,KAAK;QACjC,IAAIrB,GAAGoB,UAAU,CAACE,YAAY;YAC5B,OAAOA;QACT;QAEA,MAAMG,YAAYxB,KAAKY,IAAI,CAACQ,KAAK;QACjC,IAAIrB,GAAGoB,UAAU,CAACK,YAAY;YAC5B,OAAOA;QACT;QAEA,MAAMC,SAASzB,KAAK0B,OAAO,CAACN;QAC5B,IAAIK,WAAWL,KAAK;QACpBA,MAAMK;IACR;IAEA,MAAME,cAAc3B,KAAKY,IAAI,CAACX,aAAa;IAC3C,IAAIF,GAAGoB,UAAU,CAACQ,cAAc;QAC9B,OAAO,GAAGA,YAAY,iBAAiB,CAAC;IAC1C;IAEA,OAAO;AACT"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Postinstall script for node-version-use
|
|
3
|
+
*
|
|
4
|
+
* Downloads the platform-specific binary and installs it to ~/.nvu/bin/
|
|
5
|
+
* This enables transparent Node version switching.
|
|
6
|
+
*
|
|
7
|
+
* Uses safe atomic download pattern:
|
|
8
|
+
* 1. Download to temp file
|
|
9
|
+
* 2. Extract to temp directory
|
|
10
|
+
* 3. Atomic rename to final location
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Postinstall script for node-version-use
|
|
3
|
+
*
|
|
4
|
+
* Downloads the platform-specific binary and installs it to ~/.nvu/bin/
|
|
5
|
+
* This enables transparent Node version switching.
|
|
6
|
+
*
|
|
7
|
+
* Uses safe atomic download pattern:
|
|
8
|
+
* 1. Download to temp file
|
|
9
|
+
* 2. Extract to temp directory
|
|
10
|
+
* 3. Atomic rename to final location
|
|
11
|
+
*/ import { spawn } from 'child_process';
|
|
12
|
+
import exit from 'exit-compat';
|
|
13
|
+
import fs from 'fs';
|
|
14
|
+
import mkdirp from 'mkdirp-classic';
|
|
15
|
+
import Module from 'module';
|
|
16
|
+
import os from 'os';
|
|
17
|
+
import path from 'path';
|
|
18
|
+
import url from 'url';
|
|
19
|
+
import { homedir } from '../compat.js';
|
|
20
|
+
// CJS/ESM compatibility
|
|
21
|
+
const _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;
|
|
22
|
+
const __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));
|
|
23
|
+
// Configuration
|
|
24
|
+
const GITHUB_REPO = 'kmalakoff/node-version-use';
|
|
25
|
+
// Path is relative to dist/cjs/scripts/ at runtime
|
|
26
|
+
const BINARY_VERSION = _require(path.join(__dirname, '..', '..', '..', 'package.json')).binaryVersion;
|
|
27
|
+
/**
|
|
28
|
+
* Get the platform-specific archive base name (without extension)
|
|
29
|
+
*/ function getArchiveBaseName() {
|
|
30
|
+
const platform = os.platform();
|
|
31
|
+
const arch = os.arch();
|
|
32
|
+
const platformMap = {
|
|
33
|
+
darwin: 'darwin',
|
|
34
|
+
linux: 'linux',
|
|
35
|
+
win32: 'win32'
|
|
36
|
+
};
|
|
37
|
+
const archMap = {
|
|
38
|
+
x64: 'x64',
|
|
39
|
+
arm64: 'arm64',
|
|
40
|
+
amd64: 'x64'
|
|
41
|
+
};
|
|
42
|
+
const platformName = platformMap[platform];
|
|
43
|
+
const archName = archMap[arch];
|
|
44
|
+
if (!platformName || !archName) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return `nvu-binary-${platformName}-${archName}`;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Get the extracted binary name (includes .exe on Windows)
|
|
51
|
+
*/ function getExtractedBinaryName(archiveBaseName) {
|
|
52
|
+
const ext = os.platform() === 'win32' ? '.exe' : '';
|
|
53
|
+
return archiveBaseName + ext;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Get the download URL for the binary archive
|
|
57
|
+
*/ function getDownloadUrl(archiveBaseName) {
|
|
58
|
+
const ext = os.platform() === 'win32' ? '.zip' : '.tar.gz';
|
|
59
|
+
return `https://github.com/${GITHUB_REPO}/releases/download/binary-v${BINARY_VERSION}/${archiveBaseName}${ext}`;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Copy file
|
|
63
|
+
*/ function copyFileSync(src, dest) {
|
|
64
|
+
const content = fs.readFileSync(src);
|
|
65
|
+
fs.writeFileSync(dest, content);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Atomic rename with fallback to copy+delete for cross-device moves
|
|
69
|
+
*/ function atomicRename(src, dest, callback) {
|
|
70
|
+
fs.rename(src, dest, (err)=>{
|
|
71
|
+
if (!err) {
|
|
72
|
+
callback(null);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
// Cross-device link error - fall back to copy + delete
|
|
76
|
+
if (err.code === 'EXDEV') {
|
|
77
|
+
try {
|
|
78
|
+
copyFileSync(src, dest);
|
|
79
|
+
fs.unlinkSync(src);
|
|
80
|
+
callback(null);
|
|
81
|
+
} catch (copyErr) {
|
|
82
|
+
callback(copyErr);
|
|
83
|
+
}
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
callback(err);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Remove directory recursively
|
|
91
|
+
*/ function rmRecursive(dir) {
|
|
92
|
+
if (!fs.existsSync(dir)) return;
|
|
93
|
+
const files = fs.readdirSync(dir);
|
|
94
|
+
for(let i = 0; i < files.length; i++){
|
|
95
|
+
const filePath = path.join(dir, files[i]);
|
|
96
|
+
const stat = fs.statSync(filePath);
|
|
97
|
+
if (stat.isDirectory()) {
|
|
98
|
+
rmRecursive(filePath);
|
|
99
|
+
} else {
|
|
100
|
+
fs.unlinkSync(filePath);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
fs.rmdirSync(dir);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get temp directory
|
|
107
|
+
*/ function getTmpDir() {
|
|
108
|
+
return typeof os.tmpdir === 'function' ? os.tmpdir() : process.env.TMPDIR || process.env.TMP || process.env.TEMP || '/tmp';
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Download using curl (macOS, Linux, Windows 10+)
|
|
112
|
+
*/ function downloadWithCurl(downloadUrl, destPath, callback) {
|
|
113
|
+
const curl = spawn('curl', [
|
|
114
|
+
'-L',
|
|
115
|
+
'-f',
|
|
116
|
+
'-s',
|
|
117
|
+
'-o',
|
|
118
|
+
destPath,
|
|
119
|
+
downloadUrl
|
|
120
|
+
]);
|
|
121
|
+
curl.on('close', (code)=>{
|
|
122
|
+
if (code !== 0) {
|
|
123
|
+
// curl exit codes: 22 = HTTP error (4xx/5xx), 56 = receive error (often 404 with -f)
|
|
124
|
+
if (code === 22 || code === 56) {
|
|
125
|
+
callback(new Error('HTTP 404'));
|
|
126
|
+
} else {
|
|
127
|
+
callback(new Error(`curl failed with exit code ${code}`));
|
|
128
|
+
}
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
callback(null);
|
|
132
|
+
});
|
|
133
|
+
curl.on('error', (err)=>{
|
|
134
|
+
callback(err);
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Download using PowerShell (Windows 7+ fallback)
|
|
139
|
+
*/ function downloadWithPowerShell(downloadUrl, destPath, callback) {
|
|
140
|
+
const psCommand = `Invoke-WebRequest -Uri "${downloadUrl}" -OutFile "${destPath}" -UseBasicParsing`;
|
|
141
|
+
const ps = spawn('powershell', [
|
|
142
|
+
'-NoProfile',
|
|
143
|
+
'-Command',
|
|
144
|
+
psCommand
|
|
145
|
+
]);
|
|
146
|
+
ps.on('close', (code)=>{
|
|
147
|
+
if (code !== 0) {
|
|
148
|
+
callback(new Error(`PowerShell download failed with exit code ${code}`));
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
callback(null);
|
|
152
|
+
});
|
|
153
|
+
ps.on('error', (err)=>{
|
|
154
|
+
callback(err);
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Download a file - tries curl first, falls back to PowerShell on Windows
|
|
159
|
+
* Node 0.8's OpenSSL doesn't support TLS 1.2+ required by GitHub
|
|
160
|
+
*/ function downloadFile(downloadUrl, destPath, callback) {
|
|
161
|
+
downloadWithCurl(downloadUrl, destPath, (err)=>{
|
|
162
|
+
var _err_message;
|
|
163
|
+
if (!err) {
|
|
164
|
+
callback(null);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
// If curl failed and we're on Windows, try PowerShell
|
|
168
|
+
if (os.platform() === 'win32' && (err === null || err === void 0 ? void 0 : (_err_message = err.message) === null || _err_message === void 0 ? void 0 : _err_message.indexOf('ENOENT')) >= 0) {
|
|
169
|
+
downloadWithPowerShell(downloadUrl, destPath, callback);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
callback(err);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Extract archive to a directory (callback-based)
|
|
177
|
+
*/ function extractArchive(archivePath, destDir, callback) {
|
|
178
|
+
const platform = os.platform();
|
|
179
|
+
if (platform === 'win32') {
|
|
180
|
+
// Windows: extract zip using PowerShell
|
|
181
|
+
const ps = spawn('powershell', [
|
|
182
|
+
'-Command',
|
|
183
|
+
`Expand-Archive -Path '${archivePath}' -DestinationPath '${destDir}' -Force`
|
|
184
|
+
]);
|
|
185
|
+
ps.on('close', (code)=>{
|
|
186
|
+
if (code !== 0) {
|
|
187
|
+
callback(new Error('Failed to extract archive'));
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
callback(null);
|
|
191
|
+
});
|
|
192
|
+
} else {
|
|
193
|
+
// Unix: extract tar.gz
|
|
194
|
+
const tar = spawn('tar', [
|
|
195
|
+
'-xzf',
|
|
196
|
+
archivePath,
|
|
197
|
+
'-C',
|
|
198
|
+
destDir
|
|
199
|
+
]);
|
|
200
|
+
tar.on('close', (code)=>{
|
|
201
|
+
if (code !== 0) {
|
|
202
|
+
callback(new Error('Failed to extract archive'));
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
callback(null);
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Install binaries using atomic rename pattern
|
|
211
|
+
* 1. Extract to temp directory
|
|
212
|
+
* 2. Copy binary to temp files in destination directory
|
|
213
|
+
* 3. Atomic rename temp files to final names
|
|
214
|
+
*/ function extractAndInstall(archivePath, destDir, binaryName, callback) {
|
|
215
|
+
const platform = os.platform();
|
|
216
|
+
const isWindows = platform === 'win32';
|
|
217
|
+
const ext = isWindows ? '.exe' : '';
|
|
218
|
+
// Create temp extraction directory
|
|
219
|
+
const tempExtractDir = path.join(getTmpDir(), `nvu-extract-${Date.now()}`);
|
|
220
|
+
mkdirp.sync(tempExtractDir);
|
|
221
|
+
extractArchive(archivePath, tempExtractDir, (extractErr)=>{
|
|
222
|
+
if (extractErr) {
|
|
223
|
+
rmRecursive(tempExtractDir);
|
|
224
|
+
callback(extractErr);
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
const extractedPath = path.join(tempExtractDir, binaryName);
|
|
228
|
+
if (!fs.existsSync(extractedPath)) {
|
|
229
|
+
rmRecursive(tempExtractDir);
|
|
230
|
+
callback(new Error(`Extracted binary not found: ${binaryName}`));
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
// Binary names to install
|
|
234
|
+
const binaries = [
|
|
235
|
+
'node',
|
|
236
|
+
'npm',
|
|
237
|
+
'npx',
|
|
238
|
+
'corepack'
|
|
239
|
+
];
|
|
240
|
+
const timestamp = Date.now();
|
|
241
|
+
let installError = null;
|
|
242
|
+
// Step 1: Copy extracted binary to temp files in destination directory
|
|
243
|
+
// This ensures the temp files are on the same filesystem for atomic rename
|
|
244
|
+
for(let i = 0; i < binaries.length; i++){
|
|
245
|
+
const name = binaries[i];
|
|
246
|
+
const tempDest = path.join(destDir, `${name}.tmp-${timestamp}${ext}`);
|
|
247
|
+
try {
|
|
248
|
+
// Copy to temp file in destination directory
|
|
249
|
+
copyFileSync(extractedPath, tempDest);
|
|
250
|
+
// Set permissions on Unix
|
|
251
|
+
if (!isWindows) {
|
|
252
|
+
fs.chmodSync(tempDest, 0o755);
|
|
253
|
+
}
|
|
254
|
+
} catch (err) {
|
|
255
|
+
installError = err;
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (installError) {
|
|
260
|
+
// Clean up any temp files we created
|
|
261
|
+
for(let j = 0; j < binaries.length; j++){
|
|
262
|
+
const tempPath = path.join(destDir, `${binaries[j]}.tmp-${timestamp}${ext}`);
|
|
263
|
+
if (fs.existsSync(tempPath)) {
|
|
264
|
+
try {
|
|
265
|
+
fs.unlinkSync(tempPath);
|
|
266
|
+
} catch (_e) {
|
|
267
|
+
// ignore cleanup errors
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
rmRecursive(tempExtractDir);
|
|
272
|
+
callback(installError);
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
// Step 2: Atomic rename temp files to final names
|
|
276
|
+
let renameError = null;
|
|
277
|
+
function doRename(index) {
|
|
278
|
+
if (index >= binaries.length) {
|
|
279
|
+
// All renames complete
|
|
280
|
+
rmRecursive(tempExtractDir);
|
|
281
|
+
callback(renameError);
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
const name = binaries[index];
|
|
285
|
+
const tempDest = path.join(destDir, `${name}.tmp-${timestamp}${ext}`);
|
|
286
|
+
const finalDest = path.join(destDir, `${name}${ext}`);
|
|
287
|
+
// Remove existing file if present (for atomic replacement)
|
|
288
|
+
if (fs.existsSync(finalDest)) {
|
|
289
|
+
try {
|
|
290
|
+
fs.unlinkSync(finalDest);
|
|
291
|
+
} catch (_e) {
|
|
292
|
+
// ignore cleanup errors
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
atomicRename(tempDest, finalDest, (err)=>{
|
|
296
|
+
if (err && !renameError) {
|
|
297
|
+
renameError = err;
|
|
298
|
+
}
|
|
299
|
+
doRename(index + 1);
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
doRename(0);
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Print setup instructions
|
|
307
|
+
*/ function printInstructions(installed) {
|
|
308
|
+
const homedirPath = homedir();
|
|
309
|
+
const nvuBinPath = path.join(homedirPath, '.nvu', 'bin');
|
|
310
|
+
const platform = os.platform();
|
|
311
|
+
console.log('');
|
|
312
|
+
console.log('============================================================');
|
|
313
|
+
if (installed) {
|
|
314
|
+
console.log(' nvu binaries installed to ~/.nvu/bin/');
|
|
315
|
+
} else {
|
|
316
|
+
console.log(' nvu installed (binaries not yet available)');
|
|
317
|
+
}
|
|
318
|
+
console.log('============================================================');
|
|
319
|
+
console.log('');
|
|
320
|
+
console.log('To enable transparent Node version switching, add to your shell profile:');
|
|
321
|
+
console.log('');
|
|
322
|
+
if (platform === 'win32') {
|
|
323
|
+
console.log(' PowerShell (add to $PROFILE):');
|
|
324
|
+
console.log(` $env:PATH = "${nvuBinPath};$env:PATH"`);
|
|
325
|
+
console.log('');
|
|
326
|
+
console.log(' CMD (run as administrator):');
|
|
327
|
+
console.log(` setx PATH "${nvuBinPath};%PATH%"`);
|
|
328
|
+
} else {
|
|
329
|
+
console.log(' # For bash (~/.bashrc):');
|
|
330
|
+
console.log(' export PATH="$HOME/.nvu/bin:$PATH"');
|
|
331
|
+
console.log('');
|
|
332
|
+
console.log(' # For zsh (~/.zshrc):');
|
|
333
|
+
console.log(' export PATH="$HOME/.nvu/bin:$PATH"');
|
|
334
|
+
console.log('');
|
|
335
|
+
console.log(' # For fish (~/.config/fish/config.fish):');
|
|
336
|
+
console.log(' set -gx PATH $HOME/.nvu/bin $PATH');
|
|
337
|
+
}
|
|
338
|
+
console.log('');
|
|
339
|
+
console.log('Then restart your terminal or source your shell profile.');
|
|
340
|
+
console.log('');
|
|
341
|
+
console.log("Without this, 'nvu 18 npm test' still works - you just won't have");
|
|
342
|
+
console.log("transparent 'node' command override.");
|
|
343
|
+
console.log('============================================================');
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Main installation function
|
|
347
|
+
*/ function main() {
|
|
348
|
+
const archiveBaseName = getArchiveBaseName();
|
|
349
|
+
if (!archiveBaseName) {
|
|
350
|
+
console.log('postinstall: Unsupported platform/architecture for binary.');
|
|
351
|
+
console.log(`Platform: ${os.platform()}, Arch: ${os.arch()}`);
|
|
352
|
+
console.log('Binary not installed. You can still use nvu with explicit versions: nvu 18 npm test');
|
|
353
|
+
exit(0);
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
const extractedBinaryName = getExtractedBinaryName(archiveBaseName);
|
|
357
|
+
const homedirPath = homedir();
|
|
358
|
+
const nvuDir = path.join(homedirPath, '.nvu');
|
|
359
|
+
const binDir = path.join(nvuDir, 'bin');
|
|
360
|
+
// Create directories
|
|
361
|
+
mkdirp.sync(nvuDir);
|
|
362
|
+
mkdirp.sync(binDir);
|
|
363
|
+
const downloadUrl = getDownloadUrl(archiveBaseName);
|
|
364
|
+
const ext = os.platform() === 'win32' ? '.zip' : '.tar.gz';
|
|
365
|
+
const tempPath = path.join(getTmpDir(), `nvu-binary-${Date.now()}${ext}`);
|
|
366
|
+
console.log(`postinstall: Downloading binary for ${os.platform()}-${os.arch()}...`);
|
|
367
|
+
downloadFile(downloadUrl, tempPath, (downloadErr)=>{
|
|
368
|
+
if (downloadErr) {
|
|
369
|
+
var _downloadErr_message;
|
|
370
|
+
// Clean up temp file if it exists
|
|
371
|
+
if (fs.existsSync(tempPath)) {
|
|
372
|
+
try {
|
|
373
|
+
fs.unlinkSync(tempPath);
|
|
374
|
+
} catch (_e) {
|
|
375
|
+
// ignore cleanup errors
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
if (((_downloadErr_message = downloadErr.message) === null || _downloadErr_message === void 0 ? void 0 : _downloadErr_message.indexOf('404')) >= 0) {
|
|
379
|
+
console.log('postinstall: Binaries not yet published to GitHub releases.');
|
|
380
|
+
console.log('');
|
|
381
|
+
console.log('To build and install binaries locally:');
|
|
382
|
+
console.log(' cd node_modules/node-version-use/binary');
|
|
383
|
+
console.log(' make install');
|
|
384
|
+
console.log('');
|
|
385
|
+
console.log('Or wait for the next release which will include pre-built binaries.');
|
|
386
|
+
} else {
|
|
387
|
+
console.log(`postinstall warning: Failed to install binary: ${downloadErr.message || downloadErr}`);
|
|
388
|
+
console.log('You can still use nvu with explicit versions: nvu 18 npm test');
|
|
389
|
+
console.log('To install binaries manually: cd node_modules/node-version-use/binary && make install');
|
|
390
|
+
}
|
|
391
|
+
printInstructions(false);
|
|
392
|
+
exit(0);
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
console.log('postinstall: Extracting binary...');
|
|
396
|
+
extractAndInstall(tempPath, binDir, extractedBinaryName, (extractErr)=>{
|
|
397
|
+
// Clean up temp file
|
|
398
|
+
if (fs.existsSync(tempPath)) {
|
|
399
|
+
try {
|
|
400
|
+
fs.unlinkSync(tempPath);
|
|
401
|
+
} catch (_e) {
|
|
402
|
+
// ignore cleanup errors
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
if (extractErr) {
|
|
406
|
+
console.log(`postinstall warning: Failed to extract binary: ${extractErr.message || extractErr}`);
|
|
407
|
+
console.log('You can still use nvu with explicit versions: nvu 18 npm test');
|
|
408
|
+
printInstructions(false);
|
|
409
|
+
exit(0);
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
console.log('postinstall: Binary installed successfully!');
|
|
413
|
+
printInstructions(true);
|
|
414
|
+
exit(0);
|
|
415
|
+
});
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
main();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/node-version-use/src/scripts/postinstall.ts"],"sourcesContent":["/**\n * Postinstall script for node-version-use\n *\n * Downloads the platform-specific binary and installs it to ~/.nvu/bin/\n * This enables transparent Node version switching.\n *\n * Uses safe atomic download pattern:\n * 1. Download to temp file\n * 2. Extract to temp directory\n * 3. Atomic rename to final location\n */\n\nimport { spawn } from 'child_process';\nimport exit from 'exit-compat';\nimport fs from 'fs';\nimport mkdirp from 'mkdirp-classic';\nimport Module from 'module';\nimport os from 'os';\nimport path from 'path';\nimport url from 'url';\nimport { homedir } from '../compat.ts';\n\n// CJS/ESM compatibility\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\n\n// Configuration\nconst GITHUB_REPO = 'kmalakoff/node-version-use';\n// Path is relative to dist/cjs/scripts/ at runtime\nconst BINARY_VERSION = _require(path.join(__dirname, '..', '..', '..', 'package.json')).binaryVersion;\n\ntype Callback = (err?: Error | null) => void;\n\ninterface PlatformMap {\n [key: string]: string;\n}\n\n/**\n * Get the platform-specific archive base name (without extension)\n */\nfunction getArchiveBaseName(): string | null {\n const platform = os.platform();\n const arch = os.arch();\n\n const platformMap: PlatformMap = {\n darwin: 'darwin',\n linux: 'linux',\n win32: 'win32',\n };\n\n const archMap: PlatformMap = {\n x64: 'x64',\n arm64: 'arm64',\n amd64: 'x64',\n };\n\n const platformName = platformMap[platform];\n const archName = archMap[arch];\n\n if (!platformName || !archName) {\n return null;\n }\n\n return `nvu-binary-${platformName}-${archName}`;\n}\n\n/**\n * Get the extracted binary name (includes .exe on Windows)\n */\nfunction getExtractedBinaryName(archiveBaseName: string): string {\n const ext = os.platform() === 'win32' ? '.exe' : '';\n return archiveBaseName + ext;\n}\n\n/**\n * Get the download URL for the binary archive\n */\nfunction getDownloadUrl(archiveBaseName: string): string {\n const ext = os.platform() === 'win32' ? '.zip' : '.tar.gz';\n return `https://github.com/${GITHUB_REPO}/releases/download/binary-v${BINARY_VERSION}/${archiveBaseName}${ext}`;\n}\n\n/**\n * Copy file\n */\nfunction copyFileSync(src: string, dest: string): void {\n const content = fs.readFileSync(src);\n fs.writeFileSync(dest, content);\n}\n\n/**\n * Atomic rename with fallback to copy+delete for cross-device moves\n */\nfunction atomicRename(src: string, dest: string, callback: Callback): void {\n fs.rename(src, dest, (err) => {\n if (!err) {\n callback(null);\n return;\n }\n\n // Cross-device link error - fall back to copy + delete\n if ((err as NodeJS.ErrnoException).code === 'EXDEV') {\n try {\n copyFileSync(src, dest);\n fs.unlinkSync(src);\n callback(null);\n } catch (copyErr) {\n callback(copyErr as Error);\n }\n return;\n }\n\n callback(err);\n });\n}\n\n/**\n * Remove directory recursively\n */\nfunction rmRecursive(dir: string): void {\n if (!fs.existsSync(dir)) return;\n\n const files = fs.readdirSync(dir);\n for (let i = 0; i < files.length; i++) {\n const filePath = path.join(dir, files[i]);\n const stat = fs.statSync(filePath);\n if (stat.isDirectory()) {\n rmRecursive(filePath);\n } else {\n fs.unlinkSync(filePath);\n }\n }\n fs.rmdirSync(dir);\n}\n\n/**\n * Get temp directory\n */\nfunction getTmpDir(): string {\n return typeof os.tmpdir === 'function' ? os.tmpdir() : process.env.TMPDIR || process.env.TMP || process.env.TEMP || '/tmp';\n}\n\n/**\n * Download using curl (macOS, Linux, Windows 10+)\n */\nfunction downloadWithCurl(downloadUrl: string, destPath: string, callback: Callback): void {\n const curl = spawn('curl', ['-L', '-f', '-s', '-o', destPath, downloadUrl]);\n\n curl.on('close', (code) => {\n if (code !== 0) {\n // curl exit codes: 22 = HTTP error (4xx/5xx), 56 = receive error (often 404 with -f)\n if (code === 22 || code === 56) {\n callback(new Error('HTTP 404'));\n } else {\n callback(new Error(`curl failed with exit code ${code}`));\n }\n return;\n }\n callback(null);\n });\n\n curl.on('error', (err) => {\n callback(err);\n });\n}\n\n/**\n * Download using PowerShell (Windows 7+ fallback)\n */\nfunction downloadWithPowerShell(downloadUrl: string, destPath: string, callback: Callback): void {\n const psCommand = `Invoke-WebRequest -Uri \"${downloadUrl}\" -OutFile \"${destPath}\" -UseBasicParsing`;\n const ps = spawn('powershell', ['-NoProfile', '-Command', psCommand]);\n\n ps.on('close', (code) => {\n if (code !== 0) {\n callback(new Error(`PowerShell download failed with exit code ${code}`));\n return;\n }\n callback(null);\n });\n\n ps.on('error', (err) => {\n callback(err);\n });\n}\n\n/**\n * Download a file - tries curl first, falls back to PowerShell on Windows\n * Node 0.8's OpenSSL doesn't support TLS 1.2+ required by GitHub\n */\nfunction downloadFile(downloadUrl: string, destPath: string, callback: Callback): void {\n downloadWithCurl(downloadUrl, destPath, (err) => {\n if (!err) {\n callback(null);\n return;\n }\n\n // If curl failed and we're on Windows, try PowerShell\n if (os.platform() === 'win32' && err?.message?.indexOf('ENOENT') >= 0) {\n downloadWithPowerShell(downloadUrl, destPath, callback);\n return;\n }\n\n callback(err);\n });\n}\n\n/**\n * Extract archive to a directory (callback-based)\n */\nfunction extractArchive(archivePath: string, destDir: string, callback: Callback): void {\n const platform = os.platform();\n\n if (platform === 'win32') {\n // Windows: extract zip using PowerShell\n const ps = spawn('powershell', ['-Command', `Expand-Archive -Path '${archivePath}' -DestinationPath '${destDir}' -Force`]);\n ps.on('close', (code) => {\n if (code !== 0) {\n callback(new Error('Failed to extract archive'));\n return;\n }\n callback(null);\n });\n } else {\n // Unix: extract tar.gz\n const tar = spawn('tar', ['-xzf', archivePath, '-C', destDir]);\n tar.on('close', (code) => {\n if (code !== 0) {\n callback(new Error('Failed to extract archive'));\n return;\n }\n callback(null);\n });\n }\n}\n\n/**\n * Install binaries using atomic rename pattern\n * 1. Extract to temp directory\n * 2. Copy binary to temp files in destination directory\n * 3. Atomic rename temp files to final names\n */\nfunction extractAndInstall(archivePath: string, destDir: string, binaryName: string, callback: Callback): void {\n const platform = os.platform();\n const isWindows = platform === 'win32';\n const ext = isWindows ? '.exe' : '';\n\n // Create temp extraction directory\n const tempExtractDir = path.join(getTmpDir(), `nvu-extract-${Date.now()}`);\n mkdirp.sync(tempExtractDir);\n\n extractArchive(archivePath, tempExtractDir, (extractErr) => {\n if (extractErr) {\n rmRecursive(tempExtractDir);\n callback(extractErr);\n return;\n }\n\n const extractedPath = path.join(tempExtractDir, binaryName);\n if (!fs.existsSync(extractedPath)) {\n rmRecursive(tempExtractDir);\n callback(new Error(`Extracted binary not found: ${binaryName}`));\n return;\n }\n\n // Binary names to install\n const binaries = ['node', 'npm', 'npx', 'corepack'];\n const timestamp = Date.now();\n let installError: Error | null = null;\n\n // Step 1: Copy extracted binary to temp files in destination directory\n // This ensures the temp files are on the same filesystem for atomic rename\n for (let i = 0; i < binaries.length; i++) {\n const name = binaries[i];\n const tempDest = path.join(destDir, `${name}.tmp-${timestamp}${ext}`);\n\n try {\n // Copy to temp file in destination directory\n copyFileSync(extractedPath, tempDest);\n\n // Set permissions on Unix\n if (!isWindows) {\n fs.chmodSync(tempDest, 0o755);\n }\n } catch (err) {\n installError = err as Error;\n break;\n }\n }\n\n if (installError) {\n // Clean up any temp files we created\n for (let j = 0; j < binaries.length; j++) {\n const tempPath = path.join(destDir, `${binaries[j]}.tmp-${timestamp}${ext}`);\n if (fs.existsSync(tempPath)) {\n try {\n fs.unlinkSync(tempPath);\n } catch (_e) {\n // ignore cleanup errors\n }\n }\n }\n rmRecursive(tempExtractDir);\n callback(installError);\n return;\n }\n\n // Step 2: Atomic rename temp files to final names\n let renameError: Error | null = null;\n\n function doRename(index: number): void {\n if (index >= binaries.length) {\n // All renames complete\n rmRecursive(tempExtractDir);\n callback(renameError);\n return;\n }\n\n const name = binaries[index];\n const tempDest = path.join(destDir, `${name}.tmp-${timestamp}${ext}`);\n const finalDest = path.join(destDir, `${name}${ext}`);\n\n // Remove existing file if present (for atomic replacement)\n if (fs.existsSync(finalDest)) {\n try {\n fs.unlinkSync(finalDest);\n } catch (_e) {\n // ignore cleanup errors\n }\n }\n\n atomicRename(tempDest, finalDest, (err) => {\n if (err && !renameError) {\n renameError = err;\n }\n doRename(index + 1);\n });\n }\n\n doRename(0);\n });\n}\n\n/**\n * Print setup instructions\n */\nfunction printInstructions(installed: boolean): void {\n const homedirPath = homedir();\n const nvuBinPath = path.join(homedirPath, '.nvu', 'bin');\n const platform = os.platform();\n\n console.log('');\n console.log('============================================================');\n if (installed) {\n console.log(' nvu binaries installed to ~/.nvu/bin/');\n } else {\n console.log(' nvu installed (binaries not yet available)');\n }\n console.log('============================================================');\n console.log('');\n console.log('To enable transparent Node version switching, add to your shell profile:');\n console.log('');\n\n if (platform === 'win32') {\n console.log(' PowerShell (add to $PROFILE):');\n console.log(` $env:PATH = \"${nvuBinPath};$env:PATH\"`);\n console.log('');\n console.log(' CMD (run as administrator):');\n console.log(` setx PATH \"${nvuBinPath};%PATH%\"`);\n } else {\n console.log(' # For bash (~/.bashrc):');\n console.log(' export PATH=\"$HOME/.nvu/bin:$PATH\"');\n console.log('');\n console.log(' # For zsh (~/.zshrc):');\n console.log(' export PATH=\"$HOME/.nvu/bin:$PATH\"');\n console.log('');\n console.log(' # For fish (~/.config/fish/config.fish):');\n console.log(' set -gx PATH $HOME/.nvu/bin $PATH');\n }\n\n console.log('');\n console.log('Then restart your terminal or source your shell profile.');\n console.log('');\n console.log(\"Without this, 'nvu 18 npm test' still works - you just won't have\");\n console.log(\"transparent 'node' command override.\");\n console.log('============================================================');\n}\n\n/**\n * Main installation function\n */\nfunction main(): void {\n const archiveBaseName = getArchiveBaseName();\n\n if (!archiveBaseName) {\n console.log('postinstall: Unsupported platform/architecture for binary.');\n console.log(`Platform: ${os.platform()}, Arch: ${os.arch()}`);\n console.log('Binary not installed. You can still use nvu with explicit versions: nvu 18 npm test');\n exit(0);\n return;\n }\n\n const extractedBinaryName = getExtractedBinaryName(archiveBaseName);\n\n const homedirPath = homedir();\n const nvuDir = path.join(homedirPath, '.nvu');\n const binDir = path.join(nvuDir, 'bin');\n\n // Create directories\n mkdirp.sync(nvuDir);\n mkdirp.sync(binDir);\n\n const downloadUrl = getDownloadUrl(archiveBaseName);\n const ext = os.platform() === 'win32' ? '.zip' : '.tar.gz';\n const tempPath = path.join(getTmpDir(), `nvu-binary-${Date.now()}${ext}`);\n\n console.log(`postinstall: Downloading binary for ${os.platform()}-${os.arch()}...`);\n\n downloadFile(downloadUrl, tempPath, (downloadErr) => {\n if (downloadErr) {\n // Clean up temp file if it exists\n if (fs.existsSync(tempPath)) {\n try {\n fs.unlinkSync(tempPath);\n } catch (_e) {\n // ignore cleanup errors\n }\n }\n\n if (downloadErr.message?.indexOf('404') >= 0) {\n console.log('postinstall: Binaries not yet published to GitHub releases.');\n console.log('');\n console.log('To build and install binaries locally:');\n console.log(' cd node_modules/node-version-use/binary');\n console.log(' make install');\n console.log('');\n console.log('Or wait for the next release which will include pre-built binaries.');\n } else {\n console.log(`postinstall warning: Failed to install binary: ${downloadErr.message || downloadErr}`);\n console.log('You can still use nvu with explicit versions: nvu 18 npm test');\n console.log('To install binaries manually: cd node_modules/node-version-use/binary && make install');\n }\n printInstructions(false);\n exit(0);\n return;\n }\n\n console.log('postinstall: Extracting binary...');\n\n extractAndInstall(tempPath, binDir, extractedBinaryName, (extractErr) => {\n // Clean up temp file\n if (fs.existsSync(tempPath)) {\n try {\n fs.unlinkSync(tempPath);\n } catch (_e) {\n // ignore cleanup errors\n }\n }\n\n if (extractErr) {\n console.log(`postinstall warning: Failed to extract binary: ${extractErr.message || extractErr}`);\n console.log('You can still use nvu with explicit versions: nvu 18 npm test');\n printInstructions(false);\n exit(0);\n return;\n }\n\n console.log('postinstall: Binary installed successfully!');\n printInstructions(true);\n exit(0);\n });\n });\n}\n\nmain();\n"],"names":["spawn","exit","fs","mkdirp","Module","os","path","url","homedir","_require","require","createRequire","__dirname","dirname","__filename","fileURLToPath","GITHUB_REPO","BINARY_VERSION","join","binaryVersion","getArchiveBaseName","platform","arch","platformMap","darwin","linux","win32","archMap","x64","arm64","amd64","platformName","archName","getExtractedBinaryName","archiveBaseName","ext","getDownloadUrl","copyFileSync","src","dest","content","readFileSync","writeFileSync","atomicRename","callback","rename","err","code","unlinkSync","copyErr","rmRecursive","dir","existsSync","files","readdirSync","i","length","filePath","stat","statSync","isDirectory","rmdirSync","getTmpDir","tmpdir","process","env","TMPDIR","TMP","TEMP","downloadWithCurl","downloadUrl","destPath","curl","on","Error","downloadWithPowerShell","psCommand","ps","downloadFile","message","indexOf","extractArchive","archivePath","destDir","tar","extractAndInstall","binaryName","isWindows","tempExtractDir","Date","now","sync","extractErr","extractedPath","binaries","timestamp","installError","name","tempDest","chmodSync","j","tempPath","_e","renameError","doRename","index","finalDest","printInstructions","installed","homedirPath","nvuBinPath","console","log","main","extractedBinaryName","nvuDir","binDir","downloadErr"],"mappings":"AAAA;;;;;;;;;;CAUC,GAED,SAASA,KAAK,QAAQ,gBAAgB;AACtC,OAAOC,UAAU,cAAc;AAC/B,OAAOC,QAAQ,KAAK;AACpB,OAAOC,YAAY,iBAAiB;AACpC,OAAOC,YAAY,SAAS;AAC5B,OAAOC,QAAQ,KAAK;AACpB,OAAOC,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AACtB,SAASC,OAAO,QAAQ,eAAe;AAEvC,wBAAwB;AACxB,MAAMC,WAAW,OAAOC,YAAY,cAAcN,OAAOO,aAAa,CAAC,YAAYJ,GAAG,IAAIG;AAC1F,MAAME,YAAYN,KAAKO,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaP,IAAIQ,aAAa,CAAC,YAAYR,GAAG;AAEjH,gBAAgB;AAChB,MAAMS,cAAc;AACp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,GAAG,CAAC;QAEZ3B,kBAAkBgB,UAAUe,QAAQF,qBAAqB,CAACtB;YACxD,qBAAqB;YACrB,IAAI1F,GAAGkD,UAAU,CAACiD,WAAW;gBAC3B,IAAI;oBACFnG,GAAG8C,UAAU,CAACqD;gBAChB,EAAE,OAAOC,IAAI;gBACX,wBAAwB;gBAC1B;YACF;YAEA,IAAIV,YAAY;gBACdmB,QAAQC,GAAG,CAAC,CAAC,+CAA+C,EAAEpB,WAAWb,OAAO,IAAIa,YAAY;gBAChGmB,QAAQC,GAAG,CAAC;gBACZL,kBAAkB;gBAClB1G,KAAK;gBACL;YACF;YAEA8G,QAAQC,GAAG,CAAC;YACZL,kBAAkB;YAClB1G,KAAK;QACP;IACF;AACF;AAEAgH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-version-use",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"description": "Cross-platform solution for using multiple versions of node. Useful for compatibility testing",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"version": "tsds version"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"cross-spawn-cb": "^2.4.
|
|
51
|
+
"cross-spawn-cb": "^2.4.11",
|
|
52
52
|
"exit-compat": "^1.0.0",
|
|
53
53
|
"fs-remove-compat": "^0.2.1",
|
|
54
54
|
"getopts-compat": "^2.2.6",
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@types/mocha": "^10.0.10",
|
|
67
|
-
"@types/node": "^25.0.
|
|
67
|
+
"@types/node": "^25.0.1",
|
|
68
68
|
"cr": "^0.1.0",
|
|
69
69
|
"fs-copy-compat": "^0.1.3",
|
|
70
70
|
"fs-remove-compat": "^0.2.1",
|
|
71
71
|
"is-version": "^1.0.7",
|
|
72
72
|
"mkdirp-classic": "^0.5.3",
|
|
73
73
|
"node-version-install": "^1.5.0",
|
|
74
|
-
"node-version-use": "^2.1.
|
|
74
|
+
"node-version-use": "^2.1.3",
|
|
75
75
|
"os-shim": "^0.1.3",
|
|
76
76
|
"pinkie-promise": "^2.0.1",
|
|
77
77
|
"ts-dev-stack": "^1.21.3",
|