Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: lovell/sharp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 05d76eeadfe54713606a615185b2da047923406b
Choose a base ref
...
head repository: lovell/sharp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: db654de385e06ee6c56a05aa11a11a2e2f781b14
Choose a head ref

Commits on May 30, 2019

  1. Copy the full SHA
    cfa4f7d View commit details

Commits on Jun 26, 2019

  1. Copy the full SHA
    631a359 View commit details
  2. Copy the full SHA
    6289968 View commit details
  3. Copy the full SHA
    946d3c8 View commit details

Commits on Jul 1, 2019

  1. Copy the full SHA
    3ff3353 View commit details

Commits on Jul 4, 2019

  1. Add experimental support for HEIF images #1105

    Requires a custom, globally-installed libvips compiled with libheif
    lovell committed Jul 4, 2019
    Copy the full SHA
    b737d46 View commit details

Commits on Jul 12, 2019

  1. Copy the full SHA
    6c02949 View commit details
  2. Changelog entry for #1687

    lovell committed Jul 12, 2019
    Copy the full SHA
    38402d3 View commit details

Commits on Jul 14, 2019

  1. Copy the full SHA
    119d16c View commit details
  2. Copy the full SHA
    36e8a3d View commit details
  3. Bump dependencies

    lovell committed Jul 14, 2019
    Copy the full SHA
    28de243 View commit details

Commits on Jul 26, 2019

  1. Improve consistency of validation error handling

    Utilises common path of existing invalidParameterError
    lovell committed Jul 26, 2019
    Copy the full SHA
    233b015 View commit details
  2. Copy the full SHA
    6cf0b32 View commit details
  3. Copy the full SHA
    50b4610 View commit details
  4. Copy the full SHA
    690bc43 View commit details

Commits on Jul 28, 2019

  1. Upgrade to libvips v8.8.1

    lovell committed Jul 28, 2019
    Copy the full SHA
    a0d1a7b View commit details
  2. Copy the full SHA
    76ded7f View commit details

Commits on Jul 29, 2019

  1. Copy the full SHA
    ba4ce75 View commit details
  2. Copy the full SHA
    6b7ce8a View commit details
  3. Copy the full SHA
    16e429c View commit details
  4. Copy the full SHA
    2ed4b5a View commit details
  5. Copy the full SHA
    417cca6 View commit details
  6. Release v0.23.0

    lovell committed Jul 29, 2019
    Copy the full SHA
    c610e30 View commit details

Commits on Jul 31, 2019

  1. Copy the full SHA
    2c30075 View commit details

Commits on Aug 12, 2019

  1. Copy the full SHA
    0778c11 View commit details
  2. Copy the full SHA
    5bfcf61 View commit details
  3. Changelog entry for #1834

    lovell committed Aug 12, 2019
    Copy the full SHA
    23b2e54 View commit details

Commits on Aug 13, 2019

  1. Copy the full SHA
    3fa91bb View commit details

Commits on Aug 14, 2019

  1. Copy the full SHA
    4ae8999 View commit details
  2. Copy the full SHA
    e4333ff View commit details

Commits on Aug 16, 2019

  1. Copy the full SHA
    da4e05c View commit details
  2. Copy the full SHA
    69fe21a View commit details

Commits on Sep 8, 2019

  1. Copy the full SHA
    fb5c393 View commit details

Commits on Sep 21, 2019

  1. Copy the full SHA
    14af0bd View commit details

Commits on Sep 22, 2019

  1. Replace deprecated URL parser

    Fix up various linter errors
    lovell committed Sep 22, 2019
    Copy the full SHA
    9c7f6fc View commit details

Commits on Sep 24, 2019

  1. Copy the full SHA
    d42c383 View commit details
  2. Copy the full SHA
    5d42214 View commit details

Commits on Sep 25, 2019

  1. Remove imagemagick-native module from benchmarks

    Unmaintained, does not compile with newer ImageMagick and Node
    lovell committed Sep 25, 2019
    Copy the full SHA
    6b560f7 View commit details
  2. Ensure promise-based benchmark test is fairer

    Real-world code will register a catch handler
    lovell committed Sep 25, 2019
    Copy the full SHA
    7d6fadc View commit details
  3. Copy the full SHA
    af45c03 View commit details
  4. Copy the full SHA
    d87c289 View commit details
  5. Copy the full SHA
    11214ba View commit details
  6. Copy the full SHA
    ba46ad1 View commit details

Commits on Sep 26, 2019

  1. Release v0.23.1

    lovell committed Sep 26, 2019
    Copy the full SHA
    aa3ce76 View commit details

Commits on Oct 1, 2019

  1. Copy the full SHA
    0e66454 View commit details

Commits on Oct 3, 2019

  1. Copy the full SHA
    4fcf091 View commit details
  2. Copy the full SHA
    075771d View commit details
  3. Copy the full SHA
    5a9b6c8 View commit details

Commits on Oct 4, 2019

  1. Copy the full SHA
    e650f58 View commit details

Commits on Oct 5, 2019

  1. Copy the full SHA
    e627f6d View commit details
Showing with 16,064 additions and 6,820 deletions.
  1. +79 −0 .circleci/config.yml
  2. +16 −0 .cirrus.yml
  3. +8 −13 .github/CONTRIBUTING.md
  4. +1 −0 .github/FUNDING.yml
  5. +5 −0 .github/ISSUE_TEMPLATE/config.yml
  6. +17 −7 .github/ISSUE_TEMPLATE/feature_request.md
  7. +38 −7 .github/ISSUE_TEMPLATE/installation.md
  8. +40 −9 .github/ISSUE_TEMPLATE/possible-bug.md
  9. +17 −7 .github/ISSUE_TEMPLATE/question.md
  10. +36 −0 .github/workflows/ci-darwin-arm64v8.yml
  11. +98 −0 .github/workflows/ci.yml
  12. +3 −0 .gitignore
  13. +0 −15 .npmignore
  14. +1 −1 .prebuildrc
  15. +0 −100 .travis.yml
  16. +25 −23 README.md
  17. +0 −17 appveyor.yml
  18. +120 −93 binding.gyp
  19. +84 −0 docs/README.md
  20. +55 −25 docs/api-channel.md
  21. +80 −9 docs/api-colour.md
  22. +52 −21 docs/api-composite.md
  23. +163 −50 docs/api-constructor.md
  24. +83 −89 docs/api-input.md
  25. +308 −66 docs/api-operation.md
  26. +406 −106 docs/api-output.md
  27. +93 −49 docs/api-resize.md
  28. +133 −19 docs/api-utility.md
  29. +25 −0 docs/build.js
  30. +695 −58 docs/changelog.md
  31. +0 −5 docs/css/extra.css
  32. +1 −0 docs/docute.min.js
  33. +116 −0 docs/firebase.json
  34. +247 −0 docs/humans.txt
  35. +11 −0 docs/image/sharp-logo-mono.svg
  36. BIN docs/image/sharp-logo.png
  37. +1 −1 docs/image/sharp-logo.svg
  38. +206 −0 docs/index.html
  39. +0 −144 docs/index.md
  40. +190 −185 docs/install.md
  41. +28 −25 docs/performance.md
  42. +2 −0 docs/robots.txt
  43. +1 −0 docs/search-index.json
  44. +61 −0 docs/search-index/build.js
  45. +30 −0 docs/search-index/extract.js
  46. +120 −0 docs/search-index/stop-words.js
  47. +11 −0 install/can-compile.js
  48. +13 −11 install/dll-copy.js
  49. +164 −58 install/libvips.js
  50. +5 −2 lib/agent.js
  51. +49 −25 lib/channel.js
  52. +78 −17 lib/colour.js
  53. +43 −24 lib/composite.js
  54. +208 −86 lib/constructor.js
  55. BIN lib/icc/sRGB.icc
  56. +245 −127 lib/input.js
  57. +30 −6 lib/is.js
  58. +78 −38 lib/libvips.js
  59. +376 −71 lib/operation.js
  60. +753 −254 lib/output.js
  61. +7 −3 lib/platform.js
  62. +114 −38 lib/resize.js
  63. +32 −0 lib/sharp.js
  64. +121 −23 lib/utility.js
  65. +0 −27 mkdocs.yml
  66. +87 −35 package.json
  67. +435 −141 src/common.cc
  68. +117 −35 src/common.h
  69. +152 −0 src/libvips/cplusplus/VConnection.cpp
  70. +0 −2 src/libvips/cplusplus/VError.cpp
  71. +562 −455 src/libvips/cplusplus/VImage.cpp
  72. +0 −13 src/libvips/cplusplus/VInterpolate.cpp
  73. +2,097 −1,500 src/libvips/cplusplus/vips-operators.cpp
  74. +139 −87 src/metadata.cc
  75. +19 −4 src/metadata.h
  76. +166 −34 src/operations.cc
  77. +33 −14 src/operations.h
  78. +850 −603 src/pipeline.cc
  79. +110 −32 src/pipeline.h
  80. +23 −25 src/sharp.cc
  81. +91 −90 src/stats.cc
  82. +14 −11 src/stats.h
  83. +120 −148 src/utilities.cc
  84. +10 −9 src/utilities.h
  85. +10 −9 test/bench/package.json
  86. +140 −75 test/bench/perf.js
  87. +1 −1 test/bench/random.js
  88. BIN test/fixtures/16-bit-grey-alpha.png
  89. BIN test/fixtures/alpha-layer-1-fill-low-alpha.png
  90. BIN test/fixtures/alpha-layer-2-ink-low-alpha.png
  91. BIN test/fixtures/alpha-layer-2-ink.png
  92. BIN test/fixtures/animated-loop-3.gif
  93. BIN test/fixtures/animated-loop-3.webp
  94. BIN test/fixtures/big-height.webp
  95. +3 −0 test/fixtures/circle.svg
  96. BIN test/fixtures/concert.jpg
  97. BIN test/fixtures/expected/16-bit-grey-alpha-identity.png
  98. BIN test/fixtures/expected/affine-background-all-offsets-expected.jpg
  99. BIN test/fixtures/expected/affine-background-expected.jpg
  100. BIN test/fixtures/expected/affine-background-output-offsets-expected.jpg
  101. BIN test/fixtures/expected/affine-bicubic-2x-upscale-expected.jpg
  102. BIN test/fixtures/expected/affine-bilinear-2x-upscale-expected.jpg
  103. BIN test/fixtures/expected/affine-extract-expected.jpg
  104. BIN test/fixtures/expected/affine-extract-rotate-expected.jpg
  105. BIN test/fixtures/expected/affine-lbb-2x-upscale-expected.jpg
  106. BIN test/fixtures/expected/affine-nearest-2x-upscale-expected.jpg
  107. BIN test/fixtures/expected/affine-nohalo-2x-upscale-expected.jpg
  108. BIN test/fixtures/expected/affine-resize-expected.jpg
  109. BIN test/fixtures/expected/affine-rotate-expected.jpg
  110. BIN test/fixtures/expected/affine-vsqbs-2x-upscale-expected.jpg
  111. BIN test/fixtures/expected/alpha-layer-01-imagemagick.png
  112. BIN test/fixtures/expected/alpha-layer-01-low-alpha-imagemagick.png
  113. BIN test/fixtures/expected/alpha-layer-01-low-alpha.png
  114. BIN test/fixtures/expected/alpha-layer-01.png
  115. BIN test/fixtures/expected/alpha-layer-012-imagemagick.png
  116. BIN test/fixtures/expected/alpha-layer-012-low-alpha-imagemagick.png
  117. BIN test/fixtures/expected/alpha-layer-012-low-alpha.png
  118. BIN test/fixtures/expected/alpha-layer-012.png
  119. BIN test/fixtures/expected/alpha-layer-12-imagemagick.png
  120. BIN test/fixtures/expected/alpha-layer-12-low-alpha-imagemagick.png
  121. BIN test/fixtures/expected/alpha-layer-12-low-alpha.png
  122. BIN test/fixtures/expected/alpha-layer-12.png
  123. BIN test/fixtures/expected/blur-0.3.jpg
  124. BIN test/fixtures/expected/circle.png
  125. BIN test/fixtures/expected/clahe-100-100-0.jpg
  126. BIN test/fixtures/expected/clahe-100-50-3.jpg
  127. BIN test/fixtures/expected/clahe-11-25-14.jpg
  128. BIN test/fixtures/expected/clahe-5-5-0.jpg
  129. BIN test/fixtures/expected/clahe-5-5-5.jpg
  130. BIN test/fixtures/expected/clahe-50-50-0.jpg
  131. BIN test/fixtures/expected/clahe-50-50-14.jpg
  132. BIN test/fixtures/expected/colourspace-gradients-gamma-resize.png
  133. BIN test/fixtures/expected/composite-cutout.png
  134. BIN test/fixtures/expected/composite-multiple.png
  135. BIN test/fixtures/expected/composite.blend.dest-over.png
  136. BIN test/fixtures/expected/composite.blend.over.png
  137. BIN test/fixtures/expected/composite.blend.saturate.png
  138. BIN test/fixtures/expected/composite.blend.xor.png
  139. BIN test/fixtures/expected/conv-sobel-horizontal.jpg
  140. BIN test/fixtures/expected/crop-strategy-attention.jpg
  141. BIN test/fixtures/expected/embed-animated-height.webp
  142. BIN test/fixtures/expected/embed-animated-width.webp
  143. BIN test/fixtures/expected/expected.absent.composite.premultiplied.png
  144. BIN test/fixtures/expected/expected.false.composite.premultiplied.png
  145. BIN test/fixtures/expected/expected.true.composite.premultiplied.png
  146. BIN test/fixtures/expected/extend-equal-single.jpg
  147. BIN test/fixtures/expected/extend-equal-single.webp
  148. BIN test/fixtures/expected/extract-alpha-16bit.jpg
  149. BIN test/fixtures/expected/extract-alpha-16bit.png
  150. BIN test/fixtures/expected/extract-alpha-2-channel.png
  151. BIN test/fixtures/expected/extract-lch.jpg
  152. BIN test/fixtures/expected/extract-rotate-45.jpg
  153. BIN test/fixtures/expected/extract.webp
  154. BIN test/fixtures/expected/fast-shrink-on-load-false.png
  155. BIN test/fixtures/expected/fast-shrink-on-load-true.png
  156. BIN test/fixtures/expected/fast-shrink-on-load.png
  157. BIN test/fixtures/expected/flatten-rgb16-orange.jpg
  158. BIN test/fixtures/expected/gravity-center-height.webp
  159. BIN test/fixtures/expected/gravity-center-width.webp
  160. BIN test/fixtures/expected/hilutite.jpg
  161. BIN lib/icc/cmyk.icm → test/fixtures/expected/icc-cmyk.jpg
  162. BIN test/fixtures/expected/median_1.jpg
  163. BIN test/fixtures/expected/median_3.jpg
  164. BIN test/fixtures/expected/median_5.jpg
  165. BIN test/fixtures/expected/median_color.jpg
  166. BIN test/fixtures/expected/modulate-all.jpg
  167. BIN test/fixtures/expected/modulate-brightness-0-5.jpg
  168. BIN test/fixtures/expected/modulate-brightness-2.jpg
  169. BIN test/fixtures/expected/modulate-hue-120.jpg
  170. BIN test/fixtures/expected/modulate-hue-angle-120.png
  171. BIN test/fixtures/expected/modulate-hue-angle-150.png
  172. BIN test/fixtures/expected/modulate-hue-angle-180.png
  173. BIN test/fixtures/expected/modulate-hue-angle-210.png
  174. BIN test/fixtures/expected/modulate-hue-angle-240.png
  175. BIN test/fixtures/expected/modulate-hue-angle-270.png
  176. BIN test/fixtures/expected/modulate-hue-angle-30.png
  177. BIN test/fixtures/expected/modulate-hue-angle-300.png
  178. BIN test/fixtures/expected/modulate-hue-angle-330.png
  179. BIN test/fixtures/expected/modulate-hue-angle-360.png
  180. BIN test/fixtures/expected/modulate-hue-angle-60.png
  181. BIN test/fixtures/expected/modulate-hue-angle-90.png
  182. BIN test/fixtures/expected/modulate-saturation-0.5.jpg
  183. BIN test/fixtures/expected/modulate-saturation-2.jpg
  184. BIN test/fixtures/expected/negate-preserve-alpha-grey.png
  185. BIN test/fixtures/expected/negate-preserve-alpha-trans.png
  186. BIN test/fixtures/expected/negate-preserve-alpha-trans.webp
  187. BIN test/fixtures/expected/negate-preserve-alpha.png
  188. BIN test/fixtures/expected/negate-preserve-alpha.webp
  189. BIN test/fixtures/expected/overlay-gravity-center.jpg
  190. BIN test/fixtures/expected/overlay-gravity-centre.jpg
  191. BIN test/fixtures/expected/overlay-gravity-east.jpg
  192. BIN test/fixtures/expected/overlay-gravity-north.jpg
  193. BIN test/fixtures/expected/overlay-gravity-northeast.jpg
  194. BIN test/fixtures/expected/overlay-gravity-northwest.jpg
  195. BIN test/fixtures/expected/overlay-gravity-south.jpg
  196. BIN test/fixtures/expected/overlay-gravity-southeast.jpg
  197. BIN test/fixtures/expected/overlay-gravity-southwest.jpg
  198. BIN test/fixtures/expected/overlay-gravity-west.jpg
  199. BIN test/fixtures/expected/overlay-negative-offset-with-gravity.jpg
  200. BIN test/fixtures/expected/overlay-offset-0.jpg
  201. BIN test/fixtures/expected/overlay-offset-with-gravity-tile.jpg
  202. BIN test/fixtures/expected/overlay-offset-with-gravity.jpg
  203. BIN test/fixtures/expected/overlay-offset-with-tile.jpg
  204. BIN test/fixtures/expected/resize-crop-extract.jpg
  205. BIN test/fixtures/expected/rotate-extract-45.jpg
  206. BIN test/fixtures/expected/rotate-mirror-extract.jpg
  207. BIN test/fixtures/expected/svg-embedded.png
  208. BIN test/fixtures/expected/svg72.png
  209. BIN test/fixtures/expected/tile_centered.jpg
  210. BIN test/fixtures/expected/tint-cmyk.jpg
  211. BIN test/fixtures/expected/tint-sepia.jpg
  212. BIN test/fixtures/gradients-rgb8.png
  213. BIN test/fixtures/hilutite.icm
  214. BIN test/fixtures/image-in-alpha.png
  215. +18 −10 test/fixtures/index.js
  216. BIN test/fixtures/input.above.composite.premultiplied.png
  217. BIN test/fixtures/input.below.composite.premultiplied.png
  218. BIN test/fixtures/p3.png
  219. BIN test/fixtures/relax.jp2
  220. BIN test/fixtures/rotating-squares.webp
  221. BIN test/fixtures/sdr_cosmos12920_cicp1-13-6_yuv444_full_qp10.avif
  222. BIN test/fixtures/swiss.png
  223. BIN test/fixtures/tifftag-photoshop.tiff
  224. BIN test/fixtures/with-alpha.png
  225. +3 −3 test/leak/leak.sh
  226. +328 −3 test/leak/sharp.supp
  227. +184 −0 test/unit/affine.js
  228. +11 −0 test/unit/agent.js
  229. +36 −1 test/unit/alpha.js
  230. +104 −0 test/unit/avif.js
  231. +12 −2 test/unit/beforeEach.js
  232. +139 −0 test/unit/clahe.js
  233. +51 −13 test/unit/colourspace.js
  234. +148 −23 test/unit/composite.js
  235. +74 −9 test/unit/extend.js
  236. +111 −17 test/unit/extract.js
  237. +18 −4 test/unit/extractChannel.js
  238. +102 −0 test/unit/failOn.js
  239. +0 −75 test/unit/failOnError.js
  240. +89 −2 test/unit/gif.js
  241. +93 −0 test/unit/heif.js
  242. +356 −148 test/unit/io.js
  243. +92 −0 test/unit/jp2.js
  244. +51 −0 test/unit/jpeg.js
  245. +47 −0 test/unit/libvips.js
  246. +1 −1 test/unit/linear.js
  247. +30 −52 test/unit/median.js
  248. +356 −14 test/unit/metadata.js
  249. +126 −68 test/unit/modulate.js
  250. +100 −0 test/unit/negate.js
  251. +259 −0 test/unit/noise.js
  252. +2 −0 test/unit/normalize.js
  253. +0 −589 test/unit/overlay.js
  254. +45 −12 test/unit/platform.js
  255. +49 −12 test/unit/png.js
  256. +114 −3 test/unit/raw.js
  257. +22 −10 test/unit/recomb.js
  258. +36 −0 test/unit/resize-contain.js
  259. +49 −1 test/unit/resize-cover.js
  260. +223 −22 test/unit/resize.js
  261. +28 −0 test/unit/rotate.js
  262. +46 −0 test/unit/sharpen.js
  263. +490 −379 test/unit/stats.js
  264. +82 −0 test/unit/svg.js
  265. +156 −53 test/unit/tiff.js
  266. +244 −5 test/unit/tile.js
  267. +26 −0 test/unit/timeout.js
  268. +24 −0 test/unit/toBuffer.js
  269. +27 −0 test/unit/toFormat.js
  270. +70 −0 test/unit/trim.js
  271. +25 −8 test/unit/util.js
  272. +166 −4 test/unit/webp.js
