@pnpm/semver-diff
Advanced tools
Comparing version 1.0.0 to 1.0.2
@@ -37,3 +37,12 @@ "use strict"; | ||
function parseVersion(version) { | ||
const [normalVersion, prereleaseVersion] = version.split('-'); | ||
const dashIndex = version.indexOf('-'); | ||
let normalVersion; | ||
let prereleaseVersion; | ||
if (dashIndex === -1) { | ||
normalVersion = version; | ||
} | ||
else { | ||
normalVersion = version.substr(0, dashIndex); | ||
prereleaseVersion = version.substr(dashIndex + 1); | ||
} | ||
return [ | ||
@@ -40,0 +49,0 @@ ...normalVersion.split('.'), |
{ | ||
"name": "@pnpm/semver-diff", | ||
"version": "1.0.0", | ||
"description": "Gets the difference between two semver versions", | ||
"main": "lib/index.js", | ||
"typings": "lib/index.d.ts", | ||
"engines": { | ||
"node": ">=8.15" | ||
}, | ||
"files": [ | ||
"lib/" | ||
], | ||
"scripts": { | ||
"lint": "tslint -c tslint.json src/**/*.ts test.ts", | ||
"test": "pnpm run lint && ts-node test --type-check", | ||
"tsc": "rimraf lib && tsc", | ||
"prepublishOnly": "pnpm run tsc" | ||
}, | ||
"repository": "https://github.com/pnpm/semver-diff", | ||
"keywords": [ | ||
"pnpm", | ||
"semver", | ||
"diff" | ||
], | ||
"author": { | ||
"name": "Zoltan Kochan", | ||
"email": "z@kochan.io", | ||
"url": "https://www.kochan.io" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/pnpm/semver-diff/issues" | ||
}, | ||
"homepage": "https://github.com/pnpm/semver-diff#readme", | ||
"devDependencies": { | ||
"@pnpm/tsconfig": "^1.0.0", | ||
"@pnpm/tslint-config": "^1.0.0", | ||
"@types/node": "^12.7.2", | ||
"@types/tape": "^4.2.33", | ||
"rimraf": "^3.0.0", | ||
"tape": "^4.11.0", | ||
"ts-node": "^8.3.0", | ||
"tslint": "^5.19.0", | ||
"typescript": "^3.5.3" | ||
} | ||
"name": "@pnpm/semver-diff", | ||
"version": "1.0.2", | ||
"description": "Gets the difference between two semver versions", | ||
"main": "lib/index.js", | ||
"typings": "lib/index.d.ts", | ||
"engines": { | ||
"node": ">=8.15" | ||
}, | ||
"files": [ | ||
"lib/" | ||
], | ||
"scripts": { | ||
"lint": "tslint -c tslint.json src/**/*.ts test.ts", | ||
"test": "pnpm run lint && ts-node test --type-check", | ||
"tsc": "rimraf lib && tsc", | ||
"prepublishOnly": "pnpm run tsc" | ||
}, | ||
"repository": "https://github.com/pnpm/semver-diff", | ||
"keywords": [ | ||
"pnpm", | ||
"semver", | ||
"diff" | ||
], | ||
"author": { | ||
"name": "Zoltan Kochan", | ||
"email": "z@kochan.io", | ||
"url": "https://www.kochan.io" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/pnpm/semver-diff/issues" | ||
}, | ||
"homepage": "https://github.com/pnpm/semver-diff#readme", | ||
"devDependencies": { | ||
"@pnpm/tsconfig": "^1.0.0", | ||
"@pnpm/tslint-config": "^1.0.0", | ||
"@types/node": "^12.7.2", | ||
"@types/tape": "^4.2.33", | ||
"rimraf": "^3.0.0", | ||
"tape": "^4.11.0", | ||
"ts-node": "^8.3.0", | ||
"tslint": "^5.19.0", | ||
"typescript": "^3.5.3" | ||
} | ||
} |
4613
56