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

@waiting/shared-core

Package Overview
Dependencies
Maintainers
0
Versions
199
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waiting/shared-core - npm Package Compare versions

Comparing version 23.20.2 to 23.21.0

2

dist/lib/date.js

@@ -54,5 +54,5 @@ /**

else {
throw new Error('input is invalid');
throw new TypeError('input is invalid');
}
}
//# sourceMappingURL=date.js.map

@@ -25,5 +25,5 @@ export function expandFFIParamArray(input) {

else {
throw new Error('invalid input');
throw new TypeError('invalid input');
}
}
//# sourceMappingURL=ffi.js.map
import type { NpmPkgView } from '@waiting/shared-types';
export type { NpmPkgView };
export declare function getNpmPkgViewFromRegistry(pkgName: string, version?: string, registry?: string): Promise<NpmPkgView | undefined>;
/**
* Compare two versions, input format: '1.2.3' without prefix 'v'
* @returns 0: equal, -1: v1 < v2, 1: v1 > v2
*/
export declare function compareVersions(version1: string, version2: string): number;
//# sourceMappingURL=npm-pkg.d.ts.map

@@ -29,2 +29,19 @@ import assert from 'node:assert';

}
/**
* Compare two versions, input format: '1.2.3' without prefix 'v'
* @returns 0: equal, -1: v1 < v2, 1: v1 > v2
*/
export function compareVersions(version1, version2) {
const v1Parts = version1.split('.').map(Number);
const v2Parts = version2.split('.').map(Number);
for (let i = 0; i < Math.max(v1Parts.length, v2Parts.length); i += 1) {
if ((v1Parts[i] ?? 0) < (v2Parts[i] ?? 0)) {
return -1;
}
if ((v1Parts[i] ?? 0) > (v2Parts[i] ?? 0)) {
return 1;
}
}
return 0;
}
//# sourceMappingURL=npm-pkg.js.map
{
"name": "@waiting/shared-core",
"author": "waiting",
"version": "23.20.2",
"version": "23.21.0",
"description": "node core function re export with Promise or Observable",

@@ -35,3 +35,3 @@ "keywords": [

"@types/minimist": "^1.2.5",
"@waiting/shared-types": "^23.20.2",
"@waiting/shared-types": "^23.21.0",
"minimist": "^1.2.8",

@@ -84,3 +84,3 @@ "semver": "^7.6.2",

},
"gitHead": "bbef800075f7758e28d427c845ba4f6986d61fa0"
"gitHead": "34e3a649e3ce27f8ceaa681e0a0a0da1c33fd606"
}

@@ -71,5 +71,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

else {
throw new Error('input is invalid')
throw new TypeError('input is invalid')
}
}

@@ -33,5 +33,5 @@

else {
throw new Error('invalid input')
throw new TypeError('invalid input')
}
}

@@ -45,1 +45,16 @@ import assert from 'node:assert'

/**
* Compare two versions, input format: '1.2.3' without prefix 'v'
* @returns 0: equal, -1: v1 < v2, 1: v1 > v2
*/
export function compareVersions(version1: string, version2: string): number {
const v1Parts = version1.split('.').map(Number)
const v2Parts = version2.split('.').map(Number)
for (let i = 0; i < Math.max(v1Parts.length, v2Parts.length); i += 1) {
if ((v1Parts[i] ?? 0) < (v2Parts[i] ?? 0)) { return -1 }
if ((v1Parts[i] ?? 0) > (v2Parts[i] ?? 0)) { return 1 }
}
return 0
}

@@ -37,3 +37,3 @@ {

"stripInternal": true,
"target": "ES2022",
"target": "ES2023",
"tsBuildInfoFile": ".tsbuildinfo",

@@ -40,0 +40,0 @@ "types" : ["mocha", "node"],

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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