Skip to content

Commit

Permalink
fix: setting disablePreGypCopy: true and updating unit test with `n…
Browse files Browse the repository at this point in the history
…ode-pty` native module (#8352)
  • Loading branch information
mmaietta authored Jul 18, 2024
1 parent 578a7e1 commit 372b046
Show file tree
Hide file tree
Showing 7 changed files with 1,832 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-bottles-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

fix(mac): `disablePreGypCopy: true` to handle mac universal builds (fixes #8347)
5 changes: 2 additions & 3 deletions packages/app-builder-lib/src/util/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,8 @@ export async function rebuild(config: Configuration, appDir: string, options: Re
debug: log.isDebugEnabled,
projectRootPath: await getProjectRootPath(appDir),
mode: (config.nativeRebuilder as RebuildMode) || "sequential",
}
if (buildFromSource) {
rebuildOptions.prebuildTagPrefix = "totally-not-a-real-prefix-to-force-rebuild"
buildFromSource: buildFromSource,
disablePreGypCopy: true,
}
return remoteRebuild(rebuildOptions)
}
4 changes: 3 additions & 1 deletion test/fixtures/test-app-two-native-modules/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"main": "index.js",
"version": "1.1.1",
"dependencies": {
"debug": "4.1.1"
"debug": "4.1.1",
"node-pty": "1.1.0-beta14",
"node-addon-api": "7.1.1"
},
"optionalDependencies": {
"node-mac-permissions": "2.3.0"
Expand Down
12 changes: 12 additions & 0 deletions test/fixtures/test-app-two-native-modules/app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ ms@^2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==

node-addon-api@7.1.1, node-addon-api@^7.1.0:
version "7.1.1"
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.1.tgz#1aba6693b0f255258a049d621329329322aad558"
integrity sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==

node-addon-api@^3.0.2:
version "3.2.1"
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161"
Expand All @@ -38,3 +43,10 @@ node-mac-permissions@2.3.0:
dependencies:
bindings "^1.5.0"
node-addon-api "^3.0.2"

node-pty@1.1.0-beta14:
version "1.1.0-beta14"
resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-1.1.0-beta14.tgz#e6e9eeb3ac7186144d17902977f9da011e513563"
integrity sha512-w/o/q6UL95azHQhrKvMnIojs1AGiqxnjNgcH3138H/RIRkIpE8S5GvT4dpvQT+ZVbTJxoBFt/DnaBAT1PAN7WQ==
dependencies:
node-addon-api "^7.1.0"
Loading

0 comments on commit 372b046

Please sign in to comment.