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

@renovatebot/ruby-semver

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@renovatebot/ruby-semver - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

10

dist/index.js
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.prerelease = exports.patch = exports.minor = exports.major = exports.minSatisfying = exports.maxSatisfying = exports.satisfies = exports.valid = exports.lte = exports.lt = exports.gte = exports.gt = exports.eq = void 0;
var version_1 = require("./ruby/version");

@@ -65,3 +73,3 @@ var requirement_1 = require("./ruby/requirement");

var v = new version_1.Version(version);
var r = new (requirement_1.Requirement.bind.apply(requirement_1.Requirement, [void 0].concat(range.split(/\s*,\s*/))))();
var r = new (requirement_1.Requirement.bind.apply(requirement_1.Requirement, __spreadArrays([void 0], range.split(/\s*,\s*/))))();
return r.isSatisfiedBy(v);

@@ -68,0 +76,0 @@ }

19

dist/ruby/requirement.js
"use strict";
// https://github.com/ruby/ruby/blob/d4a86e407ec2057c2c7ad757aa76dad757f34c3a/lib/rubygems/requirement.rb
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.parse = exports.Requirement = void 0;
// import { Version } from "./version";

@@ -21,3 +29,3 @@ // # frozen_string_literal: true

function flatten(input) {
var stack = input.slice();
var stack = __spreadArrays(input);
var res = [];

@@ -52,2 +60,3 @@ while (stack.length) {

}
var copystr = function (x) { return (' ' + x).slice(1); };
// class Gem::Requirement

@@ -138,3 +147,3 @@ //

if (inputs.length > 1)
return new (Requirement.bind.apply(Requirement, [void 0].concat(inputs)))();
return new (Requirement.bind.apply(Requirement, __spreadArrays([void 0], inputs)))();
var input = inputs.shift();

@@ -144,7 +153,7 @@ if (input instanceof Requirement)

if (input instanceof Array)
return new (Requirement.bind.apply(Requirement, [void 0].concat(input)))();
return new (Requirement.bind.apply(Requirement, __spreadArrays([void 0], input)))();
if (input instanceof version_1.Version)
return new Requirement(input);
try {
return new Requirement(input.toString());
return new Requirement(copystr(input.toString()));
}

@@ -206,3 +215,3 @@ catch (_) {

try {
objStr = obj.toString();
objStr = copystr(obj.toString());
}

@@ -209,0 +218,0 @@ catch (_) {

@@ -5,3 +5,2 @@ export declare type SegmentElement = string | number;

private readonly _version;
private _segments;
version(): string;

@@ -8,0 +7,0 @@ toString(): string;

"use strict";
// https://github.com/ruby/ruby/blob/d4a86e407ec2057c2c7ad757aa76dad757f34c3a/lib/rubygems/version.rb
Object.defineProperty(exports, "__esModule", { value: true });
exports.create = exports.Version = void 0;
var copystr = function (x) { return (' ' + x).slice(1); };
// class Gem::Version

@@ -37,3 +39,3 @@ //

}
var versionStr = version.toString();
var versionStr = copystr(version.toString());
if (/^\s*$/.test(versionStr)) {

@@ -43,3 +45,2 @@ versionStr = '0';

this._version = versionStr.trim().replace(/-/g, '.pre.');
this._segments = null;
}

@@ -72,3 +73,3 @@ // ##

try {
versionStr = version.toString();
versionStr = copystr(version.toString());
}

@@ -364,8 +365,5 @@ catch (_) {

Version.prototype.getSegments = function () {
if (!this._segments) {
this._segments = this._version
.match(/[0-9]+|[a-z]+/gi)
.map(function (s) { return (/^\d+$/.test(s) ? parseInt(s, 10) : s); });
}
return this._segments.slice();
return this._version
.match(/[0-9]+|[a-z]+/gi)
.map(function (s) { return (/^\d+$/.test(s) ? parseInt(s, 10) : copystr(s)); });
};

@@ -372,0 +370,0 @@ // def _split_segments

{
"name": "@renovatebot/ruby-semver",
"version": "0.1.5",
"version": "0.1.6",
"license": "MIT",

@@ -29,21 +29,21 @@ "description": "Ruby SemVer in TypeScript.",

"devDependencies": {
"@types/jest": "25.2.1",
"@typescript-eslint/eslint-plugin": "2.26.0",
"@typescript-eslint/parser": "2.26.0",
"babel-jest": "25.2.6",
"babel-plugin-dynamic-import-node": "2.3.0",
"codecov": "3.6.5",
"eslint": "6.8.0",
"eslint-config-airbnb-typescript": "7.2.1",
"eslint-config-prettier": "6.10.1",
"@types/jest": "25.2.3",
"@typescript-eslint/eslint-plugin": "3.1.0",
"@typescript-eslint/parser": "3.1.0",
"babel-jest": "26.0.1",
"babel-plugin-dynamic-import-node": "2.3.3",
"codecov": "3.7.0",
"eslint": "7.1.0",
"eslint-config-airbnb-typescript": "8.0.2",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-promise": "4.2.1",
"jest": "25.2.7",
"jest": "26.0.1",
"jest-junit": "10.0.0",
"jest-silent-reporter": "0.2.1",
"npm-run-all": "4.1.5",
"prettier": "2.0.2",
"ts-jest": "25.3.0",
"typescript": "3.8.3"
"prettier": "2.0.5",
"ts-jest": "26.1.0",
"typescript": "3.9.3"
}
}
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