Skip to content

Commit 3c1149c

Browse files
authored
chore: update toolkit to default to node22 (#540)
1 parent 50eae0a commit 3c1149c

File tree

9 files changed

+16
-8
lines changed

9 files changed

+16
-8
lines changed

.changeset/breezy-files-float.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@twilio-labs/serverless-api": minor
3+
"twilio-run": minor
4+
"create-twilio-function": minor
5+
"@twilio-labs/plugin-serverless": minor
6+
---
7+
8+
chore: update toolkit to default to node22

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: '18',
9+
node: '22',
1010
typescript: '^5.3.3',
1111
serverlessRuntimeTypes: '^4.0.0',
1212
copyfiles: '^2.4.1',

packages/plugin-serverless/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ FLAGS
158158
--password=<value> A specific API secret or auth token for deployment. Uses fields from .env otherwise
159159
--production Please prefer the "activate" command! Deploys to the production environment (no
160160
domain suffix). Overrides the value passed via the environment flag.
161-
--runtime=<value> The version of Node.js to deploy the build to. (node18)
161+
--runtime=<value> The version of Node.js to deploy the build to. (node22)
162162
--service-sid=<value> SID of the Twilio Serverless Service to deploy to
163163
--silent Suppress output and logs. This is a shorthand for "-l none -o none".
164164
--to=<value> [Alias for "environment"]

packages/serverless-api/examples/deploy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ async function run() {
1010
const result = await client.deployProject({
1111
...config,
1212
overrideExistingService: true,
13-
runtime: 'node18',
13+
runtime: 'node22',
1414
env: {
1515
HELLO: 'ahoy',
1616
WORLD: 'welt',

packages/serverless-api/src/types/deploy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type DeployProjectConfigBase = {
4444
*/
4545
overrideExistingService?: boolean;
4646
/**
47-
* Version of Node.js to deploy with in Twilio Runtime. Can be "node18"
47+
* Version of Node.js to deploy with in Twilio Runtime. Can be "node22"
4848
*/
4949
runtime?: string;
5050
/**

packages/twilio-run/__tests__/templating/__snapshots__/defaultConfig.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ exports[`writeDefaultConfigFile default file should match snapshot 1`] = `
3636
// "production": false /* Promote build to the production environment (no domain suffix). Overrides environment flag */,
3737
// "properties": null /* Specify the output properties you want to see. Works best on single types */,
3838
// "region": null /* Twilio API Region */,
39-
"runtime": "node18" /* The version of Node.js to deploy the build to. (node18) */,
39+
"runtime": "node22" /* The version of Node.js to deploy the build to. (node22) */,
4040
// "serviceName": null /* Overrides the name of the Serverless project. Default: the name field in your package.json */,
4141
// "serviceSid": null /* SID of the Twilio Serverless Service to deploy to */,
4242
// "sourceEnvironment": null /* SID or suffix of an existing environment you want to deploy from. */,

packages/twilio-run/src/checks/nodejs-version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { stripIndent } from 'common-tags';
22
import { logger } from '../utils/logger';
33

4-
const SERVERLESS_NODE_JS_VERSION = ['16.', '18.'];
4+
const SERVERLESS_NODE_JS_VERSION = ['18.', '20.', '22.'];
55

66
export function printVersionWarning(
77
nodeVersion: string,

packages/twilio-run/src/flags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export const ALL_FLAGS = {
228228
} as Options,
229229
runtime: {
230230
type: 'string',
231-
describe: 'The version of Node.js to deploy the build to. (node18)',
231+
describe: 'The version of Node.js to deploy the build to. (node22)',
232232
} as Options,
233233
key: {
234234
type: 'string',

packages/twilio-run/src/templating/defaultConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { getDebugFunction } from '../utils/logger';
99

1010
const debug = getDebugFunction('twilio-run:templating:defaultConfig');
1111

12-
const DEFAULT_RUNTIME = 'node18';
12+
const DEFAULT_RUNTIME = 'node22';
1313

1414
function renderDefault(config: Options): string {
1515
if (config.type === 'boolean') {

0 commit comments

Comments
 (0)