Skip to content

Commit

Permalink
feat: upgrade esbuld version, drop node 14 in pipelines, use nodejs18… (
Browse files Browse the repository at this point in the history
#552)

* feat: upgrade esbuld version, drop node 14 in pipelines, use nodejs18.x as default runtime

* fix: update esbuild-node-externals to version 1.14.0

* fix: esbuild-node-externals breaking change usage

* test: fix test failing in node 20 and higher
  • Loading branch information
floydspace authored Sep 21, 2024
1 parent 7dc3b64 commit 6deddd2
Show file tree
Hide file tree
Showing 20 changed files with 301 additions and 242 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16, 18]
node-version: [18, 20, 22]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16, 18]
node-version: [18, 20, 22]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: npm ci
- run: npx semantic-release
env:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ The following `esbuild` options are automatically set.
| `entryPoints` | N/A | Cannot be overridden |
| `outDir` | N/A | Cannot be overridden |
| `platform` | `'node'` | Set `format` to `esm` to enable ESM support |
| `target` | `'node16'` | We dynamically set this. See [Supported Runtimes](#supported-runtimes) |
| `target` | `'node18'` | We dynamically set this. See [Supported Runtimes](#supported-runtimes) |
| `watch` | N/A | Cannot be overridden |

#### Packager Options
Expand Down
2 changes: 1 addition & 1 deletion e2e/__snapshots__/complete.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ exports[`complete 5`] = `
"Arn",
],
},
"Runtime": "nodejs12.x",
"Runtime": "nodejs18.x",
"Timeout": 6,
},
"Type": "AWS::Lambda::Function",
Expand Down
4 changes: 2 additions & 2 deletions e2e/__snapshots__/individually.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ exports[`individually 6`] = `
"Arn",
],
},
"Runtime": "nodejs12.x",
"Runtime": "nodejs18.x",
"Timeout": 6,
},
"Type": "AWS::Lambda::Function",
Expand Down Expand Up @@ -295,7 +295,7 @@ exports[`individually 6`] = `
"Arn",
],
},
"Runtime": "nodejs12.x",
"Runtime": "nodejs18.x",
"Timeout": 6,
},
"Type": "AWS::Lambda::Function",
Expand Down
2 changes: 1 addition & 1 deletion e2e/__snapshots__/minimal.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14227,7 +14227,7 @@ exports[`minimal 5`] = `
"Arn",
],
},
"Runtime": "nodejs12.x",
"Runtime": "nodejs18.x",
"Timeout": 6,
},
"Type": "AWS::Lambda::Function",
Expand Down
2 changes: 1 addition & 1 deletion examples/complete/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"devDependencies": {
"@types/node": "^18.7.21",
"esbuild": "^0.20.0",
"esbuild": "^0.23.0",
"serverless": "^3.22.0",
"serverless-esbuild": "file:../..",
"serverless-offline": "^10.2.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/complete/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ custom:

provider:
name: aws
runtime: nodejs12.x
runtime: nodejs18.x

functions:
validateIsin:
Expand Down
2 changes: 1 addition & 1 deletion examples/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"devDependencies": {
"@types/lodash": "4.14.185",
"@types/node": "^18.7.21",
"esbuild": "^0.20.0",
"esbuild": "^0.23.0",
"serverless": "^3.22.0",
"serverless-esbuild": "file:../..",
"serverless-offline": "^10.2.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/config/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package:

provider:
name: aws
runtime: nodejs12.x
runtime: nodejs18.x

custom:
esbuild:
Expand Down
2 changes: 1 addition & 1 deletion examples/individually/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"devDependencies": {
"@types/lodash": "4.14.185",
"@types/node": "^18.7.21",
"esbuild": "^0.20.0",
"esbuild": "^0.23.0",
"serverless": "^3.22.0",
"serverless-esbuild": "file:../..",
"serverless-offline": "^10.2.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/individually/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package:

provider:
name: aws
runtime: nodejs12.x
runtime: nodejs18.x

custom:
esbuild:
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"devDependencies": {
"@types/node": "^18.7.21",
"esbuild": "^0.20.0",
"esbuild": "^0.23.0",
"serverless": "^3.22.0",
"serverless-esbuild": "file:../..",
"serverless-offline": "^10.2.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins:

provider:
name: aws
runtime: nodejs12.x
runtime: nodejs18.x

functions:
validateIsin:
Expand Down
Loading

0 comments on commit 6deddd2

Please sign in to comment.