@gjsify/semver 0.3.21 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ var e=Object.defineProperty,__name=(t,n)=>e(t,`name`,{value:n,configurable:!0});export{__name};
package/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- const e=/^(0|[1-9]\d*)$/,t=/^(\d+)\.(\d+)\.(\d+)(?:-((?:[0-9A-Za-z-]+)(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/;function parse(e){try{return new SemVer(e)}catch{return null}}function valid(e){let t=parse(e);return t?t.version:null}function compare(e,t){let n=e instanceof SemVer?e:new SemVer(e),r=t instanceof SemVer?t:new SemVer(t);return n.compare(r)}function satisfies(e,t){let r=t instanceof n?t:new n(t),i=e instanceof SemVer?e:parse(String(e));return i?r.test(i):!1}function maxSatisfying(e,t){let r=t instanceof n?t:new n(t),i=null;for(let t of e){let e=parse(t);!e||!r.test(e)||(i===null||e.compare(i)>0)&&(i=e)}return i?i.version:null}function minSatisfying(e,t){let r=t instanceof n?t:new n(t),i=null;for(let t of e){let e=parse(t);!e||!r.test(e)||(i===null||e.compare(i)<0)&&(i=e)}return i?i.version:null}function validRange(e){try{return new n(e).format()}catch{return null}}var SemVer=class{major;minor;patch;prerelease;build;version;constructor(n){let r=String(n).trim().replace(/^v/,``),i=t.exec(r);if(!i)throw TypeError(`Invalid Version: ${n}`);this.major=Number(i[1]),this.minor=Number(i[2]),this.patch=Number(i[3]),this.prerelease=i[4]?i[4].split(`.`).map(t=>e.test(t)?Number(t):t):[],this.build=i[5]?i[5].split(`.`):[],this.version=`${this.major}.${this.minor}.${this.patch}`+(this.prerelease.length?`-${this.prerelease.join(`.`)}`:``)+(this.build.length?`+${this.build.join(`.`)}`:``)}compare(e){return this.major===e.major?this.minor===e.minor?this.patch===e.patch?this.comparePre(e):this.patch<e.patch?-1:1:this.minor<e.minor?-1:1:this.major<e.major?-1:1}comparePre(e){let t=this.prerelease,n=e.prerelease;if(t.length===0&&n.length===0)return 0;if(t.length===0)return 1;if(n.length===0)return-1;for(let e=0;;e++){let r=t[e],i=n[e];if(r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;let a=typeof r==`number`,o=typeof i==`number`;return a&&!o?-1:!a&&o?1:r<i?-1:1}}toString(){return this.version}},n=class Range{raw;set;constructor(e){if(e instanceof Range){this.raw=e.raw,this.set=e.set;return}this.raw=String(e).trim();let t=this.raw.split(/\s*\|\|\s*/),n=[];for(let e of t){let t=parseRangePart(e);if(t.length===0)throw TypeError(`Invalid range: ${this.raw}`);n.push(t)}if(n.length===0)throw TypeError(`Invalid range: ${this.raw}`);this.set=n}test(e){let t=e instanceof SemVer?e:parse(String(e));if(!t)return!1;for(let e of this.set)if(e.every(e=>testComparator(e,t))){if(t.prerelease.length>0&&!e.some(e=>e.semver!==null&&e.semver.prerelease.length>0&&e.semver.major===t.major&&e.semver.minor===t.minor&&e.semver.patch===t.patch))continue;return!0}return!1}format(){return this.set.map(e=>e.map(formatComparator).join(` `)).join(` || `)}toString(){return this.format()}};function testComparator(e,t){if(e.semver===null)return!0;let n=t.compare(e.semver);switch(e.operator){case``:case`=`:return n===0;case`<`:return n<0;case`<=`:return n<=0;case`>`:return n>0;case`>=`:return n>=0}}function formatComparator(e){return e.semver===null?`*`:`${e.operator}${e.semver.version}`}function parseRangePart(e){let t=e.trim();if(t===``||t===`*`||t.toLowerCase()===`latest`)return[{operator:`>=`,semver:new SemVer(`0.0.0`)}];let n=t.match(/^\s*(\S+)\s+-\s+(\S+)\s*$/);if(n)return hyphenRange(n[1],n[2]);let r=t.replace(/(<=|>=|<|>|=)\s+(?=\S)/g,`$1`).split(/\s+/),i=[];for(let e of r)i.push(...parseSimple(e));return i}function parseSimple(e){if(e===`*`||e===``||e.toLowerCase()===`latest`)return[{operator:`>=`,semver:new SemVer(`0.0.0`)}];if(e.startsWith(`^`))return caretRange(e.slice(1));if(e.startsWith(`~`))return tildeRange(e.slice(1).replace(/^>/,``));let t=e.match(/^(<=|>=|<|>|=)\s*(.+)$/);if(t){let e=t[1];return primitiveRange(e,t[2])}return partialRange(e)}function parsePartial(e){let t=e.trim().replace(/^v/,``);if(t===``||t===`*`)return{major:null,minor:null,patch:null,pre:``,build:``};let n=``,r=``,i=t,a=i.indexOf(`+`);a>=0&&(r=i.slice(a+1),i=i.slice(0,a));let o=i.indexOf(`-`);o>=0&&(n=i.slice(o+1),i=i.slice(0,o));let s=i.split(`.`),xr=t=>{if(t===void 0||t===``||t===`x`||t===`X`||t===`*`)return null;if(!/^\d+$/.test(t))throw TypeError(`Invalid partial version: ${e}`);return Number(t)};return{major:xr(s[0]),minor:xr(s[1]),patch:xr(s[2]),pre:n,build:r}}function partialToVersion(e){return`${e.major??0}.${e.minor??0}.${e.patch??0}${e.pre?`-${e.pre}`:``}${e.build?`+${e.build}`:``}`}function partialRange(e){let t=parsePartial(e);return t.major===null?[{operator:`>=`,semver:new SemVer(`0.0.0`)}]:t.minor===null?[{operator:`>=`,semver:new SemVer(`${t.major}.0.0`)},{operator:`<`,semver:new SemVer(`${t.major+1}.0.0`)}]:t.patch===null?[{operator:`>=`,semver:new SemVer(`${t.major}.${t.minor}.0`)},{operator:`<`,semver:new SemVer(`${t.major}.${t.minor+1}.0`)}]:[{operator:`=`,semver:new SemVer(partialToVersion(t))}]}function caretRange(e){let t=parsePartial(e);if(t.major===null)return[{operator:`>=`,semver:new SemVer(`0.0.0`)}];let n=`${t.major}.${t.minor??0}.${t.patch??0}${t.pre?`-${t.pre}`:``}`,r;return r=t.major>0||t.minor===null?`${t.major+1}.0.0`:t.minor>0||t.patch===null?`0.${t.minor+1}.0`:`0.0.${t.patch+1}`,[{operator:`>=`,semver:new SemVer(n)},{operator:`<`,semver:new SemVer(r)}]}function tildeRange(e){let t=parsePartial(e);if(t.major===null)return[{operator:`>=`,semver:new SemVer(`0.0.0`)}];let n=`${t.major}.${t.minor??0}.${t.patch??0}${t.pre?`-${t.pre}`:``}`,r=t.minor===null?`${t.major+1}.0.0`:`${t.major}.${t.minor+1}.0`;return[{operator:`>=`,semver:new SemVer(n)},{operator:`<`,semver:new SemVer(r)}]}function primitiveRange(e,t){let n=parsePartial(t);return n.major===null?[{operator:`>=`,semver:new SemVer(`0.0.0`)}]:e===`=`||e===``?partialRange(t):e===`>`?n.minor===null?[{operator:`>=`,semver:new SemVer(`${n.major+1}.0.0`)}]:n.patch===null?[{operator:`>=`,semver:new SemVer(`${n.major}.${n.minor+1}.0`)}]:[{operator:`>`,semver:new SemVer(partialToVersion(n))}]:e===`<`?n.minor===null?[{operator:`<`,semver:new SemVer(`${n.major}.0.0`)}]:n.patch===null?[{operator:`<`,semver:new SemVer(`${n.major}.${n.minor}.0`)}]:[{operator:`<`,semver:new SemVer(partialToVersion(n))}]:e===`>=`?[{operator:`>=`,semver:new SemVer(partialToVersion(n))}]:n.minor===null?[{operator:`<`,semver:new SemVer(`${n.major+1}.0.0`)}]:n.patch===null?[{operator:`<`,semver:new SemVer(`${n.major}.${n.minor+1}.0`)}]:[{operator:`<=`,semver:new SemVer(partialToVersion(n))}]}function hyphenRange(e,t){let n=parsePartial(e),r=parsePartial(t),i=n.major===null?{operator:`>=`,semver:new SemVer(`0.0.0`)}:{operator:`>=`,semver:new SemVer(`${n.major}.${n.minor??0}.${n.patch??0}${n.pre?`-${n.pre}`:``}`)},a;return a=r.major===null?{operator:`>=`,semver:new SemVer(`0.0.0`)}:r.minor===null?{operator:`<`,semver:new SemVer(`${r.major+1}.0.0`)}:r.patch===null?{operator:`<`,semver:new SemVer(`${r.major}.${r.minor+1}.0`)}:{operator:`<=`,semver:new SemVer(`${r.major}.${r.minor}.${r.patch}${r.pre?`-${r.pre}`:``}`)},[i,a]}export{n as Range,SemVer,compare,maxSatisfying,minSatisfying,parse,satisfies,valid,validRange};
1
+ import"./_virtual/_rolldown/runtime.js";const e=/^(0|[1-9]\d*)$/,t=/^(\d+)\.(\d+)\.(\d+)(?:-((?:[0-9A-Za-z-]+)(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/;function parse(e){try{return new SemVer(e)}catch{return null}}function valid(e){let t=parse(e);return t?t.version:null}function compare(e,t){let n=e instanceof SemVer?e:new SemVer(e),r=t instanceof SemVer?t:new SemVer(t);return n.compare(r)}function satisfies(e,t){let r=t instanceof n?t:new n(t),i=e instanceof SemVer?e:parse(String(e));return i?r.test(i):!1}function maxSatisfying(e,t){let r=t instanceof n?t:new n(t),i=null;for(let t of e){let e=parse(t);!e||!r.test(e)||(i===null||e.compare(i)>0)&&(i=e)}return i?i.version:null}function minSatisfying(e,t){let r=t instanceof n?t:new n(t),i=null;for(let t of e){let e=parse(t);!e||!r.test(e)||(i===null||e.compare(i)<0)&&(i=e)}return i?i.version:null}function validRange(e){try{return new n(e).format()}catch{return null}}var SemVer=class{major;minor;patch;prerelease;build;version;constructor(n){let r=String(n).trim().replace(/^v/,``),i=t.exec(r);if(!i)throw TypeError(`Invalid Version: ${n}`);this.major=Number(i[1]),this.minor=Number(i[2]),this.patch=Number(i[3]),this.prerelease=i[4]?i[4].split(`.`).map(t=>e.test(t)?Number(t):t):[],this.build=i[5]?i[5].split(`.`):[],this.version=`${this.major}.${this.minor}.${this.patch}`+(this.prerelease.length?`-${this.prerelease.join(`.`)}`:``)+(this.build.length?`+${this.build.join(`.`)}`:``)}compare(e){return this.major===e.major?this.minor===e.minor?this.patch===e.patch?this.comparePre(e):this.patch<e.patch?-1:1:this.minor<e.minor?-1:1:this.major<e.major?-1:1}comparePre(e){let t=this.prerelease,n=e.prerelease;if(t.length===0&&n.length===0)return 0;if(t.length===0)return 1;if(n.length===0)return-1;for(let e=0;;e++){let r=t[e],i=n[e];if(r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;let a=typeof r==`number`,o=typeof i==`number`;return a&&!o?-1:!a&&o?1:r<i?-1:1}}toString(){return this.version}},n=class Range{raw;set;constructor(e){if(e instanceof Range){this.raw=e.raw,this.set=e.set;return}this.raw=String(e).trim();let t=this.raw.split(/\s*\|\|\s*/),n=[];for(let e of t){let t=parseRangePart(e);if(t.length===0)throw TypeError(`Invalid range: ${this.raw}`);n.push(t)}if(n.length===0)throw TypeError(`Invalid range: ${this.raw}`);this.set=n}test(e){let t=e instanceof SemVer?e:parse(String(e));if(!t)return!1;for(let e of this.set)if(e.every(e=>testComparator(e,t))){if(t.prerelease.length>0&&!e.some(e=>e.semver!==null&&e.semver.prerelease.length>0&&e.semver.major===t.major&&e.semver.minor===t.minor&&e.semver.patch===t.patch))continue;return!0}return!1}format(){return this.set.map(e=>e.map(formatComparator).join(` `)).join(` || `)}toString(){return this.format()}};function testComparator(e,t){if(e.semver===null)return!0;let n=t.compare(e.semver);switch(e.operator){case``:case`=`:return n===0;case`<`:return n<0;case`<=`:return n<=0;case`>`:return n>0;case`>=`:return n>=0}}function formatComparator(e){return e.semver===null?`*`:`${e.operator}${e.semver.version}`}function parseRangePart(e){let t=e.trim();if(t===``||t===`*`||t.toLowerCase()===`latest`)return[{operator:`>=`,semver:new SemVer(`0.0.0`)}];let n=t.match(/^\s*(\S+)\s+-\s+(\S+)\s*$/);if(n)return hyphenRange(n[1],n[2]);let r=t.replace(/(<=|>=|<|>|=)\s+(?=\S)/g,`$1`).split(/\s+/),i=[];for(let e of r)i.push(...parseSimple(e));return i}function parseSimple(e){if(e===`*`||e===``||e.toLowerCase()===`latest`)return[{operator:`>=`,semver:new SemVer(`0.0.0`)}];if(e.startsWith(`^`))return caretRange(e.slice(1));if(e.startsWith(`~`))return tildeRange(e.slice(1).replace(/^>/,``));let t=e.match(/^(<=|>=|<|>|=)\s*(.+)$/);if(t){let e=t[1];return primitiveRange(e,t[2])}return partialRange(e)}function parsePartial(e){let t=e.trim().replace(/^v/,``);if(t===``||t===`*`)return{major:null,minor:null,patch:null,pre:``,build:``};let n=``,r=``,i=t,a=i.indexOf(`+`);a>=0&&(r=i.slice(a+1),i=i.slice(0,a));let o=i.indexOf(`-`);o>=0&&(n=i.slice(o+1),i=i.slice(0,o));let s=i.split(`.`),xr=t=>{if(t===void 0||t===``||t===`x`||t===`X`||t===`*`)return null;if(!/^\d+$/.test(t))throw TypeError(`Invalid partial version: ${e}`);return Number(t)};return{major:xr(s[0]),minor:xr(s[1]),patch:xr(s[2]),pre:n,build:r}}function partialToVersion(e){return`${e.major??0}.${e.minor??0}.${e.patch??0}${e.pre?`-${e.pre}`:``}${e.build?`+${e.build}`:``}`}function partialRange(e){let t=parsePartial(e);return t.major===null?[{operator:`>=`,semver:new SemVer(`0.0.0`)}]:t.minor===null?[{operator:`>=`,semver:new SemVer(`${t.major}.0.0`)},{operator:`<`,semver:new SemVer(`${t.major+1}.0.0`)}]:t.patch===null?[{operator:`>=`,semver:new SemVer(`${t.major}.${t.minor}.0`)},{operator:`<`,semver:new SemVer(`${t.major}.${t.minor+1}.0`)}]:[{operator:`=`,semver:new SemVer(partialToVersion(t))}]}function caretRange(e){let t=parsePartial(e);if(t.major===null)return[{operator:`>=`,semver:new SemVer(`0.0.0`)}];let n=`${t.major}.${t.minor??0}.${t.patch??0}${t.pre?`-${t.pre}`:``}`,r;return r=t.major>0||t.minor===null?`${t.major+1}.0.0`:t.minor>0||t.patch===null?`0.${t.minor+1}.0`:`0.0.${t.patch+1}`,[{operator:`>=`,semver:new SemVer(n)},{operator:`<`,semver:new SemVer(r)}]}function tildeRange(e){let t=parsePartial(e);if(t.major===null)return[{operator:`>=`,semver:new SemVer(`0.0.0`)}];let n=`${t.major}.${t.minor??0}.${t.patch??0}${t.pre?`-${t.pre}`:``}`,r=t.minor===null?`${t.major+1}.0.0`:`${t.major}.${t.minor+1}.0`;return[{operator:`>=`,semver:new SemVer(n)},{operator:`<`,semver:new SemVer(r)}]}function primitiveRange(e,t){let n=parsePartial(t);return n.major===null?[{operator:`>=`,semver:new SemVer(`0.0.0`)}]:e===`=`||e===``?partialRange(t):e===`>`?n.minor===null?[{operator:`>=`,semver:new SemVer(`${n.major+1}.0.0`)}]:n.patch===null?[{operator:`>=`,semver:new SemVer(`${n.major}.${n.minor+1}.0`)}]:[{operator:`>`,semver:new SemVer(partialToVersion(n))}]:e===`<`?n.minor===null?[{operator:`<`,semver:new SemVer(`${n.major}.0.0`)}]:n.patch===null?[{operator:`<`,semver:new SemVer(`${n.major}.${n.minor}.0`)}]:[{operator:`<`,semver:new SemVer(partialToVersion(n))}]:e===`>=`?[{operator:`>=`,semver:new SemVer(partialToVersion(n))}]:n.minor===null?[{operator:`<`,semver:new SemVer(`${n.major+1}.0.0`)}]:n.patch===null?[{operator:`<`,semver:new SemVer(`${n.major}.${n.minor+1}.0`)}]:[{operator:`<=`,semver:new SemVer(partialToVersion(n))}]}function hyphenRange(e,t){let n=parsePartial(e),r=parsePartial(t),i=n.major===null?{operator:`>=`,semver:new SemVer(`0.0.0`)}:{operator:`>=`,semver:new SemVer(`${n.major}.${n.minor??0}.${n.patch??0}${n.pre?`-${n.pre}`:``}`)},a;return a=r.major===null?{operator:`>=`,semver:new SemVer(`0.0.0`)}:r.minor===null?{operator:`<`,semver:new SemVer(`${r.major+1}.0.0`)}:r.patch===null?{operator:`<`,semver:new SemVer(`${r.major}.${r.minor+1}.0`)}:{operator:`<=`,semver:new SemVer(`${r.major}.${r.minor}.${r.patch}${r.pre?`-${r.pre}`:``}`)},[i,a]}export{n as Range,SemVer,compare,maxSatisfying,minSatisfying,parse,satisfies,valid,validRange};
@@ -1 +1 @@
1
- {"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../../node_modules/typescript/lib/lib.es2024.d.ts","../../../../node_modules/typescript/lib/lib.es2025.d.ts","../../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../../../node_modules/typescript/lib/lib.es2025.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2025.float16.d.ts","../../../../node_modules/typescript/lib/lib.es2025.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2025.iterator.d.ts","../../../../node_modules/typescript/lib/lib.es2025.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2025.regexp.d.ts","../../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../../node_modules/typescript/lib/lib.esnext.date.d.ts","../../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../node_modules/typescript/lib/lib.esnext.error.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.esnext.temporal.d.ts","../../../../node_modules/typescript/lib/lib.esnext.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/typescript/lib/lib.esnext.full.d.ts","../src/index.ts"],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"1e9332c23e9a907175e0ffc6a49e236f97b48838cc8aec9ce7e4cec21e544b65","impliedFormat":1},{"version":"3753fbc1113dc511214802a2342280a8b284ab9094f6420e7aa171e868679f91","impliedFormat":1},{"version":"999ca32883495a866aa5737fe1babc764a469e4cde6ee6b136a4b9ae68853e4b","impliedFormat":1},{"version":"17f13ecb98cbc39243f2eee1f16d45cd8ec4706b03ee314f1915f1a8b42f6984","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"2a2de5b9459b3fc44decd9ce6100b72f1b002ef523126c1d3d8b2a4a63d74d78","affectsGlobalScope":true,"impliedFormat":1},{"version":"f13f4b465c99041e912db5c44129a94588e1aafee35a50eab51044833f50b4ee","affectsGlobalScope":true,"impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bd714129fca875f7d4c477a1a392200b0bcd13fb2e80928cd334b63830ea047","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2c9037ae6cd2c52d80ceef0b3c5ffdb488627d71529cf4f63776daf11161c9a","affectsGlobalScope":true,"impliedFormat":1},{"version":"135d5cf4d345f59f1a9caadfafcd858d3d9cc68290db616cc85797224448cccc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc238c3f81c2984751932b6aab223cd5b830e0ac6cad76389e5e9d2ffc03287d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4a07f9b76d361f572620927e5735b77d6d2101c23cdd94383eb5b706e7b36357","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c4e8dc6ab834cc6baa0227e030606d29e3e8449a9f67cdf5605ea5493c4db29","affectsGlobalScope":true,"impliedFormat":1},{"version":"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78","affectsGlobalScope":true,"impliedFormat":1},{"version":"6148e4e88d720a06855071c3db02069434142a8332cf9c182cda551adedf3156","affectsGlobalScope":true,"impliedFormat":1},{"version":"d63dba625b108316a40c95a4425f8d4294e0deeccfd6c7e59d819efa19e23409","affectsGlobalScope":true,"impliedFormat":1},{"version":"0568d6befee03dd435bed4fc25c4e46865b24bdcb8c563fdc21f580a2c301904","affectsGlobalScope":true,"impliedFormat":1},{"version":"30d62269b05b584741f19a5369852d5d34895aa2ac4fd948956f886d15f9cc0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f128dae7c44d8f35ee42e0a437000a57c9f06cc04f8b4fb42eebf44954d53dc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"ffbe6d7b295306b2ba88030f65b74c107d8d99bdcf596ea99c62a02f606108b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"996fb27b15277369c68a4ba46ed138b4e9e839a02fb4ec756f7997629242fd9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"79b712591b270d4778c89706ca2cfc56ddb8c3f895840e477388f1710dc5eda9","affectsGlobalScope":true,"impliedFormat":1},{"version":"20884846cef428b992b9bd032e70a4ef88e349263f63aeddf04dda837a7dba26","affectsGlobalScope":true,"impliedFormat":1},{"version":"5fcab789c73a97cd43828ee3cc94a61264cf24d4c44472ce64ced0e0f148bdb2","affectsGlobalScope":true,"impliedFormat":1},{"version":"db59a81f070c1880ad645b2c0275022baa6a0c4f0acdc58d29d349c6efcf0903","affectsGlobalScope":true,"impliedFormat":1},{"version":"673294292640f5722b700e7d814e17aaf7d93f83a48a2c9b38f33cbc940ad8b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d786b48f934cbca483b3c6d0a798cb43bbb4ada283e76fb22c28e53ae05b9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ecb8e347cb6b2a8927c09b86263663289418df375f5e68e11a0ae683776978f","affectsGlobalScope":true,"impliedFormat":1},{"version":"142efd4ce210576f777dc34df121777be89eda476942d6d6663b03dcb53be3ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"379bc41580c2d774f82e828c70308f24a005b490c25ba34d679d84bcf05c3d9d","affectsGlobalScope":true,"impliedFormat":1},{"version":"ed484fb2aa8a1a23d0277056ec3336e0a0b52f9b8d6a961f338a642faf43235d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ffedae1d1c2d53fdbca1c96d3c7dda544281f7d262f99b6880634f8fd8d9820","affectsGlobalScope":true,"impliedFormat":1},{"version":"83a730b125d477dd264df8ba479afab27a3dae7152b005c214ab94dc7ee44fd3","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"ef4a897cd2a3f91000c10264e400b3667c7e51e1b7365f03b62e8081dc53bde6","impliedFormat":1},{"version":"da361ab239b7ac70688ba1322028d2a5829666b0484f672da4b0ab451725a64d","signature":"6b8091108ad58d10b0bd314d33d73ca1d0f4d5a6db9a688ed78da95265b15516"}],"root":[94],"options":{"allowImportingTsExtensions":false,"composite":true,"declaration":true,"declarationDir":"./types","experimentalDecorators":true,"module":99,"outDir":"./esm","rootDir":"../src","skipLibCheck":true,"strict":true,"target":99},"latestChangedDtsFile":"./types/index.d.ts","version":"6.0.3"}
1
+ {"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../../node_modules/typescript/lib/lib.es2024.d.ts","../../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../../node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../../node_modules/typescript/lib/lib.esnext.error.d.ts","../../../../node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/typescript/lib/lib.esnext.full.d.ts","../src/index.ts"],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"2ab096661c711e4a81cc464fa1e6feb929a54f5340b46b0a07ac6bbf857471f0","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7a3c8b952931daebdfc7a2897c53c0a1c73624593fa070e46bd537e64dcd20a","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"196cb558a13d4533a5163286f30b0509ce0210e4b316c56c38d4c0fd2fb38405","affectsGlobalScope":true,"impliedFormat":1},{"version":"73f78680d4c08509933daf80947902f6ff41b6230f94dd002ae372620adb0f60","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5239f5c01bcfa9cd32f37c496cf19c61d69d37e48be9de612b541aac915805b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"bde31fd423cd93b0eff97197a3f66df7c93e8c0c335cbeb113b7ff1ac35c23f4","impliedFormat":1},{"version":"da361ab239b7ac70688ba1322028d2a5829666b0484f672da4b0ab451725a64d","signature":"6b8091108ad58d10b0bd314d33d73ca1d0f4d5a6db9a688ed78da95265b15516"}],"root":[87],"options":{"allowImportingTsExtensions":false,"composite":true,"declaration":true,"declarationDir":"./types","experimentalDecorators":true,"module":99,"outDir":"./esm","rootDir":"../src","skipLibCheck":true,"strict":true,"target":99},"latestChangedDtsFile":"./types/index.d.ts","version":"5.9.3"}
package/package.json CHANGED
@@ -1,40 +1,43 @@
1
1
  {
2
- "name": "@gjsify/semver",
3
- "version": "0.3.21",
4
- "description": "Subset of node-semver for the gjsify install backend — cross-platform Node + GJS",
5
- "type": "module",
6
- "module": "lib/esm/index.js",
7
- "main": "lib/esm/index.js",
8
- "types": "lib/types/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./lib/types/index.d.ts",
12
- "default": "./lib/esm/index.js"
2
+ "name": "@gjsify/semver",
3
+ "version": "0.4.3",
4
+ "description": "Subset of node-semver for the gjsify install backend — cross-platform Node + GJS",
5
+ "type": "module",
6
+ "module": "lib/esm/index.js",
7
+ "main": "lib/esm/index.js",
8
+ "types": "lib/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./lib/types/index.d.ts",
12
+ "default": "./lib/esm/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "lib"
17
+ ],
18
+ "scripts": {
19
+ "clear": "rm -rf lib tsconfig.tsbuildinfo test.gjs.mjs test.node.mjs || exit 0",
20
+ "check": "tsc --noEmit",
21
+ "build": "gjsify run build:gjsify && gjsify run build:types",
22
+ "build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.mts'",
23
+ "build:types": "tsc -p tsconfig.build.json",
24
+ "build:test": "gjsify run build:test:gjs && gjsify run build:test:node",
25
+ "build:test:gjs": "gjsify build src/test.mts --app gjs --outfile test.gjs.mjs",
26
+ "build:test:node": "gjsify build src/test.mts --app node --outfile test.node.mjs",
27
+ "test": "gjsify run build:gjsify && gjsify run build:test && gjsify run test:node && gjsify run test:gjs",
28
+ "test:gjs": "gjsify run test.gjs.mjs",
29
+ "test:node": "node test.node.mjs"
30
+ },
31
+ "keywords": [
32
+ "gjs",
33
+ "node",
34
+ "semver",
35
+ "install"
36
+ ],
37
+ "license": "MIT",
38
+ "devDependencies": {
39
+ "@gjsify/cli": "workspace:^",
40
+ "@gjsify/unit": "workspace:^",
41
+ "typescript": "^6.0.3"
13
42
  }
14
- },
15
- "scripts": {
16
- "clear": "rm -rf lib tsconfig.tsbuildinfo test.gjs.mjs test.node.mjs || exit 0",
17
- "check": "tsc --noEmit",
18
- "build": "yarn build:gjsify && yarn build:types",
19
- "build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.mts'",
20
- "build:types": "tsc -p tsconfig.build.json",
21
- "build:test": "yarn build:test:gjs && yarn build:test:node",
22
- "build:test:gjs": "gjsify build src/test.mts --app gjs --outfile test.gjs.mjs",
23
- "build:test:node": "gjsify build src/test.mts --app node --outfile test.node.mjs",
24
- "test": "yarn build:gjsify && yarn build:test && yarn test:node && yarn test:gjs",
25
- "test:gjs": "gjsify run test.gjs.mjs",
26
- "test:node": "node test.node.mjs"
27
- },
28
- "keywords": [
29
- "gjs",
30
- "node",
31
- "semver",
32
- "install"
33
- ],
34
- "license": "MIT",
35
- "devDependencies": {
36
- "@gjsify/cli": "^0.3.21",
37
- "@gjsify/unit": "^0.3.21",
38
- "typescript": "^6.0.3"
39
- }
40
- }
43
+ }
package/src/index.spec.ts DELETED
@@ -1,210 +0,0 @@
1
- import { describe, it, expect } from "@gjsify/unit";
2
- import {
3
- SemVer,
4
- Range,
5
- parse,
6
- valid,
7
- compare,
8
- satisfies,
9
- maxSatisfying,
10
- minSatisfying,
11
- validRange,
12
- } from "./index.js";
13
-
14
- export default async () => {
15
- await describe("@gjsify/semver — SemVer", async () => {
16
- await it("parses major.minor.patch", async () => {
17
- const v = new SemVer("1.2.3");
18
- expect(v.major).toBe(1);
19
- expect(v.minor).toBe(2);
20
- expect(v.patch).toBe(3);
21
- expect(v.version).toBe("1.2.3");
22
- });
23
-
24
- await it("parses prerelease + build", async () => {
25
- const v = new SemVer("1.2.3-alpha.1+build.7");
26
- expect(v.prerelease.length).toBe(2);
27
- expect(v.prerelease[0]).toBe("alpha");
28
- expect(v.prerelease[1]).toBe(1);
29
- expect(v.build[0]).toBe("build");
30
- expect(v.version).toBe("1.2.3-alpha.1+build.7");
31
- });
32
-
33
- await it("strips leading v", async () => {
34
- expect(new SemVer("v1.2.3").version).toBe("1.2.3");
35
- });
36
-
37
- await it("rejects garbage", async () => {
38
- expect(parse("not-a-version")).toBeNull();
39
- expect(parse("1.2")).toBeNull();
40
- expect(valid("1.2.3.4")).toBeNull();
41
- });
42
-
43
- await it("compares major/minor/patch", async () => {
44
- expect(compare("1.0.0", "2.0.0")).toBe(-1);
45
- expect(compare("1.2.3", "1.2.3")).toBe(0);
46
- expect(compare("1.2.10", "1.2.9")).toBe(1);
47
- });
48
-
49
- await it("non-prerelease > any prerelease", async () => {
50
- expect(compare("1.0.0", "1.0.0-alpha")).toBe(1);
51
- expect(compare("1.0.0-alpha", "1.0.0")).toBe(-1);
52
- });
53
-
54
- await it("compares prerelease tags by parts (numeric < alpha)", async () => {
55
- expect(compare("1.0.0-alpha", "1.0.0-alpha.1")).toBe(-1);
56
- expect(compare("1.0.0-alpha.1", "1.0.0-alpha.2")).toBe(-1);
57
- expect(compare("1.0.0-alpha.10", "1.0.0-alpha.9")).toBe(1);
58
- expect(compare("1.0.0-alpha", "1.0.0-beta")).toBe(-1);
59
- expect(compare("1.0.0-1", "1.0.0-alpha")).toBe(-1); // numeric < alpha
60
- });
61
- });
62
-
63
- await describe("@gjsify/semver — Range", async () => {
64
- await it("caret narrows on 0.x.y", async () => {
65
- const r = new Range("^0.3.7");
66
- expect(r.test(new SemVer("0.3.7"))).toBe(true);
67
- expect(r.test(new SemVer("0.3.99"))).toBe(true);
68
- expect(r.test(new SemVer("0.4.0"))).toBe(false);
69
- expect(r.test(new SemVer("0.3.6"))).toBe(false);
70
- });
71
-
72
- await it("caret on >=1 keeps the major", async () => {
73
- const r = new Range("^1.2.3");
74
- expect(r.test("1.2.3")).toBe(true);
75
- expect(r.test("1.999.999")).toBe(true);
76
- expect(r.test("2.0.0")).toBe(false);
77
- expect(r.test("1.2.2")).toBe(false);
78
- });
79
-
80
- await it("caret 0.0.x is exact", async () => {
81
- const r = new Range("^0.0.3");
82
- expect(r.test("0.0.3")).toBe(true);
83
- expect(r.test("0.0.4")).toBe(false);
84
- });
85
-
86
- await it("tilde", async () => {
87
- const r = new Range("~1.2.3");
88
- expect(r.test("1.2.3")).toBe(true);
89
- expect(r.test("1.2.99")).toBe(true);
90
- expect(r.test("1.3.0")).toBe(false);
91
- expect(r.test("1.2.2")).toBe(false);
92
- });
93
-
94
- await it("x-ranges", async () => {
95
- expect(satisfies("1.2.3", "1.x")).toBe(true);
96
- expect(satisfies("2.0.0", "1.x")).toBe(false);
97
- expect(satisfies("1.2.99", "1.2.x")).toBe(true);
98
- expect(satisfies("1.3.0", "1.2.x")).toBe(false);
99
- });
100
-
101
- await it("primitives", async () => {
102
- expect(satisfies("1.2.3", ">=1.0.0 <2.0.0")).toBe(true);
103
- expect(satisfies("2.0.0", ">=1.0.0 <2.0.0")).toBe(false);
104
- expect(satisfies("1.2.3", ">1.2.2")).toBe(true);
105
- expect(satisfies("1.2.2", ">1.2.2")).toBe(false);
106
- expect(satisfies("1.2.3", "<=1.2.3")).toBe(true);
107
- });
108
-
109
- await it("primitives with whitespace between operator and version", async () => {
110
- // node-semver / npm registry accept both `>=1.2` and `>= 1.2`. The
111
- // spaced form appears in real packuments (e.g. safer-buffer's peer
112
- // range `>= 2.1.2 < 3.0.0`).
113
- expect(satisfies("1.2.3", ">= 1.0.0 < 2.0.0")).toBe(true);
114
- expect(satisfies("2.0.0", ">= 1.0.0 < 2.0.0")).toBe(false);
115
- expect(satisfies("2.1.2", ">= 2.1.2 < 3.0.0")).toBe(true);
116
- expect(satisfies("2.9.9", ">= 2.1.2 < 3.0.0")).toBe(true);
117
- expect(satisfies("3.0.0", ">= 2.1.2 < 3.0.0")).toBe(false);
118
- expect(satisfies("1.2.3", "= 1.2.3")).toBe(true);
119
- expect(new Range(">= 2.1.2 < 3.0.0").test("2.5.0")).toBe(true);
120
- });
121
-
122
- await it("primitives on partial RHS", async () => {
123
- expect(satisfies("2.0.0", ">1")).toBe(true);
124
- expect(satisfies("1.5.0", ">1")).toBe(false);
125
- expect(satisfies("0.9.0", "<1")).toBe(true);
126
- expect(satisfies("1.0.0", "<1")).toBe(false);
127
- expect(satisfies("1.9.9", "<=1")).toBe(true);
128
- expect(satisfies("2.0.0", "<=1")).toBe(false);
129
- });
130
-
131
- await it("hyphen ranges", async () => {
132
- const r = new Range("1.2.3 - 2.3.4");
133
- expect(r.test("1.2.3")).toBe(true);
134
- expect(r.test("2.0.0")).toBe(true);
135
- expect(r.test("2.3.4")).toBe(true);
136
- expect(r.test("2.3.5")).toBe(false);
137
- expect(r.test("1.2.2")).toBe(false);
138
- });
139
-
140
- await it("partial hyphen RHS extends", async () => {
141
- const r = new Range("1.2.3 - 2.3");
142
- expect(r.test("2.3.99")).toBe(true);
143
- expect(r.test("2.4.0")).toBe(false);
144
- });
145
-
146
- await it("OR sets", async () => {
147
- const r = new Range("^1.0.0 || ^2.0.0");
148
- expect(r.test("1.5.0")).toBe(true);
149
- expect(r.test("2.5.0")).toBe(true);
150
- expect(r.test("3.0.0")).toBe(false);
151
- });
152
-
153
- await it("star/* matches anything stable", async () => {
154
- expect(satisfies("0.0.0", "*")).toBe(true);
155
- expect(satisfies("99.99.99", "*")).toBe(true);
156
- });
157
-
158
- await it("rejects prereleases unless explicitly mentioned", async () => {
159
- expect(satisfies("1.2.3-alpha", ">=1.0.0")).toBe(false);
160
- expect(satisfies("1.2.3-alpha", ">=1.2.3-alpha")).toBe(true);
161
- expect(satisfies("1.2.3-beta", ">=1.2.3-alpha")).toBe(true);
162
- // Different mmp tuple — not eligible.
163
- expect(satisfies("1.3.0-beta", ">=1.2.3-alpha")).toBe(false);
164
- });
165
-
166
- await it("validRange formats / rejects garbage", async () => {
167
- expect(validRange("^1.2.3")).toBe(">=1.2.3 <2.0.0");
168
- expect(validRange("not-a-range !!")).toBeNull();
169
- });
170
- });
171
-
172
- await describe("@gjsify/semver — maxSatisfying / minSatisfying", async () => {
173
- const versions = [
174
- "0.0.1",
175
- "0.1.0",
176
- "0.3.6",
177
- "0.3.7",
178
- "0.3.7-rc.1",
179
- "1.0.0",
180
- "1.2.3",
181
- "2.0.0-rc.1",
182
- "2.0.0",
183
- ];
184
-
185
- await it("maxSatisfying ^0.3.0", async () => {
186
- expect(maxSatisfying(versions, "^0.3.0")).toBe("0.3.7");
187
- });
188
-
189
- await it("maxSatisfying ^1.0.0", async () => {
190
- expect(maxSatisfying(versions, "^1.0.0")).toBe("1.2.3");
191
- });
192
-
193
- await it("maxSatisfying *", async () => {
194
- expect(maxSatisfying(versions, "*")).toBe("2.0.0");
195
- });
196
-
197
- await it("minSatisfying >=1", async () => {
198
- expect(minSatisfying(versions, ">=1")).toBe("1.0.0");
199
- });
200
-
201
- await it("returns null for empty match", async () => {
202
- expect(maxSatisfying(versions, "^9.0.0")).toBeNull();
203
- expect(minSatisfying([], "*")).toBeNull();
204
- });
205
-
206
- await it("ignores invalid version strings", async () => {
207
- expect(maxSatisfying(["1.0.0", "garbage", "1.1.0"], "^1.0.0")).toBe("1.1.0");
208
- });
209
- });
210
- };
package/src/index.ts DELETED
@@ -1,392 +0,0 @@
1
- // SemVer - subset of node-semver for the gjsify install backend.
2
- // Implements parse, compare, satisfies, maxSatisfying, minSatisfying, and Range
3
- // for caret/tilde/hyphen/x/star/comparator/OR ranges.
4
- // Reference: https://semver.org/spec/v2.0.0.html and refs/npm-cli/.../semver/.
5
-
6
- const NUM_RE = /^(0|[1-9]\d*)$/;
7
- const SEMVER_RE =
8
- /^(\d+)\.(\d+)\.(\d+)(?:-((?:[0-9A-Za-z-]+)(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/;
9
-
10
- export type ReleaseType = "major" | "minor" | "patch";
11
-
12
- export function parse(version: string): SemVer | null {
13
- try {
14
- return new SemVer(version);
15
- } catch {
16
- return null;
17
- }
18
- }
19
-
20
- export function valid(version: string): string | null {
21
- const v = parse(version);
22
- return v ? v.version : null;
23
- }
24
-
25
- export function compare(a: string | SemVer, b: string | SemVer): -1 | 0 | 1 {
26
- const av = a instanceof SemVer ? a : new SemVer(a);
27
- const bv = b instanceof SemVer ? b : new SemVer(b);
28
- return av.compare(bv);
29
- }
30
-
31
- export function satisfies(version: string | SemVer, range: string | Range): boolean {
32
- const r = range instanceof Range ? range : new Range(range);
33
- const v = version instanceof SemVer ? version : parse(String(version));
34
- if (!v) return false;
35
- return r.test(v);
36
- }
37
-
38
- export function maxSatisfying(versions: ReadonlyArray<string>, range: string | Range): string | null {
39
- const r = range instanceof Range ? range : new Range(range);
40
- let best: SemVer | null = null;
41
- for (const raw of versions) {
42
- const v = parse(raw);
43
- if (!v || !r.test(v)) continue;
44
- if (best === null || v.compare(best) > 0) best = v;
45
- }
46
- return best ? best.version : null;
47
- }
48
-
49
- export function minSatisfying(versions: ReadonlyArray<string>, range: string | Range): string | null {
50
- const r = range instanceof Range ? range : new Range(range);
51
- let best: SemVer | null = null;
52
- for (const raw of versions) {
53
- const v = parse(raw);
54
- if (!v || !r.test(v)) continue;
55
- if (best === null || v.compare(best) < 0) best = v;
56
- }
57
- return best ? best.version : null;
58
- }
59
-
60
- export function validRange(range: string): string | null {
61
- try {
62
- return new Range(range).format();
63
- } catch {
64
- return null;
65
- }
66
- }
67
-
68
- export class SemVer {
69
- readonly major: number;
70
- readonly minor: number;
71
- readonly patch: number;
72
- readonly prerelease: ReadonlyArray<string | number>;
73
- readonly build: ReadonlyArray<string>;
74
- readonly version: string;
75
-
76
- constructor(version: string) {
77
- const trimmed = String(version).trim().replace(/^v/, "");
78
- const m = SEMVER_RE.exec(trimmed);
79
- if (!m) throw new TypeError(`Invalid Version: ${version}`);
80
- this.major = Number(m[1]);
81
- this.minor = Number(m[2]);
82
- this.patch = Number(m[3]);
83
- this.prerelease = m[4]
84
- ? m[4].split(".").map((id) => (NUM_RE.test(id) ? Number(id) : id))
85
- : [];
86
- this.build = m[5] ? m[5].split(".") : [];
87
- this.version =
88
- `${this.major}.${this.minor}.${this.patch}` +
89
- (this.prerelease.length ? `-${this.prerelease.join(".")}` : "") +
90
- (this.build.length ? `+${this.build.join(".")}` : "");
91
- }
92
-
93
- compare(other: SemVer): -1 | 0 | 1 {
94
- if (this.major !== other.major) return this.major < other.major ? -1 : 1;
95
- if (this.minor !== other.minor) return this.minor < other.minor ? -1 : 1;
96
- if (this.patch !== other.patch) return this.patch < other.patch ? -1 : 1;
97
- return this.comparePre(other);
98
- }
99
-
100
- comparePre(other: SemVer): -1 | 0 | 1 {
101
- const a = this.prerelease;
102
- const b = other.prerelease;
103
- if (a.length === 0 && b.length === 0) return 0;
104
- if (a.length === 0) return 1;
105
- if (b.length === 0) return -1;
106
- for (let i = 0; ; i++) {
107
- const x = a[i];
108
- const y = b[i];
109
- if (x === undefined && y === undefined) return 0;
110
- if (y === undefined) return 1;
111
- if (x === undefined) return -1;
112
- if (x === y) continue;
113
- const xn = typeof x === "number";
114
- const yn = typeof y === "number";
115
- if (xn && !yn) return -1;
116
- if (!xn && yn) return 1;
117
- return x < y ? -1 : 1;
118
- }
119
- }
120
-
121
- toString(): string {
122
- return this.version;
123
- }
124
- }
125
-
126
- interface Comparator {
127
- operator: "" | "<" | ">" | "<=" | ">=" | "=";
128
- semver: SemVer | null;
129
- }
130
-
131
- export class Range {
132
- readonly raw: string;
133
- readonly set: ReadonlyArray<ReadonlyArray<Comparator>>;
134
-
135
- constructor(range: string | Range) {
136
- if (range instanceof Range) {
137
- this.raw = range.raw;
138
- this.set = range.set;
139
- return;
140
- }
141
- this.raw = String(range).trim();
142
- const sets = this.raw.split(/\s*\|\|\s*/);
143
- const parsed: Comparator[][] = [];
144
- for (const part of sets) {
145
- const c = parseRangePart(part);
146
- if (c.length === 0) {
147
- throw new TypeError(`Invalid range: ${this.raw}`);
148
- }
149
- parsed.push(c);
150
- }
151
- if (parsed.length === 0) {
152
- throw new TypeError(`Invalid range: ${this.raw}`);
153
- }
154
- this.set = parsed;
155
- }
156
-
157
- test(version: SemVer | string): boolean {
158
- const v = version instanceof SemVer ? version : parse(String(version));
159
- if (!v) return false;
160
- for (const conj of this.set) {
161
- if (conj.every((c) => testComparator(c, v))) {
162
- if (v.prerelease.length > 0) {
163
- const allowed = conj.some(
164
- (c) =>
165
- c.semver !== null &&
166
- c.semver.prerelease.length > 0 &&
167
- c.semver.major === v.major &&
168
- c.semver.minor === v.minor &&
169
- c.semver.patch === v.patch,
170
- );
171
- if (!allowed) continue;
172
- }
173
- return true;
174
- }
175
- }
176
- return false;
177
- }
178
-
179
- format(): string {
180
- return this.set.map((c) => c.map(formatComparator).join(" ")).join(" || ");
181
- }
182
-
183
- toString(): string {
184
- return this.format();
185
- }
186
- }
187
-
188
- function testComparator(c: Comparator, v: SemVer): boolean {
189
- if (c.semver === null) return true;
190
- const cmp = v.compare(c.semver);
191
- switch (c.operator) {
192
- case "":
193
- case "=":
194
- return cmp === 0;
195
- case "<":
196
- return cmp < 0;
197
- case "<=":
198
- return cmp <= 0;
199
- case ">":
200
- return cmp > 0;
201
- case ">=":
202
- return cmp >= 0;
203
- }
204
- }
205
-
206
- function formatComparator(c: Comparator): string {
207
- if (c.semver === null) return "*";
208
- return `${c.operator}${c.semver.version}`;
209
- }
210
-
211
- function parseRangePart(part: string): Comparator[] {
212
- const trimmed = part.trim();
213
- if (trimmed === "" || trimmed === "*" || trimmed.toLowerCase() === "latest") {
214
- return [{ operator: ">=", semver: new SemVer("0.0.0") }];
215
- }
216
- const hyphen = trimmed.match(/^\s*(\S+)\s+-\s+(\S+)\s*$/);
217
- if (hyphen) return hyphenRange(hyphen[1], hyphen[2]);
218
- // Glue any standalone operator to the version that follows. node-semver
219
- // (and the npm registry) accept both `>=1.2` and `>= 1.2`; without this
220
- // normalization the second form tokenizes into `[">=", "1.2"]` and
221
- // `parseSimple(">=")` then fails. Real-world packuments use the spaced
222
- // form, e.g. `safer-buffer`'s peer-dep range `">= 2.1.2 < 3.0.0"`.
223
- const glued = trimmed.replace(/(<=|>=|<|>|=)\s+(?=\S)/g, "$1");
224
- const tokens = glued.split(/\s+/);
225
- const out: Comparator[] = [];
226
- for (const tok of tokens) out.push(...parseSimple(tok));
227
- return out;
228
- }
229
-
230
- function parseSimple(tok: string): Comparator[] {
231
- if (tok === "*" || tok === "" || tok.toLowerCase() === "latest") {
232
- return [{ operator: ">=", semver: new SemVer("0.0.0") }];
233
- }
234
- if (tok.startsWith("^")) return caretRange(tok.slice(1));
235
- if (tok.startsWith("~")) return tildeRange(tok.slice(1).replace(/^>/, ""));
236
- const opMatch = tok.match(/^(<=|>=|<|>|=)\s*(.+)$/);
237
- if (opMatch) {
238
- const op = opMatch[1] as Comparator["operator"];
239
- return primitiveRange(op, opMatch[2]);
240
- }
241
- return partialRange(tok);
242
- }
243
-
244
- interface PartialVersion {
245
- major: number | null;
246
- minor: number | null;
247
- patch: number | null;
248
- pre: string;
249
- build: string;
250
- }
251
-
252
- function parsePartial(s: string): PartialVersion {
253
- const trimmed = s.trim().replace(/^v/, "");
254
- if (trimmed === "" || trimmed === "*") {
255
- return { major: null, minor: null, patch: null, pre: "", build: "" };
256
- }
257
- let pre = "";
258
- let build = "";
259
- let core = trimmed;
260
- const plus = core.indexOf("+");
261
- if (plus >= 0) {
262
- build = core.slice(plus + 1);
263
- core = core.slice(0, plus);
264
- }
265
- const dash = core.indexOf("-");
266
- if (dash >= 0) {
267
- pre = core.slice(dash + 1);
268
- core = core.slice(0, dash);
269
- }
270
- const parts = core.split(".");
271
- const xr = (part: string | undefined): number | null => {
272
- if (part === undefined || part === "") return null;
273
- if (part === "x" || part === "X" || part === "*") return null;
274
- if (!/^\d+$/.test(part)) {
275
- throw new TypeError(`Invalid partial version: ${s}`);
276
- }
277
- return Number(part);
278
- };
279
- return {
280
- major: xr(parts[0]),
281
- minor: xr(parts[1]),
282
- patch: xr(parts[2]),
283
- pre,
284
- build,
285
- };
286
- }
287
-
288
- function partialToVersion(p: PartialVersion): string {
289
- return `${p.major ?? 0}.${p.minor ?? 0}.${p.patch ?? 0}${p.pre ? `-${p.pre}` : ""}${
290
- p.build ? `+${p.build}` : ""
291
- }`;
292
- }
293
-
294
- function partialRange(tok: string): Comparator[] {
295
- const p = parsePartial(tok);
296
- if (p.major === null) return [{ operator: ">=", semver: new SemVer("0.0.0") }];
297
- if (p.minor === null) {
298
- return [
299
- { operator: ">=", semver: new SemVer(`${p.major}.0.0`) },
300
- { operator: "<", semver: new SemVer(`${p.major + 1}.0.0`) },
301
- ];
302
- }
303
- if (p.patch === null) {
304
- return [
305
- { operator: ">=", semver: new SemVer(`${p.major}.${p.minor}.0`) },
306
- { operator: "<", semver: new SemVer(`${p.major}.${p.minor + 1}.0`) },
307
- ];
308
- }
309
- return [{ operator: "=", semver: new SemVer(partialToVersion(p)) }];
310
- }
311
-
312
- function caretRange(tok: string): Comparator[] {
313
- const p = parsePartial(tok);
314
- if (p.major === null) return [{ operator: ">=", semver: new SemVer("0.0.0") }];
315
- const lower = `${p.major}.${p.minor ?? 0}.${p.patch ?? 0}${p.pre ? `-${p.pre}` : ""}`;
316
- let upper: string;
317
- if (p.major > 0 || p.minor === null) {
318
- upper = `${p.major + 1}.0.0`;
319
- } else if (p.minor > 0 || p.patch === null) {
320
- upper = `0.${p.minor + 1}.0`;
321
- } else {
322
- upper = `0.0.${p.patch + 1}`;
323
- }
324
- return [
325
- { operator: ">=", semver: new SemVer(lower) },
326
- { operator: "<", semver: new SemVer(upper) },
327
- ];
328
- }
329
-
330
- function tildeRange(tok: string): Comparator[] {
331
- const p = parsePartial(tok);
332
- if (p.major === null) return [{ operator: ">=", semver: new SemVer("0.0.0") }];
333
- const lower = `${p.major}.${p.minor ?? 0}.${p.patch ?? 0}${p.pre ? `-${p.pre}` : ""}`;
334
- const upper =
335
- p.minor === null
336
- ? `${p.major + 1}.0.0`
337
- : `${p.major}.${p.minor + 1}.0`;
338
- return [
339
- { operator: ">=", semver: new SemVer(lower) },
340
- { operator: "<", semver: new SemVer(upper) },
341
- ];
342
- }
343
-
344
- function primitiveRange(op: Comparator["operator"], rhs: string): Comparator[] {
345
- const p = parsePartial(rhs);
346
- if (p.major === null) return [{ operator: ">=", semver: new SemVer("0.0.0") }];
347
- if (op === "=" || op === "") return partialRange(rhs);
348
- if (op === ">") {
349
- if (p.minor === null) return [{ operator: ">=", semver: new SemVer(`${p.major + 1}.0.0`) }];
350
- if (p.patch === null) return [{ operator: ">=", semver: new SemVer(`${p.major}.${p.minor + 1}.0`) }];
351
- return [{ operator: ">", semver: new SemVer(partialToVersion(p)) }];
352
- }
353
- if (op === "<") {
354
- if (p.minor === null) return [{ operator: "<", semver: new SemVer(`${p.major}.0.0`) }];
355
- if (p.patch === null) return [{ operator: "<", semver: new SemVer(`${p.major}.${p.minor}.0`) }];
356
- return [{ operator: "<", semver: new SemVer(partialToVersion(p)) }];
357
- }
358
- if (op === ">=") return [{ operator: ">=", semver: new SemVer(partialToVersion(p)) }];
359
- if (p.minor === null) return [{ operator: "<", semver: new SemVer(`${p.major + 1}.0.0`) }];
360
- if (p.patch === null) return [{ operator: "<", semver: new SemVer(`${p.major}.${p.minor + 1}.0`) }];
361
- return [{ operator: "<=", semver: new SemVer(partialToVersion(p)) }];
362
- }
363
-
364
- function hyphenRange(left: string, right: string): Comparator[] {
365
- const a = parsePartial(left);
366
- const b = parsePartial(right);
367
- const lower: Comparator =
368
- a.major === null
369
- ? { operator: ">=", semver: new SemVer("0.0.0") }
370
- : {
371
- operator: ">=",
372
- semver: new SemVer(
373
- `${a.major}.${a.minor ?? 0}.${a.patch ?? 0}${a.pre ? `-${a.pre}` : ""}`,
374
- ),
375
- };
376
- let upper: Comparator;
377
- if (b.major === null) {
378
- upper = { operator: ">=", semver: new SemVer("0.0.0") };
379
- } else if (b.minor === null) {
380
- upper = { operator: "<", semver: new SemVer(`${b.major + 1}.0.0`) };
381
- } else if (b.patch === null) {
382
- upper = { operator: "<", semver: new SemVer(`${b.major}.${b.minor + 1}.0`) };
383
- } else {
384
- upper = {
385
- operator: "<=",
386
- semver: new SemVer(
387
- `${b.major}.${b.minor}.${b.patch}${b.pre ? `-${b.pre}` : ""}`,
388
- ),
389
- };
390
- }
391
- return [lower, upper];
392
- }
package/src/test.mts DELETED
@@ -1,5 +0,0 @@
1
- import { run } from "@gjsify/unit";
2
-
3
- import semverTestSuite from "./index.spec.js";
4
-
5
- run({ semverTestSuite });
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "exclude": [
4
- "src/test.mts",
5
- "src/**/*.spec.ts",
6
- "src/**/*.spec.mts"
7
- ]
8
- }
package/tsconfig.json DELETED
@@ -1,22 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "ESNext",
4
- "target": "ESNext",
5
- "moduleResolution": "bundler",
6
- "experimentalDecorators": true,
7
- "declaration": true,
8
- "allowImportingTsExtensions": false,
9
- "outDir": "lib/esm",
10
- "rootDir": "src",
11
- "declarationDir": "lib/types",
12
- "composite": true,
13
- "skipLibCheck": true,
14
- "strict": true
15
- },
16
- "include": [
17
- "src/**/*.ts"
18
- ],
19
- "exclude": [
20
- "src/test.mts"
21
- ]
22
- }