resolvewithplus
Advanced tools
Comparing version 0.8.7 to 0.8.8
{ | ||
"name": "resolvewithplus", | ||
"version": "0.8.7", | ||
"version": "0.8.8", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=12.16.0" |
@@ -1,1 +0,1 @@ | ||
import u from"fs";import c from"path";import f from"module";const g=f.createRequire(import.meta.url),j=u.realpathSync.native,m=new RegExp("^(?:node:)?("+f.builtinModules.join("|").replace("/","/")+")$"),b=/^\.?\.?(\/|\\)/,x=/^.\.?(?=\/|\\)/,R=/index.[tj]sx?$/,h=/[\\/]resolvewithplus[\\/]/,p=[".js",".mjs",".ts",".tsx",".json",".node"],y="node_modules",_="package.json";export default(n=>(n=(e,t,i)=>{let s=n.cache[e+t];return s||(s=n.begin(e,t,i||{}),n.cache[e+t]=s)},n.cache={},n.begin=(e,t,i)=>{var s=null;return t=typeof t=="string"?n.getasdirname(decodeURI(t)):process.cwd(),m.test(e)?s=e:(s=b.test(e)?n.getasfileordir(e,t,i):n.getasnode_module(e,t),s=s&&j(s)),s},n.iscoremodule=e=>m.test(e),n.isfilesync=(e,t)=>{try{t=u.statSync(e)}catch{t=!1}return t&&(t.isFile()||t.isFIFO())},n.gettargetindex=(e,t)=>{let s=t&&t.ismodule&&e.module||t&&t.browser&&e.browser,r=e.exports,o,l;return s&&(typeof s=="string"?l=s:typeof s=="object"&&([o]=Object.keys(s).filter(a=>R.test(a)),l=o in s&&s[o])),r&&(typeof r=="string"?l=r:typeof r.import=="string"?l=r.import:r["."]&&(typeof r["."]=="string"&&(l=r["."]),typeof r["."].import=="string"&&(l=r["."].import),Array.isArray(r["."])&&(l=r["."].reduce((a,d)=>typeof d=="object"&&d.import?d.import:a,null)))),l},n.getpackagepath=(e,t)=>n.isfilesync(e)&&(e=g(e))&&(n.gettargetindex(e,t)||e.main),n.getasfilesync=e=>{var t=null;return n.isfilesync(e)?t=e:p.some(i=>n.isfilesync(e+i)&&(t=e+i)),t},n.getasdirsync=(e,t)=>{let i=null,s,r=c.join(e,_);return(s=n.getpackagepath(r,t))?i=n.getasfilesync(c.join(e,s)):p.some(o=>(o=c.join(e,`index${o}`))&&n.isfilesync(o)&&(i=o)),i},n.getasfileordir=(e,t,i)=>{const s=x.test(e)?c.join(t,e):e;return n.getasfilesync(s,i)||n.getasdirsync(s,i)},n.getasnode_module=(e,t,i)=>{const s=n.getasnode_module_paths(t).sort((r,o)=>r.length>o.length);return function r(o,l,a=l-1){return l--?n.getasfileordir(c.join(o[a-l],e),null,i)||r(o,l,a):null}(s,s.length)},n.getfirstparent_packagejson=e=>{let{join:t,sep:i}=c,s=e.split(i),r,o;for(let l=s.length;l--;)if(s[l]&&(o=t(i,t.apply(l,s.slice(0,l+1)),r),n.isfilesync(o))){r=g(o);break}return r},n.getasnode_module_paths=e=>e.split(c.sep).slice(1).reduce((t,i,s)=>(i===y&&!h.test(e)||(i=c.resolve(c.join(s?t[0][s-1]:c.sep,i)),t[0].push(i),t[1].push(c.join(i,y))),t),[[],[]])[1].reverse(),n.getasdirname=e=>c.resolve(c.extname(e)?c.dirname(e):e),n))(); | ||
import u from"fs";import c from"path";import f from"module";const g=f.createRequire(import.meta.url),x=u.realpathSync.native,p=new RegExp("^(?:node:)?("+f.builtinModules.join("|").replace("/","/")+")$"),b=/^\.?\.?([a-zA-Z]:)?(\/|\\)/,R=/^.\.?(?=\/|\\)/,m=/\\/g,h=/^[a-zA-Z]:/,_=/index.[tj]sx?$/,k=/[\\/]resolvewithplus[\\/]/,y=[".js",".mjs",".ts",".tsx",".json",".node"],j="node_modules",v="package.json";export default(s=>(s=(e,t,i)=>{let n=s.cache[e+t];return n||(n=s.begin(e,t,i||{}),s.cache[e+t]=n)},s.cache={},s.pathToPosix=e=>m.test(e)?e.replace(h,"").replace(m,c.posix.sep):e,s.begin=(e,t,i)=>{var n=null;return t=typeof t=="string"?s.getasdirname(decodeURI(t)):process.cwd(),p.test(e)?n=e:(n=b.test(e)?s.getasfileordir(s.pathToPosix(e),t,i):s.getasnode_module(e,t),n=n&&x(n)),n},s.iscoremodule=e=>p.test(e),s.isfilesync=(e,t)=>{try{t=u.statSync(e)}catch{t=!1}return t&&(t.isFile()||t.isFIFO())},s.gettargetindex=(e,t)=>{let n=t&&t.ismodule&&e.module||t&&t.browser&&e.browser,r=e.exports,o,l;return n&&(typeof n=="string"?l=n:typeof n=="object"&&([o]=Object.keys(n).filter(a=>_.test(a)),l=o in n&&n[o])),r&&(typeof r=="string"?l=r:typeof r.import=="string"?l=r.import:r["."]&&(typeof r["."]=="string"&&(l=r["."]),typeof r["."].import=="string"&&(l=r["."].import),Array.isArray(r["."])&&(l=r["."].reduce((a,d)=>typeof d=="object"&&d.import?d.import:a,null)))),l},s.getpackagepath=(e,t)=>s.isfilesync(e)&&(e=g(e))&&(s.gettargetindex(e,t)||e.main),s.getasfilesync=e=>{var t=null;return s.isfilesync(e)?t=e:y.some(i=>s.isfilesync(e+i)&&(t=e+i)),t},s.getasdirsync=(e,t)=>{let i=null,n,r=c.join(e,v);return(n=s.getpackagepath(r,t))?i=s.getasfilesync(c.join(e,n)):y.some(o=>(o=c.join(e,`index${o}`))&&s.isfilesync(o)&&(i=o)),i},s.getasfileordir=(e,t,i)=>{const n=R.test(e)?c.join(t,e):e;return s.getasfilesync(n,i)||s.getasdirsync(n,i)},s.getasnode_module=(e,t,i)=>{const n=s.getasnode_module_paths(t).sort((r,o)=>r.length>o.length);return function r(o,l,a=l-1){return l--?s.getasfileordir(c.join(o[a-l],e),null,i)||r(o,l,a):null}(n,n.length)},s.getfirstparent_packagejson=e=>{let{join:t,sep:i}=c,n=e.split(i),r,o;for(let l=n.length;l--;)if(n[l]&&(o=t(i,t.apply(l,n.slice(0,l+1)),r),s.isfilesync(o))){r=g(o);break}return r},s.getasnode_module_paths=e=>e.split(c.sep).slice(1).reduce((t,i,n)=>(i===j&&!k.test(e)||(i=c.resolve(c.join(n?t[0][n-1]:c.sep,i)),t[0].push(i),t[1].push(c.join(i,j))),t),[[],[]])[1].reverse(),s.getasdirname=e=>c.resolve(c.extname(e)?c.dirname(e):e),s))(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5027