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

deps: Use caret ^ semver for nan #4

Merged
merged 1 commit into from
Dec 2, 2023
Merged

deps: Use caret ^ semver for nan #4

merged 1 commit into from
Dec 2, 2023

Conversation

DeeDeeG
Copy link
Member

@DeeDeeG DeeDeeG commented Nov 26, 2023

Change:

Adds ^ (caret semver) when specifying the nan dependency.

Motivation:

Allows later upgrades within the same major versions of nan, without coming back to modify this package's package.json file and then bumping this package's version in any/all consumers of this package.

Context:

This is a follow-up to #1, which removed the caret ^ semver in specifying the nan dependency in package.json.

Rationale:

I don't think it's a good trade-off to pin an exact version of nan.

I've never had a problem updating to a newer version of nan (no point in pinning an exact version), but with new versions of NodeJS and Electron coming out all the time, bumping nan in our direct/indirect dependencies is frequently quite helpful (lots of reasons to upgrade frequently, caret ^ semver comes in handy for this).

Dealing with exact pinned version is much more laborious than just refreshing your lockfile, so caret ^ semver is the way to go for nan, IMO.

Also helps optimize the deduplication of different nan versions, not that nan is a very heavy dependency if I recall correctly. Wider/more-permissive semver ranges for nan allow one version of nan to satisfy the requirements of more packages.

I don't think it's a good trade-off to pin an exact version of nan.

It basically never has problems, but with new versions
of NodeJS and Electron coming out all the time,
bumping nan in your direct/indirect dependencies is
frequently quite helpful.

Dealing with exact pinned version is much more laborious
than just refreshing your lockfile, so caret ^ semver
is the way to go, IMO.
Copy link
Member

@confused-Techie confused-Techie left a comment

Choose a reason for hiding this comment

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

As there have been no opposing points made here, I'm inclined to trust that this is a non-problematic dependency to continuously bump, and support this one being merged in. Where on the plus side we get to worry about this repo ever so slightly less.

@DeeDeeG DeeDeeG merged commit a0cce58 into master Dec 2, 2023
1 check passed
@DeeDeeG
Copy link
Member Author

DeeDeeG commented Dec 2, 2023

Thanks for review!

Merging now.

@DeeDeeG DeeDeeG changed the title deps: User caret ^ semver for nan deps: Use caret ^ semver for nan Dec 2, 2023
@DeeDeeG
Copy link
Member Author

DeeDeeG commented Dec 2, 2023

Just noticed the typo in the PR title/merge commit message. 🥲 Oh, well.

(The typo is "User" --> "Use".)

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.

2 participants