-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathtasks.json
344 lines (344 loc) · 8.95 KB
/
tasks.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
{
"tasks": {
"build": {
"name": "build",
"description": "Full release build",
"steps": [
{
"spawn": "default"
},
{
"spawn": "pre-compile"
},
{
"spawn": "compile"
},
{
"spawn": "post-compile"
},
{
"spawn": "test"
},
{
"spawn": "package"
}
]
},
"bump": {
"name": "bump",
"description": "Bumps version based on latest git tag and generates a changelog entry",
"env": {
"OUTFILE": "package.json",
"CHANGELOG": "dist/changelog.md",
"BUMPFILE": "dist/version.txt",
"RELEASETAG": "dist/releasetag.txt",
"RELEASE_TAG_PREFIX": "",
"BUMP_PACKAGE": "commit-and-tag-version@^12"
},
"steps": [
{
"builtin": "release/bump-version"
}
],
"condition": "git log --oneline -1 | grep -qv \"chore(release):\""
},
"clobber": {
"name": "clobber",
"description": "hard resets to HEAD of origin and cleans the local repo",
"env": {
"BRANCH": "$(git branch --show-current)"
},
"steps": [
{
"exec": "git checkout -b scratch",
"name": "save current HEAD in \"scratch\" branch"
},
{
"exec": "git checkout $BRANCH"
},
{
"exec": "git fetch origin",
"name": "fetch latest changes from origin"
},
{
"exec": "git reset --hard origin/$BRANCH",
"name": "hard reset to origin commit"
},
{
"exec": "git clean -fdx",
"name": "clean all untracked files"
},
{
"say": "ready to rock! (unpushed commits are under the \"scratch\" branch)"
}
],
"condition": "git diff --exit-code > /dev/null"
},
"compat": {
"name": "compat",
"description": "Perform API compatibility check against latest version",
"steps": [
{
"exec": "jsii-diff npm:$(node -p \"require('./package.json').name\") -k --ignore-file .compatignore || (echo \"\nUNEXPECTED BREAKING CHANGES: add keys such as 'removed:constructs.Node.of' to .compatignore to skip.\n\" && exit 1)"
}
]
},
"compile": {
"name": "compile",
"description": "Only compile",
"steps": [
{
"exec": "jsii --silence-warnings=reserved-word"
}
]
},
"default": {
"name": "default",
"description": "Synthesize project files",
"steps": [
{
"exec": "node .projenrc.js"
}
]
},
"docgen": {
"name": "docgen",
"description": "Generate API.md from .jsii manifest",
"steps": [
{
"exec": "jsii-docgen -o API.md"
}
]
},
"eject": {
"name": "eject",
"description": "Remove projen from the project",
"env": {
"PROJEN_EJECTING": "true"
},
"steps": [
{
"spawn": "default"
}
]
},
"eslint": {
"name": "eslint",
"description": "Runs eslint against the codebase",
"env": {
"ESLINT_USE_FLAT_CONFIG": "false"
},
"steps": [
{
"exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ src test build-tools .projenrc.js",
"receiveArgs": true
}
]
},
"install": {
"name": "install",
"description": "Install project dependencies and update lockfile (non-frozen)",
"steps": [
{
"exec": "yarn install --check-files"
}
]
},
"install:ci": {
"name": "install:ci",
"description": "Install project dependencies using frozen lockfile",
"steps": [
{
"exec": "yarn install --check-files --frozen-lockfile"
}
]
},
"package": {
"name": "package",
"description": "Creates the distribution package",
"steps": [
{
"spawn": "package:js",
"condition": "node -e \"if (!process.env.CI) process.exit(1)\""
},
{
"spawn": "package-all",
"condition": "node -e \"if (process.env.CI) process.exit(1)\""
}
]
},
"package-all": {
"name": "package-all",
"description": "Packages artifacts for all target languages",
"steps": [
{
"spawn": "package:js"
},
{
"spawn": "package:python"
}
]
},
"package:js": {
"name": "package:js",
"description": "Create js language bindings",
"steps": [
{
"exec": "jsii-pacmak -v --target js"
}
]
},
"package:python": {
"name": "package:python",
"description": "Create python language bindings",
"steps": [
{
"exec": "jsii-pacmak -v --target python"
}
]
},
"post-compile": {
"name": "post-compile",
"description": "Runs after successful compilation",
"steps": [
{
"spawn": "docgen"
}
]
},
"post-upgrade": {
"name": "post-upgrade",
"description": "Runs after upgrading dependencies"
},
"pre-compile": {
"name": "pre-compile",
"description": "Prepare the project for compilation"
},
"publish:git": {
"name": "publish:git",
"description": "Prepends the release changelog onto the project changelog, creates a release commit, and tags the release",
"env": {
"CHANGELOG": "dist/changelog.md",
"RELEASE_TAG_FILE": "dist/releasetag.txt",
"PROJECT_CHANGELOG_FILE": "CHANGELOG.md",
"VERSION_FILE": "dist/version.txt"
},
"steps": [
{
"builtin": "release/update-changelog"
},
{
"builtin": "release/tag-version"
},
{
"exec": "git push --follow-tags origin main"
}
],
"condition": "git log --oneline -1 | grep -qv \"chore(release):\""
},
"release": {
"name": "release",
"description": "Prepare a release from \"main\" branch",
"env": {
"RELEASE": "true",
"MAJOR": "1"
},
"steps": [
{
"exec": "rm -fr dist"
},
{
"spawn": "bump"
},
{
"spawn": "build"
},
{
"spawn": "unbump"
},
{
"exec": "git diff --ignore-space-at-eol --exit-code"
},
{
"spawn": "publish:git"
}
]
},
"test": {
"name": "test",
"description": "Run tests",
"steps": [
{
"exec": "jest --passWithNoTests --updateSnapshot",
"receiveArgs": true
},
{
"spawn": "eslint"
}
]
},
"test:watch": {
"name": "test:watch",
"description": "Run jest in watch mode",
"steps": [
{
"exec": "jest --watch"
}
]
},
"unbump": {
"name": "unbump",
"description": "Restores version to 0.0.0",
"env": {
"OUTFILE": "package.json",
"CHANGELOG": "dist/changelog.md",
"BUMPFILE": "dist/version.txt",
"RELEASETAG": "dist/releasetag.txt",
"RELEASE_TAG_PREFIX": "",
"BUMP_PACKAGE": "commit-and-tag-version@^12"
},
"steps": [
{
"builtin": "release/reset-version"
}
]
},
"upgrade": {
"name": "upgrade",
"description": "upgrade dependencies",
"env": {
"CI": "0"
},
"steps": [
{
"exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --no-deprecated --dep=dev,peer,prod,optional --filter=eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-prettier,jsii-diff,jsii-pacmak,prettier,projen,typescript,ts-node,yaml"
},
{
"exec": "yarn install --check-files"
},
{
"exec": "yarn upgrade @types/jest @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser commit-and-tag-version eslint-config-prettier eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-prettier eslint jest-junit jest jsii-diff jsii-docgen jsii-pacmak jsii-rosetta jsii prettier projen ts-jest typescript deepmerge ts-node yaml @aws-cdk/aws-glue-alpha @aws-cdk/aws-kinesisfirehose-alpha @aws-cdk/aws-kinesisfirehose-destinations-alpha @aws-cdk/integ-tests-alpha aws-cdk-lib constructs"
},
{
"exec": "npx projen"
},
{
"spawn": "post-upgrade"
}
]
},
"watch": {
"name": "watch",
"description": "Watch & compile in the background",
"steps": [
{
"exec": "jsii -w --silence-warnings=reserved-word"
}
]
}
},
"env": {
"PATH": "$(npx -c \"node --print process.env.PATH\")"
},
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"."
}