79 changes: 79 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
version: 2.1

workflows:
build:
jobs:
- linux-arm64-glibc-node-12:
filters:
tags:
only: /^v.*/
- linux-arm64-musl-node-12:
filters:
tags:
only: /^v.*/
- linux-arm64-glibc-node-16:
filters:
tags:
only: /^v.*/
- linux-arm64-musl-node-16:
filters:
tags:
only: /^v.*/

jobs:
linux-arm64-glibc-node-12:
resource_class: arm.medium
machine:
image: ubuntu-2004:202101-01
steps:
- checkout
- run: |
sudo docker run -dit --name sharp --volume "${PWD}:/mnt/sharp" --workdir /mnt/sharp arm64v8/debian:bullseye
sudo docker exec sharp sh -c "apt-get update && apt-get install -y build-essential git python3 curl"
sudo docker exec sharp sh -c "curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -"
sudo docker exec sharp sh -c "echo 'deb https://deb.nodesource.com/node_12.x sid main' >/etc/apt/sources.list.d/nodesource.list"
sudo docker exec sharp sh -c "apt-get update && apt-get install -y nodejs"
- run: sudo docker exec sharp sh -c "npm install --build-from-source --unsafe-perm"
- run: sudo docker exec sharp sh -c "npm test"
- run: "[[ -n $CIRCLE_TAG ]] && sudo docker exec --env prebuild_upload sharp sh -c \"npx prebuild --runtime napi --target 5 --upload=$prebuild_upload\" || true"
linux-arm64-glibc-node-16:
resource_class: arm.medium
machine:
image: ubuntu-2004:202101-01
steps:
- checkout
- run: |
sudo docker run -dit --name sharp --workdir /mnt/sharp arm64v8/debian:bullseye
sudo docker exec sharp sh -c "apt-get update && apt-get install -y build-essential git python3 curl"
sudo docker exec sharp sh -c "curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -"
sudo docker exec sharp sh -c "echo 'deb https://deb.nodesource.com/node_16.x sid main' >/etc/apt/sources.list.d/nodesource.list"
sudo docker exec sharp sh -c "apt-get update && apt-get install -y nodejs"
sudo docker exec sharp sh -c "mkdir -p /mnt/sharp"
sudo docker cp . sharp:/mnt/sharp/.
- run: sudo docker exec sharp sh -c "npm install --build-from-source"
- run: sudo docker exec sharp sh -c "npm test"
linux-arm64-musl-node-12:
resource_class: arm.medium
machine:
image: ubuntu-2004:202101-01
steps:
- checkout
- run: |
sudo docker run -dit --name sharp --volume "${PWD}:/mnt/sharp" --workdir /mnt/sharp node:12-alpine3.11
sudo docker exec sharp sh -c "apk add build-base git python3 --update-cache"
- run: sudo docker exec sharp sh -c "npm install --build-from-source --unsafe-perm"
- run: sudo docker exec sharp sh -c "npm test"
- run: "[[ -n $CIRCLE_TAG ]] && sudo docker exec --env prebuild_upload sharp sh -c \"npx prebuild --runtime napi --target 5 --upload=$prebuild_upload\" || true"
linux-arm64-musl-node-16:
resource_class: arm.medium
machine:
image: ubuntu-2004:202101-01
steps:
- checkout
- run: |
sudo docker run -dit --name sharp --workdir /mnt/sharp node:16-alpine3.11
sudo docker exec sharp sh -c "apk add build-base git python3 --update-cache"
sudo docker exec sharp sh -c "mkdir -p /mnt/sharp"
sudo docker cp . sharp:/mnt/sharp/.
- run: sudo docker exec sharp sh -c "npm install --build-from-source"
- run: sudo docker exec sharp sh -c "npm test"
16 changes: 16 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
freebsd_instance:
image_family: freebsd-14-0-snap

