{"name":"bare-semver","version":"1.1.0","description":"Minimal semantic versioning library for Bare","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package":"./package.json","./constants":"./lib/constants.js","./errors":"./lib/errors.js","./version":"./lib/version.js","./range":"./lib/range.js","./comparator":"./lib/comparator.js"},"scripts":{"format":"prettier --write . && lunte --fix","lint":"prettier --check . && lunte","test":"brittle-bare --coverage test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/bare-semver.git"},"author":{"name":"Holepunch"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/bare-semver/issues"},"homepage":"https://github.com/holepunchto/bare-semver#readme","devDependencies":{"brittle":"^3.2.1","lunte":"^1.6.0","prettier":"^3.4.2","prettier-config-holepunch":"^2.0.0"},"gitHead":"25db5754521e65ccf1a32eff55a4e53f663744a9","types":"./index.d.ts","_id":"bare-semver@1.1.0","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-1Hw5qJ7hXdVt3uPUqjeFTuxyvBUJauvz5A1I2jk8gzjZMHp04n//6nV9MDbG9CMw78JHY2lGV0w6s//LrASm2w==","shasum":"8c12d350673ee1413969039f05546aa2023ec210","tarball":"http://registry-npm.ywwl.com/bare-semver/download/bare-semver-1.1.0.tgz","fileCount":10,"unpackedSize":31573,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/bare-semver@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDnOPa6fxYczp8/1CTqMlDGUOBlreeLEFCVV+Q4mSYXZQIgRA3iCAg73y7d4TMX53xqLRaGkQusYXYO+W9T93xDEng="}],"size":9648,"noattachment":false,"key":"/bare-semver/-/bare-semver-1.1.0.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1e9491cd-ffcb-4e1f-b4db-a30eb1bd8eb2"}},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bare-semver_1.1.0_1782198976600_0.5077812148492618"},"_hasShrinkwrap":false,"readme":"# bare-semver\n\nMinimal semantic versioning library for Bare.\n\n```\nnpm i bare-semver\n```\n\n## Usage\n\n```js\nconst semver = require('bare-semver')\n\nconst version = semver.Version.parse('1.2.3-alpha.1+build.42')\n\nconsole.log(version.major) // 1\nconsole.log(version.minor) // 2\nconsole.log(version.patch) // 3\n\nconst satisfied = semver.satisfies('1.2.3', '>=1.0.0 <2.0.0')\n\nconsole.log(satisfied) // true\n```\n\n## API\n\n#### `const satisfied = semver.satisfies(version, range)`\n\nTest whether `version` satisfies `range`. Both `version` and `range` may be strings, in which case they will be parsed.\n\n#### `semver.constants`\n\nAn object containing the comparison operator constants:\n\n```js\nconstants = {\n  EQ: 1,\n  LT: 2,\n  LTE: 3,\n  GT: 4,\n  GTE: 5\n}\n```\n\n#### `semver.errors`\n\nThe `SemVerError` class. Thrown when parsing invalid versions or ranges.\n\n#### `const version = new semver.Version(major, minor, patch[, options])`\n\nCreate a new version with the given `major`, `minor`, and `patch` components.\n\nOptions include:\n\n```js\noptions = {\n  prerelease: [],\n  build: []\n}\n```\n\n#### `version.major`\n\nThe major version number.\n\n#### `version.minor`\n\nThe minor version number.\n\n#### `version.patch`\n\nThe patch version number.\n\n#### `version.prerelease`\n\nAn array of prerelease tags.\n\n#### `version.build`\n\nAn array of build metadata tags.\n\n#### `const result = version.compare(other)`\n\nCompare `version` with `other`, returning `1` if `version` is greater, `-1` if less, or `0` if equal. Comparison follows the Semantic Versioning 2.0.0 specification, including prerelease precedence rules.\n\n#### `const string = version.toString()`\n\nReturn the string representation of `version`.\n\n#### `const version = semver.Version.parse(input)`\n\nParse a semantic version string into a `Version` instance. Throws a `SemVerError` with code `INVALID_VERSION` if `input` is not a valid version string.\n\n#### `const result = semver.Version.compare(a, b)`\n\nCompare two `Version` instances, returning `1`, `-1`, or `0`.\n\n#### `const comparator = new semver.Comparator(operator, version)`\n\nCreate a new comparator with the given `operator` constant and `version`.\n\n#### `comparator.operator`\n\nThe comparison operator constant.\n\n#### `comparator.version`\n\nThe `Version` instance to compare against.\n\n#### `const satisfied = comparator.test(version)`\n\nTest whether `version` satisfies the comparator.\n\n#### `const string = comparator.toString()`\n\nReturn the string representation of the comparator, e.g. `>=1.0.0`.\n\n#### `const range = new semver.Range([comparators])`\n\nCreate a new range from a two-dimensional array of `Comparator` instances. Each inner array represents a set of comparators joined by intersection, and the outer array represents the union of those sets.\n\n#### `range.comparators`\n\nThe two-dimensional array of `Comparator` instances.\n\n#### `const satisfied = range.test(version)`\n\nTest whether `version` satisfies the range.\n\n#### `const string = range.toString()`\n\nReturn the string representation of the range.\n\n#### `const range = semver.Range.parse(input)`\n\nParse a range string into a `Range` instance. Supports the following syntax, which is desugared into sets of comparators following the [npm advanced range syntax](https://www.npmjs.com/package/semver#advanced-range-syntax):\n\n- Comparison operators: `<`, `<=`, `>`, `>=`, `=`, e.g. `>=1.2.3`.\n- Logical OR of comparator sets: `||`, e.g. `1.2.3 || >=2.0.0`.\n- Caret ranges: `^1.2.3` allows changes that do not modify the left-most non-zero component, e.g. `^1.2.3` is `>=1.2.3 <2.0.0-0` and `^0.2.3` is `>=0.2.3 <0.3.0-0`.\n- Tilde ranges: `~1.2.3` allows patch-level changes if a minor version is specified and minor-level changes if not, e.g. `~1.2.3` is `>=1.2.3 <1.3.0-0` and `~1` is `>=1.0.0 <2.0.0-0`. `~>` is accepted as an alias for `~`.\n- X-ranges: `x`, `X`, or `*` stand in for a component, e.g. `1.2.x` is `>=1.2.0 <1.3.0-0` and `*` is `>=0.0.0`. Partial versions such as `1` and `1.2` are treated as X-ranges.\n- Hyphen ranges: `1.2.3 - 2.3.4` specifies an inclusive set, expanding to `>=1.2.3 <=2.3.4`. A partial upper bound caps the range, e.g. `1.2.3 - 2.3` is `>=1.2.3 <2.4.0-0`.\n\n## License\n\nApache-2.0\n","publish_time":1782198976716,"_cnpm_publish_time":1782198976716,"dist-tags":{"latest":"1.1.0"}}