9 Commits

Author SHA1 Message Date
Lovell Fuller
1bbee519aa Separate build script from install script #4458
The --build-from-source flag is now deprecated and will soon
be removed along with the need to define an install script.

This will remove a whole category of package manager
warnings about install scripts and "built" dependencies.

Most people don't need to build sharp from source, but for
those that do, a suitable method is now something like:

$ npm install package-that-depends-on-sharp
$ npm explore sharp -- npm run build
2025-10-07 16:11:54 +01:00
Lovell Fuller
b36237ddcb Switch linter from semistandard to biome
Uses the recommended rules apart from complexity/useArrowFunction,
which would affect about 1700 lines of code with little benefit
right now. This is something that can be addressed over time.
2025-09-18 21:18:31 +01:00
Lovell Fuller
7fbb988180 Bump deps 2024-07-24 07:59:55 +01:00
Richard Hillmann
56fae3eda1 Ensure SHARP_FORCE_GLOBAL_LIBVIPS option works correctly #4111
Allows the install/check script to inject a logger function,
keeping its use within binding.gyp free of additional output.

Co-authored-by: Lovell Fuller <github@lovell.info>
2024-05-24 17:45:39 +01:00
Lovell Fuller
b5fddd7c5e Install: log node-addon-api version if available 2024-05-10 10:43:15 +01:00
Lovell Fuller
f28e79ef4f Improve resilience of installation check 2023-12-17 09:46:28 +00:00
Lovell Fuller
f7da2e5970 Building from source now requires node-addon-api in dependencies
If you want to build sharp from source against a globally-installed
libvips then you will now need to add both node-addon-api and
node-gyp to the dependencies section of your package.json file.

The binding.gyp file is "hidden" inside the src directory to
prevent various build and package manager tooling from assuming
that everyone is going to build from source every time.
2023-10-08 15:39:02 +01:00
Lovell Fuller
59327bdd53 Install: libvips check takes precedence over flag 2023-09-27 16:20:04 +01:00
Lovell Fuller
aabbe1fa08 Distribute prebuilt binaries via the npm registry #3750
- Remove all custom download logic for prebuilt binaries
- Add scripts to populate package contents
- Specify minimum versions of common package managers
- Remove sharp.vendor runtime API as no-longer relevant
- Update installation docs and issue templates
2023-09-26 20:26:39 +01:00