Skip to content

Commit 9f945cd

Browse files
authored
feat: remove Node.js 18 from supported versions (#544)
* feat: remove Node.js 18 from supported versions Node.js 18 is EOL and will not receive bug fixes or security upgrades. Users should migrate to Node.js 20 or 22. BREAKING CHANGE: Projects using create-twilio-function, plugin-asset, plugin-serverless or twilio-run will have to migrate to Node.js 20 or 22. * chore: bump tsdoc version to ^0.28.14 Our project currently resolves to typescript version 5.9.x but tsdoc only supports this version starting from 0.28.9. * docs: add more detail to changeset
1 parent d997dfa commit 9f945cd

File tree

12 files changed

+29
-11
lines changed

12 files changed

+29
-11
lines changed

.changeset/fair-poems-pull.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@twilio-labs/serverless-twilio-runtime': major
3+
'create-twilio-function': major
4+
'@twilio-labs/plugin-serverless': major
5+
'@twilio-labs/plugin-assets': major
6+
'twilio-run': major
7+
---
8+
9+
**WHAT**: Remove Node.js 18 from supported versions.
10+
11+
**WHY**: Node.js 18 is EOL and will not receive bug fixes or security upgrades. Users should migrate to Node.js 20 or 22.
12+
13+
**BREAKING CHANGE**: Projects using `create-twilio-function`, `@twilio-labs/plugin-asset`, `@twilio-labs/plugin-serverless`, `@twilio-labs/serverless-twilio-runtime` or `twilio-run` will have to migrate to Node.js 20 or 22.

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
20

docs/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ If you are planning to contribute something that does not have an open issue yet
1414

1515
## Requirements
1616

17-
Make sure you have Node.js 18 or newer installed. Due to compatibility with Twilio
18-
Functions this project has to support at least Node.js 18.0.0.
17+
Make sure you have Node.js 20 or newer installed. Due to compatibility with Twilio
18+
Functions this project has to support at least Node.js 20.0.0.
1919

2020
We are using the npm CLI to manage our project. You'll need at least `npm` version 8 or newer.
2121

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"prettier": "^2.2.1",
4343
"rimraf": "^3.0.2",
4444
"ts-jest": "^29.1.2",
45-
"typedoc": "^0.27.4",
45+
"typedoc": "^0.28.14",
4646
"typescript": "^5.3.3"
4747
},
4848
"lint-staged": {

packages/create-twilio-function/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"yargs": "^17.2.1"
4343
},
4444
"engines": {
45-
"node": ">=12.22.1"
45+
"node": "^20.x || ^22.x"
4646
},
4747
"files": [
4848
"bin/",

packages/create-twilio-function/src/create-twilio-function/versions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
'@twilio/runtime-handler'
77
].replace(/[\^~]/, ''),
88
twilioRun: pkgJson.dependencies['twilio-run'],
9-
node: '22',
9+
node: '^20.x || ^22.x',
1010
typescript: '^5.3.3',
1111
serverlessRuntimeTypes: '^4.0.0',
1212
copyfiles: '^2.4.1',

packages/plugin-assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"rimraf": "^5.0.5"
2424
},
2525
"engines": {
26-
"node": ">=18"
26+
"node": "^20.x || ^22.x"
2727
},
2828
"files": [
2929
"/oclif.manifest.json",

packages/plugin-serverless/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"oclif": "^4.0.0"
2323
},
2424
"engines": {
25-
"node": ">=18.0.0"
25+
"node": "^20.x || ^22.x"
2626
},
2727
"files": [
2828
"/oclif.manifest.json",

packages/serverless-twilio-runtime/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Serverless Framework plugin to deploy to the Twilio Runtime.
88

99
### Pre-requisites
1010

11-
- Node.js v18.x (this is the runtime version supported by Twilio Functions)
11+
- Node.js v20.x (this is the runtime version supported by Twilio Functions)
1212
- Serverless CLI v1.50.0+. You can run npm i -g serverless if you don't already have it.
1313
- A Twilio account. If you don't have one you can [sign up quickly](https://www.twilio.com/try-twilio).
1414

packages/twilio-run/__tests__/utils/stack-trace/helpers.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ function generateMockCallSite(
1616
getFunction: jest.fn(),
1717
getFunctionName: jest.fn(),
1818
getMethodName: jest.fn(),
19+
getPosition: jest.fn(),
1920
getFileName: jest.fn().mockReturnValue(fileName),
2021
getLineNumber: jest.fn(),
2122
getColumnNumber: jest.fn(),
23+
getEnclosingColumnNumber: jest.fn(),
24+
getEnclosingLineNumber: jest.fn(),
2225
getEvalOrigin: jest.fn(),
2326
isToplevel: jest.fn(),
2427
isEval: jest.fn(),
@@ -27,6 +30,8 @@ function generateMockCallSite(
2730
isAsync: jest.fn(),
2831
isPromiseAll: jest.fn(),
2932
getPromiseIndex: jest.fn(),
33+
getScriptHash: jest.fn(),
34+
getScriptNameOrSourceURL: jest.fn(),
3035
toString: () => {
3136
return str;
3237
},

0 commit comments

Comments
 (0)