Skip to content
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

meta: Delete preinstall script from package.json #296

Merged
merged 1 commit into from
Jan 4, 2023

Conversation

DeeDeeG
Copy link
Member

@DeeDeeG DeeDeeG commented Jan 4, 2023

This script launches Node to run a script that has it immediately exit ... It is from way back in 2012, when Atom still had a binding.gyp at the root dir of the project.

See commit 2697b5e's commit message for details of why this was added, then see commit 010905d, and see also npm's "scripts" documentation page:

If there is a binding.gyp file in the root of your package and you haven't defined your own install or preinstall scripts, npm will default the install command to compile using node-gyp via node-gyp rebuild

...
But there's no binding.gyp in the project root anymore, hasn't been for a while, and keeping this script all these years has been fairly silly, and wastes a few seconds of time and some tiny amount of RAM/ disk access, I suppose.

It does not spark joy, so I am saying goodbye to this script.

"Goodbye, preinstall script."

This script launches Node to run a script that has it immediately exit
...
It is from way back in 2012, when Atom still had a binding.gyp at the
root dir of the project.

See commit 2697b5e's commit message
for details of why this was added, then see commit
010905d, and see also npm's "scripts"
documentation page:

> If there is a binding.gyp file in the root of your package
> and you haven't defined your own install or preinstall scripts,
> npm will default the install command to compile using node-gyp
> via node-gyp rebuild
- Source: https://docs.npmjs.com/cli/v9/using-npm/scripts#npm-install
...
But there's no binding.gyp in the project root anymore, hasn't been
for a while, and keeping this script all these years has been fairly
silly, and wastes a few seconds of time and some tiny amount of RAM/
disk access, I suppose.

It does not spark joy, so I am saying goodbye to this script.

"Goodbye, preinstall script."
@mauricioszabo
Copy link
Contributor

Easy merge :)

@mauricioszabo mauricioszabo merged commit 1cf93d3 into master Jan 4, 2023
@mauricioszabo mauricioszabo deleted the delete-pointless-preinstall-script branch January 4, 2023 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants