Skip to content

Commit 78b1a03

Browse files
committed
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.
1 parent d997dfa commit 78b1a03

File tree

11 files changed

+24
-10
lines changed

11 files changed

+24
-10
lines changed

.changeset/fair-poems-pull.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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+
Remove Node.js 18 from supported versions

.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

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
},

packages/twilio-run/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
"README.md"
123123
],
124124
"engines": {
125-
"node": ">=18.0.0"
125+
"node": "^20.x || ^22.x"
126126
},
127127
"gitHead": "6db273648ed19474f4125042556b10c051529912"
128128
}

0 commit comments

Comments
 (0)