task:
name: FreeBSD
env:
IGNORE_OSVERSION: yes
skip_notifications: true
prerequisites_script:
- pkg update -f
- pkg upgrade -y
- pkg install -y devel/pkgconf graphics/vips www/node16 www/npm
install_script:
- npm install --build-from-source --unsafe-perm
test_script:
- npm test
21 changes: 8 additions & 13 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -16,37 +16,32 @@ If a [similar request](https://github.com/lovell/sharp/labels/enhancement) exist
it's probably fastest to add a comment to it about your requirement.

Implementation is usually straightforward if libvips
[already supports](https://libvips.github.io/libvips/API/current/func-list.html)
[already supports](https://www.libvips.org/API/current/func-list.html)
the feature you need.

## Submit a Pull Request to fix a bug

Thank you! To prevent the problem occurring again, please add unit tests that would have failed.

Please select the `master` branch as the destination for your Pull Request so your fix can be included in the next minor release.
Please select the `main` branch as the destination for your Pull Request so your fix can be included in the next minor release.

Please squash your changes into a single commit using a command like `git rebase -i upstream/master`.
Please squash your changes into a single commit using a command like `git rebase -i upstream/main`.

To test C++ changes, you can compile the module using `npm install` and then run the tests using `npm test`.
To test C++ changes, you can compile the module using `npm install --build-from-source` and then run the tests using `npm test`.

## Submit a Pull Request with a new feature

Please add JavaScript [unit tests](https://github.com/lovell/sharp/tree/master/test/unit) to cover your new feature.
Please add JavaScript [unit tests](https://github.com/lovell/sharp/tree/main/test/unit) to cover your new feature.
A test coverage report for the JavaScript code is generated in the `coverage/lcov-report` directory.

Where possible, the functional tests use gradient-based perceptual hashes
based on [dHash](http://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html)
to compare expected vs actual images.

You deserve to add your details to the [list of contributors](https://github.com/lovell/sharp/blob/master/package.json#L5).
You deserve to add your details to the [list of contributors](https://github.com/lovell/sharp/blob/main/package.json#L5).

Any change that modifies the existing public API should be added to the relevant work-in-progress branch for inclusion in the next major release.

| Release | WIP branch |
| ------: | :--------- |
| v0.23.0 | vision |
| v0.24.0 | wit |

Please squash your changes into a single commit using a command like `git rebase -i upstream/<wip-branch>`.

### Add a new public method
@@ -71,7 +66,7 @@ The public API is documented with [JSDoc](http://usejsdoc.org/) annotated commen

These can be converted to Markdown by running:
```sh
npm run docs
npm run docs-build
```

Please include documentation updates in any Pull Request that modifies the public API.
@@ -98,5 +93,5 @@ Please feel free to ask any questions via a
[new issue](https://github.com/lovell/sharp/issues/new).

If you're unable to post details publicly, please
[e-mail](https://github.com/lovell/sharp/blob/master/package.json#L4)
[e-mail](https://github.com/lovell/sharp/blob/main/package.json#L5)
for private, paid consulting.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: libvips
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Documentation
url: https://sharp.pixelplumbing.com/
about: Installation instructions, complete API documentation with examples, changelog
24 changes: 17 additions & 7 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
---
name: Feature request
about: Suggest an idea
title: ''
labels: enhancement
assignees: ''

---

What are you trying to achieve?
## Feature request

Have you searched for similar feature requests?
### What are you trying to achieve?

What would you expect the API to look like?
<!-- Please provide context here. -->

What alternatives have you considered?
### When you searched for similar feature requests, what did you find that might be related?

Is there a sample image that helps explain?
<!-- Please demonstrate your research here. -->

### What would you expect the API to look like?

<!-- Please provide your suggestions here. -->

### What alternatives have you considered?

<!-- Please provide your ideas here. -->

### Please provide sample image(s) that help explain this feature

<!-- Please provide links to one or more images here. -->
45 changes: 38 additions & 7 deletions .github/ISSUE_TEMPLATE/installation.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,45 @@
---
name: Installation
about: For help if something went wrong installing sharp
title: ''
labels: ''
assignees: ''
about: Something went wrong during either 'npm install sharp' or 'require("sharp")'
labels: installation

---

What is the output of running `npm install --verbose sharp`?
<!-- Please try to answer as many of these questions as possible. -->

What is the output of running `npx envinfo --binaries --languages --system --utilities`?
## Possible install-time or require-time problem

Have you ensured the platform and version of Node.js used for `npm install` is the same as the platform and version of Node.js used at runtime?
<!-- Please place an [x] in the box to confirm. -->

- [ ] I have read the [documentation relating to installation](https://sharp.pixelplumbing.com/install).
- [ ] I have ensured that the architecture and platform of Node.js used for `npm install` is the same as the architecture and platform of Node.js used at runtime.

### Are you using the latest version of sharp?

<!-- Please place an [x] in the box to confirm. -->

- [ ] I am using the latest version of `sharp` as reported by `npm view sharp dist-tags.latest`.

If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.

If you are using another package which depends on a version of `sharp` that is not the latest, please open an issue against that package instead.

### Is this a problem with filesystem permissions?

If you are using npm v6 or earlier and installing as a `root` or `sudo` user, have you tried with the `npm install --unsafe-perm` flag?

If you are using npm v7 or later, does the user running `npm install` own the directory it is run in?

If you are using the `ignore-scripts` feature of `npm`, have you tried with the `npm install --ignore-scripts=false` flag?

### What is the complete output of running `npm install --verbose --foreground-scripts sharp` in an empty directory?

<details>

<!-- Please provide output of `npm install --verbose --foreground-scripts sharp` in an empty directory here. -->

</details>

### What is the output of running `npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp`?

<!-- Please provide output of `npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp` here. -->
49 changes: 40 additions & 9 deletions .github/ISSUE_TEMPLATE/possible-bug.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,49 @@
---
name: Possible bug
about: Please provide steps to reproduce
title: ''
labels: ''
assignees: ''
about: Installation of sharp was successful but then something unexpected occurred using one of its features
labels: triage

---

What is the output of running `npx envinfo --binaries --languages --system --utilities`?
<!-- If this issue relates to installation, please use https://github.com/lovell/sharp/issues/new?labels=installation&template=installation.md instead. -->

What are the steps to reproduce?
## Possible bug

What is the expected behaviour?
### Is this a possible bug in a feature of sharp, unrelated to installation?

Are you able to provide a standalone code sample, without other dependencies, that demonstrates this problem?
<!-- Please place an [x] in the box to confirm. -->

Are you able to provide a sample image that helps explain the problem?
- [ ] Running `npm install sharp` completes without error.
- [ ] Running `node -e "require('sharp')"` completes without error.

If you cannot confirm both of these, please open an [installation issue](https://github.com/lovell/sharp/issues/new?labels=installation&template=installation.md) instead.

### Are you using the latest version of sharp?

<!-- Please place an [x] in the box to confirm. -->

- [ ] I am using the latest version of `sharp` as reported by `npm view sharp dist-tags.latest`.

If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.

If you are using another package which depends on a version of `sharp` that is not the latest, please open an issue against that package instead.

### What is the output of running `npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp`?

<!-- Please provide output of the above command here. -->

### What are the steps to reproduce?

<!-- Please enter steps to reproduce here. -->

### What is the expected behaviour?

<!-- Please enter the expected behaviour here. -->

### Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem

<!-- Please provide either formatted code or a link to a repo/gist that allows someone else to reproduce here. -->

### Please provide sample image(s) that help explain this problem

<!-- Please provide links to one or more images here. -->
24 changes: 17 additions & 7 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
---
name: Question
about: For help with an existing feature
title: ''
about: For help understanding an existing feature
labels: question
assignees: ''

---

What are you trying to achieve?
<!-- If this issue relates to installation, please use https://github.com/lovell/sharp/issues/new?labels=installation&template=installation.md instead. -->

Have you searched for similar questions?
## Question about an existing feature

Are you able to provide a standalone code sample that demonstrates this question?
### What are you trying to achieve?

Are you able to provide a sample image that helps explain the question?
<!-- Please provide context here. -->

### When you searched for similar issues, what did you find that might be related?

<!-- Please demonstrate your research here. -->

### Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this question

<!-- Please provide either formatted code or a link to a repo/gist that helps someone else understand here. -->

### Please provide sample image(s) that help explain this question

<!-- Please provide links to one or more images here. -->
36 changes: 36 additions & 0 deletions .github/workflows/ci-darwin-arm64v8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI (MacStadium)
on:
- push
- pull_request
jobs:
CI:
runs-on: macos-m1
strategy:
fail-fast: false
matrix:
include:
- nodejs_version: 12
nodejs_architecture: x64
- nodejs_version: 16
nodejs_architecture: arm64
prebuild: true
defaults:
run:
shell: /usr/bin/arch -arch arm64e /bin/bash -l {0}
steps:
- name: Dependencies
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.nodejs_version }}
architecture: ${{ matrix.nodejs_architecture }}
- name: Checkout
uses: actions/checkout@v2
- name: Install
run: npm install --build-from-source --unsafe-perm
- name: Test
run: npm test
- name: Prebuild
if: matrix.prebuild && startsWith(github.ref, 'refs/tags/')
env:
prebuild_upload: ${{ secrets.GITHUB_TOKEN }}
run: npx prebuild --runtime napi --target 5
Loading