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

Inline fix logic #47

Merged
merged 4 commits into from
Jul 7, 2023
Merged

Inline fix logic #47

merged 4 commits into from
Jul 7, 2023

Conversation

wraithgar
Copy link
Member

  • deps: add semver@7.5.3
  • deps: add hosted-git-info@6.1.1
  • fix: pull in fix logic from normalize-package-data
  • fix: only report bundleDependencies change if it was changed

@wraithgar wraithgar requested a review from a team as a code owner July 7, 2023 15:14
lib/normalize.js Outdated Show resolved Hide resolved
lib/normalize.js Show resolved Hide resolved
@lukekarrys
Copy link
Contributor

Looks good! One minor swap for a var -> const and a suggestion.

This brings in the logic from `normalize-package-data` to be in this repo
instead.  It doesn't bring all of the logic, just the steps involved
with "fix".

There was some re-duplication of `bundleDependencies` that
`normalize-package-data` was doing that has been removed.  It was also
completely re-implementing the script fixing, which we already call as
part of "fix" so that was dropped.
@wraithgar wraithgar merged commit 3bcf2fd into main Jul 7, 2023
23 checks passed
@wraithgar wraithgar deleted the gar/legacy-fixer branch July 7, 2023 18:24
@github-actions github-actions bot mentioned this pull request Jul 7, 2023
if (!data.version) {
data.version = ''
} else {
if (!semver.valid(data.version, !loose)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

(Here and line 80) bool arg is loose based on typings: https://unpkg.com/browse/@types/semver@7.3.10/functions/valid.d.ts

Suggested change
if (!semver.valid(data.version, !loose)) {
if (!semver.valid(data.version, loose)) {

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep this is a typo from refactoring, I'd changed it to !strict but then decided to keep the loose param.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants