justjavac / deno-semver Goto Github PK
View Code? Open in Web Editor NEWThe semver parser for Deno (a fork of node-semver using TypeScript)
License: ISC License
The semver parser for Deno (a fork of node-semver using TypeScript)
License: ISC License
When incrementing a version that has a custom format (i.e. v0.0.1
), the format isn't kept (i.e. when incrementing major
the new version is 1.0.0
, without the v
prefix).
Actual behavior:
const version = new SemVer("v0.0.1");
console.log(version);
// SemVer { raw: "v0.0.1", ... }
version.inc("major");
console.log(version);
// SemVer { raw: "1.0.0", ... }
Expected behavior:
const version = new SemVer("v0.0.1");
console.log(version);
// SemVer { raw: "v0.0.1", ... }
version.inc("major");
console.log(version);
// SemVer { raw: "v1.0.0", ... }
Not sure if the expected behavior for me is intended or not in terms of the scope of this module. Could you confirm, please?
If this is actually a "bug" I can open a PR.
Thanks in advance!
Hi! I would be interested in using this module for cli execution in a CI pipeline without having to write my own script. Would you be open to adding a cli extension of this module, or accept a PR for it?
Example:
deno run https://deno.land/x/semver/cli.ts valid "1.2.3" // "1.2.3"
deno run https://deno.land/x/semver/cli.ts valid "a.b.c" // null
deno run https://deno.land/x/semver/cli.ts clean " =v1.2.3 " // "1.2.3"
deno run https://deno.land/x/semver/cli.ts satisfies "1.2.3" "1.x || >=2.5.0 || 5.0.0 - 7.2.3" // true
deno run https://deno.land/x/semver/cli.ts gt "1.2.3" "9.8.7" // false
deno run https://deno.land/x/semver/cli.ts lt "1.2.3" "9.8.7" // true
deno run https://deno.land/x/semver/cli.ts minVersion ">=1.0.0" // "1.0.0"
Hi @justjavac!
The Nest.land team members are all massive fans of this semver module. So much so, in fact, that we are currently working on a new CLI inside of Nest that will utilize this module. Because we want to make sure everything we publish is in one location, would you mind publishing this module on Nest.land?
If you'd prefer not to, which is absolutely no problem, would you permit us to mirror this module on Nest.land ourselves?
Thank you!
Tate
Hey @justjavac! Thanks again for all the work you put into this module and upstreaming it into deno_std
; it's a great addition.
I wanted to ask how you feel about adding a note in the README with information about migration to deno_std
and linking to https://deno.land/std/semver/README.md?
Shouldn't it be mod.ts
instead of mod.js
in README.md
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.