@moneko/core 4.8.6-beta.10 → 4.8.6-beta.11

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.
@@ -0,0 +1,2 @@
1
+ import type { Compilation } from 'webpack';
2
+ export declare function pureCache(compilation: Compilation): void;
@@ -0,0 +1 @@
1
+ import e from"node:process";let t=new Set,l=!1;export function pureCache(o){let r=new Set(o.getAssets().map(e=>e?.name).filter(e=>"string"==typeof e&&e.length>0)),a=[...t].filter(e=>!r.has(e));t.clear(),r.forEach(e=>t.add(e));let c=o.compiler.options.output?.path,n=o.compiler.outputFileSystem;c&&a.length>0&&n?.unlink&&a.forEach(e=>{n.unlink?.(`${c.replace(/[\\/]$/,"")}/${e.replace(/^[\\/]/,"")}`,()=>{})});let p=Number(e?.env?.MONEKO_DEV_HEAP_LIMIT_MB||3072),i=o.compiler.cache,s=e?.memoryUsage?.();!l&&s&&i?.clear&&!(s.heapUsed<1024*p*1024)&&(l=!0,i.clear(e=>{l=!1,e||"function"!=typeof globalThis.gc||globalThis.gc()}))}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "4.8.6-beta.10",
3
+ "version": "4.8.6-beta.11",
4
4
  "description": "@moneko/core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",