-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(examples): fix version bumping of examples #498
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel really awkward about this. But I also can't think of a better fix and want to put my thoughts before approval.
^0.4.0
and 0.4.0
My main concern is that we now have ^0.4.0
(with caret) and will be override with 0.4.0
only when running lerna
. The effect are:
- If we release
0.4.1
, thisversion
will be reverted back to 0.4.0 inlerna
run. Any patching we did won't be applied here. We need to remember to update this every time we bump a patch version. - Most contributors will not know that
version
target is run automatically bylerna
.
Should we keeping example up-to-date through checklist?
Users who try this example with npm install
will use the latest patched version. This is good. However, users may copy the code from example into their project with the latest version of library.
- If the latest is just patching (0.4.1) or minor (0.5.0), it should be fine as it is backward compatible.
- If the latest is major (1.0.x), the example can break.
To avoid this, we have to either add an updating example as part of Definition of Done checklist. This is manual now.
The alternative (leaving it as it is) is worse option
Alternatively, we can leave it as it is. We risk having broken examples for users. The users may or may not report back to us. So we might have broken examples for a very long time before any detection.
Choosing between two choice, I prefer to have this change in than leaving it as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is blocking merge. Let's go with this for now. Will discuss with the team on adding a checklist in PR so that we don't miss updating this.
* build(all): add concurrency to github actions * fix(build): revert group name for release * chore(examples): fix version bumping of examples (#498) * force fix version of deps for examples * add package.json to bump commit * build(deps): bump aws-sdk from 2.1056.0 to 2.1062.0 (#506) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1056.0 to 2.1062.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-js@v2.1056.0...v2.1062.0) --- updated-dependencies: - dependency-name: aws-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump @aws-sdk/client-sts from 3.46.0 to 3.48.0 (#505) Bumps [@aws-sdk/client-sts](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-sts) from 3.46.0 to 3.48.0. - [Release notes](https://github.com/aws/aws-sdk-js-v3/releases) - [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-sts/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.48.0/clients/client-sts) --- updated-dependencies: - dependency-name: "@aws-sdk/client-sts" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump typescript from 4.5.4 to 4.5.5 (#507) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.5.4 to 4.5.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](microsoft/TypeScript@v4.5.4...v4.5.5) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump @types/node from 17.0.8 to 17.0.10 (#488) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.8 to 17.0.10. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(logger|metrics): properly return decorated class (#489) * fix: logger to return decorated class * fix: metrics to return decorated class * chore: remove leftover files from logger * feat: Add codespaces/gitpod support (#485) * feat: initial codespaces support * chore: example commit to disable a plugin * fix: rather use lerna-ci * fix: forgot to remove "cd "to examples * feat: Add gitpod support * chore: move to node 14 for both gitpod and codespaces * fix: gitpod specific way * chore: use nvmrc to ease shared config * docs: comment out docs for gitpod * fix: force npm to be 8 * feat: finalize extensions * chore: remove ones that don't work * fix: container typo * build(all): add concurrency to github actions * fix(build): revert group name for release Co-authored-by: Florian Chazal <florianchazal@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrea Amorosi <dreamorosi@gmail.com> Co-authored-by: Michael Brewer <michael.brewer@gyft.com>
Description of your changes
Currently when a version are bumped, examples cdk package got his dependencies bumped as well to match latest package that are going to be released.
This PR leverage versionning life cycle to force versioning of deps and workaround lerna/lerna#2326 .
NB: Examples will always be behind if we don't update manually the dependencies.
Alternative
Remove
examples/cdk
from lerna.json and add lint, build and test specific scripts to either rootpackage.json
or in github actions and husky scripts ...How to verify this change
npx lerna version --force-publish=\* --no-git-tag-version --no-push --conventional-commits
Build is passing https://github.com/awslabs/aws-lambda-powertools-typescript/runs/4898015010 so package-lock.json is fixed.
Next bump then run e2e tests will demonstrate the fix
Related issues, RFCs
#494
PR status
Is this ready for review?: YES
Is it a breaking change?: NO
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.