Skip to content

chore: bring init-template package files under auto-upgrade control#19893

Merged
mergify[bot] merged 4 commits intomasterfrom
huijbers/init-versions
Apr 27, 2022
Merged

chore: bring init-template package files under auto-upgrade control#19893
mergify[bot] merged 4 commits intomasterfrom
huijbers/init-versions

Conversation

@rix0rrr
Copy link
Copy Markdown
Contributor

@rix0rrr rix0rrr commented Apr 13, 2022

The init template package manager files used to be named
package.template.json, pom.template.xml, because they contained
placeholders. This naming scheme makes Dependabot and
npm-check-updates ignore them.

Rename the files to their "official" names, do placeholder substitutions
in a hook script instead.

  • Add Dependabot config to make it watch the non-NPM package manager
    files.
  • Add to our "Yarn upgrade" script for the NPM upgrades.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

The init template package manager files used to be named
`package.template.json`, `pom.template.xml`, because they contained
placeholders. This naming scheme makes Dependabot and
`npm-check-updates` ignore them.

Rename the files to their "official" names, do placeholder substitutions
in a hook script instead.

- Add Dependabot config to make it watch the non-NPM package manager
  files.
- Add to our "Yarn upgrade" script for the NPM upgrades.
@rix0rrr rix0rrr requested a review from a team April 13, 2022 08:30
@rix0rrr rix0rrr self-assigned this Apr 13, 2022
@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Apr 13, 2022

@aws-cdk-automation aws-cdk-automation requested a review from a team April 13, 2022 08:30
@github-actions github-actions bot added the p2 label Apr 13, 2022
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Apr 13, 2022
Copy link
Copy Markdown
Contributor

@Chriscbr Chriscbr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks okay to me, though it looks like pkglint is tripping up the build:

aws-cdk: TypeError: Invalid comparator: %cdk-version%
aws-cdk:     at Comparator.parse (/codebuild/output/src349889751/src/github.com/aws/aws-cdk/tools/@aws-cdk/pkglint/node_modules/semver/classes/comparator.js:38:13)
aws-cdk:     at new Comparator (/codebuild/output/src349889751/src/github.com/aws/aws-cdk/tools/@aws-cdk/pkglint/node_modules/semver/classes/comparator.js:22:10)
aws-cdk:     at /codebuild/output/src349889751/src/github.com/aws/aws-cdk/tools/@aws-cdk/pkglint/node_modules/semver/classes/range.js:133:47
aws-cdk:     at Array.map (<anonymous>)
aws-cdk:     at Range.parseRange (/codebuild/output/src349889751/src/github.com/aws/aws-cdk/tools/@aws-cdk/pkglint/node_modules/semver/classes/range.js:133:35)
aws-cdk:     at /codebuild/output/src349889751/src/github.com/aws/aws-cdk/tools/@aws-cdk/pkglint/node_modules/semver/classes/range.js:34:22
aws-cdk:     at Array.map (<anonymous>)
aws-cdk:     at new Range (/codebuild/output/src349889751/src/github.com/aws/aws-cdk/tools/@aws-cdk/pkglint/node_modules/semver/classes/range.js:34:8)
aws-cdk:     at Object.intersects (/codebuild/output/src349889751/src/github.com/aws/aws-cdk/tools/@aws-cdk/pkglint/node_modules/semver/ranges/intersects.js:3:8)
aws-cdk:     at RegularDependenciesMustSatisfyPeerDependencies.validate (/codebuild/output/src349889751/src/github.com/aws/aws-cdk/tools/@aws-cdk/pkglint/lib/rules.js:1080:25)
aws-cdk: Error: pkglint exited with error code 1

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 27, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 22dc4c3
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit dad3089 into master Apr 27, 2022
@mergify mergify bot deleted the huijbers/init-versions branch April 27, 2022 09:52
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 27, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@iliapolo iliapolo mentioned this pull request Jun 19, 2022
4 tasks
mergify bot pushed a commit that referenced this pull request Jun 21, 2022
In #19893, we added init-templates `package.json` files to our automatic upgrades mechanism. The packages `jest` and `ts-jest` were (not sure why...), added to the rejection list, i.e they specifically will not be upgraded; However, `@types/jest` was not added to this list, thereby creating a potential major version mismatch between them. 

This is exactly what happened here: #20751

This PR rejects upgrades to `@types/jest` as well, to keep them in sync.

----

### All Submissions:

* [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
daschaa pushed a commit to daschaa/aws-cdk that referenced this pull request Jul 9, 2022
In aws#19893, we added init-templates `package.json` files to our automatic upgrades mechanism. The packages `jest` and `ts-jest` were (not sure why...), added to the rejection list, i.e they specifically will not be upgraded; However, `@types/jest` was not added to this list, thereby creating a potential major version mismatch between them. 

This is exactly what happened here: aws#20751

This PR rejects upgrades to `@types/jest` as well, to keep them in sync.

----

### All Submissions:

* [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants