@changesets/get-version-range-type
Advanced tools
Comparing version 0.1.1 to 0.2.0
# @changesets/get-version-range-type | ||
## 0.2.0 | ||
### Minor Changes | ||
- [`1282ef6`](https://github.com/atlassian/changesets/commit/1282ef698761c1f634fb409842cc7de6b4d03da4) [#263](https://github.com/atlassian/changesets/pull/263) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - add ">=" to get-version-range-type | ||
## 0.1.1 | ||
@@ -4,0 +10,0 @@ |
@@ -1,1 +0,1 @@ | ||
export default function getVersionRangeType(versionRange: string): "^" | "~" | ""; | ||
export default function getVersionRangeType(versionRange: string): "^" | "~" | ">=" | ""; |
@@ -8,2 +8,3 @@ 'use strict'; | ||
if (versionRange.charAt(0) === "~") return "~"; | ||
if (versionRange.startsWith(">=")) return ">="; | ||
return ""; | ||
@@ -10,0 +11,0 @@ } |
"use strict"; | ||
function getVersionRangeType(versionRange) { | ||
return "^" === versionRange.charAt(0) ? "^" : "~" === versionRange.charAt(0) ? "~" : ""; | ||
return "^" === versionRange.charAt(0) ? "^" : "~" === versionRange.charAt(0) ? "~" : versionRange.startsWith(">=") ? ">=" : ""; | ||
} | ||
@@ -6,0 +6,0 @@ |
function getVersionRangeType(versionRange) { | ||
if (versionRange.charAt(0) === "^") return "^"; | ||
if (versionRange.charAt(0) === "~") return "~"; | ||
if (versionRange.startsWith(">=")) return ">="; | ||
return ""; | ||
@@ -5,0 +6,0 @@ } |
{ | ||
"name": "@changesets/get-version-range-type", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Common get-version-range-type shared between changeset packages", | ||
@@ -5,0 +5,0 @@ "main": "dist/get-version-range-type.cjs.js", |
export default function getVersionRangeType( | ||
versionRange: string | ||
): "^" | "~" | "" { | ||
): "^" | "~" | ">=" | "" { | ||
if (versionRange.charAt(0) === "^") return "^"; | ||
if (versionRange.charAt(0) === "~") return "~"; | ||
if (versionRange.startsWith(">=")) return ">="; | ||
return ""; | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3155
40
1