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(regex): find package difference with tilda #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

swtyler
Copy link

@swtyler swtyler commented Jan 4, 2021

I have an automatic process to spit out any updated to libraries we depend on. The current regex to pull out package names/versions will fail to find a difference for something like the following:

Old:

vega-typings@~0.19.0:
  version "0.19.1"
  resolved "https://nexus-trunk.udev.six3/repository/npm/vega-typings/-/vega-typings-0.19.1.tgz#a53949143fa37721ae7bd146bbb9add5c78aca52"
  integrity sha512-OSyNYwMJ8FayTTNU/gohprbt1EFQBpoiMPP9p2vqo1O9z45XVnotQ92jYHAhraI6gWiMIIfo4OjPbSe/GX7etg==
  dependencies:
    vega-util "^1.15.2"

New:

vega-typings@~0.19.2:
  version "0.19.2"
  resolved "https://nexus-trunk.udev.six3/repository/npm/vega-typings/-/vega-typings-0.19.2.tgz#374fc1020c1abb263a0be87de28d1a4bd0526c3f"
  integrity sha512-YU/S9rDk4d+t4+4eTa9fzuw87PMNteeVtpcL51kUO8H7HvGaoW7ll8RHKLkR0NYBEGPRoFDKUxnoyMvhgjsdYw==
  dependencies:
    vega-util "^1.15.2"

I updated the regex to work for both ^ and ~, now it correctly shows that there is a difference.

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.

1 participant