Skip to content
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

fix: cannot use file path dependencies #1779

Merged
merged 6 commits into from
Apr 20, 2022
Merged

fix: cannot use file path dependencies #1779

merged 6 commits into from
Apr 20, 2022

Conversation

Chriscbr
Copy link
Contributor

Fixes #1777

We've supported dependency versions that aren't strictly semver-strings for a while now (see for example: #527). This simply makes the logic a little more robust / less prone to causing sudden errors.


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

@Chriscbr Chriscbr requested a review from a team April 19, 2022 00:19
@mergify mergify bot added the contribution/core ⚙️ used by automation label Apr 19, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #1779 (5da01ec) into main (d90284c) will increase coverage by 1.85%.
The diff coverage is 91.53%.

@@            Coverage Diff             @@
##             main    #1779      +/-   ##
==========================================
+ Coverage   88.06%   89.91%   +1.85%     
==========================================
  Files         132      153      +21     
  Lines        5109     6238    +1129     
  Branches     1207     1596     +389     
==========================================
+ Hits         4499     5609    +1110     
- Misses        610      624      +14     
- Partials        0        5       +5     
Impacted Files Coverage Δ
src/cdk/consts.ts 100.00% <ø> (+36.36%) ⬆️
src/dev-env.ts 83.33% <0.00%> (ø)
src/java/index.ts 100.00% <ø> (ø)
src/python/index.ts 100.00% <ø> (ø)
src/release/bump-version.ts 98.68% <ø> (+0.05%) ⬆️
src/release/index.ts 100.00% <ø> (ø)
src/release/publisher.ts 98.85% <ø> (-0.38%) ⬇️
src/release/release-trigger.ts 100.00% <ø> (ø)
src/release/release.ts 95.79% <ø> (-2.06%) ⬇️
src/release/tag-version.ts 86.66% <ø> (ø)
... and 184 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7aaa602...5da01ec. Read the comment docs.

Signed-off-by: github-actions <github-actions@github.com>
@pgollucci
Copy link
Contributor

👍

Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

Approved, because I don't have any blocking comments.

test/javascript/node-package.test.ts Outdated Show resolved Hide resolved
if (semver.validRange(version)) {
return semver.minVersion(version)?.version;
} else {
return version;
Copy link
Contributor

Choose a reason for hiding this comment

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

question: what about when someone erroneously supplies an invalid semver version. We don't error out, and maybe they would expect that. Can we attach a warning or something to this? I'm guessing Annotations don't exist in projen, so might be wishful thinking.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the semver version is invalid, it will be caught when yarn install or npm install fails.

@kaizencc kaizencc added the pr/do-not-merge ⚙️ used by automation label Apr 20, 2022
@Chriscbr Chriscbr removed the pr/do-not-merge ⚙️ used by automation label Apr 20, 2022
github-actions and others added 2 commits April 20, 2022 22:41
Signed-off-by: github-actions <github-actions@github.com>
@mergify mergify bot merged commit 6508208 into main Apr 20, 2022
@mergify mergify bot deleted the rybickic/file-deps branch April 20, 2022 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core ⚙️ used by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when using file dependencies
4 participants