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

esbuild-code-inspector-plugin

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-code-inspector-plugin - npm Package Compare versions

Comparing version 0.17.4 to 0.17.5-beta.1

2

dist/index.js

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

"use strict";var f=(n,u,r)=>new Promise((a,l)=>{var d=e=>{try{o(r.next(e))}catch(s){l(s)}},t=e=>{try{o(r.throw(e))}catch(s){l(s)}},o=e=>e.done?a(e.value):Promise.resolve(e.value).then(d,t);o((r=r.apply(n,u)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("code-inspector-core"),C=require("fs"),h=require("path"),v="esbuild-code-inspector-plugin";function b(n){return{name:v,setup(u){if(n.close||!i.isDev(n.dev,!1))return;const r={port:0,entry:"",output:n.output},{escapeTags:a=[]}=n,l=new Map;u.onLoad({filter:n.match||/\.(jsx|tsx|js|ts|mjs|mts)?$/},d=>f(this,null,function*(){const t=d.path;let o=yield C.promises.readFile(t,"utf8"),e=l.get(t);if(!e||e.originCode!==o){let s=yield i.getCodeWithWebComponent(n,t,o,r),c="";if(i.isJsTypeFile(t)?c="jsx":t.endsWith(".svelte")&&(c="svelte"),c)s=i.transformCode({content:s,filePath:t,fileType:c,escapeTags:a});else if(t.endsWith(".vue")){c="vue";const{descriptor:p}=i.parseSFC(s,{sourceMap:!1}),g=i.transformCode({content:p.template.content,filePath:t,fileType:c,escapeTags:a});s=s.replace(p.template.content,g)}const m=h.extname(t).replace(".","");e={originCode:o,output:{contents:s,loader:m}},l.set(t,e)}return e.output}))}}}exports.EsbuildCodeInspectorPlugin=b;
"use strict";var f=(n,u,r)=>new Promise((a,l)=>{var d=e=>{try{o(r.next(e))}catch(s){l(s)}},t=e=>{try{o(r.throw(e))}catch(s){l(s)}},o=e=>e.done?a(e.value):Promise.resolve(e.value).then(d,t);o((r=r.apply(n,u)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("code-inspector-core"),C=require("fs"),h=require("path"),v="esbuild-code-inspector-plugin";function b(n){return{name:v,setup(u){if(n.close||!i.isDev(n.dev,!1))return;const r={port:0,entry:"",output:n.output},{escapeTags:a=[]}=n,l=new Map;u.onLoad({filter:n.match||/\.(jsx|tsx|js|ts|mjs|mts)?$/},d=>f(this,null,function*(){const t=d.path;let o=yield C.promises.readFile(t,"utf8"),e=l.get(t);if(!e||e.originCode!==o){let s=yield i.getCodeWithWebComponent({options:n,file:t,code:o,record:r}),c="";if(i.isJsTypeFile(t)?c="jsx":t.endsWith(".svelte")&&(c="svelte"),c)s=i.transformCode({content:s,filePath:t,fileType:c,escapeTags:a});else if(t.endsWith(".vue")){c="vue";const{descriptor:p}=i.parseSFC(s,{sourceMap:!1}),g=i.transformCode({content:p.template.content,filePath:t,fileType:c,escapeTags:a});s=s.replace(p.template.content,g)}const m=h.extname(t).replace(".","");e={originCode:o,output:{contents:s,loader:m}},l.set(t,e)}return e.output}))}}}exports.EsbuildCodeInspectorPlugin=b;
{
"name": "esbuild-code-inspector-plugin",
"version": "0.17.4",
"version": "0.17.5-beta.1",
"main": "./dist/index.js",

@@ -41,3 +41,3 @@ "module": "./dist/index.mjs",

"dependencies": {
"code-inspector-core": "0.17.4"
"code-inspector-core": "0.17.5-beta.1"
},

@@ -44,0 +44,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

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