@granite-js/plugin-hermes 0.1.23-next.5 → 0.1.23
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/CHANGELOG.md +3 -30
- package/dist/index.cjs +1 -26
- package/dist/index.js +1 -26
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,38 +1,11 @@
|
|
|
1
1
|
# @granite-js/plugin-hermes
|
|
2
2
|
|
|
3
|
-
## 0.1.23
|
|
3
|
+
## 0.1.23
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
- @granite-js/plugin-core@0.1.23-next.5
|
|
10
|
-
- @granite-js/utils@0.1.23-next.5
|
|
11
|
-
|
|
12
|
-
## 0.1.23-next.4
|
|
13
|
-
|
|
14
|
-
### Patch Changes
|
|
15
|
-
|
|
16
|
-
- test
|
|
17
|
-
- Updated dependencies
|
|
18
|
-
- @granite-js/plugin-core@0.1.23-next.4
|
|
19
|
-
- @granite-js/utils@0.1.23-next.4
|
|
20
|
-
|
|
21
|
-
## 0.1.23-next.3
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
- test
|
|
26
|
-
- Updated dependencies
|
|
27
|
-
- @granite-js/plugin-core@0.1.23-next.3
|
|
28
|
-
- @granite-js/utils@0.1.23-next.3
|
|
29
|
-
|
|
30
|
-
## 0.1.23-next.0
|
|
31
|
-
|
|
32
|
-
### Patch Changes
|
|
33
|
-
|
|
34
|
-
- @granite-js/plugin-core@0.1.23-next.0
|
|
35
|
-
- @granite-js/utils@0.1.23-next.0
|
|
7
|
+
- @granite-js/plugin-core@0.1.23
|
|
8
|
+
- @granite-js/utils@0.1.23
|
|
36
9
|
|
|
37
10
|
## 0.1.22
|
|
38
11
|
|
package/dist/index.cjs
CHANGED
|
@@ -27,7 +27,6 @@ const execa = __toESM(require("execa"));
|
|
|
27
27
|
const fs_promises = __toESM(require("fs/promises"));
|
|
28
28
|
const source_map = __toESM(require("source-map"));
|
|
29
29
|
const os = __toESM(require("os"));
|
|
30
|
-
const path = __toESM(require("path"));
|
|
31
30
|
const __granite_js_utils = __toESM(require("@granite-js/utils"));
|
|
32
31
|
|
|
33
32
|
//#region src/compileHbc.ts
|
|
@@ -83,36 +82,12 @@ const BINARY_PATH = {
|
|
|
83
82
|
Linux: "react-native/sdks/hermesc/linux64-bin/hermesc",
|
|
84
83
|
Windows_NT: "react-native/sdks/hermesc/win64-bin/hermesc.exe"
|
|
85
84
|
};
|
|
86
|
-
/**
|
|
87
|
-
* Returns the Hermes OS binary folder name for the current platform.
|
|
88
|
-
*/
|
|
89
|
-
function getHermesOSBin() {
|
|
90
|
-
switch (process.platform) {
|
|
91
|
-
case "win32": return "win64-bin";
|
|
92
|
-
case "darwin": return "osx-bin";
|
|
93
|
-
default: return "linux64-bin";
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Returns the Hermes executable name for the current platform.
|
|
98
|
-
*/
|
|
99
|
-
function getHermesOSExe() {
|
|
100
|
-
const hermesExecutableName = "hermesc";
|
|
101
|
-
return process.platform === "win32" ? `${hermesExecutableName}.exe` : hermesExecutableName;
|
|
102
|
-
}
|
|
103
|
-
function getReactNativePackagePath(root) {
|
|
104
|
-
try {
|
|
105
|
-
return path.default.dirname(require.resolve("react-native/package.json", { paths: [root] }));
|
|
106
|
-
} catch {
|
|
107
|
-
return path.default.join("node_modules", "react-native");
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
85
|
function resolveHermesBinaryPath() {
|
|
111
86
|
const root = (0, __granite_js_utils.getPackageRoot)();
|
|
112
87
|
const os$1 = (0, os.type)();
|
|
113
88
|
const binaryPath = BINARY_PATH[os$1];
|
|
114
89
|
if (binaryPath == null) throw new Error(`Unsupported OS: ${os$1}`);
|
|
115
|
-
return
|
|
90
|
+
return require.resolve(binaryPath, { paths: [root] });
|
|
116
91
|
}
|
|
117
92
|
|
|
118
93
|
//#endregion
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,6 @@ import execa from "execa";
|
|
|
5
5
|
import * as fs from "fs/promises";
|
|
6
6
|
import { SourceMapConsumer, SourceMapGenerator } from "source-map";
|
|
7
7
|
import { type } from "os";
|
|
8
|
-
import path from "path";
|
|
9
8
|
import { getPackageRoot } from "@granite-js/utils";
|
|
10
9
|
|
|
11
10
|
//#region rolldown:runtime
|
|
@@ -65,36 +64,12 @@ const BINARY_PATH = {
|
|
|
65
64
|
Linux: "react-native/sdks/hermesc/linux64-bin/hermesc",
|
|
66
65
|
Windows_NT: "react-native/sdks/hermesc/win64-bin/hermesc.exe"
|
|
67
66
|
};
|
|
68
|
-
/**
|
|
69
|
-
* Returns the Hermes OS binary folder name for the current platform.
|
|
70
|
-
*/
|
|
71
|
-
function getHermesOSBin() {
|
|
72
|
-
switch (process.platform) {
|
|
73
|
-
case "win32": return "win64-bin";
|
|
74
|
-
case "darwin": return "osx-bin";
|
|
75
|
-
default: return "linux64-bin";
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Returns the Hermes executable name for the current platform.
|
|
80
|
-
*/
|
|
81
|
-
function getHermesOSExe() {
|
|
82
|
-
const hermesExecutableName = "hermesc";
|
|
83
|
-
return process.platform === "win32" ? `${hermesExecutableName}.exe` : hermesExecutableName;
|
|
84
|
-
}
|
|
85
|
-
function getReactNativePackagePath(root) {
|
|
86
|
-
try {
|
|
87
|
-
return path.dirname(__require.resolve("react-native/package.json", { paths: [root] }));
|
|
88
|
-
} catch {
|
|
89
|
-
return path.join("node_modules", "react-native");
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
67
|
function resolveHermesBinaryPath() {
|
|
93
68
|
const root = getPackageRoot();
|
|
94
69
|
const os = type();
|
|
95
70
|
const binaryPath = BINARY_PATH[os];
|
|
96
71
|
if (binaryPath == null) throw new Error(`Unsupported OS: ${os}`);
|
|
97
|
-
return
|
|
72
|
+
return __require.resolve(binaryPath, { paths: [root] });
|
|
98
73
|
}
|
|
99
74
|
|
|
100
75
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@granite-js/plugin-hermes",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.23
|
|
4
|
+
"version": "0.1.23",
|
|
5
5
|
"description": "Hermes compilation plugin for Granite",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"vitest": "^3.1.3"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@granite-js/plugin-core": "0.1.23
|
|
39
|
-
"@granite-js/utils": "0.1.23
|
|
38
|
+
"@granite-js/plugin-core": "0.1.23",
|
|
39
|
+
"@granite-js/utils": "0.1.23",
|
|
40
40
|
"es-toolkit": "^1.39.8",
|
|
41
41
|
"execa": "^5",
|
|
42
42
|
"source-map": "^0.8.0-beta.0"
|