@visulima/packem 1.0.0-alpha.57 → 1.0.0-alpha.58

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## @visulima/packem [1.0.0-alpha.58](https://github.com/visulima/packem/compare/@visulima/packem@1.0.0-alpha.57...@visulima/packem@1.0.0-alpha.58) (2024-07-30)
2
+
3
+ ### Bug Fixes
4
+
5
+ * fixed more tests ([5bc13a8](https://github.com/visulima/packem/commit/5bc13a8c1218fcbb783a3085f6fd193e8c590829))
6
+
1
7
  ## @visulima/packem [1.0.0-alpha.57](https://github.com/visulima/packem/compare/@visulima/packem@1.0.0-alpha.56...@visulima/packem@1.0.0-alpha.57) (2024-07-30)
2
8
 
3
9
  ### Bug Fixes
package/dist/cli.mjs CHANGED
@@ -7,7 +7,7 @@ import __cjs_mod__ from "node:module";
7
7
  const __filename = __cjs_url__.fileURLToPath(import.meta.url);
8
8
  const __dirname = __cjs_path__.dirname(__filename);
9
9
  const require = __cjs_mod__.createRequire(import.meta.url);
10
- const jo="@visulima/packem",ko="1.0.0-alpha.56",F=[...Yt.extensions,".cjs",".ts",".cts",".mts",".tsx",".jsx"],xo=["development","production"],Ge=["react-server","react-native","edge-light"];[...xo,...Ge];const G=/node_modules/;var Eo=Object.defineProperty,q=d((e,t)=>Eo(e,"name",{value:t,configurable:!0}),"i$d");const ce=/^#![^\n]*/,te=q(async e=>{await _t(e,493).catch(()=>{})},"makeExecutable"),Oo=q((e,t=`#!/usr/bin/env node
10
+ const jo="@visulima/packem",ko="1.0.0-alpha.57",F=[...Yt.extensions,".cjs",".ts",".cts",".mts",".tsx",".jsx"],xo=["development","production"],Ge=["react-server","react-native","edge-light"];[...xo,...Ge];const G=/node_modules/;var Eo=Object.defineProperty,q=d((e,t)=>Eo(e,"name",{value:t,configurable:!0}),"i$d");const ce=/^#![^\n]*/,te=q(async e=>{await _t(e,493).catch(()=>{})},"makeExecutable"),Oo=q((e,t=`#!/usr/bin/env node
11
11
  `)=>({name:"packem:shebang",renderChunk:{handler(o,n,r){if(!n.isEntry||!n.facadeModuleId||o.startsWith("#")&&o[1]==="!")return null;if(e.includes(n.name)){const i=new P(o);return i.prepend(t),{code:i.toString(),map:r.sourcemap?i.generateMap({hires:!0}):void 0}}return null},order:"post"},async writeBundle(o,n){for(const[r,i]of Object.entries(n))if(i.type==="chunk"&&ce.test(i.code)&&o.dir){const s=g(o.dir,r);await te(s)}}}),"shebangPlugin"),Do=q(()=>({name:"packem:remove-shebang",renderChunk(e){return e.replace(ce,"")}}),"removeShebangPlugin"),So=q((e,t=`
12
12
  `)=>{const o=ce.exec(e);return o?o+t:""},"getShebang");var No=Object.defineProperty,Po=d((e,t)=>No(e,"name",{value:t,configurable:!0}),"p$4");const pe=Po((e,t)=>{let o={};if(e.pkg.name&&(o[e.pkg.name]=e.options.rootDir),e.pkg.imports){const{imports:n}=e.pkg;for(const r in n){if(r.startsWith("#"))continue;const i=n[r];typeof i=="string"&&(o[r]=b(e.options.rootDir,i))}}return o={...o,...e.options.alias},e.options.rollup.alias&&(Array.isArray(e.options.rollup.alias.entries)?Object.assign(o,Object.fromEntries(e.options.rollup.alias.entries.map(n=>[n.find,n.replacement]))):Object.assign(o,e.options.rollup.alias.entries??e.options.rollup.alias)),e.logger.debug({message:"Resolved aliases: "+JSON.stringify(o),prefix:t}),o},"resolveAliases");var Co=Object.defineProperty,_o=d((e,t)=>Co(e,"name",{value:t,configurable:!0}),"o$3");const Mo=_o((e,t)=>{const o=ze(t,{esmResolve:!0,interopDefault:!0});try{return o.resolve(e)}catch(n){if(n.code!=="MODULE_NOT_FOUND")throw new Error(`Error trying import ${e} from ${t}`,{cause:n});return e}},"tryResolve");var Io=Object.defineProperty,Fo=d((e,t)=>Io(e,"name",{value:t,configurable:!0}),"r$a");const B=Fo((e,t)=>{e.warnings.has(t)||e.warnings.add(t)},"warn");var Ro=Object.defineProperty,To=d((e,t)=>Ro(e,"name",{value:t,configurable:!0}),"u$a");const Ao=To(async e=>{const t=await Zt("jiti",{url:import.meta.url}),o=JSON.stringify({...e.options.stubOptions.jiti,alias:{...pe(e,"jit"),...e.options.stubOptions.jiti.alias}},null,2);for(const n of e.options.entries){const r=g(e.options.rootDir,e.options.outDir,n.name),i=ie(Mo(n.input,e.options.rootDir)||n.input),s=i.slice(0,Math.max(0,i.length-se(i).length)),a=await re(i),l=So(a);e.options.emitCJS&&await J(`${r}.cjs`,l+[`const jiti = require(${JSON.stringify(t)})`,"",`const _jiti = jiti(null, ${o})`,"",`/** @type {import(${JSON.stringify(s)})} */`,`module.exports = _jiti(${JSON.stringify(i)})`].join(`
13
13
  `));let c=[];try{c=await Qt(i,{extensions:F})}catch(u){B(e,`Cannot analyze ${i} for exports: ${u.toString()}`);return}const p=c.includes("default")||c.length===0;await J(`${r}.mjs`,l+[`import jiti from ${JSON.stringify(Kt(t).href)};`,"",`const _jiti = jiti(null, ${o})`,"",`/** @type {import(${JSON.stringify(i)})} */`,`const _module = await _jiti.import(${JSON.stringify(i)});`,p?`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/packem",
3
- "version": "1.0.0-alpha.57",
3
+ "version": "1.0.0-alpha.58",
4
4
  "description": "A fast and modern bundler for Node.js and TypeScript.",
5
5
  "keywords": [
6
6
  "anolilab",