Skip to content

chore: version check rejects non-monorepo package.jsons#19033

Merged
mergify[bot] merged 2 commits intomasterfrom
huijbers/fix-versions
Feb 18, 2022
Merged

chore: version check rejects non-monorepo package.jsons#19033
mergify[bot] merged 2 commits intomasterfrom
huijbers/fix-versions

Conversation

@rix0rrr
Copy link
Copy Markdown
Contributor

@rix0rrr rix0rrr commented Feb 18, 2022

Because of the following confluence of historical decisions:

  • Our package.jsons are the source of truth for all our packages
  • We want to minimize merge conflicts and we want to be able to
    tell when we are doing a development build.

We have a mechanism called align-versions that is going to update
the version 0.0.0 in all package jsons to 1.144.0 (or whatever
the current version number is) just prior to doing the build.

It will look in the Lerna/Yarn workspace config to find all
package.jsons to replace.

Afterwards, to make sure, a grep on ALL package.jsons makes
sure there are no stray 0.0.0s left anywhere in the repo.

We recently added another package.json to help Dependabot
do version checks on packages we use in our repository: that new
package.json was NOT aligned (because it's not a monorepo
package itself), so it would stay at 0.0.0 and the integrity
check would fail the build.

Update the integrity check to stop considering packages that
have been marked as private: true. Those won't be published to
NPM anyway, and so it also doesn't matter what their version number is.


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

Because of the following confluence of historical decisions:

- Our `package.json`s are the source of truth for all our packages
- We want to minimize merge conflicts and we want to be able to
  tell when we are doing a development build.

We have a mechanism called `align-versions` that is going to update
the version `0.0.0` in all package jsons to `1.144.0` (or whatever
the current version number is) just prior to doing the build.

It will look in the Lerna/Yarn workspace config to find all
package.jsons to replace.

Afterwards, to make sure, a grep on *ALL* package.jsons makes
sure there are no stray `0.0.0`s left anywhere in the repo.

We recently added another `package.json` to help Dependabot
do version checks on packages we use in our repository: that new
`package.json` was NOT aligned (because it's not a monorepo
package itself), so it would stay at `0.0.0` and the integrity
check would fail the build.

Update the integrity check to stop considering packages that
have been marked as `private: true`. Those won't be published to
NPM anyway, and so it also doesn't matter what their version number is.
@rix0rrr rix0rrr requested a review from a team February 18, 2022 09:57
@rix0rrr rix0rrr self-assigned this Feb 18, 2022
@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Feb 18, 2022

@github-actions github-actions bot added the @aws-cdk/aws-workspaces Related Amazon WorkSpaces label Feb 18, 2022
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Feb 18, 2022
@rix0rrr rix0rrr changed the title chore: version check rejects new packages chore: version check rejects non-monorepo package.jsons Feb 18, 2022
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Feb 18, 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: 5992e08
  • 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 9754d44 into master Feb 18, 2022
@mergify mergify bot deleted the huijbers/fix-versions branch February 18, 2022 11:21
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Feb 18, 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).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
Because of the following confluence of historical decisions:

- Our `package.json`s are the source of truth for all our packages
- We want to minimize merge conflicts and we want to be able to
  tell when we are doing a development build.

We have a mechanism called `align-versions` that is going to update
the version `0.0.0` in all package jsons to `1.144.0` (or whatever
the current version number is) just prior to doing the build.

It will look in the Lerna/Yarn workspace config to find all
package.jsons to replace.

Afterwards, to make sure, a grep on *ALL* package.jsons makes
sure there are no stray `0.0.0`s left anywhere in the repo.

We recently added another `package.json` to help Dependabot
do version checks on packages we use in our repository: that new
`package.json` was NOT aligned (because it's not a monorepo
package itself), so it would stay at `0.0.0` and the integrity
check would fail the build.

Update the integrity check to stop considering packages that
have been marked as `private: true`. Those won't be published to
NPM anyway, and so it also doesn't matter what their version number is.


----

*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

@aws-cdk/aws-workspaces Related Amazon WorkSpaces contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants