diff --git a/packages/create-twilio-function/src/create-twilio-function/versions.js b/packages/create-twilio-function/src/create-twilio-function/versions.js index 8b2c8d24..e772cf51 100644 --- a/packages/create-twilio-function/src/create-twilio-function/versions.js +++ b/packages/create-twilio-function/src/create-twilio-function/versions.js @@ -6,7 +6,7 @@ module.exports = { '@twilio/runtime-handler' ].replace(/[\^~]/, ''), twilioRun: pkgJson.dependencies['twilio-run'], - node: '16', + node: '18', typescript: '^3.8', serverlessRuntimeTypes: '^1.1', copyfiles: '^2.2.0', diff --git a/packages/plugin-serverless/README.md b/packages/plugin-serverless/README.md index 7ea07d6f..27f33e17 100644 --- a/packages/plugin-serverless/README.md +++ b/packages/plugin-serverless/README.md @@ -157,7 +157,7 @@ FLAGS --password= A specific API secret or auth token for deployment. Uses fields from .env otherwise --production Please prefer the "activate" command! Deploys to the production environment (no domain suffix). Overrides the value passed via the environment flag. - --runtime= The version of Node.js to deploy the build to. (node16) + --runtime= The version of Node.js to deploy the build to. (node18) --service-sid= SID of the Twilio Serverless Service to deploy to --silent Suppress output and logs. This is a shorthand for "-l none -o none". --to= [Alias for "environment"] diff --git a/packages/serverless-api/examples/deploy.js b/packages/serverless-api/examples/deploy.js index cb4c3155..0230eb46 100644 --- a/packages/serverless-api/examples/deploy.js +++ b/packages/serverless-api/examples/deploy.js @@ -10,7 +10,7 @@ async function run() { const result = await client.deployProject({ ...config, overrideExistingService: true, - runtime: 'node16', + runtime: 'node18', env: { HELLO: 'ahoy', WORLD: 'welt', diff --git a/packages/serverless-api/src/types/deploy.ts b/packages/serverless-api/src/types/deploy.ts index a87e604f..3a2c353b 100644 --- a/packages/serverless-api/src/types/deploy.ts +++ b/packages/serverless-api/src/types/deploy.ts @@ -44,7 +44,7 @@ type DeployProjectConfigBase = { */ overrideExistingService?: boolean; /** - * Version of Node.js to deploy with in Twilio Runtime. Can be "node16" + * Version of Node.js to deploy with in Twilio Runtime. Can be "node18" */ runtime?: string; }; diff --git a/packages/twilio-run/__tests__/templating/__snapshots__/defaultConfig.test.ts.snap b/packages/twilio-run/__tests__/templating/__snapshots__/defaultConfig.test.ts.snap index f30e4043..e29e1d7c 100644 --- a/packages/twilio-run/__tests__/templating/__snapshots__/defaultConfig.test.ts.snap +++ b/packages/twilio-run/__tests__/templating/__snapshots__/defaultConfig.test.ts.snap @@ -36,7 +36,7 @@ exports[`writeDefaultConfigFile default file should match snapshot 1`] = ` // \\"production\\": false /* Promote build to the production environment (no domain suffix). Overrides environment flag */, // \\"properties\\": null /* Specify the output properties you want to see. Works best on single types */, // \\"region\\": null /* Twilio API Region */, - \\"runtime\\": \\"node16\\" /* The version of Node.js to deploy the build to. (node16) */, + \\"runtime\\": \\"node18\\" /* The version of Node.js to deploy the build to. (node18) */, // \\"serviceName\\": null /* Overrides the name of the Serverless project. Default: the name field in your package.json */, // \\"serviceSid\\": null /* SID of the Twilio Serverless Service to deploy to */, // \\"sourceEnvironment\\": null /* SID or suffix of an existing environment you want to deploy from. */, diff --git a/packages/twilio-run/src/checks/nodejs-version.ts b/packages/twilio-run/src/checks/nodejs-version.ts index e21f5f3b..ff59f306 100644 --- a/packages/twilio-run/src/checks/nodejs-version.ts +++ b/packages/twilio-run/src/checks/nodejs-version.ts @@ -1,7 +1,7 @@ import { stripIndent } from 'common-tags'; import { logger } from '../utils/logger'; -const SERVERLESS_NODE_JS_VERSION = ['14.', '16.']; +const SERVERLESS_NODE_JS_VERSION = ['16.', '18.']; export function printVersionWarning( nodeVersion: string, diff --git a/packages/twilio-run/src/flags.ts b/packages/twilio-run/src/flags.ts index 5c5d3b46..29462152 100644 --- a/packages/twilio-run/src/flags.ts +++ b/packages/twilio-run/src/flags.ts @@ -228,7 +228,7 @@ export const ALL_FLAGS = { } as Options, runtime: { type: 'string', - describe: 'The version of Node.js to deploy the build to. (node16)', + describe: 'The version of Node.js to deploy the build to. (node18)', } as Options, key: { type: 'string', diff --git a/packages/twilio-run/src/templating/defaultConfig.ts b/packages/twilio-run/src/templating/defaultConfig.ts index 26afc4b4..5251b284 100644 --- a/packages/twilio-run/src/templating/defaultConfig.ts +++ b/packages/twilio-run/src/templating/defaultConfig.ts @@ -9,7 +9,7 @@ import { getDebugFunction } from '../utils/logger'; const debug = getDebugFunction('twilio-run:templating:defaultConfig'); -const DEFAULT_RUNTIME = 'node16'; +const DEFAULT_RUNTIME = 'node18'; function renderDefault(config: Options): string { if (config.type === 'boolean') {