Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@code-inspector/webpack

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@code-inspector/webpack - npm Package Compare versions

Comparing version
1.4.0
to
1.4.1
+1
-1
dist/loader.js

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

"use strict";var T=(s,e,t)=>new Promise((p,a)=>{var o=i=>{try{c(t.next(i))}catch(n){a(n)}},u=i=>{try{c(t.throw(i))}catch(n){a(n)}},c=i=>i.done?p(i.value):Promise.resolve(i.value).then(o,u);c((t=t.apply(s,e)).next())});const r=require("@code-inspector/core"),x=["isJsx","isTsx","lang.jsx","lang.tsx"];function S(s){return T(this,null,function*(){var f,y,g;this.cacheable&&this.cacheable(!0);let e=r.normalizePath(this.resourcePath),t=new URLSearchParams(((f=this.resource.split("?"))==null?void 0:f[1])||"");const p=this.query;let{escapeTags:a=[],mappings:o}=p||{};if(r.isExcludedFile(e,p))return s;if(e=r.getMappingFilePath(e,o),r.isJsTypeFile(e)||e.endsWith(".vue")&&x.some(l=>t.get(l)!==null))return r.transformCode({content:s,filePath:e,fileType:"jsx",escapeTags:a,pathType:p.pathType});if(e.endsWith(".vue")&&(t.get("lang")==="tsx"||t.get("lang")==="jsx")){const{descriptor:l}=r.parseSFC(s,{sourceMap:!1}),d=[(y=l.script)==null?void 0:y.content,(g=l.scriptSetup)==null?void 0:g.content];for(const h of d){if(!h)continue;const m=r.transformCode({content:h,filePath:e,fileType:"jsx",escapeTags:a,pathType:p.pathType});s=s.replace(h,m)}return s}const i=e.endsWith(".vue")&&t.get("type")!=="style"&&t.get("type")!=="script"&&t.get("raw")===null,n=e.endsWith(".html")&&t.get("type")==="template"&&t.has("vue");return i||n?r.transformCode({content:s,filePath:e,fileType:"vue",escapeTags:a,pathType:p.pathType}):e.endsWith(".svelte")?r.transformCode({content:s,filePath:e,fileType:"svelte",escapeTags:a,pathType:p.pathType}):s})}module.exports=S;
"use strict";var T=(s,e,t)=>new Promise((p,a)=>{var o=i=>{try{c(t.next(i))}catch(n){a(n)}},u=i=>{try{c(t.throw(i))}catch(n){a(n)}},c=i=>i.done?p(i.value):Promise.resolve(i.value).then(o,u);c((t=t.apply(s,e)).next())});const r=require("@code-inspector/core"),x=["isJsx","isTsx","lang.jsx","lang.tsx"];function S(s){return T(this,null,function*(){var f,y,g;this.cacheable&&this.cacheable(!0);let e=r.normalizePath(this.resourcePath),t=new URLSearchParams(((f=this.resource.split("?"))==null?void 0:f[1])||"");const p=this.query;let{escapeTags:a=[],mappings:o}=p||{};if(r.isExcludedFile(e,p))return s;if(e=r.getMappingFilePath(e,o),r.isJsTypeFile(e)||e.endsWith(".vue")&&x.some(l=>t.get(l)!==null))return r.transformCode({content:s,filePath:e,fileType:"jsx",escapeTags:a,pathType:p.pathType});if(e.endsWith(".vue")&&(t.get("lang")==="tsx"||t.get("lang")==="jsx")){const{descriptor:l}=r.parseSFC(s,{sourceMap:!1}),d=[(y=l.script)==null?void 0:y.content,(g=l.scriptSetup)==null?void 0:g.content];for(const h of d){if(!h)continue;const m=r.transformCode({content:h,filePath:e,fileType:"jsx",escapeTags:a,pathType:p.pathType});s=s.replace(h,()=>m)}return s}const i=e.endsWith(".vue")&&t.get("type")!=="style"&&t.get("type")!=="script"&&t.get("raw")===null,n=e.endsWith(".html")&&t.get("type")==="template"&&t.has("vue");return i||n?r.transformCode({content:s,filePath:e,fileType:"vue",escapeTags:a,pathType:p.pathType}):e.endsWith(".svelte")?r.transformCode({content:s,filePath:e,fileType:"svelte",escapeTags:a,pathType:p.pathType}):s})}module.exports=S;
{
"name": "@code-inspector/webpack",
"version": "1.4.0",
"version": "1.4.1",
"main": "./dist/index.umd.js",

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

"dependencies": {
"@code-inspector/core": "1.4.0"
"@code-inspector/core": "1.4.1"
},

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