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.8 to 2.0.9

2

package.json
{
"name": "resolvewithplus",
"version": "2.0.8",
"version": "2.0.9",
"description": "resolvewith with extra power",

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

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

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