Skip to content

Commit

Permalink
feat: allow esbuild 0.19 (#487)
Browse files Browse the repository at this point in the history
* feat: allow esbuild v0.18

* upgrade esbuild and related packages
* remove incremental build option
  it is not supported by the esbuild api

* Upgrade esbuild version to 19

* also package.lock.json

* Removed the rest of the incremental options

* Increment the minimal example to 19 as well

* Might as well move up to esbuild 0.19.3

* Actually fix the tests. Remove the last remains of the incremental build.

* Reimport esbuild 19

---------

Co-authored-by: Florian Mayer <florian.mayer@sz.de>
  • Loading branch information
ZachLeviPixel and fm-sz committed Sep 16, 2023
1 parent 20bd3fd commit e04dcbe
Show file tree
Hide file tree
Showing 11 changed files with 208 additions and 237 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ See [example folder](examples) for some example configurations.
| Esbuild Options | This plugin can take almost any [Esbuild Javascript Build Option](https://esbuild.github.io/api/#build-api). | [Default Esbuild Options](#default-esbuild-options) |
| `concurrency` | The number of concurrent bundle operations to run at once. eg. `8`. _NOTE_: This can be memory intensive and could produce slower builds. | `Infinity` |
| `zipConcurrency` | The number of concurrent zip operations to run at once. eg. `8`. _NOTE_: This can be memory intensive and could produce slower builds. | `Infinity` |
| `disableIncremental` | Disables the use of esbuild `incremental` compilation. | `false` |
| `exclude` | An array of dependencies to exclude from the Lambda. This is passed to the esbuild `external` option. Set to `*` to disable packaging `node_modules` | `['aws-sdk']` |
| `installExtraArgs` | Optional arguments passed to npm or yarn for `external` dependency resolution. eg. `['--legacy-peer-deps']` for npm v7+ to use legacy `peerDependency` resolution behavior | `[]` |
| `keepOutputDirectory` | Keeps the `.esbuild` output folder. Useful for debugging. | `false` |
Expand All @@ -100,7 +99,6 @@ The following `esbuild` options are automatically set.
| ------------- | ---------- | ---------------------------------------------------------------------- |
| `bundle` | `true` | Esbuild requires this for use with `external` |
| `entryPoints` | N/A | Cannot be overridden |
| `incremental` | N/A | Cannot be overridden. Use `disableIncremental` to disable it |
| `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) |
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.15.9",
"esbuild": "^0.19.0",
"serverless": "^3.22.0",
"serverless-esbuild": "file:../..",
"serverless-offline": "^10.2.1",
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.15.9",
"esbuild": "^0.19.0",
"serverless": "^3.22.0",
"serverless-esbuild": "file:../..",
"serverless-offline": "^10.2.1"
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.15.9",
"esbuild": "^0.19.0",
"serverless": "^3.22.0",
"serverless-esbuild": "file:../..",
"serverless-offline": "^10.2.1"
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.15.9",
"esbuild": "^0.19.0",
"serverless": "^3.22.0",
"serverless-esbuild": "file:../..",
"serverless-offline": "^10.2.1"
Expand Down
Loading

0 comments on commit e04dcbe

Please sign in to comment.