Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

resolvewithplus

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolvewithplus - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

2

package.json
{
"name": "resolvewithplus",
"version": "2.0.3",
"version": "2.0.4",
"description": "resolvewith with extra power",

@@ -5,0 +5,0 @@ "readmeFilename": "README.md",

@@ -1,1 +0,1 @@

import w from"fs";import $ from"url";import o from"path";import S from"module";const g=S.createRequire(import.meta.url),T=w.realpathSync.native,_=new RegExp("^(?:node:)?("+S.builtinModules.join("|").replace("/","/")+")$"),C=/^\.?\.?([a-zA-Z]:)?(\/|\\)/,p=/^.\.?(?=\/|\\)/,E=/\\/g,D=/index.[tj]sx?$/,G=/[\\/]resolvewithplus[\\/]/,P=/\.js$/,J=/\.ts$/,Z=/(^@[^/]*\/[^/]*|^[^/]*)\/?(.*)$/,x=/^#/,F=/(\*)/g,O=/([./])/g,H=/^node:/,Q=/^file:/,U=[".js",".mjs",".ts",".tsx",".json",".node"],v="node_modules",j="package.json",A="node",L="default",R="import",h=".",k=t=>t&&typeof t=="object",b={},X=t=>H.test(t)?t:`node:${t}`,Y=t=>t&&$.pathToFileURL(t).href,I=t=>_.test(t),tt=t=>Q.test(t)?$.fileURLToPath(t):t,et=t=>o.resolve(o.extname(t)?o.dirname(t):t)+o.sep,y=t=>E.test(t)?t.replace(E,o.posix.sep):t,m=(t,n)=>{try{n=w.statSync(t)}catch{n=!1}return n&&(n.isFile()||n.isFIFO())},q=t=>t.split(o.sep).reduce((n,e,s)=>(e===v&&!G.test(t)||(e=s?o.join(n[0][s-1],e):e||o.sep,n[0].push(e),n[1].push(o.resolve(o.join(e,v)))),n),[[],[]])[1].reverse(),nt=t=>{const n=t.split(o.sep).slice(1).reduce((e,s,r)=>(e.push(o.resolve(o.join(r?e[r-1]:o.sep,s))),e),[]).reverse().find(e=>m(o.join(e,j)));return n&&o.join(n,j)},st=t=>(String(t).match(Z)||[]).slice(1),K=(t,n)=>new RegExp(t.replace(O,"\\$1").replace(F,".*")).test(n),ot=(t,n,e)=>{const s=new RegExp(t.replace(O,"\\$1").replace(F,"(.*)")),r=(e.match(s)||[])[1];return r&&n.replace("*",r)},M=(t,n,e,s=!1)=>(K(t,e)&&(n.includes("*")?K(n,e)?s=e:t.includes("*")&&t!==n&&(s=ot(t,n,e)):s=n),s),N=(t,n,e,s=t[0])=>t.length?(x.test(e)?x.test(s):p.test(s))&&typeof n[s]=="string"&&M(s,n[s],e)||N(t.slice(1),n,e):null,l=(t,n)=>{let e=!1;return typeof t=="string"?t:(!e&&Array.isArray(t)&&(e=t.reduce((s,r)=>s||l(r,n),null)),!e&&k(t)&&(typeof t[n]=="string"&&(e=t[n]),!e&&t[A]&&(e=l(t[A],n)),!e&&t[L]&&(e=l(t[L],n)),!e&&t[n]&&(e=l(t[n],n)),!e&&t[h]&&(e=typeof t[h]=="string"?n===R&&l(t[h],n):l(t[h],n)),e||(e=N(Object.keys(t),t,n))),e)},V=(t,n)=>{let e=n&&n.ismodule&&t.module,s=e||n&&n.browser&&t.browser,r=t.exports,c,i;return s&&(typeof s=="string"?i=s:k(s)&&([c]=Object.keys(s).filter(u=>D.test(u)),i=c in s&&s[c])),r&&(i=l(r,R)),i},a=t=>{var n=null;return m(t)?n=t:U.some(e=>m(t+e)&&(n=t+e)),n},W=(t,n)=>{let e=null,s,r=o.join(t,j),c=m(r)&&g(r);return(s=V(c,n))?e=a(o.join(t,s)):(s=c.main)?n.isTypescript&&P.test(s)?e=a(o.join(t,s.replace(P,".ts")))||a(o.join(t,s))||a(o.join(t,o.join(s,"index"))):e=a(o.join(t,s))||a(o.join(t,o.join(s,"index"))):U.some(i=>(i=o.join(t,`index${i}`))&&m(i)&&(e=i)),e},z=(t,n,e)=>{const s=p.test(t)?o.join(n,t):t;return a(s,e)||W(s,e)},rt=(t,n,e)=>{const s=e&&e.imports,r=l(s,n);return r&&(p.test(r)?o.join(t,r):B(r,t,{isposixpath:!0}))},it=(t,n,e,s)=>{const r=l(s&&s.exports,e?"./"+e:R);return r&&o.join(t,n,r)},ct=(t,n,e,s)=>{const r=o.join(t,n,j),c=m(r),i=c&&g(r);return c&&it(t,n,e,i,s)},lt=(t,n,e)=>{const s=nt(n),r=o.dirname(s);return s&&rt(r,t,g(s),e)},at=(t,n,e)=>{const[s,r]=st(t);if(x.test(s))return lt(t,n,e);const c=q(n).sort((i,u)=>i.length>u.length);return function i(u,f,d=f-1){return f--?ct(o.join(u[d-f]),s,r,e)||z(o.join(u[d-f],t),null,e)||i(c,f,d):null}(c,c.length)},ut=(t,n,e)=>{var s=null;return n=typeof n=="string"?et(tt(decodeURI(n))):process.cwd(),_.test(t)?s=X(t):(s=C.test(t)?z(y(t),n,e):at(t,n,e),s=s&&(e.isposixpath?T(s):Y(y(T(s))))),s},mt=(t,n,e)=>(e=e||{},e.isTypescript=typeof e.isTypescript=="boolean"?e.isTypescript:J.test(n),e),B=(t,n,e)=>{let s=b[t+n];return s||(e=mt(t,n,e),s=ut(t,n,e),b[t+n]=s)};export default Object.assign(B,{pathToPosix:y,getasnode_module_paths:q,getesmkeyvalmatch:M,getasfilesync:a,getasdirsync:W,gettargetindex:V,iscoremodule:I,esmparse:l,cache:b});
import w from"fs";import $ from"url";import r from"path";import S from"module";const g=S.createRequire(import.meta.url),T=w.realpathSync.native,_=new RegExp("^(?:node:)?("+S.builtinModules.join("|").replace("/","/")+")$"),C=/^\.?\.?([a-zA-Z]:)?(\/|\\)/,p=/^.\.?(?=\/|\\)/,E=/\\/g,D=/index.[tj]sx?$/,G=/[\\/]resolvewithplus[\\/]/,P=/\.js$/,J=/\.ts$/,Z=/(^@[^/]*\/[^/]*|^[^/]*)\/?(.*)$/,R=/^#/,F=/(\*)/g,v=/([./])/g,H=/^node:/,Q=/^file:/,O=[".js",".mjs",".ts",".tsx",".json",".node"],U="node_modules",h="package.json",A="node",L="default",x="import",d=".",k=t=>t&&typeof t=="object",b={},X=t=>H.test(t)?t:`node:${t}`,Y=t=>t&&$.pathToFileURL(t).href,I=t=>_.test(t),tt=t=>Q.test(t)?$.fileURLToPath(t):t,et=t=>r.resolve(r.extname(t)?r.dirname(t):t)+r.sep,y=t=>E.test(t)?t.replace(E,r.posix.sep):t,a=(t,s)=>{try{s=w.statSync(t)}catch{s=!1}return s&&(s.isFile()||s.isFIFO())},q=t=>t.split(r.sep).reduce((s,e,n)=>(e===U&&!G.test(t)||(e=n?r.join(s[0][n-1],e):e||r.sep,s[0].push(e),s[1].push(r.resolve(r.join(e,U)))),s),[[],[]])[1].reverse(),st=t=>{const s=t.split(r.sep).slice(1).reduce((e,n,o)=>(e.push(r.resolve(r.join(o?e[o-1]:r.sep,n))),e),[]).reverse().find(e=>a(r.join(e,h)));return s&&r.join(s,h)},nt=t=>(String(t).match(Z)||[]).slice(1),K=(t,s)=>new RegExp(t.replace(v,"\\$1").replace(F,".*")).test(s),ot=(t,s,e)=>{const n=new RegExp(t.replace(v,"\\$1").replace(F,"(.*)")),o=(e.match(n)||[])[1];return o&&s.replace("*",o)},M=(t,s,e,n=!1)=>(K(t,e)&&(s.includes("*")?K(s,e)?n=e:t.includes("*")&&t!==s&&(n=ot(t,s,e)):n=s),n),N=(t,s,e,n=t[0])=>t.length?(R.test(e)?R.test(n):p.test(n))&&typeof s[n]=="string"&&M(n,s[n],e)||N(t.slice(1),s,e):null,l=(t,s)=>{let e=!1;return typeof t=="string"?t:(!e&&Array.isArray(t)&&(e=t.reduce((n,o)=>n||l(o,s),null)),!e&&k(t)&&(typeof t[s]=="string"&&(e=t[s]),!e&&t[A]&&(e=l(t[A],s)),!e&&t[L]&&(e=l(t[L],s)),!e&&t[s]&&(e=l(t[s],s)),!e&&t[d]&&(e=typeof t[d]=="string"?s===x&&l(t[d],s):l(t[d],s)),e||(e=N(Object.keys(t),t,s))),e)},V=(t,s)=>{let e=s&&s.ismodule&&t.module,n=e||s&&s.browser&&t.browser,o=t.exports,c,i;return n&&(typeof n=="string"?i=n:k(n)&&([c]=Object.keys(n).filter(u=>D.test(u)),i=c in n&&n[c])),o&&(i=l(o,x)),i},f=(t,s={})=>{var e=null,n=s.isTypescript&&P.test(t)&&t.replace(P,".ts");return a(n)?e=n:a(t)?e=t:O.some(o=>a(t+o)&&(e=t+o)),e},W=(t,s)=>{let e=null,n,o=r.join(t,h),c=a(o)&&g(o);return(n=V(c,s))?e=f(r.join(t,n)):(n=c.main)?e=f(r.join(t,n),s)||f(r.join(t,r.join(n,"index"))):O.some(i=>(i=r.join(t,`index${i}`))&&a(i)&&(e=i)),e},z=(t,s,e)=>{const n=p.test(t)?r.join(s,t):t;return f(n,e)||W(n,e)},rt=(t,s,e)=>{const n=e&&e.imports,o=l(n,s);return o&&(p.test(o)?r.join(t,o):B(o,t,{isposixpath:!0}))},it=(t,s,e,n)=>{const o=l(n&&n.exports,e?"./"+e:x);return o&&r.join(t,s,o)},ct=(t,s,e,n)=>{const o=r.join(t,s,h),c=a(o),i=c&&g(o);return c&&it(t,s,e,i,n)},lt=(t,s,e)=>{const n=st(s),o=r.dirname(n);return n&&rt(o,t,g(n),e)},at=(t,s,e)=>{const[n,o]=nt(t);if(R.test(n))return lt(t,s,e);const c=q(s).sort((i,u)=>i.length>u.length);return function i(u,m,j=m-1){return m--?ct(r.join(u[j-m]),n,o,e)||z(r.join(u[j-m],t),null,e)||i(c,m,j):null}(c,c.length)},ut=(t,s,e)=>{var n=null;return s=typeof s=="string"?et(tt(decodeURI(s))):process.cwd(),_.test(t)?n=X(t):(n=C.test(t)?z(y(t),s,e):at(t,s,e),n=n&&(e.isposixpath?T(n):Y(y(T(n))))),n},mt=(t,s,e)=>(e=e||{},e.isTypescript=typeof e.isTypescript=="boolean"?e.isTypescript:J.test(s),e),B=(t,s,e)=>{let n=b[t+s];return n||(e=mt(t,s,e),n=ut(t,s,e),b[t+s]=n)};export default Object.assign(B,{pathToPosix:y,getasnode_module_paths:q,getesmkeyvalmatch:M,getasfilesync:f,getasdirsync:W,gettargetindex:V,iscoremodule:I,esmparse:l,cache:b});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc