Skip to content

Commit 372b046

Browse files
authored
fix: setting disablePreGypCopy: true and updating unit test with node-pty native module (#8352)
1 parent 578a7e1 commit 372b046

File tree

7 files changed

+1832
-11
lines changed

7 files changed

+1832
-11
lines changed

.changeset/brave-bottles-sell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
fix(mac): `disablePreGypCopy: true` to handle mac universal builds (fixes #8347)

packages/app-builder-lib/src/util/yarn.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,8 @@ export async function rebuild(config: Configuration, appDir: string, options: Re
206206
debug: log.isDebugEnabled,
207207
projectRootPath: await getProjectRootPath(appDir),
208208
mode: (config.nativeRebuilder as RebuildMode) || "sequential",
209-
}
210-
if (buildFromSource) {
211-
rebuildOptions.prebuildTagPrefix = "totally-not-a-real-prefix-to-force-rebuild"
209+
buildFromSource: buildFromSource,
210+
disablePreGypCopy: true,
212211
}
213212
return remoteRebuild(rebuildOptions)
214213
}

test/fixtures/test-app-two-native-modules/app/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"main": "index.js",
44
"version": "1.1.1",
55
"dependencies": {
6-
"debug": "4.1.1"
6+
"debug": "4.1.1",
7+
"node-pty": "1.1.0-beta14",
8+
"node-addon-api": "7.1.1"
79
},
810
"optionalDependencies": {
911
"node-mac-permissions": "2.3.0"

test/fixtures/test-app-two-native-modules/app/yarn.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ ms@^2.1.1:
2626
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
2727
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
2828

29+
[email protected], node-addon-api@^7.1.0:
30+
version "7.1.1"
31+
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.1.tgz#1aba6693b0f255258a049d621329329322aad558"
32+
integrity sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==
33+
2934
node-addon-api@^3.0.2:
3035
version "3.2.1"
3136
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161"
@@ -38,3 +43,10 @@ [email protected]:
3843
dependencies:
3944
bindings "^1.5.0"
4045
node-addon-api "^3.0.2"
46+
47+
48+
version "1.1.0-beta14"
49+
resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-1.1.0-beta14.tgz#e6e9eeb3ac7186144d17902977f9da011e513563"
50+
integrity sha512-w/o/q6UL95azHQhrKvMnIojs1AGiqxnjNgcH3138H/RIRkIpE8S5GvT4dpvQT+ZVbTJxoBFt/DnaBAT1PAN7WQ==
51+
dependencies:
52+
node-addon-api "^7.1.0"

0 commit comments

Comments
 (0)