Skip to content

Commit d8db768

Browse files
authored
FRIDGE-734 make serverless-toolkit work with node v18 (#493)
* fix(@twilio-labs/plugin-serverless): add node types to the autogenerated tsconfig autogenerated tsconfig lacks types at the moment which causes twilio serverless:init twilio-functions --typescript to fail to start * Create wise-teachers-clean.md * docs: add @makserik as a contributor * fix(create-twilio-function): bump ts from ^4.9.4 to ^5.3.3, fix serverless:init, add plugins testing * Create ten-cobras-fail.md * Delete .changeset/wise-teachers-clean.md * Delete .changeset/ten-cobras-fail.md * Create six-paws-speak.md
1 parent 83b488c commit d8db768

File tree

8 files changed

+34
-40
lines changed

8 files changed

+34
-40
lines changed

.all-contributorsrc

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"projectOwner": "dkundel",
44
"repoType": "github",
55
"repoHost": "https://github.com",
6-
"files": [
7-
"README.md"
8-
],
6+
"files": ["README.md"],
97
"imageSize": 100,
108
"commit": true,
119
"contributors": [
@@ -14,79 +12,65 @@
1412
"name": "Dominik Kundel",
1513
"avatar_url": "https://avatars3.githubusercontent.com/u/1505101?v=4",
1614
"profile": "https://dkundel.com",
17-
"contributions": [
18-
"code"
19-
]
15+
"contributions": ["code"]
2016
},
2117
{
2218
"login": "dbbidclips",
2319
"name": "dbbidclips",
2420
"avatar_url": "https://avatars1.githubusercontent.com/u/41997517?v=4",
2521
"profile": "https://github.com/dbbidclips",
26-
"contributions": [
27-
"code",
28-
"bug"
29-
]
22+
"contributions": ["code", "bug"]
3023
},
3124
{
3225
"login": "ShelbyZ",
3326
"name": "Shelby Hagman",
3427
"avatar_url": "https://avatars0.githubusercontent.com/u/1033099?v=4",
3528
"profile": "https://shagman.codes",
36-
"contributions": [
37-
"bug",
38-
"code"
39-
]
29+
"contributions": ["bug", "code"]
4030
},
4131
{
4232
"login": "jsjoeio",
4333
"name": "JavaScript Joe",
4434
"avatar_url": "https://avatars3.githubusercontent.com/u/3806031?v=4",
4535
"profile": "https://joeprevite.com/",
46-
"contributions": [
47-
"bug"
48-
]
36+
"contributions": ["bug"]
4937
},
5038
{
5139
"login": "stefanjudis",
5240
"name": "Stefan Judis",
5341
"avatar_url": "https://avatars3.githubusercontent.com/u/962099?v=4",
5442
"profile": "https://www.stefanjudis.com/",
55-
"contributions": [
56-
"bug",
57-
"code"
58-
]
43+
"contributions": ["bug", "code"]
5944
},
6045
{
6146
"login": "philnash",
6247
"name": "Phil Nash",
6348
"avatar_url": "https://avatars3.githubusercontent.com/u/31462?v=4",
6449
"profile": "https://philna.sh",
65-
"contributions": [
66-
"bug",
67-
"code",
68-
"review"
69-
]
50+
"contributions": ["bug", "code", "review"]
7051
},
7152
{
7253
"login": "childish-sambino",
7354
"name": "childish-sambino",
7455
"avatar_url": "https://avatars0.githubusercontent.com/u/47228322?v=4",
7556
"profile": "https://github.com/childish-sambino",
76-
"contributions": [
77-
"code",
78-
"bug"
79-
]
57+
"contributions": ["code", "bug"]
8058
},
8159
{
8260
"login": "thinkingserious",
8361
"name": "Elmer Thomas",
8462
"avatar_url": "https://avatars0.githubusercontent.com/u/146695?v=4",
8563
"profile": "http://www.ThinkingSerious.com",
86-
"contributions": [
87-
"bug",
88-
"doc"
89-
]
64+
"contributions": ["bug", "doc"]
65+
},
66+
{
67+
"login": "makserik",
68+
"name": "makserik",
69+
"avatar_url": "https://avatars.githubusercontent.com/u/15821542?v=4",
70+
"profile": "https://github.com/makserik",
71+
"contributions": ["code", "doc"]
9072
}
91-
]
73+
],
74+
"commitConvention": "angular"
9275
}
76+

.changeset/six-paws-speak.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-twilio-function": patch
3+
---
4+
5+
FRIDGE-734 make serverless-toolkit work with node v18

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,5 @@ dist/
7272
*.twiliodeployinfo
7373

7474
packages/serverless-api/docs/
75+
76+
.idea

.nvmrc

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

docs/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ npm run bootstrap
3333
## Contributing
3434

3535
1. Perform changes. Check out [Working with Workspaces](#working-with-workspaces) for more info
36+
2. If you changed packages/plugins, run `twilio plugins:link <PATH_TO_THE_CHANGED_PACKAGE>` and then test the plugin locally by running `twilio <PLUGIN_NAME> <COMMAND>`
3637
2. Make sure tests pass by running `npm test`
3738
3. Stage the files you changed by running `git add` with the files you changed.
3839
4. If you have a customer facing change make sure to run `npm run changeset` at the root of the project, select what type of version change it is and which packages are impacted and describe the change. Check out ["How we version"](#how-we-version) for more details.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@changesets/cli": "^2.26.0",
2727
"@commitlint/cli": "^9.1.2",
2828
"@commitlint/config-conventional": "^10.0.0",
29+
"@twilio/test-dep": "npm:[email protected]",
2930
"@types/jest": "^29.2.4",
3031
"all-contributors-cli": "^6.1.2",
3132
"commitizen": "^4.2.4",
@@ -40,8 +41,7 @@
4041
"prettier": "^2.2.1",
4142
"rimraf": "^3.0.2",
4243
"ts-jest": "^28.0.8",
43-
"typescript": "^4.9.4",
44-
"@twilio/test-dep": "npm:[email protected]"
44+
"typescript": "^5.3.3"
4545
},
4646
"lint-staged": {
4747
"*.{js,jsx,ts,tsx}": [

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,17 @@ function createTsconfigFile(pathName) {
126126
JSON.stringify(
127127
{
128128
compilerOptions: {
129-
target: 'es5',
129+
target: 'es2018',
130130
module: 'commonjs',
131131
strict: true,
132132
esModuleInterop: true,
133133
rootDir: 'src',
134134
outDir: 'dist',
135135
skipLibCheck: true,
136136
sourceMap: true,
137+
types: ['node'],
137138
},
139+
exclude: ['node_modules'],
138140
},
139141
null,
140142
2

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
].replace(/[\^~]/, ''),
88
twilioRun: pkgJson.dependencies['twilio-run'],
99
node: '18',
10-
typescript: '^3.8',
10+
typescript: '^5.3.3',
1111
serverlessRuntimeTypes: '^1.1',
1212
copyfiles: '^2.2.0',
1313
};

0 commit comments

Comments
 (0)