codemod 1.15.1 → 1.15.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/codemod +9 -4
- package/package.json +8 -6
package/codemod
CHANGED
|
@@ -7,8 +7,11 @@ const path = require("path");
|
|
|
7
7
|
const binaryName = process.platform === "win32" ? "codemod.exe" : "codemod";
|
|
8
8
|
const CODEMOD_BOOTSTRAPPED_ENV = "CODEMOD_BOOTSTRAPPED";
|
|
9
9
|
|
|
10
|
-
function detectPackageName(
|
|
11
|
-
|
|
10
|
+
function detectPackageName({
|
|
11
|
+
platform = process.platform,
|
|
12
|
+
arch = process.arch,
|
|
13
|
+
libcFamily,
|
|
14
|
+
} = {}) {
|
|
12
15
|
|
|
13
16
|
switch (platform) {
|
|
14
17
|
case "darwin":
|
|
@@ -20,9 +23,10 @@ function detectPackageName() {
|
|
|
20
23
|
}
|
|
21
24
|
break;
|
|
22
25
|
case "linux": {
|
|
23
|
-
const {
|
|
26
|
+
const { familySync, MUSL } = require("detect-libc");
|
|
27
|
+
const detectedLibcFamily = libcFamily ?? familySync();
|
|
24
28
|
const libcSuffix =
|
|
25
|
-
|
|
29
|
+
detectedLibcFamily === MUSL ? "musl" : arch === "arm" ? "gnueabihf" : "gnu";
|
|
26
30
|
if (arch === "x64") {
|
|
27
31
|
return `@codemod.com/cli-linux-x64-${libcSuffix}`;
|
|
28
32
|
}
|
|
@@ -234,6 +238,7 @@ if (require.main === module) {
|
|
|
234
238
|
|
|
235
239
|
module.exports = {
|
|
236
240
|
CODEMOD_BOOTSTRAPPED_ENV,
|
|
241
|
+
detectPackageName,
|
|
237
242
|
latestBootstrapArgs,
|
|
238
243
|
npmExecutable,
|
|
239
244
|
shouldBootstrapLatestNoCommand,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codemod",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.2",
|
|
4
4
|
"description": "Codemod platform for semantic code transformations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ast",
|
|
@@ -26,11 +26,13 @@
|
|
|
26
26
|
"detect-libc": "^2.0.3"
|
|
27
27
|
},
|
|
28
28
|
"optionalDependencies": {
|
|
29
|
-
"@codemod.com/cli-darwin-arm64": "1.15.
|
|
30
|
-
"@codemod.com/cli-darwin-x64": "1.15.
|
|
31
|
-
"@codemod.com/cli-linux-arm64-gnu": "1.15.
|
|
32
|
-
"@codemod.com/cli-linux-
|
|
33
|
-
"@codemod.com/cli-
|
|
29
|
+
"@codemod.com/cli-darwin-arm64": "1.15.2",
|
|
30
|
+
"@codemod.com/cli-darwin-x64": "1.15.2",
|
|
31
|
+
"@codemod.com/cli-linux-arm64-gnu": "1.15.2",
|
|
32
|
+
"@codemod.com/cli-linux-arm64-musl": "1.15.2",
|
|
33
|
+
"@codemod.com/cli-linux-x64-gnu": "1.15.2",
|
|
34
|
+
"@codemod.com/cli-linux-x64-musl": "1.15.2",
|
|
35
|
+
"@codemod.com/cli-win32-x64-msvc": "1.15.2"
|
|
34
36
|
},
|
|
35
37
|
"engines": {
|
|
36
38
|
"node": ">= 16.0.0"
|