BREAKING CHANGES
- requires
serverless
v3.2 or higher, support forserverless
v1 and v2 was removed. - requires
node.js
v14.18 or higher. note that this only applies to run the plugin, you can still usenodejs12.x
as a lambda runtime. - this plugin is now a pure
esm
module. this should not matter to most users as the plugin is usually being loaded byserverless
itself. you might run into issues if you are running the plugin programmatically or if you are using a plugin for this plugin. worker threads
are now being used by default. this resembles closer characteristics to how lambdas behave. the--useWorkerThreads
flag was therefore removed. if you want to run in the previously defaultin-process
mode you have to use the new--useInProcess
flag.- reloading handlers for development is now an opt-in, as opposed to be an opt-out. for that reason (and others) the flag name was changed to
--reloadHandler
.--allowCache
has been removed. - handler reloading within the node.js process (
in-process
mode) was removed and is not possible anymore, as it was buggy and the cause for countless memory leaks. removing this also sets the stage for supportingesm
handlers, which are not accessible withinrequire.cache
. if thein-process
mode is being preferred, one might want to usenodemon
or similar to trigger handler reloading (which would restart the entire node process)
Features
- add 'configValidationMode: error' option (8de4008)
- add 'configValidationMode: error' option, Part 2 (3610786)
- add 'configValidationMode: error' option, Part 3 (6f3e66b)
- add 'configValidationMode: error' option, Part 4 (b7e73f2)
- add 'configValidationMode: error' option, Part 5 (39d37cb)
- add new runtimes (#1464) (3ae08c4)
- add object.hasown shim (ea0aebf)
- add package.json exports field (2c263d0)
- add reload handler flag (f662dc5)
- bump esm-only deps (#1456) (5faa4d1)
- display memory leak warning for in-process handlers (2192a5f)
- remove babel, use esm (#1455) (1f4d836)
- remove even more serverless v2 logging (677d1b1)
- remove more serverless v2 logging (6b101aa)
- remove serverless v2 logging (404093c)
- support serverless v3 (#1444) (1e9445e)
Bug Fixes
- __dirname in esm (0cdf1b9)
- add strict directive (5d88bc4)
- await promise (d01d3e3)
- aws-sdk import (43ed77e)
- cleanup (#1457) (4e29466)
- cli option message (9e31eb3)
- console.log (d85bb15)
- don't require context (#1471) (#1472) (aaccf96)
- example plugin path (da60c98)
- execa import (a2c599a)
- getter/setter map (e56b190)
- Increase invocation payload limit to 6 mb (0e13c8b)
- package.json files (79ffb5e)
- remove allow cache option (78fec17)
- remove catch binding (#1459) (653aa5c)
- remove NODE_ENV=test condition (#1499) (2eec40a)
- remove ruby v2.5 support (ca85e7e)
- serverless-offline v8.6 and later unloads all modules when running on Windows, breaking plugins (#1461) (#1462) (af441b2)
- stringify websocket data (4b0f110)
- websocket imports (eae5400)
ci
Maintenance Improvements
- conditionally install node-fetch globally vs. node.js v18+ (0f2c313)
- don't return from constructor (cf101bd)
- export internals (37ff876)
- fix function name (52e5f98)
- import log from @serverless/utils package (63c7b43)
- make cleanupFunctions private (bb77350)
- make method private (7fa36af)
- nit (5180b25)
- re-use path.resolve kimport (732d374)
- reduce try/catch block (850ae3e)
- remove p-map module (6d4b1af)
- remove readfile function (c417198)
- remove serverless compat check (21779ff)
- remove update-notifier (861ad84)
- remove var (5f84931)
- replace cuid module with built-in crypto.randomUUID (2cf6b41)
- replace printBlankLine (b82028f)
- simplify (2943120)
- simplify (ac63c36)
- simplify condition (acdf1b9)
- use a lot more Object.entries (85361a5)
- use async fs/promises (#1458) (ae855ef)
- use async unlink (#1480) (2fccc87)
- use destructuring (f8c6533)
- use even more Object.entries (76582e0)
- use fs/promises (#1432) (f744897)
- use fs/promises (#1445) (969b37c)
- use function statements, move into module scope (4dc34c5)
- use more Object.entries (c1552e4)
- use named import (669ebc6)
- use node: protocol import (e44182b)
- use node: protocol imports (#1435) (397e703)
- use Object.entries (b864a35)
- use Object.entries (257524c)
- use object.entries (#1446) (7b25196)
- use Object.entries/.fromEntries (18c2b41)
- use private methods (#1423) (a332dbf)
- use private methods (#1425) (f04e57c)
- use way more Object.entries (86c5280)
- use worker threads by default, remove flag, introduce in-process flag (80091fb)
- websockets: use async/await (4377f45)