Skip to content

Commit b4a1521

Browse files
authored
Merge pull request #321 from twilio/v4-beta
[WIP] v4 beta
2 parents 7897d2c + a14ccbb commit b4a1521

File tree

535 files changed

+100413
-5134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

535 files changed

+100413
-5134
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,15 @@
147147
"contributions": [
148148
"code"
149149
]
150+
},
151+
{
152+
"login": "NReilingh",
153+
"name": "Nick Reilingh",
154+
"avatar_url": "https://avatars.githubusercontent.com/u/2458645?v=4",
155+
"profile": "http://nickreilingh.com/",
156+
"contributions": [
157+
"doc"
158+
]
150159
}
151160
],
152161
"skipCi": true

.circleci/config.yml

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
version: 2.1
2+
3+
parameters:
4+
run_e2e_test:
5+
default: false
6+
type: boolean
7+
run_pr_validator:
8+
default: true
9+
type: boolean
10+
run_npm_publish:
11+
default: false
12+
type: boolean
13+
dist_tag:
14+
default: 'alpha'
15+
type: string
16+
version_bump:
17+
default: 'patch'
18+
type: string
19+
package_version:
20+
default: ''
21+
type: string
22+
23+
executors:
24+
node:
25+
parameters:
26+
tag:
27+
type: string
28+
docker:
29+
- image: cimg/node:<< parameters.tag >>
30+
31+
orbs:
32+
win: circleci/[email protected]
33+
34+
commands:
35+
cmd_install-dependencies:
36+
steps:
37+
- run:
38+
name: "Install project dependencies"
39+
command: npm i
40+
cmd_install-prerequisites:
41+
steps:
42+
- run:
43+
name: "Apt-get update"
44+
command: sudo apt-get update
45+
- run:
46+
name: "Install libraries"
47+
command: sudo apt-get install -y libsecret-1-dev
48+
cmd_run-unit-tests:
49+
steps:
50+
- run:
51+
name: "Run unit tests"
52+
command: npm run test:ci
53+
cmd_run-linter:
54+
steps:
55+
- run:
56+
name: "Run linter"
57+
command: npm run lint
58+
cmd_run-build:
59+
steps:
60+
- run:
61+
name: "Build packages"
62+
command: npm run build
63+
cmd_run-e2e-tests:
64+
steps:
65+
- run:
66+
name: "Run e2e tests"
67+
command: cd packages/flex-plugin-e2e-tests && npm start
68+
cmd_codecov:
69+
steps:
70+
- run:
71+
name: "Codecov report"
72+
command: npm run coverage -- --token=$CODECOV_TOKEN
73+
cmd_setup_npm:
74+
steps:
75+
- run:
76+
name: "Setting up npm"
77+
command: |
78+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
79+
git config --global user.email $GITHUB_EMAIL
80+
git config --global user.name $GITHUB_USER
81+
cmd_run-publish:
82+
parameters:
83+
dist_tag:
84+
type: string
85+
version_bump:
86+
type: string
87+
steps:
88+
- run:
89+
name: "Publishing package"
90+
command: |
91+
npm run publish:<< parameters.dist_tag >> << parameters.version_bump >>
92+
93+
jobs:
94+
job_e2e-test:
95+
resource_class: xlarge
96+
parameters:
97+
package_version:
98+
type: string
99+
environment:
100+
PACKAGE_VERSION: << parameters.package_version >>
101+
NODE_VERSION: "lts"
102+
executor:
103+
name: node
104+
tag: "lts"
105+
steps:
106+
- checkout
107+
- cmd_install-prerequisites
108+
- cmd_install-dependencies
109+
- cmd_run-build
110+
- cmd_run-e2e-tests
111+
112+
job_npm-publish:
113+
resource_class: xlarge
114+
parameters:
115+
dist_tag:
116+
type: string
117+
version_bump:
118+
type: string
119+
environment:
120+
NODE_OPTIONS: --max-old-space-size=14336
121+
CI: ""
122+
executor:
123+
name: node
124+
tag: "lts"
125+
steps:
126+
- checkout
127+
- cmd_install-prerequisites
128+
- cmd_install-dependencies
129+
- cmd_run-build
130+
- cmd_setup_npm
131+
- cmd_run-publish:
132+
dist_tag: << parameters.dist_tag >>
133+
version_bump: << parameters.version_bump >>
134+
135+
job_pr-validator-win32:
136+
environment:
137+
NODE_OPTIONS: --max-old-space-size=14336
138+
CI: ""
139+
parameters:
140+
shell:
141+
type: string
142+
executor:
143+
name: win/default
144+
shell: << parameters.shell >>
145+
size: xlarge
146+
steps:
147+
- checkout
148+
- cmd_install-dependencies
149+
- cmd_run-build
150+
- cmd_run-unit-tests
151+
152+
job_pr-validator-node:
153+
resource_class: xlarge
154+
environment:
155+
NODE_OPTIONS: --max-old-space-size=14336
156+
CI: ""
157+
parameters:
158+
node-version:
159+
type: string
160+
executor:
161+
name: node
162+
tag: << parameters.node-version >>
163+
steps:
164+
- checkout
165+
- cmd_install-prerequisites
166+
- cmd_install-dependencies
167+
- cmd_run-linter
168+
- cmd_run-unit-tests
169+
- cmd_run-build
170+
- when:
171+
condition:
172+
equal: [<< parameters.node-version >>, lts]
173+
steps:
174+
- cmd_codecov
175+
176+
workflows:
177+
workflow_e2e-tester:
178+
when: << pipeline.parameters.run_e2e_test >>
179+
jobs:
180+
- job_e2e-test:
181+
matrix:
182+
parameters:
183+
package_version: [ << pipeline.parameters.package_version >> ]
184+
185+
workflow_publisher:
186+
when: << pipeline.parameters.run_npm_publish >>
187+
jobs:
188+
- job_npm-publish:
189+
matrix:
190+
parameters:
191+
dist_tag: [ << pipeline.parameters.dist_tag >> ]
192+
version_bump: [ << pipeline.parameters.version_bump >> ]
193+
194+
workflow_pr-validator:
195+
when: << pipeline.parameters.run_pr_validator >>
196+
jobs:
197+
- job_pr-validator-win32:
198+
matrix:
199+
parameters:
200+
shell: [ "bash.exe" ]
201+
- job_pr-validator-node:
202+
matrix:
203+
parameters:
204+
node-version: ["10.24", "12.21", "14.16", lts]
205+
post-steps:
206+
- run:
207+
name: Send Slack notification
208+
command: |
209+
curl -X POST -H "Content-type:application/json" --data "{'text':':error: $CIRCLE_PROJECT_REPONAME/$CIRCLE_BRANCH - $CIRCLE_PULL_REQUEST validation failed on *Node:${CIRCLE_JOB/job_pr-validator-node-/''}*. View <$CIRCLE_BUILD_URL|build>. cc: <@$CIRCLE_USERNAME>', 'mrkdwn':true}" $SLACK_WEBHOOK
210+
when: on_fail

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
templates

