projen 0.99.80 → 0.100.1
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 +1719 -3687
- package/BREAKING_CHANGES.md +855 -0
- package/lib/ai-instructions.d.ts +0 -1
- package/lib/ai-instructions.js +6 -12
- package/lib/awscdk/auto-discover.js +7 -14
- package/lib/awscdk/awscdk-app-java.d.ts +0 -7
- package/lib/awscdk/awscdk-app-java.js +28 -21
- package/lib/awscdk/awscdk-app-py.d.ts +0 -12
- package/lib/awscdk/awscdk-app-py.js +27 -24
- package/lib/awscdk/awscdk-app-ts.d.ts +0 -5
- package/lib/awscdk/awscdk-app-ts.js +57 -31
- package/lib/awscdk/awscdk-construct.d.ts +0 -26
- package/lib/awscdk/awscdk-construct.js +4 -44
- package/lib/awscdk/awscdk-deps-java.js +2 -6
- package/lib/awscdk/awscdk-deps-js.js +2 -7
- package/lib/awscdk/awscdk-deps-py.js +2 -7
- package/lib/awscdk/awscdk-deps.d.ts +1 -90
- package/lib/awscdk/awscdk-deps.js +68 -114
- package/lib/awscdk/cdk-config.d.ts +0 -21
- package/lib/awscdk/cdk-config.js +44 -51
- package/lib/awscdk/cdk-tasks.js +26 -4
- package/lib/awscdk/integration-test.js +10 -15
- package/lib/awscdk/internal.js +5 -2
- package/lib/awscdk/lambda-extension.js +4 -16
- package/lib/awscdk/lambda-function.d.ts +0 -10
- package/lib/awscdk/lambda-function.js +88 -78
- package/lib/awscdk/private/feature-flags-v2.const.d.ts +1 -1
- package/lib/awscdk/private/feature-flags-v2.const.js +2 -2
- package/lib/build/build-workflow.js +51 -6
- package/lib/builtin-example.task.d.ts +1 -0
- package/lib/builtin-example.task.js +2 -1
- package/lib/cdk/auto-discover-base.js +43 -8
- package/lib/cdk/construct-lib.js +2 -4
- package/lib/cdk/integration-test-base.js +26 -4
- package/lib/cdk/jsii-build.d.ts +0 -1
- package/lib/cdk/jsii-build.js +4 -4
- package/lib/cdk/jsii-docgen.js +2 -4
- package/lib/cdk/jsii-project.d.ts +12 -9
- package/lib/cdk/jsii-project.js +22 -7
- package/lib/cdk8s/auto-discover.js +3 -6
- package/lib/cdk8s/cdk8s-app-py.js +7 -4
- package/lib/cdk8s/cdk8s-app-ts.js +43 -6
- package/lib/cdk8s/cdk8s-construct.js +44 -5
- package/lib/cdk8s/cdk8s-deps-py.js +2 -4
- package/lib/cdk8s/cdk8s-deps.js +50 -5
- package/lib/cdk8s/integration-test.js +2 -4
- package/lib/cdktf/cdktf-construct.js +36 -5
- package/lib/circleci/circleci.js +66 -44
- package/lib/cleanup.js +38 -5
- package/lib/cli/cmds/new.js +51 -20
- package/lib/cli/cmds/run-task.js +107 -0
- package/lib/cli/{synth.d.ts → cmds/synth.d.ts} +0 -5
- package/lib/cli/cmds/synth.js +90 -0
- package/lib/cli/index.js +47 -22
- package/lib/cli/macros.js +35 -2
- package/lib/cli/task-runtime.d.ts +75 -0
- package/lib/cli/task-runtime.js +482 -0
- package/lib/cli/util.js +37 -4
- package/lib/common.d.ts +9 -0
- package/lib/common.js +11 -2
- package/lib/component.js +3 -4
- package/lib/dependencies.js +43 -12
- package/lib/dev-env.js +10 -4
- package/lib/docker-compose/docker-compose-service.js +54 -4
- package/lib/docker-compose/docker-compose.js +8 -4
- package/lib/file.js +60 -5
- package/lib/gitattributes.js +7 -5
- package/lib/github/actions-provider.js +3 -7
- package/lib/github/auto-approve.js +3 -4
- package/lib/github/auto-merge.js +3 -5
- package/lib/github/auto-queue.js +36 -5
- package/lib/github/dependabot.js +13 -4
- package/lib/github/dependency-review.js +2 -4
- package/lib/github/github-credentials.js +37 -5
- package/lib/github/github-project.d.ts +1 -32
- package/lib/github/github-project.js +30 -8
- package/lib/github/github.d.ts +0 -9
- package/lib/github/github.js +27 -14
- package/lib/github/index.js +24 -2
- package/lib/github/merge-queue.js +3 -4
- package/lib/github/mergify.d.ts +0 -7
- package/lib/github/mergify.js +6 -13
- package/lib/github/pr-template.js +2 -4
- package/lib/github/pull-request-backport.js +4 -4
- package/lib/github/pull-request-lint.js +4 -4
- package/lib/github/stale.js +2 -4
- package/lib/github/task-workflow-job.js +20 -4
- package/lib/github/task-workflow.js +4 -4
- package/lib/github/workflow-actions.d.ts +0 -8
- package/lib/github/workflow-actions.js +2 -14
- package/lib/github/workflow-jobs.js +2 -4
- package/lib/github/workflow-steps.js +2 -4
- package/lib/github/workflows-model.d.ts +0 -8
- package/lib/github/workflows-model.js +1 -1
- package/lib/github/workflows.js +39 -6
- package/lib/gitlab/configuration-model.d.ts +0 -4
- package/lib/gitlab/configuration-model.js +1 -1
- package/lib/gitlab/configuration.js +125 -41
- package/lib/gitlab/gitlab-configuration.js +3 -5
- package/lib/gitlab/nested-configuration.js +3 -4
- package/lib/gitpod.js +11 -7
- package/lib/ignore-file.js +5 -4
- package/lib/index.d.ts +1 -2
- package/lib/index.js +38 -18
- package/lib/ini.js +36 -5
- package/lib/inventory.d.ts +32 -23
- package/lib/inventory.js +37 -4
- package/lib/java/java-project.js +26 -4
- package/lib/java/junit.js +2 -4
- package/lib/java/maven-compile.js +2 -4
- package/lib/java/maven-packaging.js +6 -4
- package/lib/java/maven-sample.js +2 -4
- package/lib/java/pom.js +45 -12
- package/lib/java/projenrc.js +10 -4
- package/lib/javascript/biome/biome.js +48 -6
- package/lib/javascript/bundler.d.ts +0 -8
- package/lib/javascript/bundler.js +48 -11
- package/lib/javascript/eslint.d.ts +0 -13
- package/lib/javascript/eslint.js +38 -37
- package/lib/javascript/index.js +24 -2
- package/lib/javascript/jest.d.ts +0 -20
- package/lib/javascript/jest.js +71 -15
- package/lib/javascript/license-checker.js +3 -4
- package/lib/javascript/node-package.d.ts +0 -28
- package/lib/javascript/node-package.js +136 -38
- package/lib/javascript/node-project.d.ts +5 -76
- package/lib/javascript/node-project.js +88 -81
- package/lib/javascript/npm-config.js +7 -9
- package/lib/javascript/prettier.js +16 -4
- package/lib/javascript/projenrc.js +3 -4
- package/lib/javascript/render-options.d.ts +2 -2
- package/lib/javascript/render-options.js +36 -5
- package/lib/javascript/typescript-config.js +45 -8
- package/lib/javascript/upgrade-dependencies.js +56 -36
- package/lib/javascript/util.js +35 -2
- package/lib/javascript/yarnrc.d.ts +1 -28
- package/lib/javascript/yarnrc.js +3 -45
- package/lib/json-patch.js +3 -4
- package/lib/json.js +4 -5
- package/lib/license.js +37 -5
- package/lib/logger.js +14 -11
- package/lib/logging.js +10 -7
- package/lib/makefile.js +7 -4
- package/lib/object-file.js +19 -4
- package/lib/project-build.js +26 -4
- package/lib/project-tree.js +3 -4
- package/lib/project.d.ts +0 -35
- package/lib/project.js +105 -58
- package/lib/projects.js +37 -6
- package/lib/projenrc-json.d.ts +0 -10
- package/lib/projenrc-json.js +4 -13
- package/lib/projenrc.js +2 -4
- package/lib/python/index.js +24 -2
- package/lib/python/pip.js +5 -4
- package/lib/python/poetry.js +63 -7
- package/lib/python/projenrc.js +10 -4
- package/lib/python/pyproject-toml-file.js +2 -4
- package/lib/python/pytest-sample.js +2 -4
- package/lib/python/pytest.d.ts +0 -12
- package/lib/python/pytest.js +3 -5
- package/lib/python/python-project.js +33 -10
- package/lib/python/python-sample.js +2 -4
- package/lib/python/requirements-file.js +4 -5
- package/lib/python/setuppy.d.ts +0 -8
- package/lib/python/setuppy.js +3 -4
- package/lib/python/setuptools.js +8 -4
- package/lib/python/uv.js +11 -4
- package/lib/python/venv.js +45 -6
- package/lib/readme.js +2 -4
- package/lib/release/bump-version.js +36 -3
- package/lib/release/bump-version.task.js +35 -2
- package/lib/release/commit-tag-version.js +39 -3
- package/lib/release/publisher.d.ts +0 -49
- package/lib/release/publisher.js +24 -22
- package/lib/release/release-trigger.js +33 -4
- package/lib/release/release.d.ts +0 -24
- package/lib/release/release.js +66 -31
- package/lib/release/tag-version.js +35 -2
- package/lib/release/update-changelog.js +36 -3
- package/lib/renovatebot.js +14 -4
- package/lib/run-projenrc-json.task.js +35 -2
- package/lib/run-task.cjs +12631 -275
- package/lib/sample-file.js +43 -9
- package/lib/smithy/smithy-build.js +46 -1
- package/lib/source-code.js +6 -5
- package/lib/task-model.d.ts +10 -0
- package/lib/task-model.js +1 -1
- package/lib/task-runner.d.ts +25 -0
- package/lib/task-runner.js +100 -0
- package/lib/task.d.ts +0 -7
- package/lib/task.js +13 -13
- package/lib/tasks.d.ts +5 -9
- package/lib/tasks.js +64 -23
- package/lib/testing.js +2 -4
- package/lib/textfile.js +3 -4
- package/lib/toml.js +36 -5
- package/lib/typescript/projenrc-ts.js +8 -4
- package/lib/typescript/projenrc.js +6 -4
- package/lib/typescript/typescript-typedoc.js +2 -4
- package/lib/typescript/typescript.d.ts +0 -10
- package/lib/typescript/typescript.js +75 -29
- package/lib/util/synth.js +39 -6
- package/lib/util.js +38 -5
- package/lib/version.d.ts +0 -4
- package/lib/version.js +24 -10
- package/lib/vscode/devcontainer.js +11 -4
- package/lib/vscode/extensions.js +17 -18
- package/lib/vscode/launch-config.js +5 -6
- package/lib/vscode/settings.js +4 -4
- package/lib/vscode/vscode.js +5 -4
- package/lib/web/next.js +38 -8
- package/lib/web/postcss.js +5 -4
- package/lib/web/react.d.ts +0 -14
- package/lib/web/react.js +51 -25
- package/lib/web/tailwind.js +4 -4
- package/lib/xmlfile.js +2 -4
- package/lib/yaml.js +40 -5
- package/package.json +11 -12
- package/lib/cli/synth.js +0 -105
- package/lib/cli/tasks.js +0 -71
- package/lib/semver.d.ts +0 -34
- package/lib/semver.js +0 -56
- package/lib/task-runtime.d.ts +0 -34
- package/lib/task-runtime.js +0 -317
- /package/lib/cli/{tasks.d.ts → cmds/run-task.d.ts} +0 -0
|
@@ -0,0 +1,855 @@
|
|
|
1
|
+
# Breaking Changes — Removal of Deprecated APIs
|
|
2
|
+
|
|
3
|
+
This release removes a large set of APIs that had been marked `@deprecated`. Most
|
|
4
|
+
removed APIs have a documented replacement. Where there is no drop-in replacement
|
|
5
|
+
(usually because the underlying feature no longer exists upstream), an **escape
|
|
6
|
+
hatch** is shown so you can still reproduce the old behavior. Entries below
|
|
7
|
+
include a before/after example.
|
|
8
|
+
|
|
9
|
+
> A smaller number of deprecated APIs were intentionally **kept** because removing
|
|
10
|
+
> them would require major internal changes or no obvious replacement exists.
|
|
11
|
+
> See [Deprecated but retained](#deprecated-but-retained) at the end.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## `javascript` — `NodeProject` / `NodeProjectOptions`
|
|
16
|
+
|
|
17
|
+
### `mutableBuild` (option) — removed
|
|
18
|
+
|
|
19
|
+
Use `buildWorkflowOptions.mutableBuild`.
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
// before
|
|
23
|
+
new NodeProject({ mutableBuild: false, /* ... */ });
|
|
24
|
+
// after
|
|
25
|
+
new NodeProject({ buildWorkflowOptions: { mutableBuild: false }, /* ... */ });
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### `buildWorkflowTriggers` (option) — removed
|
|
29
|
+
|
|
30
|
+
Use `buildWorkflowOptions.workflowTriggers`.
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
// before
|
|
34
|
+
new NodeProject({ buildWorkflowTriggers: { push: {} }, /* ... */ });
|
|
35
|
+
// after
|
|
36
|
+
new NodeProject({ buildWorkflowOptions: { workflowTriggers: { push: {} } }, /* ... */ });
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### `releaseWorkflow` (option) — removed
|
|
40
|
+
|
|
41
|
+
Use `release`.
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
// before
|
|
45
|
+
new NodeProject({ releaseWorkflow: true, /* ... */ });
|
|
46
|
+
// after
|
|
47
|
+
new NodeProject({ release: true, /* ... */ });
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### `npmignore` (option) — removed
|
|
51
|
+
|
|
52
|
+
Use `project.addPackageIgnore(...)` after construction (or `npmIgnoreOptions`).
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
// before
|
|
56
|
+
new NodeProject({ npmignore: ["foo", "bar"], /* ... */ });
|
|
57
|
+
// after
|
|
58
|
+
const project = new NodeProject({ /* ... */ });
|
|
59
|
+
project.addPackageIgnore("foo");
|
|
60
|
+
project.addPackageIgnore("bar");
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### `allowLibraryDependencies` (getter) — removed
|
|
64
|
+
|
|
65
|
+
Use `project.package.allowLibraryDependencies`.
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
// before
|
|
69
|
+
const allow = project.allowLibraryDependencies;
|
|
70
|
+
// after
|
|
71
|
+
const allow = project.package.allowLibraryDependencies;
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### `entrypoint` (getter) — removed
|
|
75
|
+
|
|
76
|
+
Use `project.package.entrypoint`.
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
// before
|
|
80
|
+
const entry = project.entrypoint;
|
|
81
|
+
// after
|
|
82
|
+
const entry = project.package.entrypoint;
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### `packageManager` (getter) — removed
|
|
86
|
+
|
|
87
|
+
Use `project.package.packageManager`.
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
// before
|
|
91
|
+
const pm = project.packageManager;
|
|
92
|
+
// after
|
|
93
|
+
const pm = project.package.packageManager;
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### `manifest` (getter) — removed
|
|
97
|
+
|
|
98
|
+
Use `project.package.manifest` (still available on `NodePackage`).
|
|
99
|
+
`NodePackage.manifest` is also deprecated, but retained while we are investigating a suitable replacement.
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
// before
|
|
103
|
+
project.manifest.scripts.foo = "bar";
|
|
104
|
+
// after
|
|
105
|
+
project.package.manifest.scripts.foo = "bar";
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### `publisher` (property) — removed
|
|
109
|
+
|
|
110
|
+
Use `project.release?.publisher`.
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
// before
|
|
114
|
+
project.publisher?.publishToNpm();
|
|
115
|
+
// after
|
|
116
|
+
project.release?.publisher.publishToNpm();
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### `hasScript(name)` (method) — removed
|
|
120
|
+
|
|
121
|
+
Use `project.tasks.tryFind(name)`.
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
// before
|
|
125
|
+
if (project.hasScript("build")) { /* ... */ }
|
|
126
|
+
// after
|
|
127
|
+
if (project.tasks.tryFind("build") !== undefined) { /* ... */ }
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### `addCompileCommand(...cmds)` (method) — removed
|
|
131
|
+
|
|
132
|
+
Use `project.compileTask.exec(cmd)`.
|
|
133
|
+
|
|
134
|
+
```ts
|
|
135
|
+
// before
|
|
136
|
+
project.addCompileCommand("tsc", "echo done");
|
|
137
|
+
// after
|
|
138
|
+
project.compileTask.exec("tsc");
|
|
139
|
+
project.compileTask.exec("echo done");
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### `addTestCommand(...cmds)` (method) — removed
|
|
143
|
+
|
|
144
|
+
Use `project.testTask.exec(cmd)`.
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
// before
|
|
148
|
+
project.addTestCommand("jest");
|
|
149
|
+
// after
|
|
150
|
+
project.testTask.exec("jest");
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## `javascript` — `NodePackage` / `NodePackageOptions`
|
|
156
|
+
|
|
157
|
+
### `npmRegistry` (option) — removed
|
|
158
|
+
|
|
159
|
+
Use `npmRegistryUrl` (full URL, including scheme).
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
// before
|
|
163
|
+
{ npmRegistry: "my.registry.com" }
|
|
164
|
+
// after
|
|
165
|
+
{ npmRegistryUrl: "https://my.registry.com" }
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### `scripts` (option) — removed
|
|
169
|
+
|
|
170
|
+
Define tasks/scripts explicitly.
|
|
171
|
+
|
|
172
|
+
```ts
|
|
173
|
+
// before
|
|
174
|
+
new NodeProject({ scripts: { foo: "echo bar" }, /* ... */ });
|
|
175
|
+
// after
|
|
176
|
+
const project = new NodeProject({ /* ... */ });
|
|
177
|
+
project.addTask("foo", { exec: "echo bar" });
|
|
178
|
+
// or: project.package.setScript("foo", "echo bar");
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### `hasScript(name)` (method) — removed
|
|
182
|
+
|
|
183
|
+
Use `project.tasks.tryFind(name)`.
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
// before
|
|
187
|
+
if (pkg.hasScript("build")) { /* ... */ }
|
|
188
|
+
// after
|
|
189
|
+
if (pkg.project.tasks.tryFind("build") !== undefined) { /* ... */ }
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### `projenCommand` (getter) — removed
|
|
193
|
+
|
|
194
|
+
Use `project.projenCommand`.
|
|
195
|
+
|
|
196
|
+
```ts
|
|
197
|
+
// before
|
|
198
|
+
const cmd = pkg.projenCommand;
|
|
199
|
+
// after
|
|
200
|
+
const cmd = project.projenCommand;
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## `javascript` — `Yarnrc` (`YarnrcOptions` / `YarnNetworkSetting`)
|
|
206
|
+
|
|
207
|
+
### `caFilePath` (network setting) — removed
|
|
208
|
+
|
|
209
|
+
Use `httpsCaFilePath` (Yarn v4+).
|
|
210
|
+
|
|
211
|
+
```ts
|
|
212
|
+
// before
|
|
213
|
+
{ networkSettings: { "my-host": { caFilePath: "./ca.pem" } } }
|
|
214
|
+
// after
|
|
215
|
+
{ networkSettings: { "my-host": { httpsCaFilePath: "./ca.pem" } } }
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### `ignoreCwd`, `lockfileFilename`, `pnpDataPath`, `preferAggregateCacheInfo` — removed
|
|
219
|
+
|
|
220
|
+
These options were removed from Yarn itself in v4, so they are no longer projen
|
|
221
|
+
options. If you are pinned to an older Yarn that still understands one of these keys,
|
|
222
|
+
write it straight into the rc file as a raw override:
|
|
223
|
+
|
|
224
|
+
```ts
|
|
225
|
+
// before
|
|
226
|
+
new YarnFile(project, { ignoreCwd: true });
|
|
227
|
+
// after — inject the raw key
|
|
228
|
+
(project.tryFindObjectFile(".yarnrc.yml") as ObjectFile)?.addOverride(
|
|
229
|
+
"ignoreCwd",
|
|
230
|
+
true,
|
|
231
|
+
);
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## `javascript` — `Eslint` (`EslintOptions`)
|
|
237
|
+
|
|
238
|
+
### `lintProjenRcFile` (option) — removed
|
|
239
|
+
|
|
240
|
+
Add the file/directory through `devdirs` instead.
|
|
241
|
+
|
|
242
|
+
```ts
|
|
243
|
+
// before
|
|
244
|
+
{ lintProjenRcFile: ".projenrc.js" }
|
|
245
|
+
// after
|
|
246
|
+
{ devdirs: [".projenrc.js"] }
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### `lintProjenRc` (option) — removed
|
|
250
|
+
|
|
251
|
+
projen no longer automatically adds lint patterns, rule overrides, or ignore-pattern
|
|
252
|
+
exceptions for `.projenrc.js`. To keep the old behavior, add them manually:
|
|
253
|
+
|
|
254
|
+
```ts
|
|
255
|
+
// before
|
|
256
|
+
{ lintProjenRc: true } // implicit default
|
|
257
|
+
// after
|
|
258
|
+
const project = new TypeScriptProject({ /* ... */ });
|
|
259
|
+
project.eslint?.addOverride({
|
|
260
|
+
files: [".projenrc.js"],
|
|
261
|
+
rules: {
|
|
262
|
+
"@typescript-eslint/no-require-imports": "off",
|
|
263
|
+
"import/no-extraneous-dependencies": "off",
|
|
264
|
+
},
|
|
265
|
+
});
|
|
266
|
+
project.eslint?.addIgnorePattern("!.projenrc.js");
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## `javascript` — `Jest` (`JestOptions` / `JestConfigOptions`)
|
|
272
|
+
|
|
273
|
+
### `coverage` (option) — removed
|
|
274
|
+
|
|
275
|
+
Use `jestConfig.collectCoverage`.
|
|
276
|
+
|
|
277
|
+
```ts
|
|
278
|
+
// before
|
|
279
|
+
{ jestOptions: { coverage: true } }
|
|
280
|
+
// after
|
|
281
|
+
{ jestOptions: { jestConfig: { collectCoverage: true } } }
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### `ignorePatterns` (option) — removed
|
|
285
|
+
|
|
286
|
+
Use `jestConfig.coveragePathIgnorePatterns` and/or `jestConfig.testPathIgnorePatterns`.
|
|
287
|
+
|
|
288
|
+
```ts
|
|
289
|
+
// before
|
|
290
|
+
{ jestOptions: { ignorePatterns: ["/build/"] } }
|
|
291
|
+
// after
|
|
292
|
+
{ jestOptions: { jestConfig: {
|
|
293
|
+
coveragePathIgnorePatterns: ["/build/"],
|
|
294
|
+
testPathIgnorePatterns: ["/build/"],
|
|
295
|
+
} } }
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### `JestConfigOptions` index signature (`[name: string]: any`) — removed
|
|
299
|
+
|
|
300
|
+
Use `additionalOptions` for arbitrary Jest config values.
|
|
301
|
+
|
|
302
|
+
```ts
|
|
303
|
+
// before
|
|
304
|
+
{ jestConfig: { someFutureJestOption: true } }
|
|
305
|
+
// after
|
|
306
|
+
{ jestConfig: { additionalOptions: { someFutureJestOption: true } } }
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## `javascript` — `Bundler` (`BundlerOptions`)
|
|
312
|
+
|
|
313
|
+
### `addToPreCompile` (option) — removed
|
|
314
|
+
|
|
315
|
+
Use `runBundleTask`.
|
|
316
|
+
|
|
317
|
+
```ts
|
|
318
|
+
// before
|
|
319
|
+
{ addToPreCompile: false }
|
|
320
|
+
// after
|
|
321
|
+
{ runBundleTask: RunBundleTask.MANUAL }
|
|
322
|
+
// (addToPreCompile: true, the old default, maps to RunBundleTask.PRE_COMPILE)
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## `awscdk`
|
|
328
|
+
|
|
329
|
+
### `AwsCdkConstructLibrary.version` (getter) — removed
|
|
330
|
+
|
|
331
|
+
Use `cdkVersion`.
|
|
332
|
+
|
|
333
|
+
```ts
|
|
334
|
+
// before
|
|
335
|
+
const v = project.version;
|
|
336
|
+
// after
|
|
337
|
+
const v = project.cdkVersion;
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### `AwsCdkConstructLibrary.addCdkDependencies(...)` (method) — removed
|
|
341
|
+
|
|
342
|
+
CDK v2 ships all modules in `aws-cdk-lib`; add any extra (e.g. alpha) modules via
|
|
343
|
+
`deps`/`peerDeps`.
|
|
344
|
+
|
|
345
|
+
```ts
|
|
346
|
+
// before
|
|
347
|
+
project.addCdkDependencies("@aws-cdk/aws-lambda");
|
|
348
|
+
// after
|
|
349
|
+
project.addPeerDeps("@aws-cdk/aws-lambda-go-alpha");
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### `AwsCdkConstructLibrary.addCdkTestDependencies(...)` (method) — removed
|
|
353
|
+
|
|
354
|
+
Add test dependencies via `devDeps` (all CDK v2 modules ship in `aws-cdk-lib`).
|
|
355
|
+
|
|
356
|
+
```ts
|
|
357
|
+
// before
|
|
358
|
+
project.addCdkTestDependencies("@aws-cdk/aws-lambda");
|
|
359
|
+
// after
|
|
360
|
+
project.addDevDeps("@aws-cdk/integ-tests-alpha");
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### `ConstructLibraryAws` / `ConstructLibraryAwsOptions` — removed
|
|
364
|
+
|
|
365
|
+
Use `AwsCdkConstructLibrary` / `AwsCdkConstructLibraryOptions`.
|
|
366
|
+
|
|
367
|
+
```ts
|
|
368
|
+
// before
|
|
369
|
+
new awscdk.ConstructLibraryAws({ /* ... */ });
|
|
370
|
+
// after
|
|
371
|
+
new awscdk.AwsCdkConstructLibrary({ /* ... */ });
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### `AwsCdkJavaApp.addCdkDependency(...)` (method) — removed
|
|
375
|
+
|
|
376
|
+
CDK v2 ships all modules in `software.amazon.awscdk/aws-cdk-lib`; add any extra
|
|
377
|
+
modules via `deps`.
|
|
378
|
+
|
|
379
|
+
```ts
|
|
380
|
+
// before
|
|
381
|
+
project.addCdkDependency("software.amazon.awscdk/aws-lambda");
|
|
382
|
+
// after
|
|
383
|
+
project.addDeps("software.amazon.awscdk/aws-lambda-go-alpha");
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### `AwsCdkPythonAppOptions.testdir` / `AwsCdkPythonApp.testdir` — removed
|
|
387
|
+
|
|
388
|
+
Property was incorrectly named and always determined the location of the sample tests.
|
|
389
|
+
Use the more accurately named `sampleTestdir`.
|
|
390
|
+
|
|
391
|
+
```ts
|
|
392
|
+
// before
|
|
393
|
+
new awscdk.AwsCdkPythonApp({ testdir: "tests", /* ... */ });
|
|
394
|
+
// after
|
|
395
|
+
new awscdk.AwsCdkPythonApp({ sampleTestdir: "tests", /* ... */ });
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### CDK v1 dependency subsystem — removed
|
|
399
|
+
|
|
400
|
+
AWS CDK v1 (which is end-of-support) is no longer supported at all. `AwsCdkDeps` and
|
|
401
|
+
all project types now require CDK v2 — constructing one with `cdkVersion: "1.x"` (or
|
|
402
|
+
any non-2 major) throws `AWS CDK v1 is not supported. Use "cdkVersion" 2.x`.
|
|
403
|
+
|
|
404
|
+
```ts
|
|
405
|
+
// before (CDK v1)
|
|
406
|
+
new awscdk.AwsCdkConstructLibrary({
|
|
407
|
+
cdkVersion: "1.150.0",
|
|
408
|
+
cdkDependencies: ["@aws-cdk/aws-lambda"],
|
|
409
|
+
/* ... */
|
|
410
|
+
});
|
|
411
|
+
// after (CDK v2 — all modules are in aws-cdk-lib)
|
|
412
|
+
new awscdk.AwsCdkConstructLibrary({
|
|
413
|
+
cdkVersion: "2.189.1",
|
|
414
|
+
/* ... */
|
|
415
|
+
});
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
The following were removed along with v1 support:
|
|
419
|
+
|
|
420
|
+
- `cdkDependencies` → use `deps`/`peerDeps`.
|
|
421
|
+
- `cdkTestDependencies` → use `devDeps`/`testDeps`.
|
|
422
|
+
- `addV1Dependencies()` / `addV1DevDependencies()` → use `project.addDeps()` /
|
|
423
|
+
`addPeerDeps()` / `addDevDeps()`.
|
|
424
|
+
- `AwsCdkJavaApp.addCdkDependency()` / `AwsCdkTypeScriptApp.addCdkDependency()` → use
|
|
425
|
+
`deps`.
|
|
426
|
+
- `cdkAssert` / `cdkAssertions` → not needed; the assertions library is bundled in
|
|
427
|
+
`aws-cdk-lib`.
|
|
428
|
+
- `cdkDependenciesAsDeps` (option + `AwsCdkDeps` property) → CDK v1 only; v2
|
|
429
|
+
dependencies are managed normally, so there is nothing to configure.
|
|
430
|
+
- `AwsCdkPackageNames.coreV1` / `.assert` / `.assertions` → v2 only exposes `coreV2`
|
|
431
|
+
and `constructs`.
|
|
432
|
+
- `CdkFeatureFlagsV1` / `CdkFeatureFlags.V1` → use `CdkFeatureFlags.V2`.
|
|
433
|
+
|
|
434
|
+
### `LambdaRuntime.NODEJS_10_X` / `NODEJS_12_X` — removed
|
|
435
|
+
|
|
436
|
+
These Node.js runtimes are EOL in AWS Lambda and can no longer be created or updated,
|
|
437
|
+
so they are no longer exposed as constants (Node.js 14/16/18 are retained for now).
|
|
438
|
+
Prefer a supported runtime; if you genuinely still need a removed one, recreate it via
|
|
439
|
+
the public `LambdaRuntime` constructor.
|
|
440
|
+
|
|
441
|
+
```ts
|
|
442
|
+
// before
|
|
443
|
+
runtime: LambdaRuntime.NODEJS_10_X,
|
|
444
|
+
// after — use a supported runtime
|
|
445
|
+
runtime: LambdaRuntime.NODEJS_20_X,
|
|
446
|
+
// or, to recreate the removed runtime exactly:
|
|
447
|
+
runtime: new awscdk.LambdaRuntime("nodejs10.x", "node10", {
|
|
448
|
+
defaultExternals: ["aws-sdk"],
|
|
449
|
+
}),
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## `release` — `Publisher` / `PublisherOptions` / `NpmPublishOptions`
|
|
455
|
+
|
|
456
|
+
### `jsiiReleaseVersion` (option and property) — removed
|
|
457
|
+
|
|
458
|
+
Use `publibVersion`.
|
|
459
|
+
|
|
460
|
+
```ts
|
|
461
|
+
// before
|
|
462
|
+
{ jsiiReleaseVersion: "^1" }
|
|
463
|
+
// after
|
|
464
|
+
{ publibVersion: "^1" }
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
> Note: `Release` still accepts a `jsiiReleaseVersion` option (it is **not**
|
|
468
|
+
> deprecated there); it now feeds `publibVersion` internally.
|
|
469
|
+
|
|
470
|
+
### `JsiiReleaseNpm` / `JsiiReleasePyPi` / `JsiiReleaseNuget` / `JsiiReleaseMaven` / `JsiiReleaseGo` (interfaces) — removed
|
|
471
|
+
|
|
472
|
+
Use `NpmPublishOptions` / `PyPiPublishOptions` / `NugetPublishOptions` /
|
|
473
|
+
`MavenPublishOptions` / `GoPublishOptions` respectively.
|
|
474
|
+
|
|
475
|
+
```ts
|
|
476
|
+
// before
|
|
477
|
+
const opts: JsiiReleaseNpm = { /* ... */ };
|
|
478
|
+
// after
|
|
479
|
+
const opts: NpmPublishOptions = { /* ... */ };
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### `NpmPublishOptions.distTag` — removed
|
|
483
|
+
|
|
484
|
+
Set the dist-tag per release branch via `npmDistTag`.
|
|
485
|
+
|
|
486
|
+
```ts
|
|
487
|
+
// before
|
|
488
|
+
project.release.publisher.publishToNpm({ distTag: "next" });
|
|
489
|
+
// after (per-branch)
|
|
490
|
+
new Release(project, {
|
|
491
|
+
/* ... */
|
|
492
|
+
releaseBranches: { main: { majorVersion: 1, npmDistTag: "next" } },
|
|
493
|
+
});
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
---
|
|
497
|
+
|
|
498
|
+
## `release` — `Release` (`ReleaseProjectOptions` / `ReleaseOptions`)
|
|
499
|
+
|
|
500
|
+
### `releaseEveryCommit` (option) — removed
|
|
501
|
+
|
|
502
|
+
Use `releaseTrigger`.
|
|
503
|
+
|
|
504
|
+
```ts
|
|
505
|
+
// before
|
|
506
|
+
{ releaseEveryCommit: true } // old default
|
|
507
|
+
{ releaseEveryCommit: false }
|
|
508
|
+
// after
|
|
509
|
+
{ releaseTrigger: ReleaseTrigger.continuous() }
|
|
510
|
+
{ releaseTrigger: ReleaseTrigger.manual({ changelog: false }) }
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
### `releaseSchedule` (option) — removed
|
|
514
|
+
|
|
515
|
+
Use `releaseTrigger`.
|
|
516
|
+
|
|
517
|
+
```ts
|
|
518
|
+
// before
|
|
519
|
+
{ releaseSchedule: "0 17 * * *" }
|
|
520
|
+
// after
|
|
521
|
+
{ releaseTrigger: ReleaseTrigger.scheduled({ schedule: "0 17 * * *" }) }
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
### `ReleaseOptions.task` (option) — removed
|
|
525
|
+
|
|
526
|
+
Use `tasks` (an array).
|
|
527
|
+
|
|
528
|
+
```ts
|
|
529
|
+
// before
|
|
530
|
+
new Release(project, { task: project.buildTask, /* ... */ });
|
|
531
|
+
// after
|
|
532
|
+
new Release(project, { tasks: [project.buildTask], /* ... */ });
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
---
|
|
536
|
+
|
|
537
|
+
## `github`
|
|
538
|
+
|
|
539
|
+
### `GitHubOptions.projenTokenSecret` — removed
|
|
540
|
+
|
|
541
|
+
Use `projenCredentials`.
|
|
542
|
+
|
|
543
|
+
```ts
|
|
544
|
+
// before
|
|
545
|
+
{ projenTokenSecret: "MY_SECRET" }
|
|
546
|
+
// after
|
|
547
|
+
{ projenCredentials: GithubCredentials.fromPersonalAccessToken({ secret: "MY_SECRET" }) }
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
### `GitHubProjectOptions.projenTokenSecret` — removed
|
|
551
|
+
|
|
552
|
+
Same replacement as above (`projenCredentials`).
|
|
553
|
+
|
|
554
|
+
```ts
|
|
555
|
+
// before
|
|
556
|
+
new NodeProject({ projenTokenSecret: "MY_SECRET", /* ... */ });
|
|
557
|
+
// after
|
|
558
|
+
new NodeProject({
|
|
559
|
+
projenCredentials: GithubCredentials.fromPersonalAccessToken({ secret: "MY_SECRET" }),
|
|
560
|
+
/* ... */
|
|
561
|
+
});
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
### `GitHubProjectOptions.mergify` — removed
|
|
565
|
+
|
|
566
|
+
Use `githubOptions.mergify`.
|
|
567
|
+
|
|
568
|
+
```ts
|
|
569
|
+
// before
|
|
570
|
+
new NodeProject({ mergify: false, /* ... */ });
|
|
571
|
+
// after
|
|
572
|
+
new NodeProject({ githubOptions: { mergify: false }, /* ... */ });
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
### `GitHubProjectOptions.mergifyOptions` — removed
|
|
576
|
+
|
|
577
|
+
Use `githubOptions.mergifyOptions`.
|
|
578
|
+
|
|
579
|
+
```ts
|
|
580
|
+
// before
|
|
581
|
+
new NodeProject({ mergifyOptions: { /* ... */ }, /* ... */ });
|
|
582
|
+
// after
|
|
583
|
+
new NodeProject({ githubOptions: { mergifyOptions: { /* ... */ } }, /* ... */ });
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
### `CIPermissions.repositoryProjects` / `AppPermissions.repositoryAnnouncementBanners` — removed
|
|
587
|
+
|
|
588
|
+
Removed by GitHub — these permission scopes no longer exist, so there is nothing to
|
|
589
|
+
replace them with. If GitHub ever introduces a new scope before projen adds it, inject
|
|
590
|
+
a raw key by overriding the rendered workflow file.
|
|
591
|
+
|
|
592
|
+
```ts
|
|
593
|
+
// before
|
|
594
|
+
permissions: { repositoryProjects: JobPermission.READ }
|
|
595
|
+
// after — drop it; or, to emit a custom scope, override the workflow file:
|
|
596
|
+
(project.tryFindObjectFile(".github/workflows/build.yml") as ObjectFile)?.addOverride(
|
|
597
|
+
"jobs.build.permissions.some-new-scope",
|
|
598
|
+
"read",
|
|
599
|
+
);
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
### `MergifyQueue.conditions` — removed
|
|
603
|
+
|
|
604
|
+
Removed by Mergify. Use `queueConditions`.
|
|
605
|
+
|
|
606
|
+
```ts
|
|
607
|
+
// before
|
|
608
|
+
{ name: "default", conditions: ["..."] }
|
|
609
|
+
// after
|
|
610
|
+
{ name: "default", queueConditions: ["..."] }
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
> (`MergifyRule.conditions` is unaffected — only the queue-level `conditions` was removed.)
|
|
614
|
+
|
|
615
|
+
### `WorkflowActions.setupGitIdentity(id)` (static method) — removed
|
|
616
|
+
|
|
617
|
+
Use `WorkflowSteps.setupGitIdentity(...)`.
|
|
618
|
+
|
|
619
|
+
```ts
|
|
620
|
+
// before
|
|
621
|
+
const steps = WorkflowActions.setupGitIdentity(id); // returned JobStep[]
|
|
622
|
+
// after
|
|
623
|
+
const steps = [WorkflowSteps.setupGitIdentity({ gitIdentity: id })];
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
---
|
|
627
|
+
|
|
628
|
+
## `cdk` — `JsiiProject` (`JsiiProjectOptions`)
|
|
629
|
+
|
|
630
|
+
### `python` (option) — removed
|
|
631
|
+
|
|
632
|
+
Use `publishToPypi`.
|
|
633
|
+
|
|
634
|
+
```ts
|
|
635
|
+
// before
|
|
636
|
+
new JsiiProject({ python: { distName: "x", module: "x" }, /* ... */ });
|
|
637
|
+
// after
|
|
638
|
+
new JsiiProject({ publishToPypi: { distName: "x", module: "x" }, /* ... */ });
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
### `dotnet` (option) — removed
|
|
642
|
+
|
|
643
|
+
Use `publishToNuget`.
|
|
644
|
+
|
|
645
|
+
```ts
|
|
646
|
+
// before
|
|
647
|
+
new JsiiProject({ dotnet: { dotNetNamespace: "X", packageId: "X" }, /* ... */ });
|
|
648
|
+
// after
|
|
649
|
+
new JsiiProject({ publishToNuget: { dotNetNamespace: "X", packageId: "X" }, /* ... */ });
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
---
|
|
653
|
+
|
|
654
|
+
## Core
|
|
655
|
+
|
|
656
|
+
### `ProjectType` enum + `GitHubProject.projectType` (option + property) — removed
|
|
657
|
+
|
|
658
|
+
The project type (`LIB`/`APP`/`UNKNOWN`) is no longer tracked; it had only minor effects in projen itself.
|
|
659
|
+
Similar `GitHubProjectOptions.projectType` and the `GitHubProject.projectType` property are
|
|
660
|
+
gone. For `PythonProject`, packaging is no longer auto-enabled based on `projectType`
|
|
661
|
+
— enable it explicitly. (`projectType` was otherwise just metadata; if your own code
|
|
662
|
+
branched on it, store the value yourself.)
|
|
663
|
+
|
|
664
|
+
```ts
|
|
665
|
+
// before
|
|
666
|
+
new PythonProject({ projectType: ProjectType.LIB, /* ... */ }); // implied setuptools
|
|
667
|
+
// after
|
|
668
|
+
new PythonProject({ setuptools: true, /* ... */ });
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
### `Project.tryFindJsonFile(path)` — removed
|
|
672
|
+
|
|
673
|
+
Use `tryFindObjectFile(path)`.
|
|
674
|
+
|
|
675
|
+
```ts
|
|
676
|
+
// before
|
|
677
|
+
const f = project.tryFindJsonFile("package.json");
|
|
678
|
+
// after
|
|
679
|
+
const f = project.tryFindObjectFile("package.json") as JsonFile | undefined;
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
### `Project.addTip(message)` — removed
|
|
683
|
+
|
|
684
|
+
Use `project.logger.info(message)`.
|
|
685
|
+
|
|
686
|
+
```ts
|
|
687
|
+
// before
|
|
688
|
+
project.addTip("watch out for X");
|
|
689
|
+
// after
|
|
690
|
+
project.logger.info("watch out for X");
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
### `typescript.TypeScriptLibraryProject` / `TypeScriptLibraryProjectOptions` — removed
|
|
694
|
+
|
|
695
|
+
Use `TypeScriptProject` / `TypeScriptProjectOptions`.
|
|
696
|
+
|
|
697
|
+
```ts
|
|
698
|
+
// before
|
|
699
|
+
new typescript.TypeScriptLibraryProject({ /* ... */ });
|
|
700
|
+
// after
|
|
701
|
+
new typescript.TypeScriptProject({ /* ... */ });
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
### `Projenrc` / `ProjenrcOptions` (in `projenrc-json`) — removed
|
|
705
|
+
|
|
706
|
+
Use `ProjenrcJson` / `ProjenrcJsonOptions`.
|
|
707
|
+
|
|
708
|
+
```ts
|
|
709
|
+
// before
|
|
710
|
+
new Projenrc(project, opts);
|
|
711
|
+
// after
|
|
712
|
+
new ProjenrcJson(project, opts);
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
### `Version.STANDARD_VERSION` (static) — removed
|
|
716
|
+
|
|
717
|
+
Use the `bumpPackage` option on `Version`. The previous constant value was
|
|
718
|
+
`"commit-and-tag-version@^12"`.
|
|
719
|
+
|
|
720
|
+
```ts
|
|
721
|
+
// before
|
|
722
|
+
const pkg = Version.STANDARD_VERSION;
|
|
723
|
+
// after
|
|
724
|
+
new Version(project, { bumpPackage: "commit-and-tag-version@^12", /* ... */ });
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
### `Semver` class — removed (and dropped from the package exports)
|
|
728
|
+
|
|
729
|
+
Specify semver requirements inline as strings instead.
|
|
730
|
+
|
|
731
|
+
```ts
|
|
732
|
+
// before
|
|
733
|
+
deps: [Semver.caret("4.0.0")]
|
|
734
|
+
// after
|
|
735
|
+
deps: ["express@^4.0.0"]
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
### `Task.prepend(shell)` — removed
|
|
739
|
+
|
|
740
|
+
Use `Task.prependExec(shell)`.
|
|
741
|
+
|
|
742
|
+
```ts
|
|
743
|
+
// before
|
|
744
|
+
task.prepend("echo first");
|
|
745
|
+
// after
|
|
746
|
+
task.prependExec("echo first");
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
### `python.PytestOptions.testdir` / `Pytest.testdir` — removed
|
|
750
|
+
|
|
751
|
+
Reference `sampleTestdir` on the project; to change the test discovery directory use
|
|
752
|
+
`testMatch`.
|
|
753
|
+
|
|
754
|
+
```ts
|
|
755
|
+
// before
|
|
756
|
+
new PythonProject({ pytestOptions: { testdir: "tests" }, /* ... */ });
|
|
757
|
+
// after
|
|
758
|
+
new PythonProject({ sampleTestdir: "tests", /* ... */ });
|
|
759
|
+
// to change where tests are discovered:
|
|
760
|
+
new PythonProject({ pytestOptions: { testMatch: ["tests/unit"] }, /* ... */ });
|
|
761
|
+
```
|
|
762
|
+
|
|
763
|
+
### `python.SetupPyOptions` index signature (`[name: string]: any`) — removed
|
|
764
|
+
|
|
765
|
+
Use `additionalOptions`.
|
|
766
|
+
|
|
767
|
+
```ts
|
|
768
|
+
// before
|
|
769
|
+
{ setupConfig: { someExtraField: "x" } as any }
|
|
770
|
+
// after
|
|
771
|
+
{ additionalOptions: { someExtraField: "x" } }
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
### `gitlab` `Reports.cobertura` — removed
|
|
775
|
+
|
|
776
|
+
Use `coverageReport` (GitLab deprecated the `cobertura` keyword).
|
|
777
|
+
|
|
778
|
+
```ts
|
|
779
|
+
// before
|
|
780
|
+
{ reports: { cobertura: ["coverage/cobertura-coverage.xml"] } }
|
|
781
|
+
// after
|
|
782
|
+
{ reports: { coverageReport: {
|
|
783
|
+
coverageFormat: "cobertura",
|
|
784
|
+
path: "coverage/cobertura-coverage.xml",
|
|
785
|
+
} } }
|
|
786
|
+
```
|
|
787
|
+
|
|
788
|
+
### `web.ReactTypeDef` / `ReactTypeDefOptions` — removed
|
|
789
|
+
|
|
790
|
+
These were unused (`@deprecated No longer used.`). If you still want the generated
|
|
791
|
+
type-reference file, create it with a plain `TextFile`.
|
|
792
|
+
|
|
793
|
+
```ts
|
|
794
|
+
// before
|
|
795
|
+
new ReactTypeDef(project, "src/react-app-env.d.ts");
|
|
796
|
+
// after
|
|
797
|
+
new TextFile(project, "src/react-app-env.d.ts", {
|
|
798
|
+
lines: ['/// <reference types="react-scripts" />'],
|
|
799
|
+
});
|
|
800
|
+
```
|
|
801
|
+
|
|
802
|
+
---
|
|
803
|
+
|
|
804
|
+
## CLI
|
|
805
|
+
|
|
806
|
+
### Legacy synthesis (`--rc` / `tryLegacySynth`) — removed
|
|
807
|
+
|
|
808
|
+
The deprecated `--rc` CLI flag and the legacy synthesis fallback (running
|
|
809
|
+
`node .projenrc.js` directly when there is no `default` task) have been removed.
|
|
810
|
+
Modern projen projects always synthesize via the generated `default` task. To run a
|
|
811
|
+
projenrc directly (the old `--rc` behavior), invoke it with node.
|
|
812
|
+
|
|
813
|
+
```console
|
|
814
|
+
# before
|
|
815
|
+
$ projen --rc ./custom-projenrc.js
|
|
816
|
+
# after — run the projenrc directly
|
|
817
|
+
$ node ./custom-projenrc.js
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
---
|
|
821
|
+
|
|
822
|
+
## Deprecated but retained
|
|
823
|
+
|
|
824
|
+
The following remained `@deprecated` but are **not** removed today.
|
|
825
|
+
Removing them would require larger internal changes, or no suitable replacement is available yet.
|
|
826
|
+
They remain candidates for future removal.
|
|
827
|
+
|
|
828
|
+
- **`GitHubProject` class** — still the base class for `NodeProject`, `JavaProject`,
|
|
829
|
+
and `PythonProject`. Removing it requires abstracting CI/CD "engines" away from
|
|
830
|
+
GitHub first.
|
|
831
|
+
- **`NodePackageManager.YARN` and `YARN2`** — load-bearing across package-manager
|
|
832
|
+
inference logic; projen's own docs note `YARN` may later be repurposed. Use
|
|
833
|
+
`YARN_CLASSIC` / `YARN_BERRY` in new code.
|
|
834
|
+
- **`NodePackage.manifest`** — the live backing store for `package.json`, read across
|
|
835
|
+
modules; there is no read replacement (`addField` only writes).
|
|
836
|
+
- **`JsiiProject` `authorAddress` vs `authorEmail` / `authorUrl`** — jsii reconciles
|
|
837
|
+
its required `authorAddress` with the inherited `authorEmail`/`authorUrl`, and its
|
|
838
|
+
error messages call the latter two "deprecated". Retained because the future author
|
|
839
|
+
API is undecided.
|
|
840
|
+
- **Implicit `packageManager` default** — when `packageManager` is not set on a
|
|
841
|
+
`NodePackage` / `NodeProject` (and cannot be inferred from an existing
|
|
842
|
+
`package.json`), projen logs a `[DEPRECATED]` warning and falls back to
|
|
843
|
+
`NodePackageManager.YARN_CLASSIC`. This default is intended to become a required
|
|
844
|
+
option in a future version, but is retained for now because it was only recently
|
|
845
|
+
introduced. Set `packageManager` explicitly to silence the warning and pin the
|
|
846
|
+
behavior.
|
|
847
|
+
|
|
848
|
+
Some values are "soft-deprecated" by upstream services. They are discouraged from use,
|
|
849
|
+
but otherwise functional. Projen keeps these values until the upstream service fully
|
|
850
|
+
removes support for them:
|
|
851
|
+
|
|
852
|
+
- **Deprecated Lambda runtimes (newer EOL)** — `LambdaRuntime.NODEJS_14_X` / `16_X` /
|
|
853
|
+
`18_X`; prefer newer runtimes (e.g. `NODEJS_20_X`, `NODEJS_22_X`).
|
|
854
|
+
- **`DockerComposeProps.schemaVersion`** — the obsolete top-level Compose `version:`
|
|
855
|
+
field. Retained since this is only a soft-deprecation upstream and is harmless.
|