@moneko/core 3.55.6 → 3.55.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/plugin/eslint.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fileURLToPath as e}from"node:url";import{Worker as t}from"node:worker_threads";import s from"webpack";class o extends s.WebpackError{constructor(e){super(`[ESLint] ${e}`),this.name="ESLintError",this.stack=""}}export class ESLintPlugin{constructor(s={files:[]}){this.name="ESLintPlugin",this.options=s,this.worker=new t(e(new URL("../worker/eslint.mjs",import.meta.url))),this.worker.setMaxListeners(0)}apply(e){e.hooks.thisCompilation.tap(this.name,t=>{let s=e.modifiedFiles||new Set;t.hooks.finishModules.tap(this.name,e=>{let
|
|
1
|
+
import{fileURLToPath as e}from"node:url";import{Worker as t}from"node:worker_threads";import s from"webpack";class o extends s.WebpackError{constructor(e){super(`[ESLint] ${e}`),this.name="ESLintError",this.stack=""}}export class ESLintPlugin{constructor(s={files:[]}){this.name="ESLintPlugin",this.options=s,this.worker=new t(e(new URL("../worker/eslint.mjs",import.meta.url))),this.worker.setMaxListeners(0)}apply(e){e.hooks.thisCompilation.tap(this.name,t=>{let s=e.modifiedFiles||new Set,o=e=>{this.report(t,e)};this.worker.on("message",o),t.hooks.finishModules.tap(this.name,e=>{let t=this.options;if(this.options?.lintDirtyModulesOnly){let o=[];for(let t of e){let e=t.resource;s.has(e)&&o.push(e)}t.files=o}this.worker.postMessage({options:t})})}),"development"!==e.options.mode&&e.hooks.done.tap(this.name,()=>{this.worker.terminate()})}report(e,t){t?.length&&e&&(t[0]?.length&&e.warnings.push(new o(t[0])),t[1]?.length&&e.errors.push(new o(t[1])))}}
|
package/lib/plugin/stylelint.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fileURLToPath as t}from"node:url";import{Worker as e}from"node:worker_threads";import r from"webpack";class
|
|
1
|
+
import{fileURLToPath as t}from"node:url";import{Worker as e}from"node:worker_threads";import r from"webpack";class o extends r.WebpackError{constructor(t){super(`[Stylelint] ${t}`),this.name="StylelintError",this.stack=""}}export class StylelintPlugin{constructor(r={files:[]}){this.name="StylelintPlugin",this.options=r,this.worker=new e(t(new URL("../worker/stylelint.mjs",import.meta.url))),this.worker.setMaxListeners(0)}apply(t){t.hooks.thisCompilation.tap(this.name,t=>{let e=e=>{this.report(e,t)};this.worker.postMessage({options:this.options}),this.worker.on("message",e)}),"development"!==t.options.mode&&t.hooks.done.tap(this.name,()=>{this.worker.terminate()})}report(t,e){t?.length&&e&&(t[0]?.length&&e.warnings.push(new o(t[0])),t[1]?.length&&e.errors.push(new o(t[1])))}}
|
package/lib/worker/eslint.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let e
|
|
1
|
+
let a,e;import{relative as t}from"node:path";import{parentPort as r}from"node:worker_threads";import{ESLint as o}from"@moneko/eslint";import i from"../commom/paths.mjs";if(!r)throw Error("This file must be run as a worker");r?.setMaxListeners(0),r.on("message",async({options:s})=>{a||(a=new o({cache:s.cache,cacheLocation:s.cacheLocation,cacheStrategy:s.cacheStrategy,fix:s.fix}),e=await a.loadFormatter("stylish"));let m=s.files.map(a=>(s.lintDirtyModulesOnly?t(i.programPath,a):a).replace(/\\/g,"/")),n=await a.lintFiles(m),c=[],l=[];s.fix&&await o.outputFixes(n),n.forEach(a=>{a.errorCount?l.push(a):a.warningCount&&c.push(a)});let h=await Promise.all([e.format(c),e.format(l)]);r.postMessage(h.map(a=>a.replace(/[^\r\n]*(\r?\n)*$/,"")))});
|
package/lib/worker/stylelint.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parentPort as e}from"node:worker_threads";import{stylelint as r}from"@moneko/stylelint";if(!e)throw Error("This file must be run as a worker");let t=
|
|
1
|
+
import{parentPort as e}from"node:worker_threads";import{stylelint as r}from"@moneko/stylelint";if(!e)throw Error("This file must be run as a worker");let t=await r.formatters.string;e?.setMaxListeners(0),e.on("message",async({options:i})=>{let n=await r.lint({cache:i.cache,cacheLocation:i.cacheLocation,fix:i.fix,files:i.files.map(e=>e.replace(/\\/g,"/")),quietDeprecationWarnings:i.quietDeprecationWarnings,quiet:i.quiet});delete n.output;let a=[],s=[];n.results.forEach(e=>{if(!e.ignored&&(e.errored||e.parseErrors.length||e.invalidOptionWarnings.length||e.deprecations.length)){let r=[],t=[];e.warnings.forEach(e=>{"error"===e.severity?r.push(e):"warning"===e.severity&&t.push(e)}),r.length>0&&a.push({...e,warnings:r}),t.length>0&&s.push({...e,warnings:t})}});let o=[t(s,n),t(a,n)];e.postMessage(o.map(e=>e.replace(/[^\r\n]*(\r?\n)*$/,"")))});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "3.55.
|
|
3
|
+
"version": "3.55.8",
|
|
4
4
|
"description": "core",
|
|
5
5
|
"main": "lib/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"less-loader": "12.3.0",
|
|
127
127
|
"lightningcss": "1.30.1",
|
|
128
128
|
"marked-completed": "1.2.14",
|
|
129
|
-
"memfs": "4.
|
|
129
|
+
"memfs": "4.42.0",
|
|
130
130
|
"mini-css-extract-plugin": "2.9.4",
|
|
131
131
|
"style-loader": "4.0.0",
|
|
132
132
|
"swc-loader": "0.2.6",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"@types/stylis": "4.2.7",
|
|
142
142
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
143
143
|
"@types/webpack-hot-middleware": "2.25.10",
|
|
144
|
-
"sass": "1.93.
|
|
144
|
+
"sass": "1.93.2",
|
|
145
145
|
"sass-loader": "16.0.5",
|
|
146
146
|
"solid-refresh": "0.7.5",
|
|
147
147
|
"stylis": "4.3.6",
|