0.34.0 (2024-03-03)
⚠ BREAKING CHANGES
- python: Poetry is now required to be at version 1.2.0 or above. Please update Poetry if needed.
- nextjs: Minimum Node version is now 16.14.0 to match Next 13's minimum node version.
- nextjs: Next.js TSConfig
module
is nowesnext
by default, to preserve previous behavior, setmodule
toCommonJS
. - nextjs: Next.js TSConfig
moduleResolution
is nowBUNDLER
by default, to preserve previous behavior, setmoduleResolution
toNODE
. - nextjs: Next.js TSConfig
strict
is now set totrue
by default, to preserve previous behavior, setstrict
tofalse
. - gitlab: current cache definitions will need to be changed into an array or will get a compile time exception.
- python: Python >=3.8 is now required for projen and consequently for all projects. Upgrade to a supported Python version.
- json-patch: A failure of
JsonPatch.test
does not fail synthesis anymore. To preserve previous behavior, passTestFailureBehavior.FAIL_SYNTHESIS
as third parameter to theJsonPatch.test
call. - json-patch: Calls of
JsonPatch.test
are now only relevant to the scope of the list of patches passed toObjectFile.patch
. This should not break anything for truthy tests, and should not be relevant for failing tests. However, in case any issues are encountered, the previous behavior can be restored by placing allJsonPatch
es in a single call ofObjectFile.patch
. - gitlab: All
variables
are now Records of strings, as per documentation. If you are currently passing in a number, please convert it to a string. - node-package: This may potentially affect some edge cases that were relying on the internal implementation of the dependencies handling. If new dependencies appear/disappear after applying this fix, previous code
preSynthesize
handler should be inspected for any.addDependency
-like calls - those were incorrectly ignored previously and should be removed if actually are not needed. - upgrade-dependencies: When upgrading dependencies, installed packages are now checked for peer dependencies and updates will be filtered to satisfy respective version constraints. The previous behavior was to always upgrade to the latest minor version and ignore incompatible peer dependency constraints. To use the previous behavior, set
satisfyPeerDependencies: false
. - upgrade-dependencies: In v0.72.0 a bug was accidently introduced that causes peer dependencies to be always excluded from version upgrades. This releases fixes the issue. To not upgrade peer dependencies, only list desired dependency types in
types
.
Fixes projen#2874
Fixes projen#2875
Closes projen#1601
- upgrade-dependencies: the
renderUpgradePackagesCommand
has been removed fromNodePackage
. It should never have been used. Instead, configure the appropriatedepsUpgradeOptions
to control the upgrade task. If you render the upgrade command for a different purpose, you'll have to construct the command yourself according to the appropriate package manager.
Features
- add runner group support (#2817) (9bdf7d0), closes #2814
- add Yarnrc component for YARN_BERRY (#3048) (7a3883a), closes #2980
- auto-merge: rule name and queue name can be configured (#3135) (da981a3)
- awscdk: add experimental integ-runner support (#2963) (a579d86)
- awscdk: Node.js 20.x runtime (#3124) (917f3a3)
- bundler: add
esbuild
--format
control (#3103) (bfe6a57), closes #3102 - bundler: additional esbuild options and generic escape hatch to pass any options to esbuild (#3366) (482f782), closes #3364
- cdktf: update default constructs version (#3309) (aa8a2e3)
- docker-compose: Expose YAML file as property (#2866) (7737a96)
- docker: suport platform in docker-compose (#2868) (34d6497)
- eslint: add additional overrides fields (#2999) (83b412e)
- github: download artifact workflow step (#3365) (dbe4aeb)
- github: require contributor statement on PRs (#2892) (19ed699)
- gitlab: add gitlab multiple cache support (#3151) (0c8088f), closes #3022
- gitlab: add id_tokens field to gitlab ci job interface (#2910) (3b0d106)
- gitlab: support fallback-keys (#2991) (080992e), closes #2960
- gitlab: updates to configuration model (#2992) (f251b79)
- IgnoreFile: allow ignorePatterns to be set via options (#3373) (8c93086)
- introduce
YARN_CLASSIC
andYARN_BERRY
NodePackageManager options (#3014) (3273150), closes #2980 /github.com/projen/projen/issues/2980#issuecomment-1759324495 - java: support for parent POM in maven projects (#3326) (41b610d)
- jest: addModuleNameMappers, addModulePaths, addRoots (#3287) (9436206)
- json-patch: each
ObjectFile.patch()
is an atomic operation and new failure behaviors forJsonPatch.test()
(#2997) (316a3e4) - node-package: added bun as a package manager (#2985) (2f52374)
- node: allow enforcement of licenses used by dependencies (#2614) (7402c57)
- node: default to Node.js 18.x (#2984) (979d0a1), closes #2979
- node: release from CI with npm provenance statements (#3330) (e41812c)
- node: update aws-actions/configure-aws-credentials@v2 to v4 (#3329) (8eb0b03), closes #2932 #3324
- Projects and Components are Constructs (#2974) (34edf99), closes #1763
- publish: add ability to create post publish Job steps (#2885) (e93fadd)
- python: default python version is now python >=3.8 (#3125) (46f7a07)
- python: upgrade pytest default version (#3084) (829633d)
- release: subproject releases (#3208) (e2b393d)
- release: support
minorVersion
inreleaseBranches
to release patches for older major versions (#2821) (9da2c1c), closes #2813 - task: getStep, editStep, removeStep, cwd (#3311) (d46b89b)
- tsconfig: downlevelIteration, incremental, tsBuildInfoFile added to compilerOptions (#3314) (681aa72)
- typescript: Added missing TypeScript compilerOption parameters (#2920) (42146f3)
- typescript: ts-jest now uses a non-deprecated implementation (#3201) (2ccae02)
- upgrade-dependencies: allow to configure version upgrade
target
andsatisfyPeerDependencies
(#2883) (ebd75ce) - upgrade-dependencies: switch to single commands that only use
--filter
(#2845) (0063756), closes /github.com/projen/projen/blob/main/src/javascript/upgrade-dependencies.ts#L36 /github.com/projen/projen/blob/main/src/javascript/upgrade-dependencies.ts#L43 /github.com/projen/projen/blob/main/src/javascript/upgrade-dependencies.ts#L97 - vscode: expose configuration files as
.file
property (#2998) (c1d47cd) - vscode: support input variables in launch config (#3166) (d24cbf6)
- yarn: add common Yarn Berry paths to gitattributes (#3092) (b48dd96), closes #2980
Bug Fixes
- awscdk-app-py: app sample code is created in
appEntrypoint
file (#3356) (5310c04), closes #3300 - builtins: command fails when node path contains spaces (#3104) (b2e5bb6), closes #3101
- cli: pass through --help flag for tasks that receive args (#3046) (7655012)
- cli: respect git init.defaultBranch (#2917) (a5151c5)
- construct tree not used internally (#3061) (b9c68ea), closes #3056
- deps: upgrade bundled dependencies (#3051) (147050c)
- deps: upgrade bundled dependencies (#3083) (0171e78)
- deps: upgrade bundled dependencies (#3096) (5b48f48)
- deps: upgrade bundled dependencies (#3122) (26a903f)
- deps: upgrade bundled dependencies (#3132) (eda7995)
- deps: upgrade bundled dependencies (#3328) (f5a89f9)
- deps: upgrade bundled dependencies (#3349) (4f3ab75)
- deps: upgrade bundled dependencies (#3352) (67b3544)
- deps: upgrade bundled dependencies (#3402) (8041446)
- ESLint now handles zero extensions gracefully, task open for extension (#3220) (77532db)
- eslint: explicit dependency on eslint-import-resolver-node is not required (#3100) (12fe39a), closes /github.com/depcheck/depcheck/blob/adfeb8ebf64758c2adade68361ccc3f95f05c67a/src/special/eslint.js#L161-L166
- eslint: use recommended configuration from eslint-plugin-prettier (#3134) (0c330cd)
- file: directory separators are inconsistent between platforms in metadata (#3374) (90fb41e)
- file: incorrect projen command in markers (#2859) (7ce8ecd)
- file: incorrectly detects file changes on Windows when isExecutable is set (#3107) (128c68d), closes /github.com/projen/projen/blob/f8a1ac04d4a635f39a511f2af205dc0a75294d74/src/util.ts#L421-L428
- github: bump peter-evans/create-pull-request to v6 (#3361) (e8fed11), closes #3337
- github: bump upload/download artifact actions to v4; resolves runtime deprecation warnings (#3335) (0fcbcb3)
- github: bump version of actions/checkout to v4; resolves runtime deprecation warnings (#3344) (c2b3a25)
- github: bump version of actions/setup-node to v4; resolves runtime deprecation warnings (#3345) (9281501)
- github: bump version of actions/setup-python to v5; resolves runtime deprecation warnings (#3346) (47d6959), closes #3337
- github: bump version of pnpm/action-setup to v3 (#3359) (2d5be25), closes #3337
- github: bump version of tibdex/github-app-token action; resolves runtime deprecation warnings (#3338) (d4bdfed)
- github: invalid commit for tibdex/github-app-token action (#3341) (8ed7e0e), closes #3338
- gitignore: paths separators are inconsistent for cross platform development (#3325) (7b37e5c), closes #3284
- gitlab: add uppercase support for idTokens (#2922) (f867995)
- javascript: Empty pnpm object in subprojects (#3072) (9dd309c), closes #3071
- jest: build fails when running with an old (<29) version of jest that is not explicitly specified as
jestVersion
(#3276) (fbc92f0), closes #3201 - jest: directory separators are inconsistent for cross platform development (#3370) (7ca6024), closes #3284
- jest: external TypeScript projects are created with outdated jest config (#3397) (7bbfe5c), closes #3396
- jest: ts-jest configuration spelling mistakes (#3226) (b58332c)
- jsii: compile fails with
error TS1110: Type expected
due to incompatible@types/node
version (#3331) (eb6b12f), closes #3324 - jsii: pnpm pack not used as the pack command if the package manager is PNPM (#3254) (c1f37fe), closes /github.com/cdklabs/publib/issues/969#issuecomment-1881896738
- new: projen new --from fails with "Unable to resolve package name from spec" error with "save=false" in .npmrc (#2844) (eda3c14), closes #2837
- nextjs: updated
NextJsProject
default options (#3241) (afcefde) - NODE_ENV test affects projen behavior (#3294) (8330327), closes #2947
- node-package: components cannot change deps at preSynthesize stage (#2964) (5823491)
- node-project: updated code artifact login script to work for node version above 16 (#2840) (9d6a55f), closes /docs.npmjs.com/cli/v7/using-npm/changelog#v7111-2021-04-23
- node: directory separators are inconsistent between platforms in tasks.json and package.json (#3387) (2aa861d), closes /github.com/projen/projen/issues/3284#issuecomment-1952483404
- node: NpmConfig component is created even when not used (#3028) (683b4b1), closes #2638 #2635
- node: packaging bundled dependencies fails in pnpm projects (#3156) (f90f012)
- node: Prettier, Projenrc, and .gitattributes are not ignored in npm package (#3223) (ad69f80)
- node: some directory separators are still inconsistent between platforms in tasks.json and package.json (#3406) (49a51ef), closes /github.com/projen/projen/issues/3284#issuecomment-1964163891 /github.com/nodejs/node/blob/f28ccd3941e70a825786eff7e28f59014ac76ac9/lib/path.js#L1546
- node: yarn fails with
projen has unmet peer dependency "constructs@^10.0.0"
(#3037) (7d0869d) - node: yarn fails with projen has unmet peer dependency "constructs@^10.0.0" (second attempt) (#3039) (7052082)
- object-file: addToArray overrides all previous calls on non-existent array (#3087) (b7cf214)
- object-file: allow boxed primitives, Set, Map and RegExp in values (#3016) (5ca5f6e)
- poetry: add version fallback (#2969) (f3788cd)
- poetry: maintain frozen lockfile for install task (#3321) (12e2183), closes #2913
- project:
runTaskCommand()
ignoresprojenCommand
(#3293) (7ffce3c) - pull-request-lint: bump version of GH action amannn/action-semantic-pull-request to v5.4.0; resolves runtime deprecation warnings (#3357) (b9203a4)
- python:
PythonProject
with Poetry tries to use virtual environment before it's created (#3392) (af095f1), closes #3390 - python: honour sample option for pytest sample code (#3095) (243ecff), closes #3094
- python: poetry & setuptools not using python binary provided by
pythonExec
(#3291) (0da0917) - python: Poetry python project is using deprecated
dev-dependencies
notation inpyproject.toml
(#3375) (a5f5672) - python: poetry tasks are not aligned with other package managers (#3368) (ced51d6), closes #2913
- python: test dependencies are ignored (#2967) (b263f82)
- release: changelog update fails when creating a new releasing when a pre-release with the same version is present (#3256) (c86bb9a), closes #3235
- release: first release ignores minMajorVersion (#3081) (c630d31)
- release: provenance statement not being generated because of missing quotes in YAML (#3378) (d7d8ff0), closes #3300
- release: release workflow attempts to publish packages for already existing versions (#3252) (292d52f), closes #2921
- release: workflow is failing because of invalid bash command (#3285) (3698a0b), closes #3252
- renovatebot: cannot use file override for renovate.json5 (#2843) (12ddafd)
- renovate: preset config:base is now called config:recommended (#3154) (bfd745e), closes #3153
- revert "NODE_ENV test affects projen behavior" (#3334) (74fb390), closes projen/projen#3294 /github.com/projen/projen/discussions/3322#discussioncomment-8368347
- tsconfig: support three missing strict tsconfig
compilerOptions
(#3409) (75072c1), closes TypeStrong/ts-node#1958 - typescript-config: add
types
anddeclarationsMap
missed fields (#3000) (2854309) - typescript:
[@typescript-eslint](https://github.com/typescript-eslint)
packages are incompatible with ts5.2 (#2888) (f743730) - typescript: bump @types/node version to 18 (#3076) (0c574bd)
- typescript: projenrc.ts for TS projects is not excluded from npm package (#3250) (709e584)
- typescript: tsconfig filename added to compile and watch commands (#3222) (7f7bebf)
- upgrade-dependencies:
projen upgrade
fails due topnpx
deprecation (#3355) (5fa8a9f), closes #3332 - upgrade-dependencies: unnecessary attempts to upgrade versions in package.json (#3343) (cb2d898)
- upgrade-dependencies: upgrade command doesn't consider requested types (#2835) (30f41cd)
- upgrades: upgrades failing with wrap-ansi ESM cannot be loaded (#3136) (209028e), closes /github.com/isaacs/cliui/blob/main/package.json#L51
- WorkflowSteps enables completely consistent actions/checkout and setGitIdentity in Workflows (#3204) (cf61c43)
- yarn: fixup snapshot for yarn up (#3088) (#3089) (ac6dc40)
- yarn: npmrc and yarnrc cannot be set to the same value (#3091) (4a2a34e), closes #3048
- yarn: wrong upgrade command for Yarn Berry (#3088) (86aba40), closes #0 #0 #0 #2980