Skip to content

Commit

Permalink
FRIDGE-9: Update toolkit to default to node18 (#482)
Browse files Browse the repository at this point in the history
* FRIDGE-9: Update toolkit to default to node18

* FRIDGE-9: Make toolkit deploys default to node18
  • Loading branch information
AndreLars authored Oct 24, 2023
1 parent fd6235a commit b498f6f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-serverless/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ FLAGS
--password=<value> 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=<value> The version of Node.js to deploy the build to. (node16)
--runtime=<value> The version of Node.js to deploy the build to. (node18)
--service-sid=<value> SID of the Twilio Serverless Service to deploy to
--silent Suppress output and logs. This is a shorthand for "-l none -o none".
--to=<value> [Alias for "environment"]
Expand Down
2 changes: 1 addition & 1 deletion packages/serverless-api/examples/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function run() {
const result = await client.deployProject({
...config,
overrideExistingService: true,
runtime: 'node16',
runtime: 'node18',
env: {
HELLO: 'ahoy',
WORLD: 'welt',
Expand Down
2 changes: 1 addition & 1 deletion packages/serverless-api/src/types/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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. */,
Expand Down
2 changes: 1 addition & 1 deletion packages/twilio-run/src/checks/nodejs-version.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/twilio-run/src/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion packages/twilio-run/src/templating/defaultConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit b498f6f

Please sign in to comment.