esbuild-plugin-less
Advanced tools
Comparing version 1.1.11 to 1.1.12
@@ -1,1 +0,1 @@ | ||
var C=Object.create;var i=Object.defineProperty,E=Object.defineProperties,P=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,F=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var g=(e,t,s)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,L=(e,t)=>{for(var s in t||={})x.call(t,s)&&g(e,s,t[s]);if(d)for(var s of d(t))S.call(t,s)&&g(e,s,t[s]);return e},v=(e,t)=>E(e,$(t));var M=(e,t)=>{for(var s in t)i(e,s,{get:t[s],enumerable:!0})},w=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of D(t))!x.call(e,o)&&o!==s&&i(e,o,{get:()=>t[o],enumerable:!(n=P(t,o))||n.enumerable});return e};var m=(e,t,s)=>(s=e!=null?C(F(e)):{},w(t||!e||!e.__esModule?i(s,"default",{value:e,enumerable:!0}):s,e)),T=e=>w(i({},"__esModule",{value:!0}),e);var z={};M(z,{lessLoader:()=>q});module.exports=T(z);var p=m(require("path")),y=require("fs"),O=m(require("less"));var I=m(require("fs")),a=m(require("path")),U=/@import.*?["']([^"']+)["'].*?/,W=/@import.*?["']([^"']+)["'].*?/g,j=/(?:\/\*(?:[\s\S]*?)\*\/)|(\/\/(?:.*)$)/gm,k=[".css",".less"],f=e=>{try{let t=a.default.dirname(e),c=(I.default.readFileSync(e).toString("utf8").replace(j,"").match(W)||[]).map(r=>r.match(U)[1]).filter(r=>!!r).map(r=>a.default.resolve(t,a.default.extname(r)?r:`${r}.less`));return c.reduce((r,h)=>[...r,...f(h)],c).filter(r=>k.includes(a.default.extname(r).toLowerCase()))}catch(t){return[]}},R=e=>{let t=e.extract.filter(n=>n),s=t.length===3?t[1]:t[0];return{text:e.message,location:{namespace:"file",file:e.filename,line:e.line,column:e.column,lineText:s}}};var q=(e={},t={})=>({name:"less-loader",setup:s=>{let n=t.filter;s.onResolve({filter:n||/\.less$/,namespace:"file"},o=>{let c=p.default.resolve(process.cwd(),p.default.relative(process.cwd(),o.resolveDir),o.path);return{path:c,watchFiles:s.initialOptions.watch?[c,...f(c)]:void 0}}),s.onLoad({filter:n||/\.less$/,namespace:"file"},async o=>{let c=await y.promises.readFile(o.path,"utf-8"),l=p.default.dirname(o.path),u=v(L({filename:o.path,relativeUrls:!0},e),{paths:[...e.paths||[],l]});try{return{contents:(await O.default.render(c,u)).css,loader:"css",resolveDir:l}}catch(r){return{errors:[R(r)],resolveDir:l}}})}});0&&(module.exports={lessLoader}); | ||
var E=Object.create;var a=Object.defineProperty,O=Object.defineProperties,P=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,F=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var g=(e,t,s)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,L=(e,t)=>{for(var s in t||={})x.call(t,s)&&g(e,s,t[s]);if(d)for(var s of d(t))S.call(t,s)&&g(e,s,t[s]);return e},v=(e,t)=>O(e,$(t));var M=(e,t)=>{for(var s in t)a(e,s,{get:t[s],enumerable:!0})},w=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of D(t))!x.call(e,o)&&o!==s&&a(e,o,{get:()=>t[o],enumerable:!(n=P(t,o))||n.enumerable});return e};var m=(e,t,s)=>(s=e!=null?E(F(e)):{},w(t||!e||!e.__esModule?a(s,"default",{value:e,enumerable:!0}):s,e)),T=e=>w(a({},"__esModule",{value:!0}),e);var q={};M(q,{lessLoader:()=>k});module.exports=T(q);var p=m(require("path")),y=require("fs"),C=m(require("less"));var I=m(require("fs")),i=m(require("path")),U=/@import.*?["']([^"']+)["'].*?/,W=/@import.*?["']([^"']+)["'].*?/g,b=/(?:\/\*(?:[\s\S]*?)\*\/)|(\/\/(?:.*)$)/gm,j=[".css",".less"],f=e=>{try{let t=i.default.dirname(e),c=(I.default.readFileSync(e).toString("utf8").replace(b,"").match(W)||[]).map(r=>r.match(U)[1]).filter(r=>!!r).map(r=>i.default.resolve(t,i.default.extname(r)?r:`${r}.less`));return c.reduce((r,h)=>[...r,...f(h)],c).filter(r=>j.includes(i.default.extname(r).toLowerCase()))}catch(t){return[]}},R=e=>{let t=e.extract.filter(n=>n),s=t.length===3?t[1]:t[0];return{text:e.message,location:{namespace:"file",file:e.filename,line:e.line,column:e.column,lineText:s}}};var k=(e={},t={})=>({name:"less-loader",setup:s=>{let n=t.filter;s.onResolve({filter:n||/\.less$/,namespace:"file"},o=>{let c=p.default.resolve(process.cwd(),p.default.relative(process.cwd(),o.resolveDir),o.path);return{path:c,watchFiles:[c,...f(c)]}}),s.onLoad({filter:n||/\.less$/,namespace:"file"},async o=>{let c=await y.promises.readFile(o.path,"utf-8"),l=p.default.dirname(o.path),u=v(L({filename:o.path,relativeUrls:!0},e),{paths:[...e.paths||[],l]});try{return{contents:(await C.default.render(c,u)).css,loader:"css",resolveDir:l}}catch(r){return{errors:[R(r)],resolveDir:l}}})}});0&&(module.exports={lessLoader}); |
{ | ||
"name": "esbuild-plugin-less", | ||
"version": "1.1.11", | ||
"version": "1.1.12", | ||
"description": "esbuild plugin for less files", | ||
@@ -39,23 +39,23 @@ "repository": "https://github.com/iam-medvedev/esbuild-plugin-less.git", | ||
"devDependencies": { | ||
"@semantic-release/changelog": "6.0.1", | ||
"@semantic-release/changelog": "6.0.2", | ||
"@semantic-release/commit-analyzer": "9.0.2", | ||
"@semantic-release/github": "8.0.6", | ||
"@semantic-release/npm": "9.0.1", | ||
"@semantic-release/github": "8.0.7", | ||
"@semantic-release/npm": "9.0.2", | ||
"@semantic-release/release-notes-generator": "10.0.3", | ||
"@types/node": "^18.11.9", | ||
"@vitest/coverage-c8": "^0.25.2", | ||
"@types/node": "^18.11.18", | ||
"@vitest/coverage-c8": "^0.27.1", | ||
"cz-conventional-changelog": "3.3.0", | ||
"esbuild": "^0.16.1", | ||
"esbuild": "^0.17.0", | ||
"git-cz": "4.9.0", | ||
"husky": "7.0.2", | ||
"lint-staged": "13.0.3", | ||
"prettier": "2.7.1", | ||
"semantic-release": "19.0.5", | ||
"lint-staged": "13.1.0", | ||
"prettier": "2.8.3", | ||
"semantic-release": "20.0.2", | ||
"ts-node": "10.9.1", | ||
"typescript": "4.9.3", | ||
"vite": "^3.2.4", | ||
"vitest": "^0.25.2" | ||
"typescript": "4.9.4", | ||
"vite": "^4.0.4", | ||
"vitest": "^0.27.1" | ||
}, | ||
"peerDependencies": { | ||
"esbuild": "^0.14.x || ^0.15.0 || ^0.16.0" | ||
"esbuild": "^0.14.x || ^0.15.0 || ^0.16.0 || ^0.17.0" | ||
}, | ||
@@ -72,3 +72,3 @@ "dependencies": { | ||
"volta": { | ||
"node": "18.12.1", | ||
"node": "18.13.0", | ||
"yarn": "1.22.19" | ||
@@ -91,3 +91,3 @@ }, | ||
}, | ||
"packageManager": "yarn@3.3.0" | ||
"packageManager": "yarn@3.3.1" | ||
} |
Sorry, the diff of this file is not supported yet
10260