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

Closes #1055: Add version filtering to NPM action #1056

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

anthonydahanne
Copy link
Member

@anthonydahanne anthonydahanne commented Mar 17, 2023

Summary

Filter versions, similar to the maven action

Use Cases

The users will now be able to choose which "family" of the NPM packages they want, instead of just the latest.

Example:

- id: dependency
  uses: docker://ghcr.io/paketo-buildpacks/actions/npm-dependency:main
  with:
    package: express

Used to return

[...]
https://registry.npmjs.org/express/-/express-5.0.0-beta.1.tgz
aab6ee29bd280536aede56e7f57cc72e
version<<aab6ee29bd280536aede56e7f57cc72e
5.0.0
[...]

And now returns:

[...]
https://registry.npmjs.org/express/-/express-4.18.2.tgz
2c4675ba80d67e09d52c4cd342f9120f
version<<2c4675ba80d67e09d52c4cd342f9120f
4.18.2
[...]

Users can specify this invocation to return to former behavior:

- id: dependency
  uses: docker://ghcr.io/paketo-buildpacks/actions/npm-dependency:main
  with:
    package: express
    version_regex: '^[\d]+\.[\d]+\.[\d].*$'

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@anthonydahanne anthonydahanne requested a review from a team as a code owner March 17, 2023 18:27
@dmikusa dmikusa added type:enhancement A general enhancement semver:minor A change requiring a minor version bump labels Mar 17, 2023
@dmikusa dmikusa merged commit ed82d63 into paketo-buildpacks:main Mar 17, 2023
This was referenced Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants