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 — feat: allow identifierBase to be false by lsvalina · Pull Request #548 · npm/node-semver

Conversation

@lsvalina

@lsvalina lsvalina commented Apr 12, 2023

Copy link
Copy Markdown
Contributor

What

Added Disable Prerelease Identifier Base flag for creating prerelease identifiers without appending .0/.1
Improved Prerelease Identifier Base to use it when identifier is not set (1.0.0-{Identifier Base}) and adds description to cli help for -n flag

Why

Version 1.0.0-something is valid Semantic Version and its not necessary to have "build" number for identifiers that have only one/ first build, changes reflect that so if another prerelease is created with same identifier the "build" number will be append according Prerelease Identifier Base argument

References

Fixes #441
Improves #532

Sorry, something went wrong.

Uh oh!

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

bugourmet reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@lsvalina
feat: add Disable Prerelease Identifier Base for creating prerelease …
0c69881
…intentifiers without appending .0
@lsvalina
lsvalina requested a review from a team as a code owner April 12, 2023 14:17
@lsvalina
lsvalina requested a review from nlf April 12, 2023 14:17
@wraithgar

wraithgar commented Apr 12, 2023

Copy link
Copy Markdown
Contributor

A "disable" boolean is often very confusing because it's turning something off when it's true.

We already have a flag to change this number, perhaps supporting false would suffice.

ljharb, lsvalina, and per1234 reacted with thumbs up emoji
All reactions
  • 👍 3 reactions

Sorry, something went wrong.

Uh oh!

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

@lsvalina
lsvalina force-pushed the feature/add_flag_disable_prerelease_identifier_base branch from 157e260 to fda7e36 Compare April 13, 2023 09:39
@lsvalina
feat: removed Disable Prerelease Identifier Base, now using false in …
14a3913
…Prerelease Identifier Base parameter
@lsvalina
lsvalina force-pushed the feature/add_flag_disable_prerelease_identifier_base branch from fda7e36 to 14a3913 Compare April 13, 2023 09:41
@lsvalina lsvalina mentioned this pull request Apr 13, 2023
fix: obey identifierBase in all prerelease increment situations #550
Closed
wraithgar
wraithgar reviewed Apr 13, 2023
View reviewed changes
Comment thread README.md Resolved

Uh oh!

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

wraithgar
wraithgar reviewed Apr 13, 2023
View reviewed changes
Comment thread README.md Resolved

Uh oh!

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

wraithgar
wraithgar reviewed Apr 13, 2023
View reviewed changes
Comment thread bin/semver.js Resolved

Uh oh!

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

wraithgar
wraithgar reviewed Apr 13, 2023
View reviewed changes
Comment thread classes/semver.js Resolved

Uh oh!

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

@wraithgar

wraithgar commented Apr 13, 2023

Copy link
Copy Markdown
Contributor

A very good start. Just some minor copy and code quality feedback.

All reactions

Sorry, something went wrong.

Uh oh!

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

@wraithgar wraithgar changed the title feat: add Disable Prerelease Identifier Base flag feat: allow identifierBase to be false Apr 13, 2023
@lsvalina
feat: updated readme, cli help, and refactor string to boolean in cas…
871dc9d
…e of false
wraithgar
wraithgar reviewed Apr 13, 2023
View reviewed changes
Comment thread classes/semver.js Resolved

Uh oh!

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

wraithgar
wraithgar reviewed Apr 13, 2023
View reviewed changes
Comment thread classes/semver.js Resolved

Uh oh!

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

wraithgar
wraithgar reviewed Apr 13, 2023
View reviewed changes
Comment thread bin/semver.js Resolved

Uh oh!

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

@lsvalina
feat: updated cli help, moved string to boolen to cli
570f32c
@wraithgar wraithgar self-assigned this Apr 13, 2023
@lsvalina
feat: removed string false check
4246523
wraithgar
wraithgar reviewed Apr 13, 2023
View reviewed changes
Comment thread test/bin/semver.js Resolved

Uh oh!

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

wraithgar
wraithgar reviewed Apr 13, 2023
View reviewed changes
Comment thread test/fixtures/increments.js Outdated
['1.2.3-dev.bar', 'prerelease', '1.2.3-dev', false, 'dev', false],
['1.2.0', 'preminor', '1.3.0-dev', false, 'dev', false],
['1.2.3-1', 'preminor', '1.3.0-dev', false, 'dev', false],
['1.2.3-dev', 'prerelease', '1.2.3-dev.1', false, 'dev', false],

@wraithgar wraithgar Apr 13, 2023

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.

@nlf what do you think about this? If they have said "increase the prerelease" but also asked for there not to be a prerelease base, do we default to 1 or should we throw?

Sorry, something went wrong.

Uh oh!

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

All reactions

@nlf nlf Apr 13, 2023

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.

my gut reaction is we should throw because they've asked for us to do something that doesn't make sense. going from no number to adding a number when we've been asked to not add numbers feels wrong

Sorry, something went wrong.

Uh oh!

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

All reactions

@wraithgar wraithgar Apr 13, 2023

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.

I agree, let's throw in this situation. No more guessing user intent!

Sorry, something went wrong.

Uh oh!

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

All reactions

@lsvalina lsvalina Apr 13, 2023

Copy link
Copy Markdown
Contributor Author

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.

just to clarify do we want to throw also in:

