Socket
Socket
Sign inDemoInstall

@changesets/get-version-range-type

Package Overview
Dependencies
0
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.2.0

6

CHANGELOG.md
# @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 @@

2

dist/declarations/src/index.d.ts

@@ -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 "";
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc