aboutsummaryrefslogtreecommitdiffstats
path: root/vanilla/node_modules/semver/ranges/simplify.js
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-14 14:46:37 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-14 14:46:37 -0800
commitafa87af01c79a9baa539f2992d32154d2a4739bd (patch)
tree92c7416db734270a2fee1d72ee9cc119379ff8e1 /vanilla/node_modules/semver/ranges/simplify.js
parent3b927e84d200402281f68181cd4253bc77e5528d (diff)
downloadneko-afa87af01c79a9baa539f2992d32154d2a4739bd.tar.gz
neko-afa87af01c79a9baa539f2992d32154d2a4739bd.tar.bz2
neko-afa87af01c79a9baa539f2992d32154d2a4739bd.zip
task: delete vanilla js prototype\n\n- Removed vanilla/ directory and web/dist/vanilla directory\n- Updated Makefile, Dockerfile, and CI workflow to remove vanilla references\n- Cleaned up web/web.go to remove vanilla embed and routes\n- Verified build and tests pass\n\nCloses NK-2tcnmq
Diffstat (limited to 'vanilla/node_modules/semver/ranges/simplify.js')
-rw-r--r--vanilla/node_modules/semver/ranges/simplify.js49
1 files changed, 0 insertions, 49 deletions
diff --git a/vanilla/node_modules/semver/ranges/simplify.js b/vanilla/node_modules/semver/ranges/simplify.js
deleted file mode 100644
index 262732e..0000000
--- a/vanilla/node_modules/semver/ranges/simplify.js
+++ /dev/null
@@ -1,49 +0,0 @@
-'use strict'
-
-// given a set of versions and a range, create a "simplified" range
-// that includes the same versions that the original range does
-// If the original range is shorter than the simplified one, return that.
-const satisfies = require('../functions/satisfies.js')
-const compare = require('../functions/compare.js')
-module.exports = (versions, range, options) => {
- const set = []
- let first = null
- let prev = null
- const v = versions.sort((a, b) => compare(a, b, options))
- for (const version of v) {
- const included = satisfies(version, range, options)
- if (included) {
- prev = version
- if (!first) {
- first = version
- }
- } else {
- if (prev) {
- set.push([first, prev])
- }
- prev = null
- first = null
- }
- }
- if (first) {
- set.push([first, null])
- }
-
- const ranges = []
- for (const [min, max] of set) {
- if (min === max) {
- ranges.push(min)
- } else if (!max && min === v[0]) {
- ranges.push('*')
- } else if (!max) {
- ranges.push(`>=${min}`)
- } else if (min === v[0]) {
- ranges.push(`<=${max}`)
- } else {
- ranges.push(`${min} - ${max}`)
- }
- }
- const simplified = ranges.join(' || ')
- const original = typeof range.raw === 'string' ? range.raw : String(range)
- return simplified.length < original.length ? simplified : range
-}