Skip to content

perf: optimize client builds #2036

perf: optimize client builds

perf: optimize client builds #2036

Triggered via pull request November 24, 2024 18:11
Status Failure
Total duration 1m 18s
Artifacts

test.yml

on: pull_request
Matrix: bun-tests
Matrix: node-tests
Fit to window
Zoom out
Zoom in

Annotations

21 errors and 4 warnings
error: expect(received).not.toHaveBeenCalled(): packages/brisa/src/utils/compile-assets/index.test.ts#L82
Expected number of calls: 0 Received number of calls: 2 at /Users/runner/work/brisa/brisa/packages/brisa/src/utils/compile-assets/index.test.ts:82:21
error: expect(received).toEqual(expected): packages/brisa/src/utils/compile-assets/index.test.ts#L101
Expected: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"><url><loc>https://example.com</loc><lastmod>2021-10-01T00:00:00.000Z</lastmod><changefreq>daily</changefreq><priority>1.0</priority><image:image><image:loc>https://example.com/image.jpg</image:loc><image:title>Image title</image:title><image:caption>Image caption</image:caption></image:image></url></urlset>" Received: "" at /Users/runner/work/brisa/brisa/packages/brisa/src/utils/compile-assets/index.test.ts:101:65
error: expect(received).toHaveBeenCalledTimes(expected): packages/brisa/src/utils/compile-files/index.test.ts#L141
Expected number of calls: 4 Received number of calls: 2 at /Users/runner/work/brisa/brisa/packages/brisa/src/utils/compile-files/index.test.ts:141:33
error: expect(received).toContain(expected): packages/brisa/src/utils/compile-files/index.test.ts#L660
JS shared by all [ info ]" JS shared by all [ info ]" at /Users/runner/work/brisa/brisa/packages/brisa/src/utils/compile-files/index.test.ts:660:25
error: expect(received).toContain(expected): packages/brisa/src/utils/compile-files/index.test.ts#L708
Expected to contain: "\"context-provider\"" Received: "(()=>{function ut(t,s){while(t){if(t.tagName===\"CONTEXT-PROVIDER\"&&s===t.getAttribute(\"cid\")){let i=t.getAttribute(\"pid\");if(i)return i}t=t.assignedSlot??t.host??t.parentNode}return null}function St(t){return typeof t!==\"object\"?t:JSON.stringify(t,(s,i)=>i===void 0?\"_|U|_\":i)}function tt(t){if(!t)return t;try{return JSON.parse(t,(s,i)=>i===\"_|U|_\"?void 0:i)}catch(s){return t}}var q=window,J=q._s??={Map:new Map};for(let[t,s]of q._S??[])J.Map.set(t,s);var at=q.sub??=mt();for(let t of[\"get\",\"set\",\"delete\"])J[t]=(s,i)=>{let u=J.Map[t](s,i);return at.n(s,i,t===\"get\"),u};function et(){let t=[],s=new Map,i=(e,f)=>e.get(f)??new Set,u=new Map,M=new Map,R=new Map,$=!1;function Q(e,f,r){let l=s.get(e)??h(f);r?l.value:l.value=f,s.set(e,l)}function I(e){let f=t.indexOf(e);if(f>-1)t.splice(f,1)}function n(e){let f=i(M,e);for(let r of f)r();M.delete(e)}function _(e){let f=(r)=>{let l=i(R,e);return l.add(r),R.set(e,l),r};return f.id=e,f}function o(e){let f=i(R,e);for(let r of f){n(r),o(r);for(let l of u.keys()){let A=u.get(l);if(A.delete(r),A.size===0)u.delete(l)}}R.delete(e)}function h(e){return{get value(){if(t[0])u.set(this,i(u,this).add(t[0]));return e},set value(f){let r=f===e&&f!=null;if(e=f,r)return;let l=i(u,this),A=new Set(l);for(let c of l){if(c===t[0])continue;if(A.has(c))o(c),n(c),S(c)}}}}async function S(e){t.unshift(e);let f=e(_(e));if(f?.then)await f;I(e)}function C(){for(let e of M.keys())n(e);M.clear(),u.clear(),R.clear(),w(!1)}function w(e=!0){if($===e)return;$=e,at[e?\"s\":\"u\"](Q)}function B(e,f){let r=i(M,f);r.add(e),M.set(f,r)}function L(e){let f=h();return S(()=>{f.value=e()}),f}let m={...J,setOptimistic(e,f,r){let l=\"__ind:\"+e,A=\"__o:\"+f,c=m.get(f),d=r(c);m.set(l,!0),m.set(A,d),S(()=>{if(!m.get(l)&&m.get(f)===d)m.delete(A)})},get(e){return w(),J.get(\"__o:\"+e)??J.get(e)},has(e){return m.get(e)!==void 0}};function G(e){let f=\"__ind:\"+e,r=L(()=>!!m.get(f));return r.id=f,r.error=L(()=>m.get(\"e\"+f)),r}return{state:h,store:m,effect:S,reset:C,cleanup:B,derived:L,indicate:G}}function mt(){let t=new Set;return{[\"s\"](s){t.add(s)},[\"n\"](...s){for(let i of t)i(...s)},[\"u\"](s){t.delete(s)}}}var H=(t)=>t.toLowerCase();function Tt(t){let s=\"\";for(let i in t){let u=H(i.replace(/([A-Z])/g,\"-$1\"));s+=`${u}:${t[i]};`}return s}var Rt=Symbol(\"on\"),Lt=Symbol(\"off\"),ot=\"http://www.w3.org/\",X=ot+\"2000/svg\",nt=ot+\"1999/xlink\",K=\"HTML\",rt=\"indicator\",ft=\"brisa-request\",Ut=\"portal\",v=\"slot\",st=\"key\",k=\"connectedCallback\",_t=\"dis\"+k,V=\"inner\"+K,it=\"p\",z=\"l\",g=null,pt=\"context\",dt=(t)=>typeof t===\"object\",Y=(t)=>t?.some?.(dt),b=Array.from,lt=(t)=>t instanceof CustomEvent,F=(t)=>typeof t===\"function\",Z=(t)=>t.startsWith(\"on\"),P=(t,s)=>t.appendChild(s);function ht(t,s=[]){let i=document,u=window,M=(n)=>{if(n===!1)n=\"\";return i.createTextNode((Array.isArray(n)?n.join(\"\"):n??\"\").toString())},R=(n,_)=>{return n===\"svg\"||_?.namespaceURI===X&&H(_.tagName)!==\"foreignobject\"?i.createElementNS(X,n):i.createElement(n)},$=(n,_,o)=>{let h=o===Rt,S=o===Lt,C=_===\"style\"&&dt(o)?Tt(o):St(o);if(C===void 0)return;let w=n.namespaceURI===X&&(_.startsWith(\"xlink:\")||_===\"href\");if(_===rt)if(o)n.classList.add(ft);else n.classList.remove(ft);else if(_===\"ref\")o.value=n;else if(w)if(S)n.removeAttributeNS(nt,_);else n.setAttributeNS(nt,_,h?\"\":C);else if(S)n.removeAttribute(_);else n.setAttribute(_,h?\"\":C)},Q=[],I={};s.push(st);for(let n of s){let _=H(n);I[_]=I[n]=n,Q.push(_)}return class extends HTMLElement{p;l;s;static get observedAttributes(){return Q}static formAssociated=!0;async[k](){let n=this,_=n.shadowRoot??n.attachShadow({mode:\"open\"}),o=[],h=[],S=new CSSStyleSheet,C=0,w=[];for(let e of i.styleSheets)try{for(let f of e.cssRules)w.push(f.cssText)}catch(f){w.push(`@import url('${e.href}');`)}S.replaceSync(w.join(\"\")),_.adoptedStyleSheets.push(S);function B(e,f){if(e?.[0]!==Ut)return[e,f];let{element:r,target:l}=e[1];return[r,l]}async function L(e,f,r,l,A,c,d=!1){if(r?.then)r=await r;if(d){if(n.shadowR
TypeError: window.mockCleanup is not a function. (In 'window.mockCleanup()'
at cleanupAnEffect (/Users/runner/work/brisa/brisa/packages/brisa/src/utils/signals/index.ts:67:33) at reset (/Users/runner/work/brisa/brisa/packages/brisa/src/utils/signals/index.ts:152:7) at disconnectedCallback (/Users/runner/work/brisa/brisa/packages/brisa/src/utils/brisa-element/index.ts:489:15) at [disconnectedFromDocument] (/Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/nodes/node/Node.js:831:18) at [disconnectedFromDocument] (/Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/nodes/element/Element.js:1094:30) at [disconnectedFromNode] (/Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/nodes/node/Node.js:756:33) at [disconnectedFromNode] (/Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/nodes/html-element/HTMLElement.js:505:30) at [disconnectedFromNode] (/Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/nodes/node/Node.js:772:42) at [disconnectedFromNode] (/Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/nodes/html-element/HTMLElement.js:505:30) at [disconnectedFromNode] (/Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/nodes/node/Node.js:772:42) at [disconnectedFromNode] (/Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/nodes/html-element/HTMLElement.js:505:30) at [removeChild] (/Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/nodes/node/Node.js:443:29) at [destroy] (/Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/window/BrowserWindow.js:1369:27) at /Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/browser/utilities/BrowserFrameFactory.js:52:49 at new Promise (1:11) at destroyFrame (/Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/browser/utilities/BrowserFrameFactory.js:26:16) at /Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/browser/utilities/BrowserPageUtility.js:31:33 at new Promise (1:11) at closePage (/Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/browser/utilities/BrowserPageUtility.js:22:16) at /Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/browser/detached-browser/DetachedBrowserPage.js:69:32 at new Promise (1:11) at close (/Users/runner/work/brisa/brisa/node_modules/happy-dom/lib/browser/detached-browser/DetachedBrowserPage.js:67:16) at /Users/runner/work/brisa/brisa/node_modules/@happy-dom/global-registrator/lib/GlobalRegistrator.js:80:28 at unregister (/Users/runner/work/brisa/brisa/node_modules/@happy-dom/global-registrator/lib/GlobalRegistrator.js:65:31) at /Users/runner/work/brisa/brisa/packages/brisa/src/utils/client-build-plugin/integration.test.tsx:60:60 at /Users/runner/work/brisa/brisa/packages/brisa/src/utils/client-build-plugin/integration.test.tsx:58:15
error: incorrect header check: node:zlib#L104
at zlibOnError (node:zlib:104:51) at writeSync (native:1:1) at processChunkSync (node:zlib:207:25) at zlibBufferSync (node:zlib:99:32) at /Users/runner/work/brisa/brisa/packages/brisa/src/cli/serve/serve-options.test.tsx:1036:24 at processTicksAndRejections (native:7:39)
error: Decompression failed: node:zlib#L104
at zlibOnError (node:zlib:104:51) at writeSync (native:1:1) at processChunkSync (node:zlib:207:25) at zlibBufferSync (node:zlib:99:32) at /Users/runner/work/brisa/brisa/packages/brisa/src/cli/serve/serve-options.test.tsx:1121:24 at processTicksAndRejections (native:7:39)
bun-tests (windows-latest)
The job was canceled because "macos-latest" failed.
bun-tests (windows-latest)
The operation was canceled.
bun-tests (ubuntu-latest)
The job was canceled because "macos-latest" failed.
error: expect(received).toContain(expected): packages/brisa/src/cli/build.test.ts#L110
Compiled successfully!" Received: "" at /home/runner/work/brisa/brisa/packages/brisa/src/cli/build.test.ts:110:20
error: expect(received).toContain(expected): packages/brisa/src/cli/build.test.ts#L175
Expected to contain: "Generated static pages successfully!" Received: "[ info ] " at /home/runner/work/brisa/brisa/packages/brisa/src/cli/build.test.ts:175:20
error: expect(received).toContain(expected): packages/brisa/src/cli/build.test.ts#L203
Expected to contain: "Generated static pages successfully!" Received: "[ info ] " at /home/runner/work/brisa/brisa/packages/brisa/src/cli/build.test.ts:203:20
error: expect(received).toContain(expected): packages/brisa/src/cli/build.test.ts#L251
Expected to contain: "Generated static pages successfully!" Received: "[ info ] " at /home/runner/work/brisa/brisa/packages/brisa/src/cli/build.test.ts:251:20
error: expect(received).toContain(expected): packages/brisa/src/cli/build.test.ts#L271
Expected to contain: "Adapting output to my-adapter..." Received: "" at /home/runner/work/brisa/brisa/packages/brisa/src/cli/build.test.ts:271:20
error: incorrect header check: node:zlib#L104
at zlibOnError (node:zlib:104:51) at writeSync (native:1:1) at processChunkSync (node:zlib:207:25) at zlibBufferSync (node:zlib:99:32) at /home/runner/work/brisa/brisa/packages/brisa/src/cli/serve/serve-options.test.tsx:1036:24 at processTicksAndRejections (native:7:39)
error: Decompression failed: node:zlib#L104
at zlibOnError (node:zlib:104:51) at writeSync (native:1:1) at processChunkSync (node:zlib:207:25) at zlibBufferSync (node:zlib:99:32) at /home/runner/work/brisa/brisa/packages/brisa/src/cli/serve/serve-options.test.tsx:1121:24 at processTicksAndRejections (native:7:39)
error: incorrect header check: node:zlib#L104
at zlibOnError (node:zlib:104:51) at writeSync (native:1:1) at processChunkSync (node:zlib:207:25) at zlibBufferSync (node:zlib:99:32) at /home/runner/work/brisa/brisa/packages/brisa/src/cli/serve/serve-options.test.tsx:1036:24 at processTicksAndRejections (native:7:39)
error: Decompression failed: node:zlib#L104
at zlibOnError (node:zlib:104:51) at writeSync (native:1:1) at processChunkSync (node:zlib:207:25) at zlibBufferSync (node:zlib:99:32) at /home/runner/work/brisa/brisa/packages/brisa/src/cli/serve/serve-options.test.tsx:1121:24 at processTicksAndRejections (native:7:39)
error: incorrect header check: node:zlib#L104
at zlibOnError (node:zlib:104:51) at writeSync (native:1:1) at processChunkSync (node:zlib:207:25) at zlibBufferSync (node:zlib:99:32) at /home/runner/work/brisa/brisa/packages/brisa/src/cli/serve/serve-options.test.tsx:1036:24 at processTicksAndRejections (native:7:39)
bun-tests (macos-latest)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
node-tests (windows-latest)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
node-tests (ubuntu-latest)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
node-tests (macos-latest)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/