-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add CFA support #306
Conversation
I gave up with Travis CI's Windows support and went back to AppVeyor. Need to re-add the project in AppVeyor, though. |
df9e032
to
846d39e
Compare
|
94d97a7
to
5923ede
Compare
4292747
to
e33a858
Compare
[ | ||
path.resolve(__dirname, 'prebuild-shim.js'), | ||
path.resolve(__dirname, `prebuild-shim.${shimExt}`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prebuild shim wasn't correctly being run in tests because it assumed that the .js
version was always in the same location as src/rebuild.ts
.
@@ -329,7 +331,11 @@ class Rebuilder { | |||
rebuildArgs.push('--debug'); | |||
} | |||
|
|||
Object.keys(modulePackageJson.binary || {}).forEach((binaryKey) => { | |||
for (const binaryKey of Object.keys(modulePackageJson.binary || {})) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching to for
instead of .forEach
is more idiomatic, plus it makes the stack trace smaller.
|
||
function packageCommand(command: string, packageName: string) { | ||
return spawnPromise('npm', [command, packageName], { | ||
return spawnPromise('npm', [command, '--no-save', packageName], { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--no-save
prevents the top-level package.json
from being overwritten. This is more apparent when developing locally, rather than in CI.
This is based on the
asar
PR.Also refactors the "locate electron" code/tests so that they're more robust.