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

@esbuild-kit/cjs-loader

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@esbuild-kit/cjs-loader - npm Package Compare versions

Comparing version 2.3.2 to 2.3.3

2

dist/index.js

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

"use strict";var T=require("path"),g=require("fs"),S=require("module"),o=require("@esbuild-kit/core-utils"),i=require("get-tsconfig");function l(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var p=l(T),y=l(g),f=l(S);const N=/^\.{0,2}\//,P=/\.[cm]?tsx?$/,E=`${p.default.sep}node_modules${p.default.sep}`,a=process.env.ESBK_TSCONFIG_PATH?{path:process.env.ESBK_TSCONFIG_PATH,config:i.parseTsconfig(process.env.ESBK_TSCONFIG_PATH)}:i.getTsconfig(),F=a==null?void 0:a.config,m=a&&i.createPathsMatcher(a),_=o.installSourceMapSupport(),O=o.compareNodeVersion([13,2,0])>=0||o.compareNodeVersion([12,20,0])>=0&&o.compareNodeVersion([13,0,0])<0;function h(e,s){process.send&&process.send({type:"dependency",path:s});let t=y.default.readFileSync(s,"utf8");if(s.endsWith(".cjs")&&O){const r=o.transformDynamicImport(t);r&&(t=o.applySourceMap(r,s,_))}else{const r=o.transformSync(t,s,{tsconfigRaw:F});t=o.applySourceMap(r,s,_)}e._compile(t,s)}const v=f.default._extensions;[".js",".ts",".tsx",".jsx"].forEach(e=>{v[e]=h}),Object.defineProperty(v,".mjs",{value:h,enumerable:!1});const M=o.compareNodeVersion([16,0,0])>=0||o.compareNodeVersion([14,18,0])>=0,d=f.default._resolveFilename;f.default._resolveFilename=function(e,s,t,r){if(!M&&e.startsWith("node:")&&(e=e.slice(5)),m&&!N.test(e)&&!(s!=null&&s.filename.includes(E))){const c=m(e);for(const n of c)try{return d.call(this,n,s,t,r)}catch{}}if(s&&P.test(s.filename)){const c=o.resolveTsPath(e);if(c)try{return d.call(this,c,s,t,r)}catch(n){const{code:u}=n;if(u!=="MODULE_NOT_FOUND"&&u!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw n}}return d.call(this,e,s,t,r)};
"use strict";var S=require("path"),y=require("fs"),F=require("module"),r=require("@esbuild-kit/core-utils"),i=require("get-tsconfig");function f(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var m=f(S),N=f(y),u=f(F);const P=/^\.{0,2}\//,E=/\.[cm]?tsx?$/,O=`${m.default.sep}node_modules${m.default.sep}`,l=process.env.ESBK_TSCONFIG_PATH?{path:process.env.ESBK_TSCONFIG_PATH,config:i.parseTsconfig(process.env.ESBK_TSCONFIG_PATH)}:i.getTsconfig(),b=l==null?void 0:l.config,_=l&&i.createPathsMatcher(l),h=r.installSourceMapSupport(),j=r.compareNodeVersion([13,2,0])>=0||r.compareNodeVersion([12,20,0])>=0&&r.compareNodeVersion([13,0,0])<0;function v(e,s){process.send&&process.send({type:"dependency",path:s});let t=N.default.readFileSync(s,"utf8");if(s.endsWith(".cjs")&&j){const o=r.transformDynamicImport(t);o&&(t=r.applySourceMap(o,s,h))}else{const o=r.transformSync(t,s,{tsconfigRaw:b});t=r.applySourceMap(o,s,h)}e._compile(t,s)}const T=u.default._extensions;[".js",".ts",".tsx",".jsx"].forEach(e=>{T[e]=v}),Object.defineProperty(T,".mjs",{value:v,enumerable:!1});const x=r.compareNodeVersion([16,0,0])>=0||r.compareNodeVersion([14,18,0])>=0,d=u.default._resolveFilename;u.default._resolveFilename=function(e,s,t,o){if(!x&&e.startsWith("node:")&&(e=e.slice(5)),_&&!P.test(e)&&!(s!=null&&s.filename.includes(O))){const a=_(e);for(const n of a){const p=g.call(this,n,s,t,o);if(p)return p;try{return d.call(this,n,s,t,o)}catch{}}}const c=g.call(this,e,s,t,o);return c||d.call(this,e,s,t,o)};function g(e,s,t,o){const c=r.resolveTsPath(e);if(s&&E.test(s.filename)&&c)try{return d.call(this,c,s,t,o)}catch(a){const{code:n}=a;if(n!=="MODULE_NOT_FOUND"&&n!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw a}}
{
"name": "@esbuild-kit/cjs-loader",
"version": "2.3.2",
"version": "2.3.3",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

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