GithubHelp home page GithubHelp logo

justjavac / deno-semver Goto Github PK

View Code? Open in Web Editor NEW
48.0 3.0 5.0 91 KB

The semver parser for Deno (a fork of node-semver using TypeScript)

License: ISC License

TypeScript 100.00%
deno denodev semver

deno-semver's Introduction

deno-semver's People

Contributors

c4spar avatar halvardssm avatar jacoborus avatar justjavac avatar zeroxs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

deno-semver's Issues

Version format isn't kept after incrementing

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!

[IDEA] Add cli execution

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"

Publishing on Nest.land

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.