pax_global_header00006660000000000000000000000064146445151300014515gustar00rootroot0000000000000052 comment=497a7e0c5fc00c6bb16f3aa81ce32fe2acdd43cd omichelsen-compare-versions-497a7e0/000077500000000000000000000000001464451513000174775ustar00rootroot00000000000000omichelsen-compare-versions-497a7e0/.editorconfig000066400000000000000000000001131464451513000221470ustar00rootroot00000000000000root = true [*] indent_style = spaces indent_size = 2 quote_type = single omichelsen-compare-versions-497a7e0/.github/000077500000000000000000000000001464451513000210375ustar00rootroot00000000000000omichelsen-compare-versions-497a7e0/.github/workflows/000077500000000000000000000000001464451513000230745ustar00rootroot00000000000000omichelsen-compare-versions-497a7e0/.github/workflows/ci.yml000066400000000000000000000005561464451513000242200ustar00rootroot00000000000000name: build on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - run: npm ci - run: npm test - name: Coveralls uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} omichelsen-compare-versions-497a7e0/.gitignore000066400000000000000000000000621464451513000214650ustar00rootroot00000000000000.nyc_output/ .vscode/ coverage/ lib/ node_modules/omichelsen-compare-versions-497a7e0/.mocharc.json000066400000000000000000000002071464451513000220630ustar00rootroot00000000000000{ "require": "ts-node/register", "extension": ["ts"], "spec": "test/**/*.ts", "watch-files": ["src/**/*.ts", "test/**/*.ts"] } omichelsen-compare-versions-497a7e0/CHANGELOG.md000066400000000000000000000117751464451513000213230ustar00rootroot00000000000000# Changelog ## [6.1.1](https://github.com/omichelsen/compare-versions/releases/tag/v6.1.1) - 2024-07-13 - Fix ESM module browser support by appending `.js` extension to imports. ## [6.1.0](https://github.com/omichelsen/compare-versions/releases/tag/v6.1.0) - 2023-08-07 - Add new function `validateStrict` to validate according to strict semver rules. ## [6.0.0](https://github.com/omichelsen/compare-versions/releases/tag/v6.0.0) - 2022-12-15 - BREAKING CHANGE: `satisfies()` now supports npm comparator sets. This should not be a breaking change but it will assign meaning to spaces in the range which previously were ignored. ## [5.0.3](https://github.com/omichelsen/compare-versions/releases/tag/v5.0.3) - 2022-12-13 - Fix npm build chache from 5.0.2. ## [5.0.2](https://github.com/omichelsen/compare-versions/releases/tag/v5.0.2) - 2022-12-13 - Fix `satisfies()` handling of 0.x versions. ## [5.0.1](https://github.com/omichelsen/compare-versions/releases/tag/v5.0.1) - 2022-08-26 - Include source file in npm bundle for source maps. ## [5.0.0](https://github.com/omichelsen/compare-versions/releases/tag/v5.0.0) - 2022-08-25 - BREAKING CHANGE: main export is now named. - Rewrite in TypeScript. Ensure single source of truth for all outputs. - Support ESM and CJS (through UMD). - Dropped Bower support. ## [4.1.4](https://github.com/omichelsen/compare-versions/releases/tag/v4.1.4) - 2022-08-23 - Fix `satisfies()` CJS export. ## [4.1.3](https://github.com/omichelsen/compare-versions/releases/tag/v4.1.3) - 2022-01-11 - Export CJS style in ESM for cross compatibility. ## [4.1.2](https://github.com/omichelsen/compare-versions/releases/tag/v4.1.2) - 2021-12-09 - Do not allow leading comparators in `validate()`. ## [4.1.1](https://github.com/omichelsen/compare-versions/releases/tag/v4.1.1) - 2021-11-12 - Remove optional chaining operator. ## [4.1.0](https://github.com/omichelsen/compare-versions/releases/tag/v4.1.0) - 2021-11-12 - Add `satisfies()` function to test for range match. ## [4.0.2](https://github.com/omichelsen/compare-versions/releases/tag/v4.0.2) - 2021-11-12 - Fix wildcard comparisons. ## [4.0.1](https://github.com/omichelsen/compare-versions/releases/tag/v4.0.1) - 2021-11-01 - Remove `{ "type": "module" }` from package.json and set `{ "sideEffects": false }`. ## [4.0.0](https://github.com/omichelsen/compare-versions/releases/tag/v4.0.0) - 2021-10-30 - Add new ESM version in addition to the original CJS version. - Refactor ESM version to improve performance and reduce lines of code. - No breaking API changes but releasing as a major version bump to signal the new ESM code will be used by compatible bundlers like webpack and parcel. ## [3.6.0](https://github.com/omichelsen/compare-versions/releases/tag/v3.6.0) - 2020-02-13 - Add `validate()` function for checking whether a version number is semver-compliant. ## [3.5.1](https://github.com/omichelsen/compare-versions/releases/tag/v3.5.1) - 2019-07-31 - Refactor map compare with less code. ## [3.5.0](https://github.com/omichelsen/compare-versions/releases/tag/v3.5.0) - 2019-06-22 - Add api returning true or false given a comparison operator. ## [3.4.0](https://github.com/omichelsen/compare-versions/releases/tag/v3.4.0) - 2018-08-30 - Show rejected version in error message. ## [3.3.1](https://github.com/omichelsen/compare-versions/releases/tag/v3.3.1) - 2018-08-18 - Fix TypeScript export declaration. ## [3.3.0](https://github.com/omichelsen/compare-versions/releases/tag/v3.3.0) - 2018-06-10 - Add TypeScript declarations. ## [3.2.1](https://github.com/omichelsen/compare-versions/releases/tag/v3.2.1) - 2018-05-14 - Fix rare bug in handling optional metadata. ## [3.2.0](https://github.com/omichelsen/compare-versions/releases/tag/v3.2.0) - 2018-05-13 - Support Chromium version numbers. ## [3.1.0](https://github.com/omichelsen/compare-versions/releases/tag/v3.1.0) - 2017-09-25 - Ignore leading zero in numbers. ## [3.0.1](https://github.com/omichelsen/compare-versions/releases/tag/v3.0.1) - 2017-04-01 - Fix for leading 'v'. ## [3.0.0](https://github.com/omichelsen/compare-versions/releases/tag/v3.0.0) - 2016-08-08 - Validate input data. ## [2.0.2](https://github.com/omichelsen/compare-versions/releases/tag/v2.0.2) - 2016-06-06 - Handle numbers in pre-release versions. ## [2.0.1](https://github.com/omichelsen/compare-versions/releases/tag/v2.0.1) - 2015-09-13 - Fix for versions with <3 digits. ## [2.0.0](https://github.com/omichelsen/compare-versions/releases/tag/v2.0.0) - 2015-09-07 - Change global window accessor from returnExports to compareVersions. ## [1.1.2](https://github.com/omichelsen/compare-versions/releases/tag/v1.1.2) - 2015-05-03 - Move patch check outside of the for loop. ## [1.1.1](https://github.com/omichelsen/compare-versions/releases/tag/v1.1.1) - 2015-05-03 - Add a base 10 radix. ## [1.1.0](https://github.com/omichelsen/compare-versions/releases/tag/v1.1.0) - 2015-03-18 - Added support for semver pre-release and metadata syntax. ## [1.0.0](https://github.com/omichelsen/compare-versions/releases/tag/v1.0.0) - 2015-03-18 - Initial release. omichelsen-compare-versions-497a7e0/LICENSE000066400000000000000000000020751464451513000205100ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2015-2021 Ole Michelsen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. omichelsen-compare-versions-497a7e0/README.md000066400000000000000000000111311464451513000207530ustar00rootroot00000000000000# compare-versions [![Build Status](https://github.com/omichelsen/compare-versions/actions/workflows/ci.yml/badge.svg)](https://github.com/omichelsen/compare-versions/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/omichelsen/compare-versions/badge.svg?branch=main&service=github)](https://coveralls.io/github/omichelsen/compare-versions?branch=main) [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/compare-versions.svg)](https://bundlephobia.com/package/compare-versions) Compare [semver](https://semver.org/) version strings to find greater, equal or lesser. Runs in the browser as well as Node.js/React Native etc. Has no dependencies and is [tiny](https://bundlephobia.com/package/compare-versions). Supports the full semver specification including versions with different number of digits like `1.0.0`, `1.0`, `1` and pre-releases like `1.0.0-alpha`. Additionally supports the following variations: - Wildcards for minor and patch version like `1.0.x` or `1.0.*`. - [Chromium version numbers](https://www.chromium.org/developers/version-numbers) with 4 parts, e.g. version `25.0.1364.126`. - Any leading `v` is ignored, e.g. `v1.0` is interpreted as `1.0`. - Leading zero is ignored, e.g. `1.01.1` is interpreted as `1.1.1`. - [npm version ranges](https://docs.npmjs.com/cli/v6/using-npm/semver#ranges), e.g. `1.2.7 || >=1.2.9 <2.0.0` ## Install ```bash $ npm install compare-versions ``` __Note__: Starting from v5 the main export is now _named_ like so: `import { compareVersions } from 'compare-versions'`. __Note__: Starting from v4 this library includes a ESM version which will automatically be selected by your bundler (webpack, parcel etc). The CJS/UMD version is `lib/umd/index.js` and the new ESM version is `lib/esm/index.js`. ## Usage Will return `1` if first version is greater, `0` if versions are equal, and `-1` if the second version is greater: ```js import { compareVersions } from 'compare-versions'; compareVersions('11.1.1', '10.0.0'); // 1 compareVersions('10.0.0', '10.0.0'); // 0 compareVersions('10.0.0', '11.1.1'); // -1 ``` Can also be used for sorting: ```js const versions = [ '1.5.19', '1.2.3', '1.5.5' ] const sorted = versions.sort(compareVersions); /* [ '1.2.3', '1.5.5', '1.5.19' ] */ ``` ### "Human Readable" Compare The alternative `compare` function accepts an operator which will be more familiar to humans: ```js import { compare } from 'compare-versions'; compare('10.1.8', '10.0.4', '>'); // true compare('10.0.1', '10.0.1', '='); // true compare('10.1.1', '10.2.2', '<'); // true compare('10.1.1', '10.2.2', '<='); // true compare('10.1.1', '10.2.2', '>='); // false ``` ### Version ranges The `satisfies` function accepts a range to compare, compatible with [npm package versioning](https://docs.npmjs.com/cli/v6/using-npm/semver): ```js import { satisfies } from 'compare-versions'; satisfies('10.0.1', '~10.0.0'); // true satisfies('10.1.0', '~10.0.0'); // false satisfies('10.1.2', '^10.0.0'); // true satisfies('11.0.0', '^10.0.0'); // false satisfies('10.1.8', '>10.0.4'); // true satisfies('10.0.1', '=10.0.1'); // true satisfies('10.1.1', '<10.2.2'); // true satisfies('10.1.1', '<=10.2.2'); // true satisfies('10.1.1', '>=10.2.2'); // false satisfies('1.4.6', '1.2.7 || >=1.2.9 <2.0.0'); // true satisfies('1.2.8', '1.2.7 || >=1.2.9 <2.0.0'); // false satisfies('1.5.1', '1.2.3 - 2.3.4'); // true satisfies('2.3.5', '1.2.3 - 2.3.4'); // false ``` ### Validate version numbers Applies the same rules used comparing version numbers and returns a boolean: ```js import { validate } from 'compare-versions'; validate('1.0.0-rc.1'); // true validate('1.0-rc.1'); // false validate('foo'); // false ``` ### Validate version numbers (strict) Validate version numbers strictly according to semver.org; 3 integers, no wildcards, no leading zero or "v" etc: ```js import { validateStrict } from 'compare-versions'; validate('1.0.0'); // true validate('1.0.0-rc.1'); // true validate('1.0'); // false validate('1.x'); // false validate('v1.02'); // false ``` ### Browser If included directly in the browser, the functions above are available on the global window under the `compareVersions` object: ```html ``` omichelsen-compare-versions-497a7e0/package-lock.json000066400000000000000000002035751464451513000227270ustar00rootroot00000000000000{ "name": "compare-versions", "version": "6.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "compare-versions", "version": "6.1.1", "license": "MIT", "devDependencies": { "@types/mocha": "^10.0.7", "c8": "^10.1.2", "mocha": "^10.6.0", "rollup": "^4.18.1", "ts-node": "^10.9.2", "typescript": "^5.5.3" } }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "0.3.9" }, "engines": { "node": ">=12" } }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, "engines": { "node": ">=12" } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" }, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "dependencies": { "ansi-regex": "^6.0.1" }, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" }, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, "optional": true, "engines": { "node": ">=14" } }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.1.tgz", "integrity": "sha512-lncuC4aHicncmbORnx+dUaAgzee9cm/PbIqgWz1PpXuwc+sa1Ct83tnqUDy/GFKleLiN7ZIeytM6KJ4cAn1SxA==", "cpu": [ "arm" ], "dev": true, "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.1.tgz", "integrity": "sha512-F/tkdw0WSs4ojqz5Ovrw5r9odqzFjb5LIgHdHZG65dFI1lWTWRVy32KDJLKRISHgJvqUeUhdIvy43fX41znyDg==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.1.tgz", "integrity": "sha512-vk+ma8iC1ebje/ahpxpnrfVQJibTMyHdWpOGZ3JpQ7Mgn/3QNHmPq7YwjZbIE7km73dH5M1e6MRRsnEBW7v5CQ==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.1.tgz", "integrity": "sha512-IgpzXKauRe1Tafcej9STjSSuG0Ghu/xGYH+qG6JwsAUxXrnkvNHcq/NL6nz1+jzvWAnQkuAJ4uIwGB48K9OCGA==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.1.tgz", "integrity": "sha512-P9bSiAUnSSM7EmyRK+e5wgpqai86QOSv8BwvkGjLwYuOpaeomiZWifEos517CwbG+aZl1T4clSE1YqqH2JRs+g==", "cpu": [ "arm" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.1.tgz", "integrity": "sha512-5RnjpACoxtS+aWOI1dURKno11d7krfpGDEn19jI8BuWmSBbUC4ytIADfROM1FZrFhQPSoP+KEa3NlEScznBTyQ==", "cpu": [ "arm" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.1.tgz", "integrity": "sha512-8mwmGD668m8WaGbthrEYZ9CBmPug2QPGWxhJxh/vCgBjro5o96gL04WLlg5BA233OCWLqERy4YUzX3bJGXaJgQ==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.1.tgz", "integrity": "sha512-dJX9u4r4bqInMGOAQoGYdwDP8lQiisWb9et+T84l2WXk41yEej8v2iGKodmdKimT8cTAYt0jFb+UEBxnPkbXEQ==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.1.tgz", "integrity": "sha512-V72cXdTl4EI0x6FNmho4D502sy7ed+LuVW6Ym8aI6DRQ9hQZdp5sj0a2usYOlqvFBNKQnLQGwmYnujo2HvjCxQ==", "cpu": [ "ppc64" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.1.tgz", "integrity": "sha512-f+pJih7sxoKmbjghrM2RkWo2WHUW8UbfxIQiWo5yeCaCM0TveMEuAzKJte4QskBp1TIinpnRcxkquY+4WuY/tg==", "cpu": [ "riscv64" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.1.tgz", "integrity": "sha512-qb1hMMT3Fr/Qz1OKovCuUM11MUNLUuHeBC2DPPAWUYYUAOFWaxInaTwTQmc7Fl5La7DShTEpmYwgdt2hG+4TEg==", "cpu": [ "s390x" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.1.tgz", "integrity": "sha512-7O5u/p6oKUFYjRbZkL2FLbwsyoJAjyeXHCU3O4ndvzg2OFO2GinFPSJFGbiwFDaCFc+k7gs9CF243PwdPQFh5g==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.1.tgz", "integrity": "sha512-pDLkYITdYrH/9Cv/Vlj8HppDuLMDUBmgsM0+N+xLtFd18aXgM9Nyqupb/Uw+HeidhfYg2lD6CXvz6CjoVOaKjQ==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.1.tgz", "integrity": "sha512-W2ZNI323O/8pJdBGil1oCauuCzmVd9lDmWBBqxYZcOqWD6aWqJtVBQ1dFrF4dYpZPks6F+xCZHfzG5hYlSHZ6g==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.1.tgz", "integrity": "sha512-ELfEX1/+eGZYMaCIbK4jqLxO1gyTSOIlZr6pbC4SRYFaSIDVKOnZNMdoZ+ON0mrFDp4+H5MhwNC1H/AhE3zQLg==", "cpu": [ "ia32" ], "dev": true, "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.1.tgz", "integrity": "sha512-yjk2MAkQmoaPYCSu35RLJ62+dz358nE83VfTePJRp8CG7aMg25mEJYpXFiD+NcevhX8LxD5OP5tktPXnXN7GDw==", "cpu": [ "x64" ], "dev": true, "optional": true, "os": [ "win32" ] }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", "dev": true }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true }, "node_modules/@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true }, "node_modules/@tsconfig/node16": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", "dev": true }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", "dev": true }, "node_modules/@types/mocha": { "version": "10.0.7", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.7.tgz", "integrity": "sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw==", "dev": true }, "node_modules/@types/node": { "version": "20.4.8", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.8.tgz", "integrity": "sha512-0mHckf6D2DiIAzh8fM8f3HQCvMKDpK94YQ0DSVkfWTG9BZleYIWudw9cJxX8oCk9bM+vAkDyujDV6dmKHbvQpg==", "dev": true, "peer": true }, "node_modules/acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true, "bin": { "acorn": "bin/acorn" }, "engines": { "node": ">=0.4.0" } }, "node_modules/acorn-walk": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "dev": true, "engines": { "node": ">=0.4.0" } }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { "color-convert": "^2.0.1" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" }, "engines": { "node": ">= 8" } }, "node_modules/arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, "node_modules/c8": { "version": "10.1.2", "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz", "integrity": "sha512-Qr6rj76eSshu5CgRYvktW0uM0CFY0yi4Fd5D0duDXO6sYinyopmftUiJVuzBQxQcwQLor7JWDVRP+dUfCmzgJw==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@istanbuljs/schema": "^0.1.3", "find-up": "^5.0.0", "foreground-child": "^3.1.1", "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.6", "test-exclude": "^7.0.1", "v8-to-istanbul": "^9.0.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1" }, "bin": { "c8": "bin/c8.js" }, "engines": { "node": ">=18" }, "peerDependencies": { "monocart-coverage-reports": "^2" }, "peerDependenciesMeta": { "monocart-coverage-reports": { "optional": true } } }, "node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "funding": [ { "type": "individual", "url": "https://paulmillr.com/funding/" } ], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "engines": { "node": ">= 8.10.0" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" }, "engines": { "node": ">=12" } }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { "color-name": "~1.1.4" }, "engines": { "node": ">=7.0.0" } }, "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" }, "engines": { "node": ">= 8" } }, "node_modules/debug": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, "dependencies": { "ms": "2.1.2" }, "engines": { "node": ">=6.0" }, "peerDependenciesMeta": { "supports-color": { "optional": true } } }, "node_modules/debug/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "node_modules/decamelize": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/diff": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "engines": { "node": ">=0.3.1" } }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/flat": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, "bin": { "flat": "cli.js" } }, "node_modules/foreground-child": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", "dev": true, "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" }, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, "node_modules/fsevents": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "hasInstallScript": true, "optional": true, "os": [ "darwin" ], "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^5.0.1", "once": "^1.3.0" }, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { "is-glob": "^4.0.1" }, "engines": { "node": ">= 6" } }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, "bin": { "he": "bin/he" } }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "dependencies": { "binary-extensions": "^2.0.0" }, "engines": { "node": ">=8" } }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, "engines": { "node": ">=0.10.0" } }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "engines": { "node": ">=0.12.0" } }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-report": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { "node": ">=10" } }, "node_modules/istanbul-reports": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" }, "engines": { "node": ">=8" } }, "node_modules/jackspeak": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, "funding": { "url": "https://github.com/sponsors/isaacs" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { "p-locate": "^5.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "dependencies": { "yallist": "^4.0.0" }, "engines": { "node": ">=10" } }, "node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, "dependencies": { "semver": "^7.5.3" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, "node_modules/minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { "node": ">=10" } }, "node_modules/minipass": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, "engines": { "node": ">=16 || 14 >=14.17" } }, "node_modules/mocha": { "version": "10.6.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.6.0.tgz", "integrity": "sha512-hxjt4+EEB0SA0ZDygSS015t65lJw/I2yRCS3Ae+SJ5FrbzrXgfYwJr96f0OvIXdj7h4lv/vLCrH3rkiuizFSvw==", "dev": true, "dependencies": { "ansi-colors": "^4.1.3", "browser-stdout": "^1.3.1", "chokidar": "^3.5.3", "debug": "^4.3.5", "diff": "^5.2.0", "escape-string-regexp": "^4.0.0", "find-up": "^5.0.0", "glob": "^8.1.0", "he": "^1.2.0", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", "minimatch": "^5.1.6", "ms": "^2.1.3", "serialize-javascript": "^6.0.2", "strip-json-comments": "^3.1.1", "supports-color": "^8.1.1", "workerpool": "^6.5.1", "yargs": "^16.2.0", "yargs-parser": "^20.2.9", "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", "mocha": "bin/mocha.js" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^7.0.0" } }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "dependencies": { "has-flag": "^4.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/mocha/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" }, "engines": { "node": ">=10" } }, "node_modules/mocha/node_modules/yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "engines": { "node": ">=10" } }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "dependencies": { "wrappy": "1" } }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { "yocto-queue": "^0.1.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "dependencies": { "p-limit": "^3.0.2" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/package-json-from-dist": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", "dev": true }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/path-scurry": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/path-scurry/node_modules/lru-cache": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { "node": ">=8.6" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "dependencies": { "picomatch": "^2.2.1" }, "engines": { "node": ">=8.10.0" } }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/rollup": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.1.tgz", "integrity": "sha512-Elx2UT8lzxxOXMpy5HWQGZqkrQOtrVDDa/bm9l10+U4rQnVzbL/LgZ4NOM1MPIDyHk69W4InuYDF5dzRh4Kw1A==", "dev": true, "dependencies": { "@types/estree": "1.0.5" }, "bin": { "rollup": "dist/bin/rollup" }, "engines": { "node": ">=18.0.0", "npm": ">=8.0.0" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.18.1", "@rollup/rollup-android-arm64": "4.18.1", "@rollup/rollup-darwin-arm64": "4.18.1", "@rollup/rollup-darwin-x64": "4.18.1", "@rollup/rollup-linux-arm-gnueabihf": "4.18.1", "@rollup/rollup-linux-arm-musleabihf": "4.18.1", "@rollup/rollup-linux-arm64-gnu": "4.18.1", "@rollup/rollup-linux-arm64-musl": "4.18.1", "@rollup/rollup-linux-powerpc64le-gnu": "4.18.1", "@rollup/rollup-linux-riscv64-gnu": "4.18.1", "@rollup/rollup-linux-s390x-gnu": "4.18.1", "@rollup/rollup-linux-x64-gnu": "4.18.1", "@rollup/rollup-linux-x64-musl": "4.18.1", "@rollup/rollup-win32-arm64-msvc": "4.18.1", "@rollup/rollup-win32-ia32-msvc": "4.18.1", "@rollup/rollup-win32-x64-msvc": "4.18.1", "fsevents": "~2.3.2" } }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/feross" }, { "type": "patreon", "url": "https://www.patreon.com/feross" }, { "type": "consulting", "url": "https://feross.org/support" } ] }, "node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, "bin": { "semver": "bin/semver.js" }, "engines": { "node": ">=10" } }, "node_modules/serialize-javascript": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" } }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, "engines": { "node": ">=8" } }, "node_modules/shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" } }, "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" } }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { "has-flag": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/test-exclude": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^10.4.1", "minimatch": "^9.0.4" }, "engines": { "node": ">=18" } }, "node_modules/test-exclude/node_modules/glob": { "version": "10.4.5", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/test-exclude/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "dependencies": { "is-number": "^7.0.0" }, "engines": { "node": ">=8.0" } }, "node_modules/ts-node": { "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", "@tsconfig/node16": "^1.0.2", "acorn": "^8.4.1", "acorn-walk": "^8.1.1", "arg": "^4.1.0", "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "bin": { "ts-node": "dist/bin.js", "ts-node-cwd": "dist/bin-cwd.js", "ts-node-esm": "dist/bin-esm.js", "ts-node-script": "dist/bin-script.js", "ts-node-transpile-only": "dist/bin-transpile.js", "ts-script": "dist/bin-script-deprecated.js" }, "peerDependencies": { "@swc/core": ">=1.2.50", "@swc/wasm": ">=1.2.50", "@types/node": "*", "typescript": ">=2.7" }, "peerDependenciesMeta": { "@swc/core": { "optional": true }, "@swc/wasm": { "optional": true } } }, "node_modules/ts-node/node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, "engines": { "node": ">=0.3.1" } }, "node_modules/typescript": { "version": "5.5.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { "node": ">=14.17" } }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, "node_modules/v8-to-istanbul": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^1.6.0" }, "engines": { "node": ">=10.12.0" } }, "node_modules/v8-to-istanbul/node_modules/@jridgewell/trace-mapping": { "version": "0.3.19", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "bin/node-which" }, "engines": { "node": ">= 8" } }, "node_modules/workerpool": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, "engines": { "node": ">=10" } }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12" } }, "node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, "engines": { "node": ">=12" } }, "node_modules/yargs-unparser": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" }, "engines": { "node": ">=10" } }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } } } } omichelsen-compare-versions-497a7e0/package.json000066400000000000000000000023151464451513000217660ustar00rootroot00000000000000{ "name": "compare-versions", "version": "6.1.1", "description": "Compare semver version strings to find greater, equal or lesser.", "repository": { "type": "git", "url": "git+https://github.com/omichelsen/compare-versions.git" }, "author": "Ole Michelsen", "license": "MIT", "bugs": { "url": "https://github.com/omichelsen/compare-versions/issues" }, "homepage": "https://github.com/omichelsen/compare-versions#readme", "keywords": [ "semver", "version", "compare", "browser", "node" ], "scripts": { "build": "npm run build:esm && npm run build:umd", "build:esm": "tsc --module esnext --target es2017 --outDir lib/esm", "build:umd": "rollup lib/esm/index.js --format umd --name compareVersions --sourcemap -o lib/umd/index.js", "prepublishOnly": "npm run build", "test": "c8 --reporter=lcov mocha" }, "main": "./lib/umd/index.js", "module": "./lib/esm/index.js", "types": "./lib/esm/index.d.ts", "sideEffects": false, "files": [ "lib", "src" ], "devDependencies": { "@types/mocha": "^10.0.7", "c8": "^10.1.2", "mocha": "^10.6.0", "rollup": "^4.18.1", "ts-node": "^10.9.2", "typescript": "^5.5.3" } } omichelsen-compare-versions-497a7e0/src/000077500000000000000000000000001464451513000202665ustar00rootroot00000000000000omichelsen-compare-versions-497a7e0/src/compare.ts000066400000000000000000000031021464451513000222600ustar00rootroot00000000000000import { compareVersions } from './compareVersions.js'; import { CompareOperator } from './utils.js'; /** * Compare [semver](https://semver.org/) version strings using the specified operator. * * @param v1 First version to compare * @param v2 Second version to compare * @param operator Allowed arithmetic operator to use * @returns `true` if the comparison between the firstVersion and the secondVersion satisfies the operator, `false` otherwise. * * @example * ``` * compare('10.1.8', '10.0.4', '>'); // return true * compare('10.0.1', '10.0.1', '='); // return true * compare('10.1.1', '10.2.2', '<'); // return true * compare('10.1.1', '10.2.2', '<='); // return true * compare('10.1.1', '10.2.2', '>='); // return false * ``` */ export const compare = (v1: string, v2: string, operator: CompareOperator) => { // validate input operator assertValidOperator(operator); // since result of compareVersions can only be -1 or 0 or 1 // a simple map can be used to replace switch const res = compareVersions(v1, v2); return operatorResMap[operator].includes(res); }; const operatorResMap = { '>': [1], '>=': [0, 1], '=': [0], '<=': [-1, 0], '<': [-1], '!=': [-1, 1], }; const allowedOperators = Object.keys(operatorResMap); const assertValidOperator = (op: string) => { if (typeof op !== 'string') { throw new TypeError( `Invalid operator type, expected string but got ${typeof op}` ); } if (allowedOperators.indexOf(op) === -1) { throw new Error( `Invalid operator, expected one of ${allowedOperators.join('|')}` ); } }; omichelsen-compare-versions-497a7e0/src/compareVersions.ts000066400000000000000000000021311464451513000240120ustar00rootroot00000000000000import { compareSegments, validateAndParse } from './utils.js'; /** * Compare [semver](https://semver.org/) version strings to find greater, equal or lesser. * This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`. * @param v1 - First version to compare * @param v2 - Second version to compare * @returns Numeric value compatible with the [Array.sort(fn) interface](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters). */ export const compareVersions = (v1: string, v2: string) => { // validate input and split into segments const n1 = validateAndParse(v1); const n2 = validateAndParse(v2); // pop off the patch const p1 = n1.pop(); const p2 = n2.pop(); // validate numbers const r = compareSegments(n1, n2); if (r !== 0) return r; // validate pre-release if (p1 && p2) { return compareSegments(p1.split('.'), p2.split('.')); } else if (p1 || p2) { return p1 ? -1 : 1; } return 0; }; omichelsen-compare-versions-497a7e0/src/index.ts000066400000000000000000000003641464451513000217500ustar00rootroot00000000000000export { compare } from './compare.js'; export { compareVersions } from './compareVersions.js'; export { satisfies } from './satisfies.js'; export { CompareOperator } from './utils.js'; export { validate, validateStrict } from './validate.js'; omichelsen-compare-versions-497a7e0/src/satisfies.ts000066400000000000000000000041211464451513000226260ustar00rootroot00000000000000import { compare } from './compare.js'; import { CompareOperator, compareSegments, validateAndParse } from './utils.js'; /** * Match [npm semver](https://docs.npmjs.com/cli/v6/using-npm/semver) version range. * * @param version Version number to match * @param range Range pattern for version * @returns `true` if the version number is within the range, `false` otherwise. * * @example * ``` * satisfies('1.1.0', '^1.0.0'); // return true * satisfies('1.1.0', '~1.0.0'); // return false * ``` */ export const satisfies = (version: string, range: string): boolean => { // clean input range = range.replace(/([><=]+)\s+/g, '$1'); // handle multiple comparators if (range.includes('||')) { return range.split('||').some((r) => satisfies(version, r)); } else if (range.includes(' - ')) { const [a, b] = range.split(' - ', 2); return satisfies(version, `>=${a} <=${b}`); } else if (range.includes(' ')) { return range .trim() .replace(/\s{2,}/g, ' ') .split(' ') .every((r) => satisfies(version, r)); } // if no range operator then "=" const m = range.match(/^([<>=~^]+)/); const op = m ? m[1] : '='; // if gt/lt/eq then operator compare if (op !== '^' && op !== '~') return compare(version, range, op as CompareOperator); // else range of either "~" or "^" is assumed const [v1, v2, v3, , vp] = validateAndParse(version); const [r1, r2, r3, , rp] = validateAndParse(range); const v = [v1, v2, v3]; const r = [r1, r2 ?? 'x', r3 ?? 'x']; // validate pre-release if (rp) { if (!vp) return false; if (compareSegments(v, r) !== 0) return false; if (compareSegments(vp.split('.'), rp.split('.')) === -1) return false; } // first non-zero number const nonZero = r.findIndex((v) => v !== '0') + 1; // pointer to where segments can be >= const i = op === '~' ? 2 : nonZero > 1 ? nonZero : 1; // before pointer must be equal if (compareSegments(v.slice(0, i), r.slice(0, i)) !== 0) return false; // after pointer must be >= if (compareSegments(v.slice(i), r.slice(i)) === -1) return false; return true; }; omichelsen-compare-versions-497a7e0/src/utils.ts000066400000000000000000000026131464451513000220000ustar00rootroot00000000000000/** * Allowed arithmetic operators */ export type CompareOperator = '>' | '>=' | '=' | '<' | '<=' | '!='; export const semver = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i; export const validateAndParse = (version: string) => { if (typeof version !== 'string') { throw new TypeError('Invalid argument expected string'); } const match = version.match(semver); if (!match) { throw new Error( `Invalid argument not valid semver ('${version}' received)` ); } match.shift(); return match; }; const isWildcard = (s: string) => s === '*' || s === 'x' || s === 'X'; const tryParse = (v: string) => { const n = parseInt(v, 10); return isNaN(n) ? v : n; }; const forceType = (a: string | number, b: string | number) => typeof a !== typeof b ? [String(a), String(b)] : [a, b]; const compareStrings = (a: string, b: string) => { if (isWildcard(a) || isWildcard(b)) return 0; const [ap, bp] = forceType(tryParse(a), tryParse(b)); if (ap > bp) return 1; if (ap < bp) return -1; return 0; }; export const compareSegments = ( a: string | string[] | RegExpMatchArray, b: string | string[] | RegExpMatchArray ) => { for (let i = 0; i < Math.max(a.length, b.length); i++) { const r = compareStrings(a[i] || '0', b[i] || '0'); if (r !== 0) return r; } return 0; }; omichelsen-compare-versions-497a7e0/src/validate.ts000066400000000000000000000023071464451513000224310ustar00rootroot00000000000000import { semver } from './utils.js'; /** * Validate [semver](https://semver.org/) version strings. * * @param version Version number to validate * @returns `true` if the version number is a valid semver version number, `false` otherwise. * * @example * ``` * validate('1.0.0-rc.1'); // return true * validate('1.0-rc.1'); // return false * validate('foo'); // return false * ``` */ export const validate = (version: string) => typeof version === 'string' && /^[v\d]/.test(version) && semver.test(version); /** * Validate [semver](https://semver.org/) version strings strictly. Will not accept wildcards and version ranges. * * @param version Version number to validate * @returns `true` if the version number is a valid semver version number `false` otherwise * * @example * ``` * validate('1.0.0-rc.1'); // return true * validate('1.0-rc.1'); // return false * validate('foo'); // return false * ``` */ export const validateStrict = (version: string) => typeof version === 'string' && /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test( version ); omichelsen-compare-versions-497a7e0/test/000077500000000000000000000000001464451513000204565ustar00rootroot00000000000000omichelsen-compare-versions-497a7e0/test/compare.ts000066400000000000000000000206461464451513000224640ustar00rootroot00000000000000import assert from 'assert'; import { compareVersions, compare, CompareOperator } from '../src/index'; describe('compare versions', () => { const cmp = { '1': '>', '0': '=', '-1': '<', } as { [key: string]: string }; const runTests = (dataSet: Array<[string, string, number]>) => { dataSet.forEach(([v1, v2, expected]) => { it(`${v1} ${cmp[expected]} ${v2}`, () => assert.strictEqual( compareVersions(v1, v2), expected, `${v1} ${cmp[expected]} ${v2} !== ${expected}` )); }); }; describe('single-segment versions', () => { runTests([ ['10', '9', 1], ['10', '10', 0], ['9', '10', -1], ]); }); describe('two-segment versions', () => { runTests([ ['10.8', '10.4', 1], ['10.1', '10.1', 0], ['10.1', '10.2', -1], ]); }); describe('three-segment versions', () => { runTests([ ['10.1.8', '10.0.4', 1], ['10.0.1', '10.0.1', 0], ['10.1.1', '10.2.2', -1], ['11.0.10', '11.0.2', 1], ['11.0.2', '11.0.10', -1], ]); }); describe('four-segment versions - https://www.chromium.org/developers/version-numbers', () => { runTests([ ['1.0.0.0', '1', 0], ['1.0.0.0', '1.0', 0], ['1.0.0.0', '1.0.0', 0], ['1.0.0.0', '1.0.0.0', 0], ['1.2.3.4', '1.2.3.4', 0], ['1.2.3.4', '1.2.3.04', 0], ['v1.2.3.4', '01.2.3.4', 0], ['1.2.3.4', '1.2.3.5', -1], ['1.2.3.5', '1.2.3.4', 1], ['1.0.0.0-alpha', '1.0.0-alpha', 0], ['1.0.0.0-alpha', '1.0.0.0-beta', -1], ]); }); describe('different segment versions', () => { runTests([ ['11.1.10', '11.0', 1], ['1.1.1', '1', 1], ['01.1.0', '1.01', 0], ['1.0.0', '1', 0], ['10.0.0', '10.114', -1], ['1.0', '1.4.1', -1], ]); }); describe('pre-release versions - https://semver.org/#spec-item-9', () => { runTests([ ['1.0.0-alpha.1', '1.0.0-alpha', 1], ['1.0.0-alpha', '1.0.0-alpha.1', -1], ['1.0.0-alpha.1', '1.0.0-alpha.beta', -1], ['1.0.0-alpha.beta', '1.0.0-beta', -1], ['1.0.0-beta', '1.0.0-beta.2', -1], ['1.0.0-beta.2', '1.0.0-beta.11', -1], ['1.0.0-beta.11', '1.0.0-rc.1', -1], ['1.0.0-rc.1', '1.0.0', -1], ['1.0.0-alpha', '1', -1], ['1.0.0-beta.11', '1.0.0-beta.1', 1], ['1.0.0-beta.10', '1.0.0-beta.9', 1], ['1.0.0-beta.10', '1.0.0-beta.90', -1], ]); }); describe('ignore build metadata - https://semver.org/#spec-item-10', () => { runTests([ ['1.4.0-build.3928', '1.4.0-build.3928+sha.a8d9d4f', 0], ['1.4.0-build.3928+sha.b8dbdb0', '1.4.0-build.3928+sha.a8d9d4f', 0], ['1.0.0-alpha+001', '1.0.0-alpha', 0], ['1.0.0-beta+exp.sha.5114f85', '1.0.0-beta+exp.sha.999999', 0], ['1.0.0+20130313144700', '1.0.0', 0], ['1.0.0+20130313144700', '2.0.0', -1], ['1.0.0+20130313144700', '1.0.1+11234343435', -1], ['1.0.1+1', '1.0.1+2', 0], ['1.0.0+a-a', '1.0.0+a-b', 0], ]); }); describe('ignore leading `v`', () => { runTests([ ['v1.0.0', '1.0.0', 0], ['v1.0.0', 'v1.0.0', 0], ['v1.0.0', 'v1.0.0', 0], ['v1.0.0-alpha', '1.0.0-alpha', 0], ]); }); describe('ignore leading `0`', () => { runTests([ ['01.0.0', '1', 0], ['01.0.0', '1.0.0', 0], ['1.01.0', '1.01.0', 0], ['1.0.03', '1.0.3', 0], ['1.0.03-alpha', '1.0.3-alpha', 0], ['v01.0.0', '1.0.0', 0], ['v01.0.0', '2.0.0', -1], ]); }); describe('wildcards', () => { runTests([ ['3', '3.x.x', 0], ['3.3', '3.x.x', 0], ['3.3.3', '3.x.x', 0], ['3.x.x', '3.3.3', 0], ['3.3.3', '3.X.X', 0], ['3.3.3', '3.3.x', 0], ['3.3.3', '3.*.*', 0], ['3.3.3', '3.3.*', 0], ['3.0.3', '3.0.*', 0], ['0.7.x', '0.6.0', 1], ['0.7.x', '0.6.0-asdf', 1], ['0.7.x', '0.6.2', 1], ['0.7.x', '0.7.0-asdf', 1], ['1.2.*', '1.1.3', 1], ['1.2.*', '1.1.9999', 1], ['1.2.x', '1.0.0', 1], ['1.2.x', '1.1.0', 1], ['1.2.x', '1.1.3', 1], ['2.*.*', '1.0.1', 1], ['2.*.*', '1.1.3', 1], ['2.x.x', '1.0.0', 1], ['2.x.x', '1.1.3', 1], ]); }); describe('invalid input', () => { ( [ [42, /Invalid argument expected string/], [{}, /Invalid argument expected string/], [[], /Invalid argument expected string/], [() => undefined, /Invalid argument expected string/], ['6.3.', /Invalid argument not valid semver/], ['1.2.3a', /Invalid argument not valid semver/], ['1.2.-3a', /Invalid argument not valid semver/], ] as const ).forEach(([v1, exception]) => { it(`should throw on ${v1}`, () => { assert.throws(() => { compareVersions(v1 as any, v1 as any); }, exception); }); }); }); runTests([ ['0.1.20', '0.1.5', 1], ['0.6.1-1', '0.6.1-0', 1], ['1', '0.0.0-beta', 1], ['1', '0.2.3', 1], ['1', '0.2.4', 1], ['1', '1.0.0-0', 1], ['1', '1.0.0-beta', 1], ['1.0', '0.0.0', 1], ['1.0', '0.1.0', 1], ['1.0', '0.1.2', 1], ['1.0.0', '0.0.0', 1], ['1.0.0', '0.0.1', 1], ['1.0.0', '0.2.3', 1], ['1.0.0-beta.2', '1.0.0-beta.1', 1], ['1.2.2', '1.2.1', 1], ['2', '1.0.0', 1], ['2', '1.0.0-beta', 1], ['2', '1.9999.9999', 1], ['2.0.0', '1.0.0', 1], ['2.0.0', '1.1.1', 1], ['2.0.0', '1.2.9', 1], ['2.0.0', '1.9999.9999', 1], ['2.3', '2.2.1', 1], ['2.3', '2.2.2', 1], ['2.4', '2.3.0', 1], ['2.4', '2.3.5', 1], ['3.2.1', '2.3.2', 1], ['3.2.1', '3.2.0', 1], ['v0.5.4-pre', '0.5.4-alpha', 1], ['v3.2.1', 'v2.3.2', 1], ]); }); describe('human readable compare versions', () => { const runTests = ( dataSet: Array<[string, string, CompareOperator, boolean]> ) => { dataSet.forEach(([v1, v2, operator, expected]) => { it(`${v1} ${operator} ${v2}`, () => assert.strictEqual( compare(v1, v2, operator), expected, `${v1} ${operator} ${v2} !== ${expected}` )); }); }; const runThrows = (dataSet: Array<[string, string, any, RegExp]>) => { dataSet.forEach(([v1, v2, operator, expected]) => { it(`${v1} ${operator} ${v2}`, () => { assert.throws(() => { compare(v1, v2, operator); }, expected); }); }); }; runThrows([ ['3.2.1', '3.2.0', null, /Invalid operator type, expected string but got /], [ '3.2.1', '3.2.0', undefined, /Invalid operator type, expected string but got /, ], [ '3.2.1', '3.2.0', true, /Invalid operator type, expected string but got boolean/, ], [ '3.2.1', '3.2.0', 1, /Invalid operator type, expected string but got number/, ], [ '3.2.1', '3.2.0', { foo: 'bar' }, /Invalid operator type, expected string but got object/, ], [ '3.2.1', '3.2.0', () => {}, /Invalid operator type, expected string but got function/, ], ['3.2.1', '3.2.0', '', /Invalid operator, expected one of /], ['3.2.1', '3.2.0', 'foo', /Invalid operator, expected one of /], ['3.2.1', '3.2.0', '> ', /Invalid operator, expected one of /], ]); it('should throw the same Errors thrown by the main function', () => { ( [ [42, /Invalid argument expected string/], [{}, /Invalid argument expected string/], [[], /Invalid argument expected string/], [() => undefined, /Invalid argument expected string/], ['6.3.', /Invalid argument not valid semver/], ['1.2.3a', /Invalid argument not valid semver/], ['1.2.-3a', /Invalid argument not valid semver/], ] as const ).forEach(([v1, exception]) => { assert.throws(() => { compare(v1 as any, v1 as any, '>'); }, exception); }); }); runTests([ ['10.1.8', '10.0.4', '>', true], ['10.1.8', '10.0.4', '>=', true], ['10.0.1', '10.0.1', '=', true], ['10.0.1', '10.1.*', '=', false], ['3.3.3', '3.x.x', '<', false], ['3.3.3', '3.x.x', '>=', true], ['10.1.1', '10.2.2', '<', true], ['10.1.1', '10.0.2', '<', false], ['10.1.1', '10.2.2', '<=', true], ['10.1.1', '10.1.1', '<=', true], ['10.1.1', '10.0.2', '<=', false], ['10.1.1', '10.0.2', '>=', true], ['10.1.1', '10.1.1', '>=', true], ['10.1.1', '10.2.2', '>=', false], ['10.1.1', '10.2.2', '!=', true], ['10.1.1', '10.1.1', '!=', false], ]); }); omichelsen-compare-versions-497a7e0/test/satisfies.ts000066400000000000000000000114751464451513000230300ustar00rootroot00000000000000import assert from 'assert'; import { satisfies } from '../src/index'; describe('satisfies versions', () => { const runTests = (dataSet: Array<[string, string, boolean]>) => { dataSet.forEach(([v, m, expected]) => { it(`${v} ${expected ? 'satisfies' : 'violates'} ${m}`, () => { assert.strictEqual(satisfies(v, m), expected); }); }); }; describe('tilde - https://docs.npmjs.com/cli/v6/using-npm/semver#tilde-ranges-123-12-1', () => { runTests([ ['1.0.0', '~1.0.1', false], ['1.0.1', '~1.0.1', true], ['1.2.5', '~1.2.3', true], ['1.3.0', '~1.2.3', false], ['1.2.5', '~1.2', true], // (Same as 1.2.x) ['1.3.0', '~1.2', false], // (Same as 1.2.x) ['1.0.0', '~1', true], // (Same as 1.x) ['2.0.0', '~1', false], // (Same as 1.x) ['0.2.5', '~0.2.3', true], ['0.3.0', '~0.2.3', false], ['0.2.5', '~0.2', true], // (Same as 0.2.x) ['0.3.0', '~0.2', false], // (Same as 0.2.x) ['0.0.0', '~0', true], // (Same as 0.x) ['0.1.2', '~0', true], // (Same as 0.x) ['1.0.0', '~0', false], // (Same as 0.x) ]); }); describe('caret - https://docs.npmjs.com/cli/v6/using-npm/semver#caret-ranges-123-025-004', () => { runTests([ ['1.0.0', '^1', true], ['1.0.0', '^1.0', true], ['1.0.0', '^1.0.0', true], ['1.2.0', '^1.0.0', true], ['v1.2.0', '^1.0.0', true], ['2.0.0', '^1.0.0', false], ['1.0.0', '^1.2.0', false], ['1.0.1', '^1.2.0', false], ['1.3.4', '^1.2.3', true], ['2.0.0', '^1.2.3', false], ['0.3.0', '^0.2.3', false], ['0.0.4', '^0.0.3', false], ]); }); runTests([ ['1.2.0', '>1.0.0', true], ['1.2.0', '<1.0.0', false], ['1.0.0', '<=1.0.0', true], ['1.0.0', '<=2.0.0', true], ['1.0.1', '1.0.0', false], ['1.0.0', '1.0.0', true], ['10.1.8', '>10.0.4', true], ['10.1.8', '>=10.0.4', true], ['10.0.1', '=10.0.1', true], ['10.0.1', '=10.1.*', false], ['10.1.1', '<10.2.2', true], ['10.1.1', '<10.0.2', false], ['10.1.1', '<=10.2.2', true], ['10.1.1', '<=10.1.1', true], ['10.1.1', '<=10.0.2', false], ['10.1.1', '>=10.0.2', true], ['10.1.1', '>=10.1.1', true], ['10.1.1', '>=10.2.2', false], ['11.0.0', '>=10.1.1', true], ['3', '3.x.x', true], ['3.3', '3.x.x', true], ['3.3.3', '3.x.x', true], ['3.x.x', '3.3.3', true], ['3.3.3', '3.X.X', true], ['3.3.3', '3.3.x', true], ['3.3.3', '3.*.*', true], ['3.3.3', '3.3.*', true], ['3.0.3', '3.0.*', true], ['1.1.0', '1.2.x', false], ['1.1.0', '2.x.x', false], ['2.0.0', '<2.x.x', false], ['2.0.0', '<=2.x.x', true], ['2.0.0', '>2.x.x', false], ]); describe('pre-release versions - https://semver.org/#spec-item-9', () => { runTests([ ['1.2.3-beta.4', '~1.2.3-beta.2', true], ['1.2.3-beta.1', '~1.2.3-beta.2', false], ['1.2.4-beta.2', '~1.2.3-beta.2', false], ['1.2.3-beta.4', '^1.2.3-beta.2', true], ['1.2.4-beta.2', '^1.2.3-beta.2', false], ['2.0.0', '^1.2.3-beta.2', false], ['0.0.3-beta.2', '^0.0.3-beta', true], ['0.0.3-pr.2', '^0.0.3-beta', true], ['0.0.4', '^0.0.3-beta', false], ]); }); describe('comparator sets - https://docs.npmjs.com/cli/v6/using-npm/semver#ranges', () => { runTests([ ['1.1.0', '>=1.2.7 <1.3.0', false], ['1.2.9', '>=1.2.7 <1.3.0', true], ['1.3.0', '>=1.2.7 <1.3.0', false], ['1.2.9', ' >=1.2.7 <1.3.0 ', true], ['1.3.0', ' >=1.2.7 <1.3.0 ', false], ['1.2.7', '1.2.7 || >=1.2.9 <2.0.0', true], ['1.2.9', '1.2.7 || >=1.2.9 <2.0.0', true], ['1.4.6', '1.2.7 || >=1.2.9 <2.0.0', true], ['1.2.8', '1.2.7 || >=1.2.9 <2.0.0', false], ['2.0.0', '1.2.7 || >=1.2.9 <2.0.0', false], ['2.0.0', '1.2.7 || >=1.2.9 <2.0.0', false], ['1.4.6', ' 1.2.7 || >=1.2.9 <2.0.0 ', true], ['2.0.0', ' 1.2.7 || >=1.2.9 <2.0.0 ', false], ['1.0.0', '1.2.3 - 2.3.4', false], ['1.2.3', '1.2.3 - 2.3.4', true], ['1.5.1', '1.2.3 - 2.3.4', true], ['2.3.4', '1.2.3 - 2.3.4', true], ['2.4.0', '1.2.3 - 2.3.4', false], ['12.25.0', '^12.22.0 || ^14.17.0 || >=16.0.0', true], ['14.25.0', '^12.22.0 || ^14.17.0 || >=16.0.0', true], ['17', '^12.22.0 || ^14.17.0 || >=16.0.0', true], ['15', '^12.22.0 || ^14.17.0 || >=16.0.0', false], ]); }); describe('malformed input - https://docs.npmjs.com/cli/v6/using-npm/semver#hyphen-ranges-xyz---abc', () => { runTests([ ['1.2.3', '> 1.2.3', false], ['1.2.4', '> 1.2.3', true], ['1.2.3', '> 1.2.3 < 1.2.5', false], ['1.2.4', '> 1.2.3 < 1.2.5', true], ['0.0.0', '> 1.2.3 <= 1.2.5 || 0.0.0', true], ['1.2.5', '> 1.2.3 <= 1.2.5 || 0.0.0', true], ['1.3.0', '> 1.2.3 <= 1.2.5 || 0.0.0', false], ]); }); }); omichelsen-compare-versions-497a7e0/test/sort.ts000066400000000000000000000017371464451513000220250ustar00rootroot00000000000000import assert from 'assert'; import { compareVersions } from '../src/index'; describe('sort versions', function () { it('should sort versions', function () { const versions = [ '1.2.3', '4.11.6', '4.2.0', '1.5.19', '1.5.5', '4.1.3', '2.3.1', '10.5.5', '11.3.0', ]; assert.deepEqual(versions.sort(compareVersions), [ '1.2.3', '1.5.5', '1.5.19', '2.3.1', '4.1.3', '4.2.0', '4.11.6', '10.5.5', '11.3.0', ]); }); it('should sort different digits', function () { const versions = ['1.0', '1.0.0', '1.0.1']; assert.deepEqual(versions.sort(compareVersions), ['1.0', '1.0.0', '1.0.1']); }); it('should sort pre-release', function () { const versions = ['1.0.0', '1.0.1', '1.0.1-gamma', '1.0.1-alpha']; assert.deepEqual(versions.sort(compareVersions), [ '1.0.0', '1.0.1-alpha', '1.0.1-gamma', '1.0.1', ]); }); }); omichelsen-compare-versions-497a7e0/test/validate.ts000066400000000000000000000057641464451513000226330ustar00rootroot00000000000000import assert from 'assert'; import { validate, validateStrict } from '../src/index'; describe('validate versions', () => { ( [ [undefined, false], [null, false], [42, false], [{}, false], [[], false], [() => undefined, false], ['foo', false], ['6.3.', false], ['1.2.3a', false], ['1.2.-3a', false], ['v1.0.0', true], ['01.0.0', true], ['1.0.x', true], ['1.0.0-rc.1', true], ['1.0.0-alpha', true], ['1.0.0-build.3928', true], ['1.0.0+20130313144700', true], ['1.2.3.100', true], ['2020', true], ['=1.0', false], ['>1.0.0', false], ] as const ).forEach(([v, expected]) => { it(`${v}`, () => { assert.equal(validate(v as any), expected); }); }); }); describe('validateStrict - https://regex101.com/r/vkijKf/1/', () => { describe('valid', () => { [ '0.0.4', '1.2.3', '10.20.30', '1.1.2-prerelease+meta', '1.1.2+meta', '1.1.2+meta-valid', '1.0.0-alpha', '1.0.0-beta', '1.0.0-alpha.beta', '1.0.0-alpha.beta.1', '1.0.0-alpha.1', '1.0.0-alpha0.valid', '1.0.0-alpha.0valid', '1.0.0-alpha-a.b-c-somethinglong+build.1-aef.1-its-okay', '1.0.0-rc.1+build.1', '2.0.0-rc.1+build.123', '1.2.3-beta', '10.2.3-DEV-SNAPSHOT', '1.2.3-SNAPSHOT-123', '1.0.0', '2.0.0', '1.1.7', '2.0.0+build.1848', '2.0.1-alpha.1227', '1.0.0-alpha+beta', '1.2.3----RC-SNAPSHOT.12.9.1--.12+788', '1.2.3----R-S.12.9.1--.12+meta', '1.2.3----RC-SNAPSHOT.12.9.1--.12', '1.0.0+0.build.1-rc.10000aaa-kk-0.1', '99999999999999999999999.999999999999999999.99999999999999999', '1.0.0-0A.is.legal', ].forEach((v) => { it(`${v}`, () => { assert.equal(validateStrict(v), true); }); }); }); describe('invalid', () => { [ '1', '1.2', '1.2.3-0123', '1.2.3-0123.0123', '1.1.2+.123', '+invalid', '-invalid', '-invalid+invalid', '-invalid.01', 'alpha', 'alpha.beta', 'alpha.beta.1', 'alpha.1', 'alpha+beta', 'alpha_beta', 'alpha.', 'alpha..', 'beta', '1.0.0-alpha_beta', '-alpha.', '1.0.0-alpha..', '1.0.0-alpha..1', '1.0.0-alpha...1', '1.0.0-alpha....1', '1.0.0-alpha.....1', '1.0.0-alpha......1', '1.0.0-alpha.......1', '01.1.1', '1.01.1', '1.1.01', '1.2', '1.2.3.DEV', '1.2-SNAPSHOT', '1.2.31.2.3----RC-SNAPSHOT.12.09.1--..12+788', '1.2-RC-SNAPSHOT', '-1.0.3-gamma+b7718', '+justmeta', '9.8.7+meta+meta', '9.8.7-whatever+meta+meta', '99999999999999999999999.999999999999999999.99999999999999999----RC-SNAPSHOT.12.09.1--------------------------------..', '12', ].forEach((v) => { it(`${v}`, () => { assert.equal(validateStrict(v), false); }); }); }); }); omichelsen-compare-versions-497a7e0/tsconfig.json000066400000000000000000000005761464451513000222160ustar00rootroot00000000000000{ "compilerOptions": { "declaration": true, "esModuleInterop": true, "module": "UMD", "noUnusedLocals": true, "noUnusedParameters": true, "outDir": ".", "sourceMap": true, "strict": true, "target": "ES5" }, "include": ["src/index.ts"], "exclude": ["./src/test/**/*", "node_modules"], "ts-node": { "experimentalResolver": true } }