GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: semver.diff prerelease to release recognition by wraithgar · Pull Request #533 · npm/node-semver

Conversation

@wraithgar

@wraithgar wraithgar commented Apr 5, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Cleanup of #334
Closes #333

Authored by @deefactorial

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

H4ad reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@wraithgar
wraithgar requested a review from a team as a code owner April 5, 2023 23:32
@wraithgar
wraithgar requested review from lukekarrys and removed request for a team April 5, 2023 23:32
@wraithgar
wraithgar force-pushed the pull/334 branch from 960a0f0 to b3a7d63 Compare April 5, 2023 23:35
H4ad
H4ad reviewed Apr 7, 2023
View reviewed changes
Comment thread functions/diff.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

H4ad
H4ad reviewed Apr 7, 2023
View reviewed changes
Comment thread functions/diff.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@H4ad

H4ad commented Apr 7, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

In this line:

node-semver/functions/diff.js

Lines 8 to 9 in b3a7d63

const v1 = parse(version1)
const v2 = parse(version2)

If we parse it first, we can speedup this from 300k op/s to ~470k to ~500k op/s.

Like this:

  const v1 = parse(version1)
  const v2 = parse(version2)

  if (eq(v1, v2)) {

Because eq also parse the version, so we parse it twice in this method without need.

Should I open another PR for this one?

EDIT: I opened a PR just to not mix the bugfix and the perf fix.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@H4ad H4ad mentioned this pull request Apr 7, 2023
fix: faster diff #539
Merged
@wraithgar
wraithgar force-pushed the pull/334 branch 3 times, most recently from 6a4fd89 to cc279ff Compare April 7, 2023 01:18
@dominique-blockchain @wraithgar
fix: semver.diff prerelease to release recognition
acc4e58
@wraithgar
wraithgar force-pushed the pull/334 branch from cc279ff to acc4e58 Compare April 10, 2023 13:54
nlf
nlf approved these changes Apr 10, 2023
View reviewed changes

@nlf nlf left a comment

Copy link
Copy Markdown
Contributor

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 one was a bit confusing and is a little unintuitive, but it does make sense. for future readers here's what helped me wrap my head around it:

the versions 1.0.0, 1.1.0-pre and 1.1.0 would sort in that same order. the transition from 1.0.0 to 1.1.0-pre could be considered a pre-release, but it's also a minor and since the minor is the more impactful change that's what we report the diff as.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@wraithgar
wraithgar merged commit 796cbe2 into main Apr 10, 2023
@wraithgar
wraithgar deleted the pull/334 branch April 10, 2023 17:30
@github-actions github-actions Bot mentioned this pull request Apr 10, 2023
chore: release 7.4.0 #540
Merged
@ms-bot ms-bot mentioned this pull request Apr 17, 2023
chore(deps): bump 🧳 semver to ^7.6.3 mobsuccess-devops/pmd-github-action#11
Closed
@snyk-bot snyk-bot mentioned this pull request May 16, 2023
[Snyk] Upgrade semver from 6.3.0 to 7.5.0 OutSystems/cordova-plugin-add-swift-support#3
Closed
This was referenced Jul 17, 2023
chore(version): update tests to reflect new behavior of semver lerna/lerna#3785
Merged
fix(deps): bump semver from 7.3.8 to 7.5.2 lerna/lerna#3750
Merged
This was referenced Jul 31, 2023
Bump semver from 7.3.5 to 7.5.2 in /platform/ui ossrs/oryx#107
Closed
Bump semver from 7.3.5 to 7.5.2 in /ui ossrs/oryx#116
Closed
This was referenced May 24, 2024
[Snyk] Upgrade semver from 7.3.7 to 7.6.0 NOUIY/npm-groovy-lint#71
Closed
[Snyk] Upgrade semver from 7.3.8 to 7.6.0 NOUIY/security-wg#55
Closed
@devcurt696 devcurt696 mentioned this pull request May 29, 2024
[Snyk] Upgrade semver from 7.0.0 to 7.6.1 devcurt696/resume-builder#77
Open
@NOUIY NOUIY mentioned this pull request May 30, 2024
[Snyk] Upgrade semver from 7.3.7 to 7.6.1 NOUIY/npm-groovy-lint#77
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lukekarrys lukekarrys Awaiting requested review from lukekarrys lukekarrys is a code owner automatically assigned from npm/cli-team
2 more reviewers
@H4ad H4ad H4ad left review comments
@nlf nlf nlf approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[BUG] semver.diff returns incorrect responses

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@wraithgar @H4ad @nlf @dominique-blockchain
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.