['1.2.0', 'prerelease', '1.2.1-1', false, '', false],

?

Sorry, something went wrong.

Uh oh!

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

All reactions

@wraithgar wraithgar Apr 13, 2023 •
edited
Loading

Uh oh!

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

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.

Oooh good point. We sure do! "increase the prerelease with no identifier and no identifierBase" sure sounds impossible.

Sorry, something went wrong.

Uh oh!

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

All reactions

@lsvalina lsvalina Apr 14, 2023

Copy link
Copy Markdown
Contributor Author

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.

i updated it to throw on both cases

Sorry, something went wrong.

Uh oh!

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

All reactions
@wraithgar

wraithgar commented Apr 13, 2023

Copy link
Copy Markdown
Contributor

Can you add the tests from #550 to this PR?

lsvalina reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

lsvalina added 3 commits April 13, 2023 20:04
@lsvalina
feat: added more tests, restored accidental removed test
d0399b5
@lsvalina
feat: throwing when identifier base is false and if indentifier is mi…
136de01
…ssing or same as prerelese version
@lsvalina
feat: updated readme
ac3016b
wraithgar
wraithgar approved these changes Apr 14, 2023
View reviewed changes
@wraithgar
wraithgar merged commit 503a4e5 into npm:main Apr 14, 2023
@wraithgar

wraithgar commented Apr 14, 2023

Copy link
Copy Markdown
Contributor

Really useful new feature, thanks!

lsvalina reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

@Gornator Gornator mentioned this pull request Jul 2, 2023
[BUG] <title> #581
Closed
1 task done
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.4 in /platform/ui ossrs/oryx#111
Closed
Bump semver from 7.3.5 to 7.5.2 in /ui ossrs/oryx#116
Closed
@wraithgar wraithgar mentioned this pull request Oct 18, 2023
fix: correctly increase version for "pre" versions #643
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
@fanibahar fanibahar mentioned this pull request May 30, 2024
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 fanibahar/juice-shop1#71
Open
@devcurt696 devcurt696 mentioned this pull request May 31, 2024
[Snyk] Upgrade semver from 7.0.0 to 7.6.2 devcurt696/resume-builder#78
Open
@NOUIY NOUIY mentioned this pull request May 31, 2024
[Snyk] Upgrade semver from 7.3.7 to 7.6.2 NOUIY/npm-groovy-lint#78
Closed
@Mhmonicox Mhmonicox mentioned this pull request Jun 1, 2024
[Snyk] Upgrade semver from 7.3.6 to 7.6.2 Mhmonicox/actions-setup-cmake#35
Open
@Haricthered Haricthered mentioned this pull request Jun 7, 2024
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 Haricthered/juice-shop#5
Open
@AndrewSnyk AndrewSnyk mentioned this pull request Jun 8, 2024
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 AndrewSnyk/juice-shop#5
Merged
@jessicazhanggg jessicazhanggg mentioned this pull request Jun 13, 2024
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 jessicazhanggg/juice-shop#6
Open
@monjie110 monjie110 mentioned this pull request Jun 22, 2024
[Snyk] Upgrade semver from 7.3.4 to 7.6.2 monjie110/vscode-go#4
Open
@Kavinpg96 Kavinpg96 mentioned this pull request Jun 25, 2024
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 Kavinpg96/nodejs.org#5
Open
@dulumina dulumina mentioned this pull request Jul 11, 2024
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 dulumina/WBOT#2
Open
This was referenced Jul 16, 2024
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 Exhorder6/addons-linter#31
Closed
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 terrorizer1980/addons-linter#35
Closed
@Z-byte-prog Z-byte-prog mentioned this pull request Jul 17, 2024
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 Z-byte-prog/docs#1243
Closed
@safiaminnn safiaminnn mentioned this pull request Jul 21, 2024
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 safiaminnn/juice-shop#5
Open
@YoYBaBy YoYBaBy mentioned this pull request Jul 23, 2024
[Snyk] Upgrade semver from 7.3.2 to 7.6.2 YoYBaBy/nodejs.org#274
Open
@koishichito koishichito mentioned this pull request Jul 24, 2024
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 koishichito/juice-shop#5
Open
@KobayashiMasaomi KobayashiMasaomi mentioned this pull request Jul 25, 2024
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 KobayashiMasaomi/juice-shop#10
Open
@q1blue q1blue mentioned this pull request Jul 28, 2024
[Snyk] Upgrade semver from 5.7.2 to 7.6.2 https-quantumblockchainai-atlassian-net/botframework-sdk#1
Open
@otmaneEH otmaneEH mentioned this pull request Jul 30, 2024
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 otmaneEH/docs#4
Open
@annkornienko annkornienko mentioned this pull request Jul 30, 2024
[Snyk] Upgrade semver from 7.3.5 to 7.6.2 Simpplr/serverless-plugin-include-dependencies#12
Closed
@hkleungai hkleungai mentioned this pull request Aug 5, 2025
feat(semver): identifierBase for inc() & throwErrors for parse() & jsdoc DefinitelyTyped/DefinitelyTyped#73409
Merged
7 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

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

Uh oh!

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

Assignees

@wraithgar wraithgar

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[BUG] Increase pre* with pre-release identifiers without build

Uh oh!

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

4 participants

@lsvalina @wraithgar @nlf @Leena8686
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.