Skip to content

Commit b04349d

Browse files
authored
Merge pull request #12 from xtrinch/main
Upgrade to sharp 0.30.7
2 parents cd02f56 + 4982dfe commit b04349d

File tree

8 files changed

+1463
-256
lines changed

8 files changed

+1463
-256
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Due to potential license concerns for the HEVC patent group, this repo can't be
1414

1515
But you can compile and deploy this lambda layer yourself at your own risk and use it wihin your own accounts. All you need is an S3 bucket to deploy the compiled code to (replace `your-s3-bucket` in the code snippet below). Please see the note below regarding the build process.
1616

17-
It is recommended to automate this process using AWS CodeBuild. A buildspec file is provided in the repo. In that case you'll have to set the `SAM_BUCKET` environment variable in CodeBuild. For other environment variables see the table below.
17+
It is recommended to automate this process using AWS CodeBuild. A buildspec file is provided in the repo. In that case you'll have to set the `SAM_BUCKET` environment variable in CodeBuild. For other environment variables see the table below. The base image that should be used is `aws/codebuild/amazonlinux2-x86_64-standard:4.0`.
1818

1919
```bash
2020
npm run build
@@ -68,10 +68,12 @@ The following table lists the release version of this repo together with the ver
6868
| 1.1.0 | 0.27.0 | 8.10.5 | 1.10.0 | 1.1.0 | 1.0.8 | 12 |
6969
| 1.2.0 | 0.28.2 | 8.10.6 | 1.12.0 | 1.2.0 | 1.0.8 | 12 |
7070
| 2.0.0 | 0.29.1 | 8.11.3 | 1.12.0 | 1.2.1 | 1.0.8 | 14 |
71+
| 3.0.0 | 0.30.7 | 8.12.2 | 1.12.0 | 1.2.4 | 1.0.8 | 16 |
7172

7273
### CompatibleRuntimes
7374
- `nodejs12.x` (v1.x)
7475
- `nodejs14.x` (v2.x)
76+
- `nodejs16.x` (v3.x)
7577

7678

7779
## Contributions

buildspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99
phases:
1010
install:
1111
runtime-versions:
12-
nodejs: 14
12+
nodejs: 16
1313
commands:
1414
- pip3 install aws-sam-cli --upgrade --user
1515
pre_build:

examples/src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"author": "Andreas Zoellner",
1010
"license": "MIT",
1111
"engines": {
12-
"node": ">=14.0"
12+
"node": ">=16.0"
1313
}
1414
}

layer/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Library Versions
2-
WEBP_VERSION=1.2.1
2+
WEBP_VERSION=1.2.4
33
LIBDE265_VERSION=1.0.8
44
LIBHEIF_VERSION=1.12.0
5-
VIPS_VERSION=8.11.3
6-
SHARP_VERSION=0.29.1
5+
VIPS_VERSION=8.12.2
6+
SHARP_VERSION=0.30.7
77

88
PREFIX_PATH=/opt
99

@@ -16,7 +16,7 @@ build-SharpHEICLayer: libvips
1616
# sharp uses several of the libs we installed or compiled. extract the full list and copy all of those into /opt/lib
1717
# extract list with ldd from sharp.node, manipulate a bit with sed to only get the absolute paths, then copy
1818
LD_LIBRARY_PATH=$(PREFIX_PATH)/lib npm --prefix "$(ARTIFACTS_DIR)/nodejs/" install sharp@$(SHARP_VERSION)
19-
ldd $(ARTIFACTS_DIR)/nodejs/node_modules/sharp/build/Release/sharp-linux-x64.node | sed -nE "s/^[^\/\n]*(\/[^ ]+)(.*)/\1/p" | xargs cp -t $(ARTIFACTS_DIR)/lib
19+
LD_LIBRARY_PATH=$(PREFIX_PATH)/lib ldd $(ARTIFACTS_DIR)/nodejs/node_modules/sharp/build/Release/sharp-linux-x64.node | sed -nE "s/^[^\/\n]*(\/[^ ]+)(.*)/\1/p" | xargs cp -t $(ARTIFACTS_DIR)/lib
2020

2121
libwebp:
2222
curl -L https://github.com/webmproject/libwebp/archive/v$(WEBP_VERSION).tar.gz | tar zx

layer/src/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"license": "MIT",
99
"devDependencies": {},
1010
"engines": {
11-
"node": ">=14.0"
11+
"node": ">=16.0"
1212
},
1313
"dependencies": {
14-
"sharp": "^0.29.1"
14+
"sharp": "^0.30.7"
1515
}
1616
}

0 commit comments

Comments
 (0)