forked from projen/projen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.projenrc.ts
200 lines (163 loc) · 4.66 KB
/
.projenrc.ts
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
import {
setupAllContributors,
setupProjenBootstrap,
setupBundleTaskRunner,
setupCheckLicenses,
setupDevcontainer,
setupJsiiDocgen,
setupGitignore,
setupGitpod,
setupIntegTest,
setupMarkdown,
setupMergify,
setupNpmignore,
setupUpgradeDependencies,
setupVscode,
WindowsBuild,
} from "./projenrc";
import { ProjectTree, ReleasableCommits } from "./src";
import { JsiiProject } from "./src/cdk";
const bootstrapScriptFile = "projen.js";
const project = new JsiiProject({
name: "projen",
description: "CDK for software projects",
repositoryUrl: "https://github.com/projen/projen.git",
author: "Amazon Web Services",
authorAddress: "https://aws.amazon.com",
authorOrganization: true,
stability: "experimental",
keywords: [
"scaffolding",
"cicd",
"project",
"management",
"generator",
"cdk",
],
githubOptions: {
pullRequestLintOptions: {
contributorStatement:
"By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.",
contributorStatementOptions: {
exemptUsers: ["cdklabs-automation", "dependabot[bot]"],
},
},
},
jsiiVersion: "5.5.x",
typescriptVersion: "5.5.x",
deps: ["constructs@^10.0.0"],
bundledDeps: [
"conventional-changelog-config-spec",
"yaml@^2.2.2",
"yargs",
"case",
"glob@^8",
"semver",
"chalk",
"@iarna/toml",
"xmlbuilder2",
"ini",
"shx",
"fast-json-patch",
],
devDeps: [
"@types/conventional-changelog-config-spec",
"@types/yargs",
"@types/glob",
"@types/semver",
"@types/ini",
"markmac",
"esbuild",
"all-contributors-cli",
],
peerDeps: ["constructs@^10.0.0"],
depsUpgrade: false, // configured below
projenDevDependency: false, // because I am projen
releaseToNpm: true,
minNodeVersion: "16.0.0", // Do not change this before a version has been EOL for a while
workflowNodeVersion: "18.18.0",
codeCov: true,
prettier: true,
defaultReleaseBranch: "main",
gitpod: true,
devContainer: true,
// since this is projen, we need to always compile before we run
projenCommand: `node ./${bootstrapScriptFile}`,
projenrcTs: true,
// Disable interop since it's disabled available in jsii
tsconfigDev: {
compilerOptions: {
esModuleInterop: false,
},
exclude: ["docusaurus/**/*"],
},
jestOptions: {
// makes it very hard to iterate with jest --watch
coverageText: false,
jestConfig: {
// Adding text-summary as a replacement for text
coverageReporters: [
"json",
"lcov",
"clover",
"cobertura",
"text-summary",
],
// By default jest will try to use all CPU cores on the running machine.
// But some of our integration tests spawn child processes - so by
// creating one jest worker per test, some of the child processes will get
// starved of CPU time and sometimes hang or timeout. This should
// help mitigate that.
maxWorkers: "50%",
},
},
// To reduce the release frequency we only release features and fixes
// This is important because PyPI has limits on the total storage amount used, and extensions need to be manually requested
releasableCommits: ReleasableCommits.featuresAndFixes(),
publishToMaven: {
javaPackage: "io.github.cdklabs.projen",
mavenGroupId: "io.github.cdklabs",
mavenArtifactId: "projen",
mavenEndpoint: "https://s01.oss.sonatype.org",
},
publishToPypi: {
distName: "projen",
module: "projen",
},
publishToGo: {
moduleName: "github.com/projen/projen-go",
},
npmProvenance: true,
releaseFailureIssue: true,
autoApproveUpgrades: true,
autoApproveOptions: { allowedUsernames: ["cdklabs-automation"] },
checkLicenses: {
allow: ["MIT", "ISC", "BSD", "BSD-2-Clause", "BSD-3-Clause", "Apache-2.0"],
},
});
setupCheckLicenses(project);
setupUpgradeDependencies(project);
setupJsiiDocgen(project);
setupProjenBootstrap(project, bootstrapScriptFile);
// because snapshots include the projen marker...
project.addExcludeFromCleanup("test/**");
setupGitignore(project);
setupMarkdown(project);
setupVscode(project);
setupMergify(project);
setupGitpod(project);
setupDevcontainer(project);
setupAllContributors(project);
setupNpmignore(project);
setupIntegTest(project);
setupBundleTaskRunner(project);
new WindowsBuild(project);
// we are projen, so re-synth after compiling.
// fixes feedback loop where projen contibutors run "build"
// but not all files are updated
if (project.defaultTask) {
project.postCompileTask.spawn(project.defaultTask);
}
new ProjectTree(project);
project.synth();