projen 0.52.21 → 0.52.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +139 -107
- package/changelog.md +3 -3
- package/docs/api/API.md +42 -39
- package/lib/awscdk/auto-discover.d.ts +14 -46
- package/lib/awscdk/auto-discover.js +8 -22
- package/lib/awscdk/awscdk-app-java.d.ts +10 -32
- package/lib/awscdk/awscdk-app-java.js +5 -9
- package/lib/awscdk/awscdk-app-ts.d.ts +15 -35
- package/lib/awscdk/awscdk-app-ts.js +6 -14
- package/lib/awscdk/awscdk-construct.d.ts +14 -28
- package/lib/awscdk/awscdk-construct.js +8 -16
- package/lib/awscdk/awscdk-deps-java.d.ts +1 -8
- package/lib/awscdk/awscdk-deps-java.js +3 -10
- package/lib/awscdk/awscdk-deps-js.d.ts +1 -8
- package/lib/awscdk/awscdk-deps-js.js +3 -10
- package/lib/awscdk/awscdk-deps.d.ts +28 -67
- package/lib/awscdk/awscdk-deps.js +5 -12
- package/lib/awscdk/cdk-config.d.ts +19 -51
- package/lib/awscdk/cdk-config.js +13 -11
- package/lib/awscdk/cdk-tasks.d.ts +7 -24
- package/lib/awscdk/cdk-tasks.js +3 -8
- package/lib/awscdk/integration-test.d.ts +7 -29
- package/lib/awscdk/integration-test.js +3 -8
- package/lib/awscdk/lambda-function.d.ts +22 -50
- package/lib/awscdk/lambda-function.js +11 -24
- package/lib/build/build-workflow.d.ts +33 -78
- package/lib/build/build-workflow.js +15 -25
- package/lib/cdk/auto-discover-base.d.ts +11 -34
- package/lib/cdk/auto-discover-base.js +5 -15
- package/lib/cdk/construct-lib.d.ts +8 -22
- package/lib/cdk/construct-lib.js +3 -8
- package/lib/cdk/integration-test-base.d.ts +12 -38
- package/lib/cdk/integration-test-base.js +2 -8
- package/lib/cdk/jsii-docgen.d.ts +6 -12
- package/lib/cdk/jsii-docgen.js +6 -8
- package/lib/cdk/jsii-project.d.ts +16 -95
- package/lib/cdk/jsii-project.js +3 -10
- package/lib/cdk8s/auto-discover.d.ts +6 -23
- package/lib/cdk8s/auto-discover.js +6 -15
- package/lib/cdk8s/cdk8s-app-ts.d.ts +21 -43
- package/lib/cdk8s/cdk8s-app-ts.js +4 -7
- package/lib/cdk8s/cdk8s-construct.d.ts +12 -27
- package/lib/cdk8s/cdk8s-construct.js +3 -7
- package/lib/cdk8s/integration-test.d.ts +2 -9
- package/lib/cdk8s/integration-test.js +3 -8
- package/lib/cdktf/cdktf-construct.d.ts +3 -12
- package/lib/cdktf/cdktf-construct.js +3 -7
- package/lib/component.d.ts +4 -17
- package/lib/component.js +6 -19
- package/lib/dependencies.d.ts +44 -77
- package/lib/dependencies.js +50 -38
- package/lib/dev-env.d.ts +26 -53
- package/lib/dev-env.js +9 -19
- package/lib/docker-compose.d.ts +83 -209
- package/lib/docker-compose.js +38 -61
- package/lib/file.d.ts +24 -71
- package/lib/file.js +4 -16
- package/lib/gitattributes.d.ts +3 -14
- package/lib/gitattributes.js +5 -16
- package/lib/github/auto-approve.d.ts +7 -23
- package/lib/github/auto-approve.js +3 -8
- package/lib/github/auto-merge.d.ts +7 -29
- package/lib/github/auto-merge.js +7 -16
- package/lib/github/dependabot.d.ts +54 -147
- package/lib/github/dependabot.js +81 -22
- package/lib/github/github-project.d.ts +26 -70
- package/lib/github/github-project.js +5 -10
- package/lib/github/github.d.ts +19 -58
- package/lib/github/github.js +9 -30
- package/lib/github/mergify.d.ts +9 -54
- package/lib/github/mergify.js +2 -14
- package/lib/github/pr-template.d.ts +3 -13
- package/lib/github/pr-template.js +3 -8
- package/lib/github/pull-request-lint.d.ts +8 -28
- package/lib/github/pull-request-lint.js +3 -9
- package/lib/github/stale.d.ts +17 -47
- package/lib/github/stale.js +6 -10
- package/lib/github/task-workflow.d.ts +21 -63
- package/lib/github/task-workflow.js +3 -8
- package/lib/github/workflows-model.d.ts +199 -582
- package/lib/github/workflows-model.js +5 -4
- package/lib/github/workflows.d.ts +14 -41
- package/lib/github/workflows.js +8 -16
- package/lib/gitlab/configuration-model.d.ts +145 -947
- package/lib/gitlab/configuration-model.js +11 -28
- package/lib/gitlab/configuration.d.ts +31 -121
- package/lib/gitlab/configuration.js +14 -49
- package/lib/gitlab/gitlab-configuration.d.ts +2 -13
- package/lib/gitlab/gitlab-configuration.js +4 -15
- package/lib/gitlab/nested-configuration.d.ts +1 -9
- package/lib/gitlab/nested-configuration.js +3 -8
- package/lib/gitpod.d.ts +71 -167
- package/lib/gitpod.js +75 -42
- package/lib/ignore-file.d.ts +4 -23
- package/lib/ignore-file.js +6 -25
- package/lib/ini.d.ts +2 -14
- package/lib/ini.js +3 -13
- package/lib/java/java-project.d.ts +29 -70
- package/lib/java/java-project.js +10 -17
- package/lib/java/junit.d.ts +5 -17
- package/lib/java/junit.js +3 -8
- package/lib/java/maven-compile.d.ts +4 -13
- package/lib/java/maven-compile.js +3 -8
- package/lib/java/maven-packaging.d.ts +6 -21
- package/lib/java/maven-packaging.js +3 -8
- package/lib/java/maven-sample.d.ts +2 -12
- package/lib/java/maven-sample.js +3 -8
- package/lib/java/pom.d.ts +38 -100
- package/lib/java/pom.js +13 -25
- package/lib/java/projenrc.d.ts +7 -22
- package/lib/java/projenrc.js +3 -8
- package/lib/javascript/bundler.d.ts +30 -72
- package/lib/javascript/bundler.js +13 -21
- package/lib/javascript/eslint.d.ts +27 -84
- package/lib/javascript/eslint.js +11 -30
- package/lib/javascript/jest.d.ts +91 -344
- package/lib/javascript/jest.js +6 -23
- package/lib/javascript/node-package.d.ts +111 -259
- package/lib/javascript/node-package.js +64 -81
- package/lib/javascript/node-project.d.ts +112 -220
- package/lib/javascript/node-project.js +54 -73
- package/lib/javascript/npm-config.d.ts +9 -19
- package/lib/javascript/npm-config.js +9 -16
- package/lib/javascript/prettier.d.ts +65 -196
- package/lib/javascript/prettier.js +70 -46
- package/lib/javascript/projenrc.d.ts +2 -12
- package/lib/javascript/projenrc.js +3 -8
- package/lib/javascript/typescript-config.d.ts +62 -158
- package/lib/javascript/typescript-config.js +31 -18
- package/lib/javascript/upgrade-dependencies.d.ts +35 -94
- package/lib/javascript/upgrade-dependencies.js +21 -51
- package/lib/json.d.ts +3 -17
- package/lib/json.js +3 -13
- package/lib/license.d.ts +3 -20
- package/lib/license.js +2 -13
- package/lib/logger.d.ts +18 -62
- package/lib/logger.js +17 -37
- package/lib/makefile.d.ts +14 -45
- package/lib/makefile.js +7 -25
- package/lib/object-file.d.ts +19 -39
- package/lib/object-file.js +17 -28
- package/lib/option-hints.d.ts +4 -13
- package/lib/option-hints.js +11 -5
- package/lib/project-build.d.ts +7 -26
- package/lib/project-build.js +3 -8
- package/lib/project.d.ts +64 -186
- package/lib/project.js +43 -91
- package/lib/projects.d.ts +11 -32
- package/lib/projects.js +4 -8
- package/lib/projenrc-json.d.ts +2 -12
- package/lib/projenrc-json.js +3 -8
- package/lib/python/pip.d.ts +7 -23
- package/lib/python/pip.js +8 -17
- package/lib/python/poetry.d.ts +36 -121
- package/lib/python/poetry.js +12 -26
- package/lib/python/projenrc.d.ts +4 -15
- package/lib/python/projenrc.js +3 -8
- package/lib/python/pytest.d.ts +3 -16
- package/lib/python/pytest.js +2 -8
- package/lib/python/python-deps.d.ts +7 -21
- package/lib/python/python-deps.js +1 -1
- package/lib/python/python-env.d.ts +1 -6
- package/lib/python/python-env.js +1 -1
- package/lib/python/python-packaging.d.ts +12 -34
- package/lib/python/python-packaging.js +1 -1
- package/lib/python/python-project.d.ts +34 -79
- package/lib/python/python-project.js +7 -20
- package/lib/python/python-sample.d.ts +2 -9
- package/lib/python/python-sample.js +3 -8
- package/lib/python/requirements-file.d.ts +4 -19
- package/lib/python/requirements-file.js +5 -15
- package/lib/python/setuppy.d.ts +11 -39
- package/lib/python/setuppy.js +3 -13
- package/lib/python/setuptools.d.ts +2 -14
- package/lib/python/setuptools.js +3 -8
- package/lib/python/venv.d.ts +4 -14
- package/lib/python/venv.js +4 -11
- package/lib/readme.d.ts +7 -16
- package/lib/readme.js +5 -7
- package/lib/release/publisher.d.ts +103 -206
- package/lib/release/publisher.js +47 -59
- package/lib/release/release-trigger.d.ts +16 -48
- package/lib/release/release-trigger.js +8 -18
- package/lib/release/release.d.ts +50 -110
- package/lib/release/release.js +9 -24
- package/lib/run-task.js +1820 -0
- package/lib/sample-file.d.ts +14 -47
- package/lib/sample-file.js +9 -30
- package/lib/semver.d.ts +4 -21
- package/lib/semver.js +6 -20
- package/lib/source-code.d.ts +7 -23
- package/lib/source-code.js +7 -19
- package/lib/task-model.d.ts +21 -61
- package/lib/task-model.js +1 -1
- package/lib/task-runtime.d.ts +7 -24
- package/lib/task-runtime.js +7 -20
- package/lib/task.d.ts +29 -73
- package/lib/task.js +28 -61
- package/lib/tasks.d.ts +12 -34
- package/lib/tasks.js +14 -36
- package/lib/testing.d.ts +6 -10
- package/lib/testing.js +8 -12
- package/lib/textfile.d.ts +9 -24
- package/lib/textfile.js +9 -19
- package/lib/toml.d.ts +2 -14
- package/lib/toml.js +3 -13
- package/lib/typescript/projenrc.d.ts +4 -14
- package/lib/typescript/projenrc.js +3 -8
- package/lib/typescript/typescript-typedoc.d.ts +1 -6
- package/lib/typescript/typescript-typedoc.js +3 -8
- package/lib/typescript/typescript.d.ts +24 -82
- package/lib/typescript/typescript.js +6 -15
- package/lib/version.d.ts +9 -38
- package/lib/version.js +2 -11
- package/lib/vscode/devcontainer.d.ts +10 -30
- package/lib/vscode/devcontainer.js +10 -26
- package/lib/vscode/launch-config.d.ts +18 -97
- package/lib/vscode/launch-config.js +9 -15
- package/lib/vscode/vscode.d.ts +0 -9
- package/lib/vscode/vscode.js +2 -11
- package/lib/web/next.d.ts +19 -60
- package/lib/web/next.js +6 -20
- package/lib/web/postcss.d.ts +3 -24
- package/lib/web/postcss.js +3 -8
- package/lib/web/react.d.ts +13 -60
- package/lib/web/react.js +7 -32
- package/lib/web/tailwind.d.ts +1 -15
- package/lib/web/tailwind.js +3 -7
- package/lib/xmlfile.d.ts +2 -14
- package/lib/xmlfile.js +3 -13
- package/lib/yaml.d.ts +4 -19
- package/lib/yaml.js +3 -13
- package/package.json +5 -5
- package/releasetag.txt +1 -1
- package/version.txt +1 -1
|
@@ -9,155 +9,130 @@ import { Bundler, BundlerOptions } from "./bundler";
|
|
|
9
9
|
import { Jest, JestOptions } from "./jest";
|
|
10
10
|
import { NodePackage, NodePackageManager, NodePackageOptions } from "./node-package";
|
|
11
11
|
import { ProjenrcOptions } from "./projenrc";
|
|
12
|
-
/**
|
|
13
|
-
* @experimental
|
|
14
|
-
*/
|
|
15
12
|
export interface NodeProjectOptions extends GitHubProjectOptions, NodePackageOptions, ReleaseProjectOptions {
|
|
16
13
|
/**
|
|
17
|
-
*
|
|
14
|
+
* License copyright owner.
|
|
18
15
|
*
|
|
19
16
|
* @default - defaults to the value of authorName or "" if `authorName` is undefined.
|
|
20
|
-
* @experimental
|
|
21
17
|
*/
|
|
22
18
|
readonly copyrightOwner?: string;
|
|
23
19
|
/**
|
|
24
|
-
*
|
|
20
|
+
* The copyright years to put in the LICENSE file.
|
|
25
21
|
*
|
|
26
22
|
* @default - current year
|
|
27
|
-
* @experimental
|
|
28
23
|
*/
|
|
29
24
|
readonly copyrightPeriod?: string;
|
|
30
25
|
/**
|
|
31
|
-
*
|
|
26
|
+
* Version of projen to install.
|
|
32
27
|
*
|
|
33
28
|
* @default - Defaults to the latest version.
|
|
34
|
-
* @experimental
|
|
35
29
|
*/
|
|
36
30
|
readonly projenVersion?: string;
|
|
37
31
|
/**
|
|
38
|
-
*
|
|
32
|
+
* Indicates of "projen" should be installed as a devDependency.
|
|
39
33
|
*
|
|
40
34
|
* @default true
|
|
41
|
-
* @experimental
|
|
42
35
|
*/
|
|
43
36
|
readonly projenDevDependency?: boolean;
|
|
44
37
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
38
|
+
* Define a GitHub workflow for building PRs.
|
|
47
39
|
* @default - true if not a subproject
|
|
48
|
-
* @experimental
|
|
49
40
|
*/
|
|
50
41
|
readonly buildWorkflow?: boolean;
|
|
51
42
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* This means
|
|
43
|
+
* Automatically update files modified during builds to pull-request branches. This means
|
|
55
44
|
* that any files synthesized by projen or e.g. test snapshots will always be up-to-date
|
|
56
45
|
* before a PR is merged.
|
|
57
46
|
*
|
|
58
47
|
* Implies that PR builds do not have anti-tamper checks.
|
|
59
48
|
*
|
|
60
49
|
* @default true
|
|
61
|
-
* @experimental
|
|
62
50
|
*/
|
|
63
51
|
readonly mutableBuild?: boolean;
|
|
64
52
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
53
|
+
* Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/
|
|
54
|
+
* Uses codecov/codecov-action@v1
|
|
55
|
+
* A secret is required for private repos. Configured with @codeCovTokenSecret
|
|
67
56
|
* @default false
|
|
68
|
-
* @experimental
|
|
69
57
|
*/
|
|
70
58
|
readonly codeCov?: boolean;
|
|
71
59
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
60
|
+
* Define the secret name for a specified https://codecov.io/ token
|
|
61
|
+
* A secret is required to send coverage for private repositories
|
|
74
62
|
* @default - if this option is not specified, only public repositories are supported
|
|
75
|
-
* @experimental
|
|
76
63
|
*/
|
|
77
64
|
readonly codeCovTokenSecret?: string;
|
|
78
65
|
/**
|
|
79
|
-
*
|
|
66
|
+
* DEPRECATED: renamed to `release`.
|
|
80
67
|
*
|
|
81
68
|
* @default - true if not a subproject
|
|
82
69
|
* @deprecated see `release`.
|
|
83
70
|
*/
|
|
84
71
|
readonly releaseWorkflow?: boolean;
|
|
85
72
|
/**
|
|
86
|
-
*
|
|
73
|
+
* Add release management to this project.
|
|
87
74
|
*
|
|
88
75
|
* @default - true (false for subprojects)
|
|
89
|
-
* @experimental
|
|
90
76
|
*/
|
|
91
77
|
readonly release?: boolean;
|
|
92
78
|
/**
|
|
93
|
-
*
|
|
79
|
+
* The name of the main release branch.
|
|
94
80
|
*
|
|
95
81
|
* @default "main"
|
|
96
|
-
* @experimental
|
|
97
82
|
*/
|
|
98
83
|
readonly defaultReleaseBranch: string;
|
|
99
84
|
/**
|
|
100
|
-
*
|
|
85
|
+
* Workflow steps to use in order to bootstrap this repo.
|
|
101
86
|
*
|
|
102
87
|
* @default "yarn install --frozen-lockfile && yarn projen"
|
|
103
|
-
* @experimental
|
|
104
88
|
*/
|
|
105
89
|
readonly workflowBootstrapSteps?: any[];
|
|
106
90
|
/**
|
|
107
|
-
*
|
|
91
|
+
* The git identity to use in workflows.
|
|
108
92
|
*
|
|
109
93
|
* @default - GitHub Actions
|
|
110
|
-
* @experimental
|
|
111
94
|
*/
|
|
112
95
|
readonly workflowGitIdentity?: GitIdentity;
|
|
113
96
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
97
|
+
* Automatically release to npm when new versions are introduced.
|
|
116
98
|
* @default false
|
|
117
|
-
* @experimental
|
|
118
99
|
*/
|
|
119
100
|
readonly releaseToNpm?: boolean;
|
|
120
101
|
/**
|
|
121
|
-
*
|
|
102
|
+
* The node version to use in GitHub workflows.
|
|
122
103
|
*
|
|
123
104
|
* @default - same as `minNodeVersion`
|
|
124
|
-
* @experimental
|
|
125
105
|
*/
|
|
126
106
|
readonly workflowNodeVersion?: string;
|
|
127
107
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
108
|
+
* Use dependabot to handle dependency upgrades.
|
|
130
109
|
* Cannot be used in conjunction with `depsUpgrade`.
|
|
131
110
|
*
|
|
132
111
|
* @default false
|
|
133
|
-
* @experimental
|
|
134
112
|
*/
|
|
135
113
|
readonly dependabot?: boolean;
|
|
136
114
|
/**
|
|
137
|
-
*
|
|
115
|
+
* Options for dependabot.
|
|
138
116
|
*
|
|
139
117
|
* @default - default options
|
|
140
|
-
* @experimental
|
|
141
118
|
*/
|
|
142
119
|
readonly dependabotOptions?: DependabotOptions;
|
|
143
120
|
/**
|
|
144
|
-
*
|
|
145
|
-
*
|
|
121
|
+
* Use github workflows to handle dependency upgrades.
|
|
146
122
|
* Cannot be used in conjunction with `dependabot`.
|
|
147
123
|
*
|
|
148
124
|
* @default true
|
|
149
|
-
* @experimental
|
|
150
125
|
*/
|
|
151
126
|
readonly depsUpgrade?: boolean;
|
|
152
127
|
/**
|
|
153
|
-
*
|
|
128
|
+
* Options for depsUpgrade.
|
|
154
129
|
*
|
|
155
130
|
* @default - default options
|
|
156
|
-
* @experimental
|
|
157
131
|
*/
|
|
158
132
|
readonly depsUpgradeOptions?: UpgradeDependenciesOptions;
|
|
159
133
|
/**
|
|
160
|
-
*
|
|
134
|
+
* Periodically submits a pull request for projen upgrades (executes `yarn
|
|
135
|
+
* projen:upgrade`).
|
|
161
136
|
*
|
|
162
137
|
* This setting is a GitHub secret name which contains a GitHub Access Token
|
|
163
138
|
* with `repo` and `workflow` permissions.
|
|
@@ -168,11 +143,13 @@ export interface NodeProjectOptions extends GitHubProjectOptions, NodePackageOpt
|
|
|
168
143
|
* To create a personal access token see https://github.com/settings/tokens
|
|
169
144
|
*
|
|
170
145
|
* @default - no automatic projen upgrade pull requests
|
|
146
|
+
*
|
|
171
147
|
* @deprecated use `githubTokenSecret` instead.
|
|
172
148
|
*/
|
|
173
149
|
readonly projenUpgradeSecret?: string;
|
|
174
150
|
/**
|
|
175
|
-
*
|
|
151
|
+
* Automatically approve projen upgrade PRs, allowing them to be
|
|
152
|
+
* merged by mergify (if configued).
|
|
176
153
|
*
|
|
177
154
|
* Throw if set to true but `autoApproveOptions` are not defined.
|
|
178
155
|
*
|
|
@@ -181,169 +158,138 @@ export interface NodeProjectOptions extends GitHubProjectOptions, NodePackageOpt
|
|
|
181
158
|
*/
|
|
182
159
|
readonly projenUpgradeAutoMerge?: boolean;
|
|
183
160
|
/**
|
|
184
|
-
*
|
|
161
|
+
* Automatically approve projen upgrade PRs, allowing them to be
|
|
162
|
+
* merged by mergify (if configued).
|
|
185
163
|
*
|
|
186
164
|
* Throw if set to true but `autoApproveOptions` are not defined.
|
|
187
165
|
*
|
|
188
166
|
* @default false
|
|
189
|
-
* @experimental
|
|
190
167
|
*/
|
|
191
168
|
readonly autoApproveProjenUpgrades?: boolean;
|
|
192
169
|
/**
|
|
193
|
-
*
|
|
170
|
+
* Automatically approve deps upgrade PRs, allowing them to be
|
|
171
|
+
* merged by mergify (if configued).
|
|
194
172
|
*
|
|
195
173
|
* Throw if set to true but `autoApproveOptions` are not defined.
|
|
196
174
|
*
|
|
197
175
|
* @default - true
|
|
198
|
-
* @experimental
|
|
199
176
|
*/
|
|
200
177
|
readonly autoApproveUpgrades?: boolean;
|
|
201
178
|
/**
|
|
202
|
-
*
|
|
179
|
+
* Customize the projenUpgrade schedule in cron expression.
|
|
203
180
|
*
|
|
204
|
-
|
|
205
|
-
* @experimental
|
|
181
|
+
@default [ "0 6 * * *" ]
|
|
206
182
|
*/
|
|
207
183
|
readonly projenUpgradeSchedule?: string[];
|
|
208
184
|
/**
|
|
209
|
-
*
|
|
185
|
+
* Defines an .npmignore file. Normally this is only needed for libraries that
|
|
186
|
+
* are packaged as tarballs.
|
|
210
187
|
*
|
|
211
188
|
* @default true
|
|
212
|
-
* @experimental
|
|
213
189
|
*/
|
|
214
190
|
readonly npmignoreEnabled?: boolean;
|
|
215
191
|
/**
|
|
216
|
-
*
|
|
217
|
-
*
|
|
192
|
+
* Additional entries to .npmignore.
|
|
218
193
|
* @deprecated - use `project.addPackageIgnore`
|
|
219
194
|
*/
|
|
220
195
|
readonly npmignore?: string[];
|
|
221
196
|
/**
|
|
222
|
-
*
|
|
197
|
+
* Include a GitHub pull request template.
|
|
223
198
|
*
|
|
224
199
|
* @default true
|
|
225
|
-
* @experimental
|
|
226
200
|
*/
|
|
227
201
|
readonly pullRequestTemplate?: boolean;
|
|
228
202
|
/**
|
|
229
|
-
*
|
|
203
|
+
* The contents of the pull request template.
|
|
230
204
|
*
|
|
231
205
|
* @default - default content
|
|
232
|
-
* @experimental
|
|
233
206
|
*/
|
|
234
207
|
readonly pullRequestTemplateContents?: string[];
|
|
235
208
|
/**
|
|
236
|
-
*
|
|
209
|
+
* Setup prettier.
|
|
237
210
|
*
|
|
238
211
|
* @default false
|
|
239
|
-
* @experimental
|
|
240
212
|
*/
|
|
241
213
|
readonly prettier?: boolean;
|
|
242
214
|
/**
|
|
243
|
-
*
|
|
244
|
-
*
|
|
215
|
+
* Prettier options
|
|
245
216
|
* @default - default options
|
|
246
|
-
* @experimental
|
|
247
217
|
*/
|
|
248
218
|
readonly prettierOptions?: PrettierOptions;
|
|
249
219
|
/**
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
* @experimental
|
|
220
|
+
* Additional entries to .gitignore
|
|
253
221
|
*/
|
|
254
222
|
readonly gitignore?: string[];
|
|
255
223
|
/**
|
|
256
|
-
*
|
|
257
|
-
*
|
|
224
|
+
* Setup jest unit tests
|
|
258
225
|
* @default true
|
|
259
|
-
* @experimental
|
|
260
226
|
*/
|
|
261
227
|
readonly jest?: boolean;
|
|
262
228
|
/**
|
|
263
|
-
*
|
|
264
|
-
*
|
|
229
|
+
* Jest options
|
|
265
230
|
* @default - default options
|
|
266
|
-
* @experimental
|
|
267
231
|
*/
|
|
268
232
|
readonly jestOptions?: JestOptions;
|
|
269
233
|
/**
|
|
270
|
-
*
|
|
234
|
+
* Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable
|
|
235
|
+
* .projenrc.js generation.
|
|
271
236
|
*
|
|
272
237
|
* @default - true if projenrcJson is false
|
|
273
|
-
* @experimental
|
|
274
238
|
*/
|
|
275
239
|
readonly projenrcJs?: boolean;
|
|
276
240
|
/**
|
|
277
|
-
*
|
|
278
|
-
*
|
|
241
|
+
* Options for .projenrc.js
|
|
279
242
|
* @default - default options
|
|
280
|
-
* @experimental
|
|
281
243
|
*/
|
|
282
244
|
readonly projenrcJsOptions?: ProjenrcOptions;
|
|
283
245
|
/**
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* @experimental
|
|
246
|
+
* Options for `Bundler`.
|
|
287
247
|
*/
|
|
288
248
|
readonly bundlerOptions?: BundlerOptions;
|
|
289
249
|
/**
|
|
290
|
-
*
|
|
250
|
+
* A directory which will contain build artifacts.
|
|
291
251
|
*
|
|
292
252
|
* @default "dist"
|
|
293
|
-
* @experimental
|
|
294
253
|
*/
|
|
295
254
|
readonly artifactsDirectory?: string;
|
|
296
255
|
/**
|
|
297
|
-
*
|
|
256
|
+
* Defines a `package` task that will produce an npm tarball under the
|
|
257
|
+
* artifacts directory (e.g. `dist`).
|
|
298
258
|
*
|
|
299
259
|
* @default true
|
|
300
|
-
* @experimental
|
|
301
260
|
*/
|
|
302
261
|
readonly package?: boolean;
|
|
303
262
|
/**
|
|
304
|
-
*
|
|
305
|
-
*
|
|
263
|
+
* Build workflow triggers
|
|
306
264
|
* @default "{ pullRequest: {}, workflowDispatch: {} }"
|
|
307
|
-
* @experimental
|
|
308
265
|
*/
|
|
309
266
|
readonly buildWorkflowTriggers?: Triggers;
|
|
310
267
|
}
|
|
311
268
|
/**
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
* @experimental
|
|
269
|
+
* Automatic bump modes
|
|
315
270
|
*/
|
|
316
271
|
export declare enum AutoRelease {
|
|
317
272
|
/**
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
* @experimental
|
|
273
|
+
* Automatically bump & release a new version for every commit to "main"
|
|
321
274
|
*/
|
|
322
275
|
EVERY_COMMIT = 0,
|
|
323
276
|
/**
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
* @experimental
|
|
277
|
+
* Automatically bump & release a new version on a daily basis.
|
|
327
278
|
*/
|
|
328
279
|
DAILY = 1
|
|
329
280
|
}
|
|
330
281
|
/**
|
|
331
|
-
*
|
|
282
|
+
* Node.js project
|
|
332
283
|
*
|
|
333
|
-
* @experimental
|
|
334
284
|
* @pjid node
|
|
335
285
|
*/
|
|
336
286
|
export declare class NodeProject extends GitHubProject {
|
|
337
287
|
/**
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
* @experimental
|
|
288
|
+
* API for managing the node package.
|
|
341
289
|
*/
|
|
342
290
|
readonly package: NodePackage;
|
|
343
291
|
/**
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
* @experimental
|
|
292
|
+
* The .npmignore file.
|
|
347
293
|
*/
|
|
348
294
|
readonly npmignore?: IgnoreFile;
|
|
349
295
|
/**
|
|
@@ -355,241 +301,187 @@ export declare class NodeProject extends GitHubProject {
|
|
|
355
301
|
*/
|
|
356
302
|
get entrypoint(): string;
|
|
357
303
|
/**
|
|
358
|
-
*
|
|
359
|
-
*
|
|
360
|
-
* @experimental
|
|
304
|
+
* Automatic PR merges.
|
|
361
305
|
*/
|
|
362
306
|
readonly autoMerge?: AutoMerge;
|
|
363
307
|
/**
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
* `undefined` if `buildWorkflow` is disabled.
|
|
367
|
-
*
|
|
368
|
-
* @experimental
|
|
308
|
+
* The PR build GitHub workflow. `undefined` if `buildWorkflow` is disabled.
|
|
369
309
|
*/
|
|
370
310
|
readonly buildWorkflow?: BuildWorkflow;
|
|
371
311
|
/**
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
* This will be `undefined` if the project does not have a
|
|
312
|
+
* Package publisher. This will be `undefined` if the project does not have a
|
|
375
313
|
* release workflow.
|
|
376
314
|
*
|
|
377
315
|
* @deprecated use `release.publisher`.
|
|
378
316
|
*/
|
|
379
317
|
readonly publisher?: Publisher;
|
|
380
318
|
/**
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
* @experimental
|
|
319
|
+
* Release management.
|
|
384
320
|
*/
|
|
385
321
|
readonly release?: Release;
|
|
386
322
|
/**
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
* @experimental
|
|
323
|
+
* Minimum node.js version required by this package.
|
|
390
324
|
*/
|
|
391
325
|
get minNodeVersion(): string | undefined;
|
|
392
326
|
/**
|
|
393
|
-
*
|
|
394
|
-
*
|
|
395
|
-
* @experimental
|
|
327
|
+
* Maximum node version required by this pacakge.
|
|
396
328
|
*/
|
|
397
329
|
get maxNodeVersion(): string | undefined;
|
|
398
330
|
private readonly nodeVersion?;
|
|
399
331
|
/**
|
|
400
|
-
*
|
|
332
|
+
* The package manager to use.
|
|
401
333
|
*
|
|
402
334
|
* @deprecated use `package.packageManager`
|
|
403
335
|
*/
|
|
404
336
|
get packageManager(): NodePackageManager;
|
|
405
337
|
/**
|
|
406
|
-
*
|
|
407
|
-
*
|
|
408
|
-
* @experimental
|
|
338
|
+
* The command to use to run scripts (e.g. `yarn run` or `npm run` depends on the package manager).
|
|
409
339
|
*/
|
|
410
340
|
readonly runScriptCommand: string;
|
|
411
341
|
/**
|
|
412
|
-
*
|
|
413
|
-
*
|
|
414
|
-
* @experimental
|
|
342
|
+
* The Jest configuration (if enabled)
|
|
415
343
|
*/
|
|
416
344
|
readonly jest?: Jest;
|
|
417
345
|
/**
|
|
418
346
|
* @deprecated use `package.addField(x, y)`
|
|
419
347
|
*/
|
|
420
348
|
get manifest(): any;
|
|
421
|
-
/**
|
|
422
|
-
* @experimental
|
|
423
|
-
*/
|
|
424
349
|
readonly bundler: Bundler;
|
|
425
350
|
/**
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
* An npm tarball will be created under the `js`
|
|
351
|
+
* The build output directory. An npm tarball will be created under the `js`
|
|
429
352
|
* subdirectory. For example, if this is set to `dist` (the default), the npm
|
|
430
353
|
* tarball will be placed under `dist/js/boom-boom-1.2.3.tg`.
|
|
431
|
-
*
|
|
432
|
-
* @experimental
|
|
433
354
|
*/
|
|
434
355
|
readonly artifactsDirectory: string;
|
|
435
356
|
/**
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
* @experimental
|
|
357
|
+
* The location of the npm tarball after build (`${artifactsDirectory}/js`).
|
|
439
358
|
*/
|
|
440
359
|
readonly artifactsJavascriptDirectory: string;
|
|
441
360
|
/**
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
* @experimental
|
|
361
|
+
* The upgrade workflow.
|
|
445
362
|
*/
|
|
446
363
|
readonly upgradeWorkflow?: UpgradeDependencies;
|
|
447
364
|
private readonly workflowBootstrapSteps;
|
|
448
365
|
private readonly workflowGitIdentity;
|
|
449
|
-
/**
|
|
450
|
-
* @experimental
|
|
451
|
-
*/
|
|
452
366
|
readonly prettier?: Prettier;
|
|
453
|
-
/**
|
|
454
|
-
* @experimental
|
|
455
|
-
*/
|
|
456
367
|
constructor(options: NodeProjectOptions);
|
|
457
|
-
/**
|
|
458
|
-
* @experimental
|
|
459
|
-
*/
|
|
460
368
|
addBins(bins: Record<string, string>): void;
|
|
461
369
|
/**
|
|
462
|
-
*
|
|
370
|
+
* Replaces the contents of an npm package.json script.
|
|
463
371
|
*
|
|
464
|
-
* @param name The script name
|
|
465
|
-
* @param command The command to execute
|
|
466
|
-
* @experimental
|
|
372
|
+
* @param name The script name
|
|
373
|
+
* @param command The command to execute
|
|
467
374
|
*/
|
|
468
375
|
setScript(name: string, command: string): void;
|
|
469
376
|
/**
|
|
470
|
-
*
|
|
471
|
-
*
|
|
377
|
+
* Removes the npm script (always successful).
|
|
472
378
|
* @param name The name of the script.
|
|
473
|
-
* @experimental
|
|
474
379
|
*/
|
|
475
380
|
removeScript(name: string): void;
|
|
476
381
|
/**
|
|
477
|
-
*
|
|
478
|
-
*
|
|
479
|
-
* @param name The name of the script.
|
|
480
|
-
* @experimental
|
|
382
|
+
* Indicates if a script by the name name is defined.
|
|
383
|
+
* @param name The name of the script
|
|
481
384
|
*/
|
|
482
385
|
hasScript(name: string): boolean;
|
|
483
386
|
/**
|
|
484
|
-
*
|
|
485
|
-
*
|
|
387
|
+
* DEPRECATED
|
|
486
388
|
* @deprecated use `project.compileTask.exec()`
|
|
487
389
|
*/
|
|
488
390
|
addCompileCommand(...commands: string[]): void;
|
|
489
391
|
/**
|
|
490
|
-
*
|
|
491
|
-
*
|
|
392
|
+
* DEPRECATED
|
|
492
393
|
* @deprecated use `project.testTask.exec()`
|
|
493
394
|
*/
|
|
494
395
|
addTestCommand(...commands: string[]): void;
|
|
495
396
|
/**
|
|
496
|
-
*
|
|
497
|
-
*
|
|
498
|
-
* @param fields The fields to set.
|
|
499
|
-
* @experimental
|
|
397
|
+
* Directly set fields in `package.json`.
|
|
398
|
+
* @param fields The fields to set
|
|
500
399
|
*/
|
|
501
400
|
addFields(fields: {
|
|
502
401
|
[name: string]: any;
|
|
503
402
|
}): void;
|
|
504
403
|
/**
|
|
505
|
-
*
|
|
506
|
-
*
|
|
507
|
-
* @param keywords The keywords to add.
|
|
508
|
-
* @experimental
|
|
404
|
+
* Adds keywords to package.json (deduplicated)
|
|
405
|
+
* @param keywords The keywords to add
|
|
509
406
|
*/
|
|
510
407
|
addKeywords(...keywords: string[]): void;
|
|
511
408
|
/**
|
|
512
|
-
*
|
|
409
|
+
* Returns the set of workflow steps which should be executed to bootstrap a
|
|
410
|
+
* workflow.
|
|
513
411
|
*
|
|
514
412
|
* @param options Options.
|
|
515
413
|
* @returns Job steps
|
|
516
|
-
* @experimental
|
|
517
414
|
*/
|
|
518
415
|
renderWorkflowSetup(options?: RenderWorkflowSetupOptions): JobStep[];
|
|
519
416
|
/**
|
|
520
|
-
*
|
|
417
|
+
* Defines normal dependencies.
|
|
521
418
|
*
|
|
522
|
-
* @param deps Names modules to install.
|
|
523
|
-
*
|
|
419
|
+
* @param deps Names modules to install. By default, the the dependency will
|
|
420
|
+
* be installed in the next `npx projen` run and the version will be recorded
|
|
421
|
+
* in your `package.json` file. You can upgrade manually or using `yarn
|
|
422
|
+
* add/upgrade`. If you wish to specify a version range use this syntax:
|
|
423
|
+
* `module@^7`.
|
|
524
424
|
*/
|
|
525
425
|
addDeps(...deps: string[]): void;
|
|
526
426
|
/**
|
|
527
|
-
*
|
|
427
|
+
* Defines development/test dependencies.
|
|
528
428
|
*
|
|
529
|
-
* @param deps Names modules to install.
|
|
530
|
-
*
|
|
429
|
+
* @param deps Names modules to install. By default, the the dependency will
|
|
430
|
+
* be installed in the next `npx projen` run and the version will be recorded
|
|
431
|
+
* in your `package.json` file. You can upgrade manually or using `yarn
|
|
432
|
+
* add/upgrade`. If you wish to specify a version range use this syntax:
|
|
433
|
+
* `module@^7`.
|
|
531
434
|
*/
|
|
532
435
|
addDevDeps(...deps: string[]): void;
|
|
533
436
|
/**
|
|
534
|
-
*
|
|
437
|
+
* Defines peer dependencies.
|
|
535
438
|
*
|
|
536
439
|
* When adding peer dependencies, a devDependency will also be added on the
|
|
537
440
|
* pinned version of the declared peer. This will ensure that you are testing
|
|
538
441
|
* your code against the minimum version required from your consumers.
|
|
539
442
|
*
|
|
540
|
-
* @param deps Names modules to install.
|
|
541
|
-
*
|
|
443
|
+
* @param deps Names modules to install. By default, the the dependency will
|
|
444
|
+
* be installed in the next `npx projen` run and the version will be recorded
|
|
445
|
+
* in your `package.json` file. You can upgrade manually or using `yarn
|
|
446
|
+
* add/upgrade`. If you wish to specify a version range use this syntax:
|
|
447
|
+
* `module@^7`.
|
|
542
448
|
*/
|
|
543
449
|
addPeerDeps(...deps: string[]): void;
|
|
544
450
|
/**
|
|
545
|
-
*
|
|
451
|
+
* Defines bundled dependencies.
|
|
546
452
|
*
|
|
547
453
|
* Bundled dependencies will be added as normal dependencies as well as to the
|
|
548
454
|
* `bundledDependencies` section of your `package.json`.
|
|
549
455
|
*
|
|
550
|
-
* @param deps Names modules to install.
|
|
551
|
-
*
|
|
456
|
+
* @param deps Names modules to install. By default, the the dependency will
|
|
457
|
+
* be installed in the next `npx projen` run and the version will be recorded
|
|
458
|
+
* in your `package.json` file. You can upgrade manually or using `yarn
|
|
459
|
+
* add/upgrade`. If you wish to specify a version range use this syntax:
|
|
460
|
+
* `module@^7`.
|
|
552
461
|
*/
|
|
553
462
|
addBundledDeps(...deps: string[]): void;
|
|
554
|
-
/**
|
|
555
|
-
* (experimental) Exclude these files from the bundled package.
|
|
556
|
-
*
|
|
557
|
-
* Implemented by project types based on the
|
|
558
|
-
* packaging mechanism. For example, `NodeProject` delegates this to `.npmignore`.
|
|
559
|
-
*
|
|
560
|
-
* @experimental
|
|
561
|
-
*/
|
|
562
463
|
addPackageIgnore(pattern: string): void;
|
|
563
464
|
private addLicense;
|
|
564
465
|
private addDefaultGitIgnore;
|
|
565
466
|
/**
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
* This will
|
|
467
|
+
* Returns the shell command to execute in order to run a task. This will
|
|
569
468
|
* typically be `npx projen TASK`.
|
|
570
469
|
*
|
|
571
|
-
* @param task The task for which the command is required
|
|
572
|
-
* @experimental
|
|
470
|
+
* @param task The task for which the command is required
|
|
573
471
|
*/
|
|
574
472
|
runTaskCommand(task: Task): string;
|
|
575
473
|
/**
|
|
576
|
-
*
|
|
577
|
-
*
|
|
578
|
-
* @experimental
|
|
474
|
+
* The job ID of the build workflow.
|
|
579
475
|
*/
|
|
580
476
|
get buildWorkflowJobId(): string | undefined;
|
|
581
477
|
}
|
|
582
478
|
/**
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
* @experimental
|
|
479
|
+
* Options for `renderInstallSteps()`.
|
|
586
480
|
*/
|
|
587
481
|
export interface RenderWorkflowSetupOptions {
|
|
588
482
|
/**
|
|
589
|
-
*
|
|
590
|
-
*
|
|
483
|
+
* Should the pacakge lockfile be updated?
|
|
591
484
|
* @default false
|
|
592
|
-
* @experimental
|
|
593
485
|
*/
|
|
594
486
|
readonly mutable?: boolean;
|
|
595
487
|
}
|