Repository navigation
Releases
Releases · jogold/projen
v0.9.0
0.9.0 (2023-11-17)
⚠ BREAKING CHANGES
- json-patch: A failure of
JsonPatch.testdoes not fail synthesis anymore. To preserve previous behavior, passTestFailureBehavior.FAIL_SYNTHESISas third parameter to theJsonPatch.testcall. - json-patch: Calls of
JsonPatch.testare 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 allJsonPatches in a single call ofObjectFile.patch. - gitlab: All
variablesare 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
preSynthesizehandler 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
renderUpgradePackagesCommandhas been removed fromNodePackage. It should never have been used. Instead, configure the appropriatedepsUpgradeOptionsto 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. - github: To align the
PullRequestFromPatchOptionsinterface with the newly introduced feature, two options have moved:
PullRequestFromPatchOptions.patch.workflowName->PullRequestFromPatchOptions.workflowName,PullRequestFromPatchOptions.ref->PullRequestFromPatchOptions.patch.ref. - The values of
JestConfigOptions.transformsandJestConfigOptions.watchPluginshave changed types and now use a dedicated class, in order to enable use in non-JS/TS languages. - node: default to node16
To use any other Node version, explicitly provide the desired version number - node: remove
jsii/superchainimage from AwsCdkConstructLibrary workflows - subproject: Projenrc components are no longer added to subprojects
When a project is a subproject, they do not require a projenrc file.
Previously a Projenrc component was added to every subproject.
To restore the previous behavior, you can manually add the requiredProjenrccomponent to the project:
declare subproject: typescript.TypeScriptProject;
new typescript.Projenrc(subproject);Features
- add
workflowContainerImagetoPublisher(#2572) (9554bd7) - add runner group support (#2817) (9bdf7d0), closes #2814
- add support for Git LFS (#2455) (adfcf6c)
- add Yarnrc component for YARN_BERRY (#3048) (7a3883a), closes #2980
- allow prettier configuration in yaml (#2388) (8cba761), closes /github.com/projen/projen/blob/main/src/javascript/eslint.ts#L85
- awscdk: add experimental integ-runner support (#2963) (a579d86)
- build: allow setting workflow file name (#2754) (c8c1428), closes #2753
- bundler: add
esbuild--formatcontrol (#3103) (bfe6a57), closes #3102 - cli:
projen newcan take simple list project options (#2368) (4aacce0) - cli: allow running
projenfrom a subdirectory (#2493) (806bd92), closes #2418 - cli: validate options when creating projects from external packages (#2563) (5dbf456), closes #2487
- convert TypescriptConfig to Component and allow comments (#2409) (342a642), closes #2395
- dependabot: add additional dependatbot options (#2777) (6606966)
- docker-compose: Expose YAML file as property (#2866) (7737a96)
- docker-compose: support defining networks (#2406) (bf07061), closes #2397
- docker-compose: support entrypoint (#2506) (ca916e8)
- docker-compose: support service labels (#2407) (40af0e2), closes /docs.docker.com/compose/compose-file/compose-file-v3/#labels-2
- docker: suport platform in docker-compose (#2868) (34d6497)
- eslint: add additional overrides fields (#2999) (83b412e)
- generic .projenrc.ts file that can be used in non-TS projects (#2521) (53ac035)
- github: add createPullRequest Workflow Action to create PRs without using a patch (#2597) (6a6ef63)
- github: add dependabot options: assignees, groups, allow (#2787) (3db1a5b)
- github: add support for the 'strategy' property in reusable workflows (#2433) (e52fd32)
- github: add support for workflows run-name (#2424) (9637ab6)
- github: allow specifying permission scope for app token (#2380) (6a86f86)
- github: allow workflow action versions to be set (#2439) (1bca225), closes #1844 #1702
- github: expose GitHub Actions workflow helpers (#2595) (ea80db1)
- github: require contrib...
v0.8.0
0.8.0 (2023-01-16)
⚠ BREAKING CHANGES
- python: The default Python version used for Poetry and Setuptools was updated to
>=3.7as required by each of these packages. - gitlab: GitLab job names from the projen CI configuration will be preserved rather than changed to snake case
- github: If you have customized the
package-pythonorpackage-dotnetjobs of the release workflow, please review the changes for the release of the respective action.
actions/setup-python@v4: https://github.com/actions/setup-python/releases/tag/v4.0.0
actions/setup-dotnet@v3: https://github.com/actions/setup-dotnet/releases/tag/v3.0.0
- github: Requires self-hosted GitHub Actions runners to be updated to version 2.297.0 or greater.
- jest: Removal of
test:updatetask whenalwaysUpdateSnapshotsis enabled (default is enabled). This task was exactly the same astestwhich can be used instead. Alternatively setalwaysUpdateSnapshotstofalseto change the behavior oftestand add an explicittest:updatetask.
fixes projen#1144
Description
- As a lot of users is noticing, updating snapshot in task "test" is a unexpected behavior and it should be separated as "test:update" that already exists
- I believe that snapshot should not be updated in the
buildWorkflow, because snapshot test is one important way to confirm that the auto updates doesn't break something. Although, I would try to keep the current behavior (updating snapshots inbuildWorkflow) as a default to avoid breaking changes
Fix
- Deleted "--updateSnapshot" for the task "test"
- Added
alwaysUpdateSnapshotsoption to keep the current behavior- Deleted "test:update" if
alwaysUpdateSnapshotsis true because it is confusing that "test:update" is doing the same thing- This can be a breaking change for people currently using "test:update", but I think it is easy enough to migrate to "test" or configuring
alwaysUpdateSnapshotsfalse, because it's doing almost same thing already
- This can be a breaking change for people currently using "test:update", but I think it is easy enough to migrate to "test" or configuring
- Deleted "test:update" if
- release: existing tags for prerelease not respected (projen#2098)
- add Project.commitGenerated prop (projen#1972)
- cdk8s: * python:
PytestSamplenow requires an explicitmoduleName, as part of the newoptions: PytestSampleOptionsparameter (replacingtestdir). If you have aPythonProjectthe module name is available frompythonProject.moduleName. - cdk8s: In
Cdk8sTypeScriptApp, information about the usedcdk8sversion are now available fromCdk8sTypeScriptApp.cdk8sDeps.
Features
- add Node.js 18 Lambda runtime (#2289) (133b10a)
- add Project.commitGenerated prop (#1972) (b578083)
- add support for
cpcommand on Windows using shx (#2004) (a7058b7) - add support for gzip compression in latest jsii/file-redirect s… (#2025) (7a3ba34), closes #2024
- Adding notes about forcing release versions (#2070) (274682b)
- adding steps for upgrading project to .ts file (#1995) (10551cf)
- awscdk: custom Lambda runtimes (#1982) (83d148b)
- bump actions/setup-node@v3 for NodeProject (#2022) (b225cd9)
- cdk8s: add support for building cdk8s apps with python (#1720) (e5cc514)
- cdk: allow user to pass arguments to deploy and destroy tasks (#2249) (246d8d3)
- eslint: expose eslint task from the eslint component, so consumer could easily refer to (#2325) (d6ddc13)
- github: support
working-directoryon GitHub Actions Workflow Step (#2187) (2bc290b), closes #2185 - jest: new option to disable updating snapshots in test task (#2129) (c84c8f9)
- jest: support running single tests by passing arguments through to jest (#2247) (6b7ab97)
- jsii-project: add support for compressing assembly file (#2056) (1e88e36)
- jsii-project: allow passing the go package name (#2001) (896bb1a)
- jsii-project: support
iconUrlonJsiiDotNetTarget(#2035) (d5b0b19) - made bundler esbuild loaders configurable (#2181) (#2183) (5ca981d)
- object-file: added ability to apply JSON patches to object files (#1994) (f01c425)
- optionally support comments in .json and in .jsonc files (#2045) (022c4bf)
- PNPM: Updated to latest version (#2086) (cddd4d1)
- pom: support adding phase to plugin execution (#2079) (a3c0556)
- release: add option to set the minimal major version (#2000) (08378c4)
- release: allow github oidc auth provider for aws code artifact (#2111) (c6048af), closes #1313 /github.com/cdklabs/publib/blob/main/bin/publib-npm#L24-L40
- release: github releases support the prerelease option (#2168) (ae0889a)
- renovate: add options to overwrite configuration (#2293) (b152a20), closes #2292
- tasks: allow passing arguments to tasks (#2246) (46a4167), closes #356
- vscode: support additional launch config properties (#2044) (777eb08)
- vscode: support VS Code workspace settings (#2047) (9e5454f)
- vscode: support workspace recommended extensions (#2046) (17634fa)
Bug Fixes
v0.7.0
0.7.0 (2022-07-19)
⚠ BREAKING CHANGES
- circleci: WorkflowJob no longer has a parameters key, and the parameters key in Job is now an object with
description?,type, anddefault?keys. - react:
reactTypeDefis no longer exposed on React project types, andReactTypeDefandReactTypeDefOptionsare deprecated. This file is now created as a sample file so it will be managed by the user (and they can edit it, delete it, etc.) instead of by projen. Create aSourceCodefile instead if you would like to use a managed react type definitions file in your project.
Features
- add smithy build support to projen (#1970) (b962f6a)
- add support for package resolution overrides (#1902) (75d05ef), closes #1854
- awscdk: add lambda runtime nodejs16.x (#1927) (7330bb8)
- cdk-config: add methods for adding includes and excludes (#1919) (834f1cf), closes #1898
- circleci: Add support for CircleCi (#1718) (4e2d3ed), closes #1717
- create sample test files only if jest is enabled (#1959) (8fd59aa)
- eslint: added ability to override parsers (#1914) (3373acf)
- github: support calling reusable workflows in github actions workflows (#1957) (b79bf51), closes #1956
- java: allow repositories to be added to pom.xml (#1944) (65b1312), closes #1943
- jest: allow passing extra CLI options (#1961) (f3404da), closes #1960
- ObjectFile:
addToArrayescape hatch method (#1920) (0398d88) - publisher: Support GitHub deploy keys for golang (#1906) (41548cd)
- react-ts: change eslint to true and put the correct settings on… (#1952) (f184b9b), closes #1478
- react-ts: change tsconfig module from esnext to commonjs (#1955) (dd0d6fa), closes #1954
Bug Fixes
- awscdk-construct: new project build fails (#1966) (60800a2), closes #1964
- circleci: add pipeline parameters object, remove parameters from workflow job (#1969) (1a5dc94), closes #1968
- circleci: fix typo on workflow job filter (#1934) (8c7a4bd), closes #1930
- codecov: added codecov upload to github release workflow (#1942) (0cfaaf3), closes #1654
- dev-deps: upgrade npm-check-updates to 15.3.3 (#1976) (82b3ffb)
- GoPublishOptions is marked as deprecated (#1907) (5159df5)
- Pin jest dependencies to same version (#1947) (1e9aa42), closes #1946 #1941
- publisher: add manual publish condition (#1950) (d19c0f8)
- react: build errors with ReactTypescriptProject (#1911) (41c95b7), closes #1635
- react: ReactTypeScript project not synthing sample code (#1918) (334f742), closes #1915
- restore ability to lint files in projenrc src directory (#1926) (5291158), closes #1903 #1832 #1903
- typescript: ignore declaration map files from git (#1975) (1215165), closes #1896
- update jest matcher (#1949) (2441c24)
v0.6.0
0.6.0 (2022-06-02)
⚠ BREAKING CHANGES
- update GitHub actions to recent versions (projen#1890)
- typescript: EslintOptions.lintProjenRc is now a string
- new versions of projen now require node v14, since node v12 reaches EOL on April 30, 2022.
- The deprecated
projenUpgradeSecretis removed, and GitHub API access is now customizable throughgithubOptions.projenCredentials. - Separate tasks/workflows for upgrading projen (and approving those PRs) are no longer generated by default.
autoApproveProjenUpgrades,projenUpgradeAutoMerge, andprojenUpgradeSchedulehave been correspondingly removed. stale.ymlGitHub workflow is no longer generated as the default behavior in projects. To keep generating it, specifystale: trueor initialize agithub.Stalecomponent directly.- ReactProject's
ejecttask now ejects the project from projen instead of ejecting from React. Project.defaultTaskis now optional as it may be undefined if a project is being ejected.FileBase.PROJEN_MARKERis now deprecated, please useFileBase.markerinstead. This value will be undefined if the project is being ejected.- cdk8s: The
importtask in theCdk8sTypeScriptAppproject now outputs to thesrcdirectory by default instead of the project root. - jest: The method
jest.addTypeScriptSupport()is no longer available. This code is now insideTypeScriptProject. - java:
cdkVersionparameter ofAwsCdkJavaAppno longer support caret (eg:"^1.136.0"). That behavior is now controlled on whethercdkVersionPinningis set totrueorfalse. - java:
addCdkDependencymethod ofAwsCdkJavaAppnow expects fully qualified package names (eg:software.amazon.awscdk/aws-lambda). - eslint: Prettier configuration is now under a
settingsoption instead (instead ofprettierOptions: { bracketSpacing: false }, writeprettierOptions: { settings: { bracketSpacing: false } }). - prettier:
prettier.configis now calledprettier.settingsand DOES NOT includeoverrides. - node: The
prettierIgnoreEnabledoption is now underprettierOptions.ignoreFileand can be accessed viaprettier.ignoreFile. Similarly,project.addPrettierIgnore()is nowproject.prettier.addIgnorePattern(). - workflows: A secret called
PROJEN_GITHUB_TOKENwithworkflows,packagesandreposcopes is now required for all projects. As much as this is a bit of a burden, most projects already have such a token because otherwise projen upgrade workflows cannot really function. - jsii: The
packagetask now only produces an npm tarball. To create all language bindings, usepackage-allorpackage:LANGfor a specific language. NewProjecthas been renamedInitProject, andNewProjectOptionHintshas been renamedInitProjectOptionHintsPythonProjectis now initialized with a.projenrc.pyfile by default instead of.projenrc.js.- awscdk:
LambdaFunctionandAutoDiscovernow requirescdkDepsso they can interact with CDK version manager. - awscdk: The
cdkVersionandconstructsVersionoptions are now semver ranges and not just specific versions. To enable the previous behavior, use a caret prefix^. - awscdk:
LambdaFunctionandAutoDiscovernow requirescdkDepsso they can interact with CDK version manager. - the default version of
@types/nodeinstalled if no
minNodeVersionis specified on Node projects is now^12instead of
^14. - release:
npmDistTagonly effects publishing (and supported for each release branch) setting and so it is no longer set inpackage.json. workflow.addJobsLater()is no longer supported. UsepostSynthesishooks and call.addJobs()as needed.publish:xxxxtasks for automated releases are not defined by default since normally they should only be executed from within workflows. SetpublishingTasks: trueto create them.- awscdk-construct: cdkVersion default value updated to
2.0.0
cdkAssertdeprecated and default changed tofalse- new property
cdkAssertionsadded and defaulted totrue
- awscdk-construct:
awscdk.AutoDiscoverandawscdk.IntegrationTestnow requiretsconfigPath. - dependency cycles between submodules in Python and Go (projen#1286)
- cdk8s:
cdk8s-plusis not included automatically in cdk8s project. Users need to add this dependency explicitly. - awscdk:
AutoDiscovernow requirestestdir. - node: minor tweaks of the
LambdaFunctionandBundlerAPIs. - It is now impossible to modify the
buildtask. Instead, extend one of the specific build phases (precompile,compile,post compile,testandpackage). To access these tasks useproject.xxxTask. - The
compileBeforeTestoption inTypeScriptProjectis not supported any more. Tests are always executed after compilation. projenDuringBuildis no longer supported. Let us know if you have a use case for it that we are not aware of.- awscdk:
CdkApprovalLevelis nowawscdk.ApprovalLevel. - awscdk:
cdkTypeScriptApp.cdkConfignow refers to aawscdk.CdkConfigobject. To add custom fields tocdk.jsonusecdkTypeScriptApp.cdkConfig.json. - typescript:
nodeProject.testCompileTaskhas been removed. - typescript:
tsconfig.jest.jsonandtsconfig.eslint.jsonare now combined into a singletsconfig.dev.json. You can interact with this file it via thetypescriptProject.tsconfigDevproperty. - jest: The method
generateTypescriptConfig()has been replaced withaddTypeScriptSupport(). project.github.workflowshas been renamedproject.github.workflowsEnabled-project.github.workflowsnow returns an array of allGithubWorkflowinstances in the project.- The default minimum Node.js version for node projects is now 14.x since Node 10.x is now end-of-life. Therefore we also change the default build container for JSII projects is now jsii/superchain:node14.
Co-authored-by: Elad Ben-Israel benisrae@amazon.com
- nextjs: Removed
web.NextJsTypeDefcomponent. This file is automatically managed by Next.js - delete the one created by projen and let it regenerate if you run into errors. - auto-merge:
AutoMergenow expects aGitHubcomponent as its first argument, and no longer requiresMergifyto be provided. Publisheris nowrelease.Publisher- Task categories have been removed.
- projen new:
projen newwill no longer ask you if you want to create a git repository nor push the initial commit to github. By default, it will create a repo and a commit (which you will need to push yourself). Use--no-gitto disable. - node:
DependabotOptions.autoMergewas removed. Passproject.autoApprove.labelintoDependabotOptions.labelsinstead. In addition,projenUpgradeAutoMergenow defaults tofalse. - release: The
releaseWorkflowsis now a map instead of an array. - release: The
initialVersionoption has been removed. The default isv0.1.0orvMM.0.0. - project: The
mergifyAutoMergeoption inNodeProjectOptions
has been removed. To auto merge PRs, use the 'auto approve'
functionality via theautoApproveOptionsoption. - release:
task.toShellCommand()has been removed, as well as the option to render npm scripts as shell commands. Maintaining this task rendition is too expensive and limits the ability to expand the task system. - tasks: The
Taskinitializer no longer takesTasksas the first argument (no longer needed). - node: The
npmTaskExecutionoption has been removed. - license: The initializer of the
Licensenow takesspdxthrough the options struct instead of a positional argument. Additionally, an error is thrown ifMITlicense is selected but thecopyrightOwneris not provided (because it is required in the license text). - github: the GitHub Workflow triggers and job
keys now usecamelCaseinstead ofsnake_caseor
kebab-case. - version numbers are now maintained through git tags instead of
version.json. This file should be deleted alongside theCHANGELOG.mdfile. Change log entries are now included inside a GitHub Release. @projen rebuildis no longer supported due to a security issue.- as we migrate the default value of
defaultReleaseBranchfrommastertomain, this option will be required and an error will be printed if the value is not set. We will make this optional in a future release. - Projects created with
projenwill now default to using themainbranch. GithubWorkflowno longer extendsFileBase. Useworkflow.fileinstead to access file properties.- project
project.tryFindJsonFile()is now deprecated. UsetryFindObjectFile()instead. - project The
objfield on files is now private. Usefile.addOverride()to make changes instead. - the
javaoption in jsii projects is now calledpublishToMaven. - node: The
libdir,srcdirandtestdiroptions are no longer available inNodeProject. Instead they are available in specific project types like typescript, nextjs and react. - the
nameoption is now required for all project types. - node:
Version.resolveVersion(outdir)is nowVersion.version. NodeProjectCommonOptionsis nowNodePackageOptions.- all deprecated
dependenciesAPIs have been removed.
warn - PROP projen.NodeProjectCommonOptions.bundledDependencies: has been removed [removed:projen.NodeProjectCommonOptions.bundledDependencies]
warn - PROP projen.NodeProjectCommonOptions.dependencies: has been removed [removed:projen.NodeProjectCommonOptions.dependencies]
warn - PROP projen.NodeProjectCommonOptions.devDependencies: has been removed [removed:projen.NodeProjectCommonOptions.devDependencies]
warn - PROP projen.NodeProjectCommonOptions.peerDependencies: has been removed [removed:projen.NodeProjectCommonOptions.peerDependencies]
warn - PROP projen.NodeProjectOptions.bundledDependencie...