@visulima/packem 2.0.0-alpha.43 → 2.0.0-alpha.44

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.
Files changed (99) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/LICENSE.md +156 -102
  3. package/dist/builder/typedoc/generate-reference-documentation.d.ts +4 -0
  4. package/dist/builder/typedoc/index.js +3 -160
  5. package/dist/cli/commands/add.d.ts +4 -0
  6. package/dist/cli/commands/build.d.ts +21 -0
  7. package/dist/cli/commands/init.d.ts +3 -0
  8. package/dist/cli/commands/migrate.d.ts +21 -0
  9. package/dist/cli/commands/utils/css-loader-dependencies.d.ts +2 -0
  10. package/dist/cli/index.js +52 -1377
  11. package/dist/config/index.js +1 -4
  12. package/dist/config/preset/auto.d.ts +3 -0
  13. package/dist/config/preset/react.js +1 -43
  14. package/dist/config/preset/solid.js +1 -72
  15. package/dist/config/preset/svelte.d.ts +1 -1
  16. package/dist/config/preset/svelte.js +1 -44
  17. package/dist/config/preset/utils/infer-entries.d.ts +12 -0
  18. package/dist/config/preset/utils/overwrite-with-publish-config.d.ts +4 -0
  19. package/dist/config/preset/vue.js +1 -33
  20. package/dist/config/utils/find-packem-file.d.ts +2 -0
  21. package/dist/config/utils/load-package-json.d.ts +6 -0
  22. package/dist/config/utils/load-packem-config.d.ts +7 -0
  23. package/dist/config/utils/load-preset.d.ts +4 -0
  24. package/dist/config/utils/load-tsconfig.d.ts +5 -0
  25. package/dist/config/utils/prepare-entries.d.ts +4 -0
  26. package/dist/index.js +1 -30
  27. package/dist/jit/create-stub.d.ts +4 -0
  28. package/dist/packem/build.d.ts +21 -0
  29. package/dist/packem/index.d.ts +25 -0
  30. package/dist/packem/utils/brotli-size.d.ts +2 -0
  31. package/dist/packem/utils/group-by-keys.d.ts +3 -0
  32. package/dist/packem/utils/gzip-size.d.ts +2 -0
  33. package/dist/packem_shared/browserslistToEsbuild-C0IWmbNe-C6xPL1oW.js +1 -0
  34. package/dist/packem_shared/create-or-update-key-storage-C0tWtgSr.js +3 -0
  35. package/dist/packem_shared/default-5XUc-qHw.js +1 -0
  36. package/dist/packem_shared/default-B2EOH52z.js +1 -0
  37. package/dist/packem_shared/default-BYM_JvQL.js +1 -0
  38. package/dist/packem_shared/default-B_dUKZ_J.js +1 -0
  39. package/dist/packem_shared/default-DsjSAv7m.js +1 -0
  40. package/dist/packem_shared/esbuildPlugin-pPPsJB9N-YI_X-5wr.js +3 -0
  41. package/dist/packem_shared/index-CUp9WuCG.js +1 -0
  42. package/dist/packem_shared/index-ChtiNkgT.js +174 -0
  43. package/dist/packem_shared/isolatedDeclarationsOxcTransformer-WbfE6cGu-NeZOx2Y7.js +1 -0
  44. package/dist/packem_shared/isolatedDeclarationsSwcTransformer-Ch2AgtWC-B-0lOgFf.js +1 -0
  45. package/dist/packem_shared/isolatedDeclarationsTypescriptTransformer-DkuEkofo-Cwe3ODMG.js +3 -0
  46. package/dist/packem_shared/oxcResolvePlugin-Ccef6pyL-D14z9S9i.js +1 -0
  47. package/dist/packem_shared/oxcTransformPlugin-DfVQouIB-Cpfv95eA.js +4 -0
  48. package/dist/packem_shared/resolveTypescriptMjsCtsPlugin-DcZrZTmM-CauidYR5.js +6 -0
  49. package/dist/packem_shared/swcPlugin-Boip4lWG-CwJ-HVJc.js +1 -0
  50. package/dist/rollup/build-types.d.ts +5 -0
  51. package/dist/rollup/build.d.ts +5 -0
  52. package/dist/rollup/get-rollup-options.d.ts +5 -0
  53. package/dist/rollup/plugins/css/loaders/less.js +1 -1
  54. package/dist/rollup/plugins/css/loaders/lightningcss.js +1 -1
  55. package/dist/rollup/plugins/css/loaders/postcss.js +1 -1
  56. package/dist/rollup/plugins/css/loaders/sass.js +1 -1
  57. package/dist/rollup/plugins/css/loaders/sourcemap.js +1 -1
  58. package/dist/rollup/plugins/css/loaders/stylus.js +1 -1
  59. package/dist/rollup/plugins/css/loaders/tailwindcss.js +1 -1
  60. package/dist/rollup/plugins/css/minifiers/cssnano.js +1 -1
  61. package/dist/rollup/plugins/css/minifiers/lightningcss.js +1 -1
  62. package/dist/rollup/plugins/esbuild/index.js +1 -1
  63. package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.js +1 -1
  64. package/dist/rollup/plugins/oxc/oxc-transformer.js +1 -1
  65. package/dist/rollup/plugins/sucrase/index.js +1 -1
  66. package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.js +1 -1
  67. package/dist/rollup/plugins/swc/swc-plugin.js +1 -1
  68. package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.js +1 -1
  69. package/dist/rollup/utils/resolve-aliases.d.ts +4 -0
  70. package/dist/rollup/watch.d.ts +5 -0
  71. package/dist/utils/clean-distribution-directories.d.ts +4 -0
  72. package/dist/utils/create-or-update-key-storage.d.ts +3 -0
  73. package/dist/utils/extract-export-filenames.d.ts +16 -0
  74. package/dist/utils/find-alternatives.d.ts +2 -0
  75. package/dist/utils/get-package-side-effect.d.ts +3 -0
  76. package/dist/utils/infer-export-type.d.ts +3 -0
  77. package/dist/utils/kill-process.d.ts +14 -0
  78. package/dist/utils/log-build-errors.d.ts +4 -0
  79. package/dist/utils/remove-old-cache-folders.d.ts +3 -0
  80. package/dist/utils/warn-legacy-cjs.d.ts +8 -0
  81. package/dist/validator/attw.d.ts +7 -0
  82. package/dist/validator/package-json/index.d.ts +4 -0
  83. package/dist/validator/package-json/validate-dependencies.d.ts +4 -0
  84. package/dist/validator/package-json/validate-engines.d.ts +4 -0
  85. package/dist/validator/package-json/validate-package-entries.d.ts +4 -0
  86. package/dist/validator/package-json/validate-package-fields.d.ts +4 -0
  87. package/dist/validator/validate-alias-entries.d.ts +3 -0
  88. package/dist/validator/validate-bundle-size.d.ts +4 -0
  89. package/package.json +1 -111
  90. package/dist/packem_shared/create-or-update-key-storage-Dd7b8-t1.js +0 -36
  91. package/dist/packem_shared/default-79SPobLI.js +0 -12
  92. package/dist/packem_shared/default-DWBYeUSC.js +0 -210
  93. package/dist/packem_shared/default-DaU6CQEi.js +0 -28
  94. package/dist/packem_shared/default-DavaZMwC.js +0 -32
  95. package/dist/packem_shared/default-DeYZ934H.js +0 -32
  96. package/dist/packem_shared/default-tUOOZ8w7.js +0 -42
  97. package/dist/packem_shared/default-wScAfTaq.js +0 -27
  98. package/dist/packem_shared/index-CTIRxV2x.js +0 -63
  99. package/dist/packem_shared/index-DzTDn4ad.js +0 -9521
@@ -0,0 +1 @@
1
+ var i=Object.defineProperty;var o=(e,r)=>i(e,"name",{value:r,configurable:!0});import{isolatedDeclaration as m}from"oxc-transform";var s=Object.defineProperty,u=o((e,r)=>s(e,"name",{value:r,configurable:!0}),"o"),l=Object.defineProperty,p=u((e,r)=>l(e,"name",{value:r,configurable:!0}),"o"),f=Object.defineProperty,d=p((e,r)=>f(e,"name",{value:r,configurable:!0}),"r");const g=d((e,r,t,n)=>{const a=m(e,r,{...n,sourcemap:t});return{errors:a.errors.map(c=>c.message),map:a.map?.mappings,sourceText:a.code}},"isolatedDeclarationsOxcTransformer");export{g as d};
@@ -0,0 +1 @@
1
+ var n=Object.defineProperty;var t=(e,r)=>n(e,"name",{value:r,configurable:!0});import{transform as c}from"@swc/core";var i=Object.defineProperty,p=t((e,r)=>i(e,"name",{value:r,configurable:!0}),"t"),u=Object.defineProperty,l=p((e,r)=>u(e,"name",{value:r,configurable:!0}),"a"),m=Object.defineProperty,f=l((e,r)=>m(e,"name",{value:r,configurable:!0}),"e");const y=f(async(e,r,o)=>{try{const a=await c(r,{filename:e,jsc:{experimental:{emitIsolatedDts:!0},parser:{syntax:"typescript",tsx:!1}},sourceMaps:o}),s=JSON.parse(a.output);return{errors:[],map:a.map?JSON.parse(a.map).mappings:void 0,sourceText:s.__swc_isolated_declarations__}}catch(a){return{errors:[a.toString()],sourceText:""}}},"isolatedDeclarationsSwcTransformer");export{y as u};
@@ -0,0 +1,3 @@
1
+ var m=Object.defineProperty;var l=(e,r)=>m(e,"name",{value:r,configurable:!0});import{transpileDeclaration as f,formatDiagnostics as y,sys as n}from"typescript";var v=Object.defineProperty,d=l((e,r)=>v(e,"name",{value:r,configurable:!0}),"p"),N=Object.defineProperty,C=d((e,r)=>N(e,"name",{value:r,configurable:!0}),"l"),D=Object.defineProperty,t=C((e,r)=>D(e,"name",{value:r,configurable:!0}),"s");const b=t(e=>{const r=e.split(`
2
+ `);return r.at(-1)?.startsWith("//# sourceMappingURL=")?r.slice(0,-1).join(`
3
+ `):e},"stripMapUrl"),M=t(async(e,r,u,o)=>{const s={declarationMap:u,...o?.compilerOptions};let{diagnostics:c,outputText:i,sourceMapText:a}=f(r,{fileName:e,reportDiagnostics:!0,...o,compilerOptions:s});s.declarationMap&&(i=b(i));const g=c?.length?[y(c,{getCanonicalFileName:t(p=>n.useCaseSensitiveFileNames?p:p.toLowerCase(),"getCanonicalFileName"),getCurrentDirectory:t(()=>n.getCurrentDirectory(),"getCurrentDirectory"),getNewLine:t(()=>n.newLine,"getNewLine")})]:[];return a&&(a=JSON.parse(a).mappings),{errors:g,map:a,sourceText:i}},"isolatedDeclarationsTypescriptTransformer");export{M as v};
@@ -0,0 +1 @@
1
+ var R=Object.defineProperty;var y=(r,e)=>R(r,"name",{value:e,configurable:!0});import{createFilter as S}from"@rollup/pluginutils";import{findPackageJson as j}from"@visulima/package/package-json";import{dirname as n}from"@visulima/path";import{ResolverFactory as k}from"oxc-resolver";var O=Object.defineProperty,M=y((r,e)=>O(r,"name",{value:e,configurable:!0}),"y"),A=Object.defineProperty,J=M((r,e)=>A(r,"name",{value:e,configurable:!0}),"g"),z=Object.defineProperty,u=J((r,e)=>z(r,"name",{value:e,configurable:!0}),"a");let x;const I=new Map,G=u((r,e,h,m)=>{const{ignoreSideEffectsForRoot:E,...s}=r;let c=x;return c||(c=x=new k({...s,roots:[...s.roots??[],e],tsconfig:m?{configFile:m,references:"auto"}:void 0})),{name:"oxc-resolve",resolveId:{async handler(p,l,{isEntry:w}){const v=w||!l?n(p):n(l),{error:g,path:t}=await c.async(v,p);if(g){h.debug(g,{context:[{basedir:e,extensions:s.extensions,id:t}]});return}let f=u(a=>!1,"hasModuleSideEffects");try{const{packageJson:a,path:P}=await j(n(t),{cache:I}),b=n(P);if(!E||e!==b){const i=a.sideEffects;if(typeof i=="boolean")f=u(()=>i,"hasModuleSideEffects");else if(Array.isArray(i)){const F=i.map(d=>d.includes("/")?d:`**/${d}`);f=S(F,void 0,{resolve:b})}}}catch(a){console.debug(a.message,{context:[{basedir:v,caller:"Resolver",error:a,extensions:s.extensions,id:t}]})}const o=await this.resolve(t,l,{skipSelf:!0});if(o)return o.external?!1:o.id!==t?o:{id:t,meta:o.meta,moduleSideEffects:f(t)}},order:"post"}}},"oxcResolvePlugin");export{G as z};
@@ -0,0 +1,4 @@
1
+ var i=Object.defineProperty;var a=(r,e)=>i(r,"name",{value:e,configurable:!0});import{createFilter as s}from"@rollup/pluginutils";import{f as l}from"./index-CUp9WuCG.js";import{transform as p}from"oxc-transform";var d=Object.defineProperty,v=a((r,e)=>d(r,"name",{value:e,configurable:!0}),"t"),g=Object.defineProperty,b=v((r,e)=>g(r,"name",{value:e,configurable:!0}),"a"),x=Object.defineProperty,j=b((r,e)=>x(r,"name",{value:e,configurable:!0}),"t");const y=j(({exclude:r,include:e,...n})=>{const c=s(e,r??l);return{name:"packem:oxc-transform",async transform(m,o){if(!c(o))return;const{code:u,errors:t,map:f}=p(o,m,{...n,sourcemap:!0});return t.length>0?this.error({message:[`
2
+ transform errors:`,...t].join(`
3
+
4
+ `),pluginCode:"ERR_TRANSFORM"}):{code:u,map:f}}}},"oxcTransformPlugin");y.NAME="oxc";export{y as n};
@@ -0,0 +1,6 @@
1
+ var M=Object.defineProperty;var u=(t,e)=>M(t,"name",{value:e,configurable:!0});import{parse as U}from"@babel/parser";import q from"magic-string";import{findStaticImports as F}from"mlly";import{isAbsolute as L,join as N,dirname as Z,resolve as R}from"@visulima/path";import{isRelative as z}from"@visulima/path/utils";var G=Object.defineProperty,m=u((t,e)=>G(t,"name",{value:e,configurable:!0}),"u$1"),H=Object.defineProperty,h=m((t,e)=>H(t,"name",{value:e,configurable:!0}),"n"),J=Object.defineProperty,x=h((t,e)=>J(t,"name",{value:e,configurable:!0}),"i");let B=class{static{u(this,"y")}static{m(this,"_")}static{h(this,"WalkerBase")}static{x(this,"WalkerBase")}constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:x(()=>this.should_skip=!0,"skip"),remove:x(()=>this.should_remove=!0,"remove"),replace:x(e=>this.replacement=e,"replace")}}replace(e,s,r,n){e&&s&&(r!=null?e[s][r]=n:e[s]=n)}remove(e,s,r){e&&s&&(r!=null?e[s].splice(r,1):delete e[s])}};var K=Object.defineProperty,g=h((t,e)=>K(t,"name",{value:e,configurable:!0}),"c$1");let Q=class extends B{static{u(this,"A")}static{m(this,"x")}static{h(this,"SyncWalker")}static{g(this,"SyncWalker")}constructor(e,s){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:g(()=>this.should_skip=!0,"skip"),remove:g(()=>this.should_remove=!0,"remove"),replace:g(r=>this.replacement=r,"replace")},this.enter=e,this.leave=s}visit(e,s,r,n){if(e){if(this.enter){const i=this.should_skip,o=this.should_remove,l=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,s,r,n),this.replacement&&(e=this.replacement,this.replace(s,r,n,e)),this.should_remove&&this.remove(s,r,n);const a=this.should_skip,p=this.should_remove;if(this.should_skip=i,this.should_remove=o,this.replacement=l,a)return e;if(p)return null}let c;for(c in e){const i=e[c];if(i&&typeof i=="object")if(Array.isArray(i)){const o=i;for(let l=0;l<o.length;l+=1){const a=o[l];$(a)&&(this.visit(a,e,c,l)||l--)}}else $(i)&&this.visit(i,e,c,null)}if(this.leave){const i=this.replacement,o=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,s,r,n),this.replacement&&(e=this.replacement,this.replace(s,r,n,e)),this.should_remove&&this.remove(s,r,n);const l=this.should_remove;if(this.replacement=i,this.should_remove=o,l)return null}}return e}};function $(t){return t!==null&&typeof t=="object"&&"type"in t&&typeof t.type=="string"}u($,"d$2");m($,"f");h($,"n");g($,"isNode");var V=Object.defineProperty,y=h((t,e)=>V(t,"name",{value:e,configurable:!0}),"c");let X=class extends B{static{u(this,"P")}static{m(this,"j")}static{h(this,"AsyncWalker")}static{y(this,"AsyncWalker")}constructor(e,s){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:y(()=>this.should_skip=!0,"skip"),remove:y(()=>this.should_remove=!0,"remove"),replace:y(r=>this.replacement=r,"replace")},this.enter=e,this.leave=s}async visit(e,s,r,n){if(e){if(this.enter){const i=this.should_skip,o=this.should_remove,l=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,await this.enter.call(this.context,e,s,r,n),this.replacement&&(e=this.replacement,this.replace(s,r,n,e)),this.should_remove&&this.remove(s,r,n);const a=this.should_skip,p=this.should_remove;if(this.should_skip=i,this.should_remove=o,this.replacement=l,a)return e;if(p)return null}let c;for(c in e){const i=e[c];if(i&&typeof i=="object")if(Array.isArray(i)){const o=i;for(let l=0;l<o.length;l+=1){const a=o[l];b(a)&&(await this.visit(a,e,c,l)||l--)}}else b(i)&&await this.visit(i,e,c,null)}if(this.leave){const i=this.replacement,o=this.should_remove;this.replacement=null,this.should_remove=!1,await this.leave.call(this.context,e,s,r,n),this.replacement&&(e=this.replacement,this.replace(s,r,n,e)),this.should_remove&&this.remove(s,r,n);const l=this.should_remove;if(this.replacement=i,this.should_remove=o,l)return null}}return e}};function b(t){return t!==null&&typeof t=="object"&&"type"in t&&typeof t.type=="string"}u(b,"f$2");m(b,"d");h(b,"a$1");y(b,"isNode");var Y=Object.defineProperty,C=h((t,e)=>Y(t,"name",{value:e,configurable:!0}),"a");function j(t,{enter:e,leave:s}){return new Q(e,s).visit(t,null)}u(j,"k$1");m(j,"A");h(j,"walk");C(j,"walk");async function O(t,{enter:e,leave:s}){return await new X(e,s).visit(t,null)}u(O,"w$3");m(O,"O");h(O,"asyncWalk");C(O,"asyncWalk");var ee=Object.defineProperty,A=u((t,e)=>ee(t,"name",{value:e,configurable:!0}),"l$1"),te=Object.defineProperty,W=A((t,e)=>te(t,"name",{value:e,configurable:!0}),"l"),se=Object.defineProperty,d=W((t,e)=>se(t,"name",{value:e,configurable:!0}),"r");const re=/\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\//g,ie=/MIT License|MIT license|BSD license/,ne=/\n{2,}/g,oe=/\b(\w+)\$\d+\b/g,le=/[-/\\^$*+?.()|[\]{}]/g,ae=d(t=>t.replaceAll(le,String.raw`\$&`),"escapeRegex"),ce=d(t=>[...new Set(t)],"unique"),ue=d(t=>t.replaceAll(re,e=>ie.test(e)?"":e).replaceAll(ne,`
2
+
3
+ `),"cleanUnnecessaryComments"),I=new Map;function w(t,e,{identifierReplacements:s},r){const n=F(t);for(const i in s){const o=n.find(a=>a.specifier===i&&a.imports.includes("{"));if(!o){this.warn(`${e.fileName} does not import "${i}" for replacement`),process.exitCode=1;continue}const l=s[i];for(const a in l){if(!o.imports.includes(a))throw new Error(`${e.fileName} does not import "${a}" from "${i}" for replacement`);const p=l[a],v=ae(a);p.includes(".")&&(t=t.replace(new RegExp(String.raw`\b\w+\b as ${v},?\s?`),"")),t=t.replaceAll(new RegExp(String.raw`\b${v}\b`,"g"),p)}}const c=ce(Array.from(t.matchAll(oe),i=>i[0]));if(c.length>0){const i=c.map(l=>`
4
+ - ${l}`).join(""),o=e.fileName.replace(/\.[^/.]+$/,"");I.has(o)||r.warn({message:`${e.fileName} contains confusing identifier names${i}
5
+
6
+ To replace these, add them to the "rollup -> patchTypes -> identifierReplacements" option in your packem config.`,prefix:"plugin:patch-types"}),I.set(o,!0)}return t}u(w,"f$1");A(w,"g");W(w,"I");d(w,"replaceConfusingTypeNames");const pe=d((t,e)=>{if(e.leadingComments?.some(s=>s.type==="CommentBlock"&&s.value.includes("@internal"))){const s=t.original[e.end]===","?e.end+1:e.end;return t.remove(e.leadingComments[0].start,s),!0}return!1},"removeInternal");function P(t,e){if(t.includes("@internal")){const s=new q(t),r=U(t,{plugins:["typescript"],sourceType:"module"});if(j(r,{enter(n){pe(s,n)&&this.skip()}}),t=s.toString(),t.includes("@internal"))throw new Error(`${e.fileName} has unhandled @internal declarations`)}return t}u(P,"u");A(P,"h");W(P,"P");d(P,"stripInternalTypes");const He=d((t,e)=>({name:"packem:patch-types",renderChunk(s,r){return s=w.call(this,s,r,t,e),s=P.call(this,s,r),s=ue(s),s}}),"patchTypescriptTypes");var he=Object.defineProperty,fe=u((t,e)=>he(t,"name",{value:e,configurable:!0}),"d$1"),me=Object.defineProperty,de=fe((t,e)=>me(t,"name",{value:e,configurable:!0}),"d"),ve=Object.defineProperty,f=de((t,e)=>ve(t,"name",{value:e,configurable:!0}),"o");const ge=42,ye=f(t=>{let e=!1;for(let s=0;s<t.length;s++)if(t.codePointAt(s)===ge){if(e)return!1;e=!0}return!0},"hasZeroOrOneAsteriskCharacter"),$e=f(t=>{const e=t.indexOf("*");return e===-1?void 0:{prefix:t.slice(0,e),suffix:t.slice(e+1)}},"tryParsePattern"),be=f(({prefix:t,suffix:e},s)=>s.length>=t.length+e.length&&s.startsWith(t)&&s.endsWith(e),"isPatternMatch"),ke=f((t,e,s)=>{let r,n=-1;for(const c of t){const i=e(c);be(i,s)&&i.prefix.length>n&&(n=i.prefix.length,r=c)}return r},"findBestPatternMatch"),_e=f((t,e)=>{const s=[];for(const r of t){if(!ye(r))continue;const n=$e(r);if(n)s.push(n);else if(r===e)return r}return ke(s,r=>r,e)},"matchPatternOrExact"),xe=f((t,e)=>e.substring(t.prefix.length,e.length-t.suffix.length),"matchedText"),je=f(({prefix:t,suffix:e})=>`${t}*${e}`,"patternText"),we=f((t,e,s)=>{let r=Z(e.path);e.config.compilerOptions?.baseUrl&&(r=R(t,e.config.compilerOptions.baseUrl)),s?.debug({message:`Resolved baseUrl to ${r}`,prefix:"plugin:resolve-tsconfig-paths"});const n=e.config.compilerOptions?.paths??{};return Object.keys(n).length===0&&s?.debug({message:"No paths found in tsconfig.json",prefix:"plugin:resolve-tsconfig-paths"}),{paths:n,resolvedBaseUrl:r}},"getTsconfigPaths"),Je=f((t,e,s,r)=>{const{paths:n,resolvedBaseUrl:c}=we(t,e,s),i=Object.keys(n);return{name:"plugin:resolve-tsconfig-paths",async resolveId(o,l,a){if(i.length===0)return;if(o.includes("\0")){s.debug({message:`Skipping resolution of ${o} as it is a virtual module`,prefix:"plugin:resolve-tsconfig-paths"});return}if(o.includes("node_modules")){s.debug({message:`Skipping request as it is inside node_modules ${o}`,prefix:"plugin:resolve-tsconfig-paths"});return}if(!r.resolveAbsolutePath&&L(o)){s.debug({message:`Skipping request as it is an absolute path ${o}`,prefix:"plugin:resolve-tsconfig-paths"});return}if(z(o)){s.debug({message:`Skipping request as it is a relative path ${o}`,prefix:"plugin:resolve-tsconfig-paths"});return}const p=_e(i,o);if(!p){s.debug({message:`moduleName did not match any paths pattern ${o}`,prefix:"plugin:resolve-tsconfig-paths"});return}const v=typeof p=="string"?void 0:xe(p,o),E=typeof p=="string"?p:je(p);for await(const S of n[E]){const k=v?S.replace("*",v):S;if(k.endsWith(".d.ts")||k.endsWith(".d.cts")||k.endsWith(".d.mts"))continue;const T=N(c,k);try{const _=await this.resolve(T,l,{skipSelf:!0,...a});if(_)return _}catch(_){s.debug({context:[_],message:`Failed to resolve ${T} from ${o}`,prefix:"plugin:resolve-tsconfig-paths"})}}}}},"resolveTsconfigPathsPlugin");var Pe=Object.defineProperty,Oe=u((t,e)=>Pe(t,"name",{value:e,configurable:!0}),"f"),Ae=Object.defineProperty,We=Oe((t,e)=>Ae(t,"name",{value:e,configurable:!0}),"a"),Se=Object.defineProperty,D=We((t,e)=>Se(t,"name",{value:e,configurable:!0}),"u");const Te=D((t,e)=>{if(!e)return;const{config:s,path:r}=e;if(!s.compilerOptions)return;const{rootDirs:n}=s.compilerOptions;if(!n)return;const c=[];for(const i of n){if(i.startsWith("."))throw new Error(`Invalid rootDir value '.' in ${r}.`);if(i.startsWith(".."))throw new Error(`Invalid rootDir value '..' in ${r}.`);c.push(R(t,i))}return c},"getRootDirectories"),Ke=D((t,e,s)=>{const r=Te(t,s);return{name:"packem:resolve-tsconfig-root-dirs",async resolveId(n,c,i){if(!(r===void 0||r.length===0)&&n.startsWith("."))for(const o of r){const l=N(o,n),a=await this.resolve(l,c,{skipSelf:!0,...i});if(a)return e.debug({message:`Resolved ${n} to ${a.id} using rootDirs from tsconfig.json.`,prefix:"plugin:resolve-tsconfig-root-dirs"}),a.id}}}},"resolveTsconfigRootDirectories");var Ie=Object.defineProperty,Ne=u((t,e)=>Ie(t,"name",{value:e,configurable:!0}),"t"),Re=Object.defineProperty,Be=Ne((t,e)=>Re(t,"name",{value:e,configurable:!0}),"t"),Ce=Object.defineProperty,De=Be((t,e)=>Ce(t,"name",{value:e,configurable:!0}),"r");const Qe=De(()=>{const t=/\.(?:[mc]?js|jsx)$/;return{name:"packem:resolve-typescript-mjs-cjs",async resolveId(e,s,r){if(t.test(e)&&s)return await this.resolve(e.replace(/js(x?)$/,"ts$1"),s,r)}}},"resolveTypescriptMjsCts");export{Ke as D,Je as N,He as P,Qe as i,j as k};
@@ -0,0 +1 @@
1
+ var m=Object.defineProperty;var t=(e,r)=>m(e,"name",{value:r,configurable:!0});import{createFilter as u}from"@rollup/pluginutils";import{transform as l}from"@swc/core";import{f as s}from"./index-CUp9WuCG.js";var p=Object.defineProperty,v=t((e,r)=>p(e,"name",{value:r,configurable:!0}),"n"),d=Object.defineProperty,b=v((e,r)=>d(e,"name",{value:r,configurable:!0}),"t"),g=Object.defineProperty,w=b((e,r)=>g(e,"name",{value:r,configurable:!0}),"e");const y=w(({exclude:e,include:r,...n})=>{const c=u(r,e??s);return{name:"packem:swc",async transform(o,a){if(!c(a))return;const{code:f,map:i}=await l(o,{...n,configFile:!1,filename:a,swcrc:!1});return{code:f,map:i}}}},"swcPlugin");y.NAME="swc";export{y as t};
@@ -0,0 +1,5 @@
1
+ import type { FileCache } from "@visulima/packem-share";
2
+ import type { BuildContext } from "@visulima/packem-share/types";
3
+ import type { InternalBuildOptions } from "../types.d.ts";
4
+ declare const buildTypes: (context: BuildContext<InternalBuildOptions>, fileCache: FileCache, subDirectory: string) => Promise<void>;
5
+ export default buildTypes;
@@ -0,0 +1,5 @@
1
+ import type { FileCache } from "@visulima/packem-share";
2
+ import type { BuildContext } from "@visulima/packem-share/types";
3
+ import type { InternalBuildOptions } from "../types.d.ts";
4
+ declare const build: (context: BuildContext<InternalBuildOptions>, fileCache: FileCache, subDirectory: string) => Promise<void>;
5
+ export default build;
@@ -0,0 +1,5 @@
1
+ import type { BuildContext, FileCache } from "@visulima/packem-share";
2
+ import type { RollupOptions } from "rollup";
3
+ import type { InternalBuildOptions } from "../types.d.ts";
4
+ export declare const getRollupOptions: (context: BuildContext<InternalBuildOptions>, fileCache: FileCache) => Promise<RollupOptions>;
5
+ export declare const getRollupDtsOptions: (context: BuildContext<InternalBuildOptions>, fileCache: FileCache) => Promise<RollupOptions>;
@@ -1 +1 @@
1
- export { default } from '@visulima/rollup-plugin-css/loader/less';
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/less";export{o as default};
@@ -1 +1 @@
1
- export { default } from '@visulima/rollup-plugin-css/loader/lightningcss';
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/lightningcss";export{o as default};
@@ -1 +1 @@
1
- export { default } from '@visulima/rollup-plugin-css/loader/postcss';
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/postcss";export{o as default};
@@ -1 +1 @@
1
- export { default } from '@visulima/rollup-plugin-css/loader/sass';
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/sass";export{o as default};
@@ -1 +1 @@
1
- export { default } from '@visulima/rollup-plugin-css/loader/sourcemap';
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/sourcemap";export{o as default};
@@ -1 +1 @@
1
- export { default } from '@visulima/rollup-plugin-css/loader/stylus';
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/stylus";export{o as default};
@@ -1 +1 @@
1
- export { default } from '@visulima/rollup-plugin-css/loader/tailwindcss';
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/tailwindcss";export{o as default};
@@ -1 +1 @@
1
- export { default } from '@visulima/rollup-plugin-css/minifier/cssnano';
1
+ import{default as o}from"@visulima/rollup-plugin-css/minifier/cssnano";export{o as default};
@@ -1 +1 @@
1
- export { default } from '@visulima/rollup-plugin-css/minifier/lightningcss';
1
+ import{default as o}from"@visulima/rollup-plugin-css/minifier/lightningcss";export{o as default};
@@ -1 +1 @@
1
- export { default } from '../../../packem_shared/default-DWBYeUSC.js';
1
+ import{z as f}from"../../../packem_shared/esbuildPlugin-pPPsJB9N-YI_X-5wr.js";export{f as default};
@@ -1 +1 @@
1
- export { default } from '../../../packem_shared/default-79SPobLI.js';
1
+ import{d as e}from"../../../packem_shared/isolatedDeclarationsOxcTransformer-WbfE6cGu-NeZOx2Y7.js";export{e as default};
@@ -1 +1 @@
1
- export { default } from '../../../packem_shared/default-DeYZ934H.js';
1
+ import{n as f}from"../../../packem_shared/oxcTransformPlugin-DfVQouIB-Cpfv95eA.js";export{f as default};
@@ -1 +1 @@
1
- export { sucrasePlugin as default } from '../../../packem_shared/default-wScAfTaq.js';
1
+ import{sucrasePlugin as r}from"../../../packem_shared/default-B_dUKZ_J.js";export{r as default};
@@ -1 +1 @@
1
- export { default } from '../../../packem_shared/default-DavaZMwC.js';
1
+ import{u as f}from"../../../packem_shared/isolatedDeclarationsSwcTransformer-Ch2AgtWC-B-0lOgFf.js";export{f as default};
@@ -1 +1 @@
1
- export { default } from '../../../packem_shared/default-DaU6CQEi.js';
1
+ import{t as e}from"../../../packem_shared/swcPlugin-Boip4lWG-CwJ-HVJc.js";export{e as default};
@@ -1 +1 @@
1
- export { default } from '../../../packem_shared/default-tUOOZ8w7.js';
1
+ import{v as f}from"../../../packem_shared/isolatedDeclarationsTypescriptTransformer-DkuEkofo-Cwe3ODMG.js";export{f as default};
@@ -0,0 +1,4 @@
1
+ import type { PackageJson } from "@visulima/package";
2
+ import type { InternalBuildOptions } from "../../types.d.ts";
3
+ declare const resolveAliases: (packageJson: PackageJson, options: InternalBuildOptions) => Record<string, string>;
4
+ export default resolveAliases;
@@ -0,0 +1,5 @@
1
+ import type { FileCache } from "@visulima/packem-share";
2
+ import type { BuildContext } from "@visulima/packem-share/types";
3
+ import type { InternalBuildOptions } from "../types.d.ts";
4
+ declare const watch: (context: BuildContext<InternalBuildOptions>, fileCache: FileCache, runBuilder: () => Promise<void>, runOnsuccess: () => Promise<void>, doOnSuccessCleanup: () => Promise<void>) => Promise<void>;
5
+ export default watch;
@@ -0,0 +1,4 @@
1
+ import type { BuildContext } from "@visulima/packem-share/types";
2
+ import type { InternalBuildOptions } from "../types.d.ts";
3
+ declare const cleanDistributionDirectories: (context: BuildContext<InternalBuildOptions>) => Promise<void>;
4
+ export default cleanDistributionDirectories;
@@ -0,0 +1,3 @@
1
+ import type { Pail } from "@visulima/pail";
2
+ declare const createOrUpdateKeyStorage: (hashKey: string, storePath: string, logger: Pail, shouldUpdate?: true) => void;
3
+ export default createOrUpdateKeyStorage;
@@ -0,0 +1,16 @@
1
+ import type { PackageJson } from "@visulima/package";
2
+ import type { BuildOptions, Format } from "../types.d.ts";
3
+ declare const runtimeExportConventions: Set<string>;
4
+ export type OutputDescriptor = {
5
+ exportKey?: string;
6
+ fieldName?: string;
7
+ file: string;
8
+ /** Whether this output was from an ignored export key */
9
+ ignored?: boolean;
10
+ isExecutable?: true;
11
+ key: "bin" | "exports" | "main" | "module" | "types";
12
+ subKey?: typeof runtimeExportConventions | (NonNullable<unknown> & string);
13
+ type?: Format;
14
+ };
15
+ export declare const extractExportFilenames: (packageExports: PackageJson["exports"], packageType: "cjs" | "esm", declaration: BuildOptions["declaration"], conditions: string[], ignoreExportKeys: string[]) => OutputDescriptor[];
16
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const findAlternatives: (string: string, array: string[]) => string[];
2
+ export default findAlternatives;
@@ -0,0 +1,3 @@
1
+ import type { PackageJson } from "@visulima/package";
2
+ declare const getPackageSideEffect: (cwd: string, packageJson: PackageJson) => (id: string) => boolean | undefined;
3
+ export default getPackageSideEffect;
@@ -0,0 +1,3 @@
1
+ import type { Format } from "../types.d.ts";
2
+ export declare const inferExportTypeFromFileName: (filename: string) => Format | undefined;
3
+ export declare const inferExportType: (condition: string, previousConditions: string[], packageType: Format, filename?: string) => Format;
@@ -0,0 +1,14 @@
1
+ import type { KillSignal } from "../types.d.ts";
2
+ /**
3
+ * Terminates a process with the specified signal.
4
+ * @param params The parameters object
5
+ * @param params.pid Process ID to terminate
6
+ * @param params.signal Signal to send ('SIGTERM', 'SIGKILL', etc.)
7
+ * @throws {Error} If pid is invalid or process termination fails
8
+ * @returns Resolves when process is terminated
9
+ */
10
+ declare const killProcess: ({ pid, signal }: {
11
+ pid: number;
12
+ signal: KillSignal;
13
+ }) => Promise<void>;
14
+ export default killProcess;
@@ -0,0 +1,4 @@
1
+ import type { BuildContext } from "@visulima/packem-share/types";
2
+ import type { InternalBuildOptions } from "../types.d.ts";
3
+ declare const logBuildErrors: (context: BuildContext<InternalBuildOptions>, hasOtherLogs: boolean) => void;
4
+ export default logBuildErrors;
@@ -0,0 +1,3 @@
1
+ import type { Pail } from "@visulima/pail";
2
+ declare const removeOldCacheFolders: (cachePath: string | undefined, logger: Pail, logged: boolean) => Promise<void>;
3
+ export default removeOldCacheFolders;
@@ -0,0 +1,8 @@
1
+ import type { BuildContext } from "@visulima/packem-share/types";
2
+ import type { InternalBuildOptions } from "../types.d.ts";
3
+ /**
4
+ * Warns when building CommonJS for Node targets that have deprecated CJS.
5
+ * Triggers for Node >= 23.0.0 or >= 22.12.0.
6
+ */
7
+ declare const warnLegacyCJS: (context: BuildContext<InternalBuildOptions>) => void;
8
+ export default warnLegacyCJS;
@@ -0,0 +1,7 @@
1
+ import type { BuildContext } from "@visulima/packem-share/types";
2
+ import type { InternalBuildOptions } from "../types.d.ts";
3
+ /**
4
+ * End.
5
+ */
6
+ declare const attw: (context: BuildContext<InternalBuildOptions>, logged: boolean) => Promise<void>;
7
+ export default attw;
@@ -0,0 +1,4 @@
1
+ import type { BuildContext } from "@visulima/packem-share/types";
2
+ import type { InternalBuildOptions } from "../../types.d.ts";
3
+ declare const validator: (context: BuildContext<InternalBuildOptions>) => void;
4
+ export default validator;
@@ -0,0 +1,4 @@
1
+ import type { BuildContext } from "@visulima/packem-share/types";
2
+ import type { InternalBuildOptions } from "../../types.d.ts";
3
+ declare const validateDependencies: (context: BuildContext<InternalBuildOptions>) => void;
4
+ export default validateDependencies;
@@ -0,0 +1,4 @@
1
+ import type { BuildContext } from "@visulima/packem-share/types";
2
+ import type { InternalBuildOptions } from "../../types.d.ts";
3
+ declare const validateEngines: (context: BuildContext<InternalBuildOptions>) => void;
4
+ export default validateEngines;
@@ -0,0 +1,4 @@
1
+ import type { BuildContext } from "@visulima/packem-share/types";
2
+ import type { InternalBuildOptions } from "../../types.d.ts";
3
+ declare const validatePackageEntries: (context: BuildContext<InternalBuildOptions>) => void;
4
+ export default validatePackageEntries;
@@ -0,0 +1,4 @@
1
+ import type { BuildContext } from "@visulima/packem-share/types";
2
+ import type { InternalBuildOptions } from "../../types.d.ts";
3
+ declare const validatePackageFields: (context: BuildContext<InternalBuildOptions>) => void;
4
+ export default validatePackageFields;
@@ -0,0 +1,3 @@
1
+ import type { Alias } from "@visulima/packem-rollup";
2
+ declare const validateAliasEntries: (entries: ReadonlyArray<Alias> | Record<string, string>) => void;
3
+ export default validateAliasEntries;
@@ -0,0 +1,4 @@
1
+ import type { BuildContext } from "@visulima/packem-share/types";
2
+ import type { InternalBuildOptions } from "../types.d.ts";
3
+ declare const validateBundleSize: (context: BuildContext<InternalBuildOptions>, logged: boolean) => void;
4
+ export default validateBundleSize;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/packem",
3
- "version": "2.0.0-alpha.43",
3
+ "version": "2.0.0-alpha.44",
4
4
  "description": "A fast and modern bundler for Node.js and TypeScript.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -211,99 +211,6 @@
211
211
  "tinyexec": "1.0.1",
212
212
  "tinyglobby": "0.2.15"
213
213
  },
214
- "devDependencies": {
215
- "@anolilab/eslint-config": "^16.4.4",
216
- "@anolilab/prettier-config": "^6.0.8",
217
- "@anolilab/semantic-release-pnpm": "2.0.4",
218
- "@anolilab/semantic-release-preset": "^12.1.2",
219
- "@arethetypeswrong/cli": "^0.18.2",
220
- "@arethetypeswrong/core": "^0.18.2",
221
- "@babel/core": "^7.28.5",
222
- "@babel/parser": "7.28.4",
223
- "@csstools/css-parser-algorithms": "3.0.5",
224
- "@csstools/css-tokenizer": "3.0.4",
225
- "@csstools/postcss-slow-plugins": "^2.0.0",
226
- "@oxc-transform/binding-linux-x64-gnu": "*",
227
- "@rollup/plugin-alias": "5.1.1",
228
- "@rollup/plugin-commonjs": "29.0.0",
229
- "@rollup/plugin-dynamic-import-vars": "2.1.5",
230
- "@rollup/plugin-inject": "5.0.5",
231
- "@rollup/plugin-json": "6.1.0",
232
- "@rollup/plugin-node-resolve": "16.0.1",
233
- "@rollup/plugin-replace": "6.0.2",
234
- "@rollup/plugin-wasm": "6.2.2",
235
- "@secretlint/secretlint-rule-preset-recommend": "^11.2.5",
236
- "@svgr/core": "^8.1.0",
237
- "@swc/core": "^1.15.3",
238
- "@swc/types": "0.1.25",
239
- "@tailwindcss/node": "^4.1.17",
240
- "@tailwindcss/oxide": "^4.1.17",
241
- "@total-typescript/ts-reset": "^0.6.1",
242
- "@types/babel__core": "^7.20.5",
243
- "@types/node": "24.5.2",
244
- "@types/picomatch": "^4.0.2",
245
- "@types/react-dom": "^19.2.3",
246
- "@types/semver": "^7.7.1",
247
- "@vitest/coverage-v8": "^4.0.15",
248
- "@vitest/ui": "^4.0.15",
249
- "conventional-changelog-conventionalcommits": "9.1.0",
250
- "cross-env": "^10.1.0",
251
- "cssnano": "^7.1.2",
252
- "deeks": "^3.2.0",
253
- "detect-indent": "^7.0.2",
254
- "esbuild": "^0.27.1",
255
- "eslint": "^9.36.0",
256
- "execa": "^9.6.1",
257
- "glob-parent": "6.0.2",
258
- "icss-utils": "^5.1.0",
259
- "less": "^4.4.2",
260
- "lightningcss": "^1.30.2",
261
- "lit": "^3.3.1",
262
- "lucide-static": "^0.556.0",
263
- "minireset.css": "0.0.7",
264
- "oxc-parser": "0.99.0",
265
- "oxc-resolver": "11.14.0",
266
- "oxc-transform": "0.99.0",
267
- "package-manager-detector": "^1.6.0",
268
- "postcss": "^8.5.6",
269
- "postcss-custom-properties": "14.0.6",
270
- "postcss-load-config": "^6.0.1",
271
- "postcss-modules-extract-imports": "^3.1.0",
272
- "postcss-modules-local-by-default": "^4.2.0",
273
- "postcss-modules-scope": "^3.2.1",
274
- "postcss-modules-values": "^4.0.0",
275
- "postcss-value-parser": "^4.2.0",
276
- "prettier": "^3.7.4",
277
- "publint": "^0.3.15",
278
- "react": "^19.2.1",
279
- "react-dom": "^19.2.1",
280
- "rimraf": "^6.1.2",
281
- "rollup-plugin-dts": "6.2.3",
282
- "rollup-plugin-license": "3.6.0",
283
- "rollup-plugin-lit-css": "^6.0.0",
284
- "rollup-plugin-polyfill-node": "0.13.0",
285
- "rollup-plugin-pure": "^0.4.0",
286
- "rollup-plugin-visualizer": "6.0.3",
287
- "rs-module-lexer": "^2.6.0",
288
- "sass": "^1.95.0",
289
- "sass-embedded": "^1.93.3",
290
- "secretlint": "^11.2.5",
291
- "semantic-release": "^25.0.2",
292
- "sort-package-json": "3.4.0",
293
- "stylus": "^0.64.0",
294
- "sucrase": "^3.35.1",
295
- "sugarss": "5.0.1",
296
- "tailwindcss": "^4.1.17",
297
- "tempy": "^3.1.0",
298
- "tree-kill": "^1.2.2",
299
- "typedoc": "0.28.13",
300
- "typedoc-plugin-markdown": "4.9.0",
301
- "typedoc-plugin-rename-defaults": "0.7.3",
302
- "typescript": "^5.9.3",
303
- "unplugin-vue": "^7.1.0",
304
- "rollup-plugin-svelte": "^7.2.3",
305
- "vitest": "^4.0.15"
306
- },
307
214
  "peerDependencies": {
308
215
  "@arethetypeswrong/core": ">=0.18.2",
309
216
  "@swc/core": ">=1.11.29",
@@ -432,22 +339,5 @@
432
339
  "publishConfig": {
433
340
  "access": "public",
434
341
  "provenance": true
435
- },
436
- "scripts": {
437
- "build": "cross-env INTERNAL_PACKEM_BUILD=1 JITI_INTEROP_DEFAULT=1 jiti src/cli/index.ts build --development",
438
- "build:prod": "cross-env INTERNAL_PACKEM_BUILD=1 JITI_INTEROP_DEFAULT=1 jiti src/cli/index.ts build --production",
439
- "clean": "rimraf node_modules dist .eslintcache",
440
- "dev": "pnpm run build",
441
- "lint:attw": "attw --pack",
442
- "lint:eslint": "eslint ./src",
443
- "lint:eslint:fix": "eslint . --cache --concurrency auto --fix,",
444
- "lint:package-json": "publint --strict",
445
- "lint:prettier": "prettier --config=.prettierrc.cjs --check .",
446
- "lint:prettier:fix": "prettier --config=.prettierrc.cjs --write .",
447
- "lint:types": "tsc --noEmit",
448
- "test": "vitest run --cache",
449
- "test:coverage": "vitest run --cache --coverage",
450
- "test:ui": "vitest --cache --ui --coverage.enabled=true",
451
- "test:watch": "vitest"
452
342
  }
453
343
  }
@@ -1,36 +0,0 @@
1
- import { writeJsonSync, isAccessibleSync, readJsonSync } from '@visulima/fs';
2
- import { join } from '@visulima/path';
3
-
4
- const replaceContentWithinMarker = (content, marker, replacement) => {
5
- const regex = new RegExp(`(<!-- ${marker} -->)[\\s\\S]*?(<!-- /${marker} -->)`, "g");
6
- if (!regex.test(content)) {
7
- return void 0;
8
- }
9
- return content.replace(regex, `$1
10
- ${replacement}
11
- $2`);
12
- };
13
-
14
- const createOrUpdateKeyStorage = (hashKey, storePath, logger, shouldUpdate) => {
15
- try {
16
- let keyStore = {};
17
- const keyStorePath = join(storePath, "keystore.json");
18
- if (shouldUpdate && isAccessibleSync(keyStorePath)) {
19
- keyStore = readJsonSync(keyStorePath);
20
- }
21
- if (keyStore[hashKey] === void 0) {
22
- keyStore[hashKey] = (/* @__PURE__ */ new Date()).toISOString();
23
- }
24
- writeJsonSync(keyStorePath, keyStore, {
25
- overwrite: true
26
- });
27
- } catch (error) {
28
- logger.debug({
29
- context: [error],
30
- message: error.message,
31
- prefix: "cache-key-store"
32
- });
33
- }
34
- };
35
-
36
- export { createOrUpdateKeyStorage as c, replaceContentWithinMarker as r };
@@ -1,12 +0,0 @@
1
- import { isolatedDeclaration } from 'oxc-transform';
2
-
3
- const isolatedDeclarationsOxcTransformer = (id, code, sourceMap, transformOptions) => {
4
- const result = isolatedDeclaration(id, code, { ...transformOptions, sourcemap: sourceMap });
5
- return {
6
- errors: result.errors.map((error) => error.message),
7
- map: result.map?.mappings,
8
- sourceText: result.code
9
- };
10
- };
11
-
12
- export { isolatedDeclarationsOxcTransformer as default };