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

Upgrade to node 20 #37

Merged
merged 7 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18.x"
node-version: "20.x"
cache: "yarn"
- run: yarn install
- run: npx eslint .
Expand All @@ -23,10 +23,10 @@ jobs:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18.x"
node-version: "20.x"
cache: "yarn"
- run: yarn install
- run: npx prettier --check .
Expand All @@ -35,10 +35,10 @@ jobs:
name: Run unit tests
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18.x"
node-version: "20.x"
cache: "yarn"
- run: yarn install
- run: yarn test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Upgrade to V4.2.0

The node runtime has been updated to version 20.
Ensure your deploy workflows use the correct node version.

# Upgrade to V4

The URL structure has changed to make it possible to add more options. The old URL structure is not supported anymore. But can easily be converted to the new structure.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ This tests a variety of actual image conversions against problems we encountered

## Deploy Lambda function

Due to internal requirements, this project has a default Serverless configuration. But you can deploy the app with your own copy op `serverless.example.yml`. We advise you to do so, because it's more flexible.
Due to internal requirements, this project has a default Serverless configuration. But you can deploy the app with your own copy of `serverless.example.yml`. We advise you to do so, because it's more flexible.

## With your own copy of serverless.example.yml

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Microservice for scaling S3-stored images on the fly.",
"main": "index.js",
"engines": {
"node": "18"
"node": "20"
},
"scripts": {
"serve": "node server/index.js",
Expand All @@ -22,7 +22,7 @@
},
"homepage": "https://github.com/grrr-amsterdam/s3-image-scaler#readme",
"dependencies": {
"sharp": "^0.32.4"
"sharp": "^0.33.5"
},
"devDependencies": {
"@aws-sdk/client-s3": "^3.312.0",
Expand Down
6 changes: 5 additions & 1 deletion serverless.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ provider:
- - "arn:aws:s3:::"
- ${param:bucket}
- "/*"
runtime: nodejs18.x
runtime: nodejs20.x
versionFunctions: false
deploymentBucket:
name: serverless.deployments.grrr
# Enable these lines when using ApiGateway:
# apiGateway:
# binaryMediaTypes:
# - "*/*"
environment:
BUCKET: ${param:bucket}
IMAGE_QUALITY: ${param:image_quality}
Expand Down
2 changes: 1 addition & 1 deletion serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ provider:
Project: ${env:PROJECT_NAME,env:SERVICE_NAME}
iam:
role: ${env:SERVERLESS_ROLE}
runtime: nodejs18.x
runtime: nodejs20.x
versionFunctions: false
deploymentBucket:
name: ${env:DEPLOYMENT_BUCKET}
Expand Down
Binary file modified test/fixtures/belltower500x500.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/drawing.webp
Binary file not shown.
Binary file modified test/fixtures/pixelme500x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/pixelme50x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/pixelme5x5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/sample160x.jfif
Binary file not shown.
Binary file modified test/fixtures/transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/transparent50x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/with-orientation-header240x.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading