Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

semver-parser

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

semver-parser - npm Package Compare versions

Comparing version 4.1.3 to 4.1.4

2

modules/common.js

@@ -11,3 +11,2 @@ /**

* get type
*
* @param {*} o - object to check

@@ -21,3 +20,2 @@ * @returns {string} - type of object

* is string
*
* @param {*} o - object to check

@@ -24,0 +22,0 @@ * @returns {boolean} - result

/**
* semver.js
*
* @see {@link http://semver.org/|Semantic Versioning}

@@ -27,3 +26,2 @@ * @see {@link https://github.com/mojombo/semver/|mojombo/semver}

* parsed SemVer object
*
* @typedef {object} SemVerObject

@@ -41,3 +39,2 @@ * @property {string} version - version string

* is valid SemVer string
*
* @param {string} version - version string

@@ -57,3 +54,2 @@ * @param {boolean} [strict] - reject 'v' prefixed

* parse version part
*
* @param {string} part - version part

@@ -84,3 +80,2 @@ * @param {boolean} [nonPosInt] - accept non positive integer

* compare SemVer
*
* @param {string} version - version string

@@ -174,3 +169,2 @@ * @param {string} base - base version string to compare from

* parse SemVer string
*
* @param {string} version - version string

@@ -205,3 +199,2 @@ * @param {boolean} [strict] - reject 'v' prefixed

* compare SemVer (async)
*
* @param {string} version - version string

@@ -222,3 +215,2 @@ * @param {string} base - base version string to compare from

* is valid SemVer string (async)
*
* @param {string} version - version string

@@ -235,3 +227,2 @@ * @param {boolean} [strict] - reject 'v' prefixed

* parse SemVer string (async)
*
* @param {string} version - version string

@@ -238,0 +229,0 @@ * @param {boolean} [strict] - reject 'v' prefixed

12

package.json

@@ -18,12 +18,12 @@ {

"chai": "^4.3.7",
"eslint": "^8.35.0",
"eslint": "^8.38.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsdoc": "^40.0.0",
"eslint-plugin-n": "^15.6.1",
"eslint-plugin-jsdoc": "^43.0.6",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-regexp": "^1.12.0",
"eslint-plugin-regexp": "^1.14.0",
"mocha": "^10.2.0",
"typescript": "^4.9.5"
"typescript": "^5.0.4"
},

@@ -36,3 +36,3 @@ "scripts": {

},
"version": "4.1.3"
"version": "4.1.4"
}

@@ -11,3 +11,3 @@ [![build](https://github.com/asamuzaK/semverParser/workflows/build/badge.svg)](https://github.com/asamuzaK/semverParser/actions?query=workflow%3Abuild)

```
```console
npm install semver-parser

@@ -22,3 +22,3 @@ ```

sync:
```
```javascript
import { compareSemVer, isValidSemVer, parseSemVer } from 'semver-parser';

@@ -28,3 +28,3 @@ ```

async:
```
```javascript
import { promises } from 'semver-parser';

@@ -81,3 +81,3 @@ const { compareSemVer, isValidSemVer, parseSemVer } = promises;

### valid semver
```
```bnf
<valid semver> ::= <version core>

@@ -88,11 +88,11 @@ | <version core> "-" <pre-release>

```
```javascript
(?:0|[1-9]\d*)(?:\.(?:0|[1-9]\d*)){2}(?:-(?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*))*)?(?:\+(?:\d*[A-Za-z-][\dA-Za-z-]*|\d+)(?:\.(?:\d*[A-Za-z-][\dA-Za-z-]*|\d+))*)?
```
(?:0|[1-9]\d*)(?:\.(?:0|[1-9]\d*)){2}(?:-(?:(?:0|[1-9]\d*|\d*[A-z-][A-z\d-]*)(?:\.(?:0|[1-9]\d*|\d*[A-z-][A-z\d-]*))*))?(?:\+(?:\d*[A-z-][A-z\d-]*|\d+)(?:\.(?:\d*[A-z-][A-z\d-]*|\d+))*)?
```
### version core
```
```bnf
<version core> ::= <major> "." <minor> "." <patch>
```
```
```javascript
(?:0|[1-9]\d*)(?:\.(?:0|[1-9]\d*)){2}

@@ -102,6 +102,6 @@ ```

### major
```
```bnf
<major> ::= <numeric identifier>
```
```
```javascript
0|[1-9]\d*

@@ -111,6 +111,6 @@ ```

### minor
```
```bnf
<minor> ::= <numeric identifier>
```
```
```javascript
0|[1-9]\d*

@@ -120,6 +120,6 @@ ```

### patch
```
```bnf
<patch> ::= <numeric identifier>
```
```
```javascript
0|[1-9]\d*

@@ -129,55 +129,55 @@ ```

### pre-release
```
```bnf
<pre-release> ::= <dot-separated pre-release identifiers>
```
```javascript
(?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*))*
```
(?:0|[1-9]\d*|\d*[A-z-][A-z\d-]*)(?:\.(?:0|[1-9]\d*|\d*[A-z-][A-z\d-]*))*
```
### dot-separated pre-release identifiers
```
```bnf
<dot-separated pre-release identifiers> ::= <pre-release identifier>
| <pre-release identifier> "." <dot-separated pre-release identifiers>
```
```javascript
(?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*))*
```
(?:0|[1-9]\d*|\d*[A-z-][A-z\d-]*)(?:\.(?:0|[1-9]\d*|\d*[A-z-][A-z\d-]*))*
```
### build
```
```bnf
<build> ::= <dot-separated build identifiers>
```
```javascript
(?:\d*[A-Za-z-][\dA-Za-z-]*|\d+)(?:\.(?:\d*[A-Za-z-][\dA-Za-z-]*|\d+))*
```
(?:\d*[A-z-][A-z\d-]*|\d+)(?:\.(?:\d*[A-z-][A-z\d-]*|\d+))*
```
### dot-separated build identifiers
```
```bnf
<dot-separated build identifiers> ::= <build identifier>
| <build identifier> "." <dot-separated build identifiers>
```
```javascript
(?:\d*[A-Za-z-][\dA-Za-z-]*|\d+)(?:\.(?:\d*[A-Za-z-][\dA-Za-z-]*|\d+))*
```
(?:\d*[A-z-][A-z\d-]*|\d+)(?:\.(?:\d*[A-z-][A-z\d-]*|\d+))*
```
### pre-release identifier
```
```bnf
<pre-release identifier> ::= <alphanumeric identifier>
| <numeric identifier>
```
```javascript
0|[1-9]\d*|\d*[A-Za-z-][\dA-Za-z-]*
```
0|[1-9]\d*|\d*[A-z-][A-z\d-]*
```
### build identifier
```
```bnf
<build identifier> ::= <alphanumeric identifier>
| <digits>
```
```javascript
\d*[A-Za-z-][\dA-Za-z-]*|\d+
```
\d*[A-z-][A-z\d-]*|\d+
```
### alphanumeric identifier
```
```bnf
<alphanumeric identifier> ::= <non-digit>

@@ -188,12 +188,12 @@ | <non-digit> <identifier characters>

```
```javascript
[\dA-Za-z-]*[A-Za-z-][\dA-Za-z-]*
```
(?:[A-z\d-]+)?[A-z-](?:[A-z\d-]+)?
```
optimized:
```javascript
\d*[A-Za-z-][\dA-Za-z-]*
```
\d*[A-z-][A-z\d-]*
```
### numeric identifier
```
```bnf
<numeric identifier> ::= "0"

@@ -203,3 +203,3 @@ | <positive digit>

```
```
```javascript
0|[1-9]\d*

@@ -209,34 +209,34 @@ ```

### identifier characters
```
```bnf
<identifier characters> ::= <identifier character>
| <identifier character> <identifier characters>
```
```javascript
[\dA-Za-z-]+
```
[A-z\d-]+
```
### identifier character
```
```bnf
<identifier character> ::= <digit>
| <non-digit>
```
```javascript
[\dA-Za-z-]
```
[A-z\d-]
```
### non-digit
```
```bnf
<non-digit> ::= <letter>
| "-"
```
```javascript
[A-Za-z-]
```
[A-z-]
```
### digits
```
```bnf
<digits> ::= <digit>
| <digit> <digits>
```
```
```javascript
\d+

@@ -246,7 +246,7 @@ ```

### digit
```
```bnf
<digit> ::= "0"
| <positive digit>
```
```
```javascript
\d

@@ -256,6 +256,6 @@ ```

### positive digit
```
```bnf
<positive digit> ::= "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
```
```
```javascript
[1-9]

@@ -265,3 +265,3 @@ ```

### letter
```
```bnf
<letter> ::= "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J"

@@ -274,4 +274,4 @@ | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T"

```
```javascript
[A-Za-z]
```
[A-z]
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc