@storm-software/npm-tools 0.6.246 → 0.6.247
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.
- package/CHANGELOG.md +18 -0
- package/dist/chunk-AHNK4573.js +2 -0
- package/dist/chunk-BIVUS4E7.cjs +2 -0
- package/dist/chunk-BO2QIE5F.cjs +1 -0
- package/dist/chunk-GEEZCB3O.js +1 -0
- package/dist/chunk-K2GC3HMH.cjs +1 -0
- package/dist/chunk-KRTT6Y3M.js +1 -0
- package/dist/chunk-MXCE2BIL.js +2 -0
- package/dist/chunk-QHHUSRX2.js +1 -0
- package/dist/chunk-R6735QLL.cjs +1 -0
- package/dist/chunk-WCUHQ6KP.js +1 -0
- package/dist/chunk-XRX2ERTU.cjs +2 -0
- package/dist/chunk-ZEV2KI7V.cjs +1 -0
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/helpers/get-registry.cjs +1 -1
- package/dist/helpers/get-registry.js +1 -1
- package/dist/helpers/get-version.cjs +1 -1
- package/dist/helpers/get-version.d.cts +15 -1
- package/dist/helpers/get-version.d.ts +15 -1
- package/dist/helpers/get-version.js +1 -1
- package/dist/helpers/get-version.test.cjs +19 -0
- package/dist/helpers/get-version.test.d.cts +2 -0
- package/dist/helpers/get-version.test.d.ts +2 -0
- package/dist/helpers/get-version.test.js +19 -0
- package/dist/helpers/index.cjs +1 -1
- package/dist/helpers/index.d.cts +1 -1
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-3YOLXKIO.js +0 -1
- package/dist/chunk-7YDCWNQR.js +0 -1
- package/dist/chunk-B6PKMEQO.js +0 -2
- package/dist/chunk-GGNOJ77I.js +0 -0
- package/dist/chunk-OBOKFFDE.cjs +0 -1
- package/dist/chunk-OXRBB73B.cjs +0 -1
- package/dist/chunk-QFGWM46Y.cjs +0 -2
- package/dist/chunk-SFZRYJZ2.cjs +0 -1
- package/dist/chunk-YLO7DD6B.cjs +0 -1
- package/dist/chunk-ZS7ZL333.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Npm Tools
|
|
4
4
|
|
|
5
|
+
## [0.6.247](https://github.com/storm-software/storm-ops/releases/tag/npm-tools%400.6.247) (08/08/2026)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **bun-tools:** Update `storm-bun` to include improved error logging ([97d65d1d3](https://github.com/storm-software/storm-ops/commit/97d65d1d3))
|
|
10
|
+
|
|
11
|
+
### Updated Dependencies
|
|
12
|
+
|
|
13
|
+
- Updated **config-tools** to **v1.190.129**
|
|
14
|
+
|
|
15
|
+
## [0.6.246](https://github.com/storm-software/storm-ops/releases/tag/npm-tools%400.6.246) (08/08/2026)
|
|
16
|
+
|
|
17
|
+
### Updated Dependencies
|
|
18
|
+
|
|
19
|
+
- Updated **config** to **v1.138.65**
|
|
20
|
+
- Updated **config-tools** to **v1.190.128**
|
|
21
|
+
- Updated **testing-tools** to **v1.119.281**
|
|
22
|
+
|
|
5
23
|
## [0.6.245](https://github.com/storm-software/storm-ops/releases/tag/npm-tools%400.6.245) (08/08/2026)
|
|
6
24
|
|
|
7
25
|
### Miscellaneous
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkK2GC3HMH_cjs=require('./chunk-K2GC3HMH.cjs'),chunkXRX2ERTU_cjs=require('./chunk-XRX2ERTU.cjs'),chunkZEV2KI7V_cjs=require('./chunk-ZEV2KI7V.cjs'),child_process=require('child_process'),semver=require('semver'),g=require('strip-ansi');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var g__default=/*#__PURE__*/_interopDefault(g);chunkZEV2KI7V_cjs.c();var N=/^(npm warn|\[[\d.]+ms\]|\[sys\]|\[warn\] request took)/i;function b(r){return r.split(/\r?\n/).map(t=>t.trim()).filter(t=>t.length>0).filter(t=>!N.test(t)).join(`
|
|
2
|
+
`).trim()}function v(r){let t=g__default.default(r).split(/\r?\n/).map(e=>e.trim()).filter(Boolean);for(let e=t.length-1;e>=0;e-=1){let i=t[e];if(i&&semver.valid(i,true))return i}return g__default.default(r).trim()}async function u(r,t=chunkXRX2ERTU_cjs.f,e={}){let i=e.executable||"npm",l=e.retries??3,G=e.timeout??1e4,_=e.registry||await chunkK2GC3HMH_cjs.a(i),f;for(let o=0;o<=l;o++)try{let s=new AbortController,a=setTimeout(()=>{s.abort();},G),n=await Promise.resolve(new Promise((d,p)=>{child_process.exec(`${i} view ${r} version --registry=${_}`,{signal:s.signal,maxBuffer:1024*1024*10},(m,V,w)=>{let c=w?b(w):"";return m&&!m.message.toLowerCase().trim().startsWith("npm warn")?p(c?new Error(c,{cause:m}):m):c?p(new Error(c)):d(v(V))});}));if(!semver.valid(n,!0))throw clearTimeout(a),new Error(g__default.default(n).startsWith("[WARN] Request took")?`A timeout occurred while fetching the version for package "${r}" with tag "${t}".`:`Invalid version "${n}" fetched for package "${r}" with tag "${t}"`);return clearTimeout(a),n}catch(s){if(f=s,o<l){let a=Math.pow(2,o)*100;await new Promise(n=>setTimeout(n,a));}}throw f}async function k(r,t={}){return u(r,chunkXRX2ERTU_cjs.c,t)}async function B(r,t={}){return u(r,chunkXRX2ERTU_cjs.d,t)}async function S(r,t={}){return u(r,chunkXRX2ERTU_cjs.e,t)}exports.a=b;exports.b=v;exports.c=u;exports.d=k;exports.e=B;exports.f=S;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkZEV2KI7V_cjs=require('./chunk-ZEV2KI7V.cjs');chunkZEV2KI7V_cjs.c();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a,b}from'./chunk-AHNK4573.js';import {c}from'./chunk-QHHUSRX2.js';import {getConfig}from'@storm-software/config-tools/get-config';import {exec}from'node:child_process';c();async function _(r="npm"){return new Promise((R,n)=>{exec(`${r} config get registry`,(t,m,e)=>t&&!t.message.toLowerCase().trim().startsWith("npm warn")?n(t):e&&!e.toLowerCase().trim().startsWith("npm warn")?n(e):R(m.trim()));})}async function y(){if(process.env.STORM_REGISTRY_NPM)return process.env.STORM_REGISTRY_NPM;let r=await getConfig();return r?.registry?.npm?r?.registry?.npm:a}async function G(){if(process.env.STORM_REGISTRY_GITHUB)return process.env.STORM_REGISTRY_GITHUB;let r=await getConfig();return r?.registry?.github?r?.registry?.github:b}export{_ as a,y as b,G as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkXRX2ERTU_cjs=require('./chunk-XRX2ERTU.cjs'),chunkZEV2KI7V_cjs=require('./chunk-ZEV2KI7V.cjs'),getConfig=require('@storm-software/config-tools/get-config'),child_process=require('child_process');chunkZEV2KI7V_cjs.c();async function T(r="npm"){return new Promise((R,n)=>{child_process.exec(`${r} config get registry`,(t,m,e)=>t&&!t.message.toLowerCase().trim().startsWith("npm warn")?n(t):e&&!e.toLowerCase().trim().startsWith("npm warn")?n(e):R(m.trim()));})}async function _(){if(process.env.STORM_REGISTRY_NPM)return process.env.STORM_REGISTRY_NPM;let r=await getConfig.getConfig();return r?.registry?.npm?r?.registry?.npm:chunkXRX2ERTU_cjs.a}async function y(){if(process.env.STORM_REGISTRY_GITHUB)return process.env.STORM_REGISTRY_GITHUB;let r=await getConfig.getConfig();return r?.registry?.github?r?.registry?.github:chunkXRX2ERTU_cjs.b}exports.a=T;exports.b=_;exports.c=y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c}from'./chunk-QHHUSRX2.js';c();
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-GEEZCB3O.js';import {f,c as c$1,d,e}from'./chunk-AHNK4573.js';import {c}from'./chunk-QHHUSRX2.js';import {exec}from'node:child_process';import {valid}from'semver';import g from'strip-ansi';c();var N=/^(npm warn|\[[\d.]+ms\]|\[sys\]|\[warn\] request took)/i;function b(r){return r.split(/\r?\n/).map(t=>t.trim()).filter(t=>t.length>0).filter(t=>!N.test(t)).join(`
|
|
2
|
+
`).trim()}function v(r){let t=g(r).split(/\r?\n/).map(e=>e.trim()).filter(Boolean);for(let e=t.length-1;e>=0;e-=1){let i=t[e];if(i&&valid(i,true))return i}return g(r).trim()}async function u(r,t=f,e={}){let i=e.executable||"npm",l=e.retries??3,G=e.timeout??1e4,_=e.registry||await a(i),f;for(let o=0;o<=l;o++)try{let s=new AbortController,a=setTimeout(()=>{s.abort();},G),n=await Promise.resolve(new Promise((d,p)=>{exec(`${i} view ${r} version --registry=${_}`,{signal:s.signal,maxBuffer:1024*1024*10},(m,V,w)=>{let c=w?b(w):"";return m&&!m.message.toLowerCase().trim().startsWith("npm warn")?p(c?new Error(c,{cause:m}):m):c?p(new Error(c)):d(v(V))});}));if(!valid(n,!0))throw clearTimeout(a),new Error(g(n).startsWith("[WARN] Request took")?`A timeout occurred while fetching the version for package "${r}" with tag "${t}".`:`Invalid version "${n}" fetched for package "${r}" with tag "${t}"`);return clearTimeout(a),n}catch(s){if(f=s,o<l){let a=Math.pow(2,o)*100;await new Promise(n=>setTimeout(n,a));}}throw f}async function B(r,t={}){return u(r,c$1,t)}async function S(r,t={}){return u(r,d,t)}async function W(r,t={}){return u(r,e,t)}export{b as a,v as b,u as c,B as d,S as e,W as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=Object.create;var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var l=(t,e)=>()=>(t&&(e=t(t=0)),e);var d=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var s=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let m of p(e))!f.call(t,m)&&m!==o&&i(t,m,{get:()=>e[m],enumerable:!(r=a(e,m))||r.enumerable});return t};var g=(t,e,o)=>(o=t!=null?n(c(t)):{},s(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:true}):o,t));var _=l(()=>{});export{d as a,g as b,_ as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkZEV2KI7V_cjs=require('./chunk-ZEV2KI7V.cjs');chunkZEV2KI7V_cjs.c();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c}from'./chunk-QHHUSRX2.js';c();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var m=Object.create;var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var p=(e,t)=>()=>(e&&(t=e(e=0)),t);var U=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var a=(e,t,n,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of u(t))!f.call(e,r)&&r!==n&&o(e,r,{get:()=>t[r],enumerable:!(c=i(t,r))||c.enumerable});return e};var l=(e,t,n)=>(n=e!=null?m(d(e)):{},a(t||!e||!e.__esModule?o(n,"default",{value:e,enumerable:true}):n,e));var s=p(()=>{});exports.a=U;exports.b=l;exports.c=s;
|
package/dist/constants.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkXRX2ERTU_cjs=require('./chunk-XRX2ERTU.cjs');require('./chunk-ZEV2KI7V.cjs');Object.defineProperty(exports,"CANARY_NPM_TAG",{enumerable:true,get:function(){return chunkXRX2ERTU_cjs.d}});Object.defineProperty(exports,"DEFAULT_GITHUB_REGISTRY",{enumerable:true,get:function(){return chunkXRX2ERTU_cjs.b}});Object.defineProperty(exports,"DEFAULT_NPM_REGISTRY",{enumerable:true,get:function(){return chunkXRX2ERTU_cjs.a}});Object.defineProperty(exports,"DEFAULT_NPM_TAG",{enumerable:true,get:function(){return chunkXRX2ERTU_cjs.f}});Object.defineProperty(exports,"EXPERIMENTAL_NPM_TAG",{enumerable:true,get:function(){return chunkXRX2ERTU_cjs.e}});Object.defineProperty(exports,"LATEST_NPM_TAG",{enumerable:true,get:function(){return chunkXRX2ERTU_cjs.c}});
|
package/dist/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d as CANARY_NPM_TAG,b as DEFAULT_GITHUB_REGISTRY,a as DEFAULT_NPM_REGISTRY,f as DEFAULT_NPM_TAG,e as EXPERIMENTAL_NPM_TAG,c as LATEST_NPM_TAG}from'./chunk-
|
|
1
|
+
export{d as CANARY_NPM_TAG,b as DEFAULT_GITHUB_REGISTRY,a as DEFAULT_NPM_REGISTRY,f as DEFAULT_NPM_TAG,e as EXPERIMENTAL_NPM_TAG,c as LATEST_NPM_TAG}from'./chunk-AHNK4573.js';import'./chunk-QHHUSRX2.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkK2GC3HMH_cjs=require('../chunk-K2GC3HMH.cjs');require('../chunk-XRX2ERTU.cjs'),require('../chunk-ZEV2KI7V.cjs');Object.defineProperty(exports,"getGitHubRegistry",{enumerable:true,get:function(){return chunkK2GC3HMH_cjs.c}});Object.defineProperty(exports,"getNpmRegistry",{enumerable:true,get:function(){return chunkK2GC3HMH_cjs.b}});Object.defineProperty(exports,"getRegistry",{enumerable:true,get:function(){return chunkK2GC3HMH_cjs.a}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as getGitHubRegistry,b as getNpmRegistry,a as getRegistry}from'../chunk-
|
|
1
|
+
export{c as getGitHubRegistry,b as getNpmRegistry,a as getRegistry}from'../chunk-GEEZCB3O.js';import'../chunk-AHNK4573.js';import'../chunk-QHHUSRX2.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkBIVUS4E7_cjs=require('../chunk-BIVUS4E7.cjs');require('../chunk-K2GC3HMH.cjs'),require('../chunk-XRX2ERTU.cjs'),require('../chunk-ZEV2KI7V.cjs');Object.defineProperty(exports,"extractPackageVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.b}});Object.defineProperty(exports,"filterBenignPackageManagerStderr",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.a}});Object.defineProperty(exports,"getCanaryVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.e}});Object.defineProperty(exports,"getExperimentalVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.f}});Object.defineProperty(exports,"getLatestVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.d}});Object.defineProperty(exports,"getVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.c}});
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remove known package manager diagnostic output from stderr.
|
|
3
|
+
*
|
|
4
|
+
* @param stderr - The stderr output from a package manager command.
|
|
5
|
+
* @returns The remaining stderr content, if any.
|
|
6
|
+
*/
|
|
7
|
+
declare function filterBenignPackageManagerStderr(stderr: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Extract a semver version from package manager stdout.
|
|
10
|
+
*
|
|
11
|
+
* @param stdout - The stdout output from a package manager command.
|
|
12
|
+
* @returns The extracted version string.
|
|
13
|
+
*/
|
|
14
|
+
declare function extractPackageVersion(stdout: string): string;
|
|
1
15
|
interface GetVersionOptions {
|
|
2
16
|
/**
|
|
3
17
|
* The registry URL to use.
|
|
@@ -58,4 +72,4 @@ declare function getCanaryVersion(packageName: string, options?: GetVersionOptio
|
|
|
58
72
|
*/
|
|
59
73
|
declare function getExperimentalVersion(packageName: string, options?: GetVersionOptions): Promise<string>;
|
|
60
74
|
|
|
61
|
-
export { type GetVersionOptions, getCanaryVersion, getExperimentalVersion, getLatestVersion, getVersion };
|
|
75
|
+
export { type GetVersionOptions, extractPackageVersion, filterBenignPackageManagerStderr, getCanaryVersion, getExperimentalVersion, getLatestVersion, getVersion };
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remove known package manager diagnostic output from stderr.
|
|
3
|
+
*
|
|
4
|
+
* @param stderr - The stderr output from a package manager command.
|
|
5
|
+
* @returns The remaining stderr content, if any.
|
|
6
|
+
*/
|
|
7
|
+
declare function filterBenignPackageManagerStderr(stderr: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Extract a semver version from package manager stdout.
|
|
10
|
+
*
|
|
11
|
+
* @param stdout - The stdout output from a package manager command.
|
|
12
|
+
* @returns The extracted version string.
|
|
13
|
+
*/
|
|
14
|
+
declare function extractPackageVersion(stdout: string): string;
|
|
1
15
|
interface GetVersionOptions {
|
|
2
16
|
/**
|
|
3
17
|
* The registry URL to use.
|
|
@@ -58,4 +72,4 @@ declare function getCanaryVersion(packageName: string, options?: GetVersionOptio
|
|
|
58
72
|
*/
|
|
59
73
|
declare function getExperimentalVersion(packageName: string, options?: GetVersionOptions): Promise<string>;
|
|
60
74
|
|
|
61
|
-
export { type GetVersionOptions, getCanaryVersion, getExperimentalVersion, getLatestVersion, getVersion };
|
|
75
|
+
export { type GetVersionOptions, extractPackageVersion, filterBenignPackageManagerStderr, getCanaryVersion, getExperimentalVersion, getLatestVersion, getVersion };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{b as extractPackageVersion,a as filterBenignPackageManagerStderr,e as getCanaryVersion,f as getExperimentalVersion,d as getLatestVersion,c as getVersion}from'../chunk-MXCE2BIL.js';import'../chunk-GEEZCB3O.js';import'../chunk-AHNK4573.js';import'../chunk-QHHUSRX2.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';var chunkBIVUS4E7_cjs=require('../chunk-BIVUS4E7.cjs');require('../chunk-K2GC3HMH.cjs'),require('../chunk-XRX2ERTU.cjs');var chunkZEV2KI7V_cjs=require('../chunk-ZEV2KI7V.cjs');var s=chunkZEV2KI7V_cjs.a((g,o)=>{chunkZEV2KI7V_cjs.c();(()=>{throw new Error("Do not import `@jest/globals` outside of the Jest test environment")})();});chunkZEV2KI7V_cjs.c();var e=chunkZEV2KI7V_cjs.b(s(),1);(0, e.describe)("filterBenignPackageManagerStderr",()=>{(0, e.it)("removes bun env file timing output",()=>{(0, e.expect)(chunkBIVUS4E7_cjs.a(`[0.04ms] ".env.local", ".env"
|
|
2
|
+
`)).toBe("");}),(0, e.it)("removes bun system call diagnostics",()=>{(0, e.expect)(chunkBIVUS4E7_cjs.a(`[SYS] read(3, 4096) = 4096 (0.019ms)
|
|
3
|
+
[SYS] close(3)
|
|
4
|
+
`)).toBe("");}),(0, e.it)("keeps real error output",()=>{(0, e.expect)(chunkBIVUS4E7_cjs.a(`[0.04ms] ".env.local", ".env"
|
|
5
|
+
404 Not Found - GET https://registry.npmjs.org/missing`)).toBe("404 Not Found - GET https://registry.npmjs.org/missing");});});(0, e.describe)("extractPackageVersion",()=>{(0, e.it)("returns the last valid semver line",()=>{(0, e.expect)(chunkBIVUS4E7_cjs.b(`[0.04ms] ".env.local", ".env"
|
|
6
|
+
1.2.3
|
|
7
|
+
`)).toBe("1.2.3");});});
|
|
8
|
+
/*! Bundled license information:
|
|
9
|
+
|
|
10
|
+
@jest/globals/build/index.js:
|
|
11
|
+
(*!
|
|
12
|
+
* /**
|
|
13
|
+
* * Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
* *
|
|
15
|
+
* * This source code is licensed under the MIT license found in the
|
|
16
|
+
* * LICENSE file in the root directory of this source tree.
|
|
17
|
+
* * /
|
|
18
|
+
*)
|
|
19
|
+
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {a as a$1,b as b$1}from'../chunk-MXCE2BIL.js';import'../chunk-GEEZCB3O.js';import'../chunk-AHNK4573.js';import {a,c,b}from'../chunk-QHHUSRX2.js';var s=a((c$1,o)=>{c();(()=>{throw new Error("Do not import `@jest/globals` outside of the Jest test environment")})();});c();var e=b(s(),1);(0, e.describe)("filterBenignPackageManagerStderr",()=>{(0, e.it)("removes bun env file timing output",()=>{(0, e.expect)(a$1(`[0.04ms] ".env.local", ".env"
|
|
2
|
+
`)).toBe("");}),(0, e.it)("removes bun system call diagnostics",()=>{(0, e.expect)(a$1(`[SYS] read(3, 4096) = 4096 (0.019ms)
|
|
3
|
+
[SYS] close(3)
|
|
4
|
+
`)).toBe("");}),(0, e.it)("keeps real error output",()=>{(0, e.expect)(a$1(`[0.04ms] ".env.local", ".env"
|
|
5
|
+
404 Not Found - GET https://registry.npmjs.org/missing`)).toBe("404 Not Found - GET https://registry.npmjs.org/missing");});});(0, e.describe)("extractPackageVersion",()=>{(0, e.it)("returns the last valid semver line",()=>{(0, e.expect)(b$1(`[0.04ms] ".env.local", ".env"
|
|
6
|
+
1.2.3
|
|
7
|
+
`)).toBe("1.2.3");});});
|
|
8
|
+
/*! Bundled license information:
|
|
9
|
+
|
|
10
|
+
@jest/globals/build/index.js:
|
|
11
|
+
(*!
|
|
12
|
+
* /**
|
|
13
|
+
* * Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
* *
|
|
15
|
+
* * This source code is licensed under the MIT license found in the
|
|
16
|
+
* * LICENSE file in the root directory of this source tree.
|
|
17
|
+
* * /
|
|
18
|
+
*)
|
|
19
|
+
*/
|
package/dist/helpers/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';require('../chunk-
|
|
1
|
+
'use strict';require('../chunk-BO2QIE5F.cjs');var chunkBIVUS4E7_cjs=require('../chunk-BIVUS4E7.cjs'),chunkK2GC3HMH_cjs=require('../chunk-K2GC3HMH.cjs');require('../chunk-XRX2ERTU.cjs'),require('../chunk-ZEV2KI7V.cjs');Object.defineProperty(exports,"extractPackageVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.b}});Object.defineProperty(exports,"filterBenignPackageManagerStderr",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.a}});Object.defineProperty(exports,"getCanaryVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.e}});Object.defineProperty(exports,"getExperimentalVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.f}});Object.defineProperty(exports,"getLatestVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.d}});Object.defineProperty(exports,"getVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.c}});Object.defineProperty(exports,"getGitHubRegistry",{enumerable:true,get:function(){return chunkK2GC3HMH_cjs.c}});Object.defineProperty(exports,"getNpmRegistry",{enumerable:true,get:function(){return chunkK2GC3HMH_cjs.b}});Object.defineProperty(exports,"getRegistry",{enumerable:true,get:function(){return chunkK2GC3HMH_cjs.a}});
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { getGitHubRegistry, getNpmRegistry, getRegistry } from './get-registry.cjs';
|
|
2
|
-
export { GetVersionOptions, getCanaryVersion, getExperimentalVersion, getLatestVersion, getVersion } from './get-version.cjs';
|
|
2
|
+
export { GetVersionOptions, extractPackageVersion, filterBenignPackageManagerStderr, getCanaryVersion, getExperimentalVersion, getLatestVersion, getVersion } from './get-version.cjs';
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { getGitHubRegistry, getNpmRegistry, getRegistry } from './get-registry.js';
|
|
2
|
-
export { GetVersionOptions, getCanaryVersion, getExperimentalVersion, getLatestVersion, getVersion } from './get-version.js';
|
|
2
|
+
export { GetVersionOptions, extractPackageVersion, filterBenignPackageManagerStderr, getCanaryVersion, getExperimentalVersion, getLatestVersion, getVersion } from './get-version.js';
|
package/dist/helpers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import'../chunk-
|
|
1
|
+
import'../chunk-KRTT6Y3M.js';export{b as extractPackageVersion,a as filterBenignPackageManagerStderr,e as getCanaryVersion,f as getExperimentalVersion,d as getLatestVersion,c as getVersion}from'../chunk-MXCE2BIL.js';export{c as getGitHubRegistry,b as getNpmRegistry,a as getRegistry}from'../chunk-GEEZCB3O.js';import'../chunk-AHNK4573.js';import'../chunk-QHHUSRX2.js';
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';require('./chunk-
|
|
1
|
+
'use strict';require('./chunk-R6735QLL.cjs'),require('./chunk-BO2QIE5F.cjs');var chunkBIVUS4E7_cjs=require('./chunk-BIVUS4E7.cjs'),chunkK2GC3HMH_cjs=require('./chunk-K2GC3HMH.cjs'),chunkXRX2ERTU_cjs=require('./chunk-XRX2ERTU.cjs'),chunkZEV2KI7V_cjs=require('./chunk-ZEV2KI7V.cjs');chunkZEV2KI7V_cjs.c();Object.defineProperty(exports,"extractPackageVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.b}});Object.defineProperty(exports,"filterBenignPackageManagerStderr",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.a}});Object.defineProperty(exports,"getCanaryVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.e}});Object.defineProperty(exports,"getExperimentalVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.f}});Object.defineProperty(exports,"getLatestVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.d}});Object.defineProperty(exports,"getVersion",{enumerable:true,get:function(){return chunkBIVUS4E7_cjs.c}});Object.defineProperty(exports,"getGitHubRegistry",{enumerable:true,get:function(){return chunkK2GC3HMH_cjs.c}});Object.defineProperty(exports,"getNpmRegistry",{enumerable:true,get:function(){return chunkK2GC3HMH_cjs.b}});Object.defineProperty(exports,"getRegistry",{enumerable:true,get:function(){return chunkK2GC3HMH_cjs.a}});Object.defineProperty(exports,"CANARY_NPM_TAG",{enumerable:true,get:function(){return chunkXRX2ERTU_cjs.d}});Object.defineProperty(exports,"DEFAULT_GITHUB_REGISTRY",{enumerable:true,get:function(){return chunkXRX2ERTU_cjs.b}});Object.defineProperty(exports,"DEFAULT_NPM_REGISTRY",{enumerable:true,get:function(){return chunkXRX2ERTU_cjs.a}});Object.defineProperty(exports,"DEFAULT_NPM_TAG",{enumerable:true,get:function(){return chunkXRX2ERTU_cjs.f}});Object.defineProperty(exports,"EXPERIMENTAL_NPM_TAG",{enumerable:true,get:function(){return chunkXRX2ERTU_cjs.e}});Object.defineProperty(exports,"LATEST_NPM_TAG",{enumerable:true,get:function(){return chunkXRX2ERTU_cjs.c}});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { CANARY_NPM_TAG, DEFAULT_GITHUB_REGISTRY, DEFAULT_NPM_REGISTRY, DEFAULT_NPM_TAG, EXPERIMENTAL_NPM_TAG, LATEST_NPM_TAG } from './constants.cjs';
|
|
2
2
|
export { getGitHubRegistry, getNpmRegistry, getRegistry } from './helpers/get-registry.cjs';
|
|
3
|
-
export { GetVersionOptions, getCanaryVersion, getExperimentalVersion, getLatestVersion, getVersion } from './helpers/get-version.cjs';
|
|
3
|
+
export { GetVersionOptions, extractPackageVersion, filterBenignPackageManagerStderr, getCanaryVersion, getExperimentalVersion, getLatestVersion, getVersion } from './helpers/get-version.cjs';
|
|
4
4
|
export { NpmPackageAccess, NpmPackageTag, NpmPackageTagType } from './types.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { CANARY_NPM_TAG, DEFAULT_GITHUB_REGISTRY, DEFAULT_NPM_REGISTRY, DEFAULT_NPM_TAG, EXPERIMENTAL_NPM_TAG, LATEST_NPM_TAG } from './constants.js';
|
|
2
2
|
export { getGitHubRegistry, getNpmRegistry, getRegistry } from './helpers/get-registry.js';
|
|
3
|
-
export { GetVersionOptions, getCanaryVersion, getExperimentalVersion, getLatestVersion, getVersion } from './helpers/get-version.js';
|
|
3
|
+
export { GetVersionOptions, extractPackageVersion, filterBenignPackageManagerStderr, getCanaryVersion, getExperimentalVersion, getLatestVersion, getVersion } from './helpers/get-version.js';
|
|
4
4
|
export { NpmPackageAccess, NpmPackageTag, NpmPackageTagType } from './types.js';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import'./chunk-
|
|
1
|
+
import'./chunk-WCUHQ6KP.js';import'./chunk-KRTT6Y3M.js';export{b as extractPackageVersion,a as filterBenignPackageManagerStderr,e as getCanaryVersion,f as getExperimentalVersion,d as getLatestVersion,c as getVersion}from'./chunk-MXCE2BIL.js';export{c as getGitHubRegistry,b as getNpmRegistry,a as getRegistry}from'./chunk-GEEZCB3O.js';export{d as CANARY_NPM_TAG,b as DEFAULT_GITHUB_REGISTRY,a as DEFAULT_NPM_REGISTRY,f as DEFAULT_NPM_TAG,e as EXPERIMENTAL_NPM_TAG,c as LATEST_NPM_TAG}from'./chunk-AHNK4573.js';import {c}from'./chunk-QHHUSRX2.js';c();
|
package/dist/types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';require('./chunk-
|
|
1
|
+
'use strict';require('./chunk-R6735QLL.cjs'),require('./chunk-ZEV2KI7V.cjs');
|
package/dist/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import'./chunk-
|
|
1
|
+
import'./chunk-WCUHQ6KP.js';import'./chunk-QHHUSRX2.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/npm-tools",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.247",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A set of tools and utilities for managing packages stored in the [npm](https://www.npmjs.com/) registry.",
|
|
6
6
|
"repository": {
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
"module": "./dist/index.js",
|
|
83
83
|
"types": "./dist/index.d.ts",
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@storm-software/config": "1.138.65",
|
|
86
|
-
"@storm-software/config-tools": "1.190.
|
|
85
|
+
"@storm-software/config": "^1.138.65",
|
|
86
|
+
"@storm-software/config-tools": "1.190.129",
|
|
87
87
|
"semver": "^7.8.5",
|
|
88
88
|
"strip-ansi": "^7.2.0"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": { "@types/node": "^25.9.5", "tsup": "8.4.0" },
|
|
91
91
|
"publishConfig": { "access": "public" },
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "b42641c3e4afdcfa82cb04d47afe5c6f372115ec"
|
|
93
93
|
}
|
package/dist/chunk-3YOLXKIO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-7YDCWNQR.js';import {f,c,d,e}from'./chunk-B6PKMEQO.js';import {exec}from'node:child_process';import {valid}from'semver';import b from'strip-ansi';async function u(t,r=f,i={}){let c=i.executable||"npm",g=i.retries??3,P=i.timeout??1e4,T=i.registry||await a(c),f;for(let n=0;n<=g;n++)try{let o=new AbortController,s=setTimeout(()=>{o.abort();},P),e=await Promise.resolve(new Promise((x,l)=>{exec(`${c} view ${t} version --registry=${T}`,{signal:o.signal,maxBuffer:1024*1024*10},(a,E,m)=>a&&!a.message.toLowerCase().trim().startsWith("npm warn")?l(a):m&&!m.toLowerCase().trim().startsWith("npm warn")?l(m):x(E.trim()));}));if(!valid(e,!0))throw clearTimeout(s),new Error(b(e).startsWith("[WARN] Request took")?`A timeout occurred while fetching the version for package "${t}" with tag "${r}".`:`Invalid version "${e}" fetched for package "${t}" with tag "${r}"`);return clearTimeout(s),e}catch(o){if(f=o,n<g){let s=Math.pow(2,n)*100;await new Promise(e=>setTimeout(e,s));}}throw f}async function N(t,r={}){return u(t,c,r)}async function O(t,r={}){return u(t,d,r)}async function R(t,r={}){return u(t,e,r)}export{u as a,N as b,O as c,R as d};
|
package/dist/chunk-7YDCWNQR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a,b}from'./chunk-B6PKMEQO.js';import {getConfig}from'@storm-software/config-tools/get-config';import {exec}from'node:child_process';async function T(r="npm"){return new Promise((g,n)=>{exec(`${r} config get registry`,(t,R,e)=>t&&!t.message.toLowerCase().trim().startsWith("npm warn")?n(t):e&&!e.toLowerCase().trim().startsWith("npm warn")?n(e):g(R.trim()));})}async function _(){if(process.env.STORM_REGISTRY_NPM)return process.env.STORM_REGISTRY_NPM;let r=await getConfig();return r?.registry?.npm?r?.registry?.npm:a}async function y(){if(process.env.STORM_REGISTRY_GITHUB)return process.env.STORM_REGISTRY_GITHUB;let r=await getConfig();return r?.registry?.github?r?.registry?.github:b}export{T as a,_ as b,y as c};
|
package/dist/chunk-B6PKMEQO.js
DELETED
package/dist/chunk-GGNOJ77I.js
DELETED
|
File without changes
|
package/dist/chunk-OBOKFFDE.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';
|
package/dist/chunk-OXRBB73B.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkYLO7DD6B_cjs=require('./chunk-YLO7DD6B.cjs'),chunkQFGWM46Y_cjs=require('./chunk-QFGWM46Y.cjs'),child_process=require('child_process'),semver=require('semver'),b=require('strip-ansi');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var b__default=/*#__PURE__*/_interopDefault(b);async function u(t,r=chunkQFGWM46Y_cjs.f,i={}){let c=i.executable||"npm",g=i.retries??3,P=i.timeout??1e4,T=i.registry||await chunkYLO7DD6B_cjs.a(c),f;for(let n=0;n<=g;n++)try{let o=new AbortController,s=setTimeout(()=>{o.abort();},P),e=await Promise.resolve(new Promise((x,l)=>{child_process.exec(`${c} view ${t} version --registry=${T}`,{signal:o.signal,maxBuffer:1024*1024*10},(a,E,m)=>a&&!a.message.toLowerCase().trim().startsWith("npm warn")?l(a):m&&!m.toLowerCase().trim().startsWith("npm warn")?l(m):x(E.trim()));}));if(!semver.valid(e,!0))throw clearTimeout(s),new Error(b__default.default(e).startsWith("[WARN] Request took")?`A timeout occurred while fetching the version for package "${t}" with tag "${r}".`:`Invalid version "${e}" fetched for package "${t}" with tag "${r}"`);return clearTimeout(s),e}catch(o){if(f=o,n<g){let s=Math.pow(2,n)*100;await new Promise(e=>setTimeout(e,s));}}throw f}async function L(t,r={}){return u(t,chunkQFGWM46Y_cjs.c,r)}async function N(t,r={}){return u(t,chunkQFGWM46Y_cjs.d,r)}async function O(t,r={}){return u(t,chunkQFGWM46Y_cjs.e,r)}exports.a=u;exports.b=L;exports.c=N;exports.d=O;
|
package/dist/chunk-QFGWM46Y.cjs
DELETED
package/dist/chunk-SFZRYJZ2.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';
|
package/dist/chunk-YLO7DD6B.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkQFGWM46Y_cjs=require('./chunk-QFGWM46Y.cjs'),getConfig=require('@storm-software/config-tools/get-config'),child_process=require('child_process');async function c(r="npm"){return new Promise((g,n)=>{child_process.exec(`${r} config get registry`,(t,R,e)=>t&&!t.message.toLowerCase().trim().startsWith("npm warn")?n(t):e&&!e.toLowerCase().trim().startsWith("npm warn")?n(e):g(R.trim()));})}async function T(){if(process.env.STORM_REGISTRY_NPM)return process.env.STORM_REGISTRY_NPM;let r=await getConfig.getConfig();return r?.registry?.npm?r?.registry?.npm:chunkQFGWM46Y_cjs.a}async function _(){if(process.env.STORM_REGISTRY_GITHUB)return process.env.STORM_REGISTRY_GITHUB;let r=await getConfig.getConfig();return r?.registry?.github?r?.registry?.github:chunkQFGWM46Y_cjs.b}exports.a=c;exports.b=T;exports.c=_;
|
package/dist/chunk-ZS7ZL333.js
DELETED
|
File without changes
|