.eslintrc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"extends": [
3+
"twilio-ts"
4+
],
5+
"parserOptions": {
6+
"project": "./tsconfig.lint.json"
7+
},
8+
"rules": {
9+
"prefer-promise-reject-errors": "off",
10+
"import/no-named-as-default-member": "off",
11+
"prefer-named-capture-group": "off",
12+
"@typescript-eslint/ban-ts-comment": "off",
13+
"@typescript-eslint/triple-slash-reference": "off",
14+
"sonarjs/no-duplicate-string": "warn",
15+
"sonarjs/cognitive-complexity": "warn",
16+
"spaced-comment": [
17+
"error",
18+
"always",
19+
{
20+
"line": {
21+
"markers": ["/"]
22+
}
23+
}
24+
]
25+
}
26+
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ A clear and concise description of what the bug is.
1717
| ----------------------------| ------- |
1818
| `create-flex-plugin` | `X.Y.Z` |
1919
| `flex-plugin` | `X.Y.Z` |
20-
| `craco-config-flex-plugin` | `X.Y.Z` |
2120
| `node` | `X.Y.Z` |
2221
| `npm` | `X.Y.Z` |
2322

.gitignore

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ lerna-debug.log
6666
dist/
6767
plugin-test/
6868
**/node_modules
69-
.ultra.cache.json
70-
71-
# Package Locks
72-
package-lock.json
73-
7469
.idea
75-
7670
.lerna_backup
71+
.ultra.cache.json

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
ultra lint

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run test

.npmrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
message=":bookmark: Release v%s"
2-
package-lock=false

0 commit comments

Comments
 (0)