Skip to content

refactor: use !!v insetead of Boolean(v) to reduce bundle size #6004

refactor: use !!v insetead of Boolean(v) to reduce bundle size

refactor: use !!v insetead of Boolean(v) to reduce bundle size #6004

Triggered via pull request November 28, 2024 03:28
Status Failure
Total duration 1m 55s
Artifacts 6

ci.yml

on: pull_request
Matrix: node
Checking if it's valid for JSR
10s
Checking if it's valid for JSR
Type & Bundle size Check on PR
1m 22s
Type & Bundle size Check on PR
Type & Bundle size Check on Main
0s
Type & Bundle size Check on Main
Coverage
0s
Coverage
Fit to window
Zoom out
Zoom in

Annotations

26 errors and 1 warning
Deno
Process completed with exit code 1.
Node.js v20.x: src/adapter/aws-lambda/handler.ts#L336
'event' is declared but its value is never read.
Node.js v20.x: src/adapter/aws-lambda/handler.ts#L338
'headers' is declared but its value is never read.
Node.js v20.x: src/jsx/types.ts#L26
All type parameters are unused.
Node.js v18.18.2: src/adapter/aws-lambda/handler.ts#L336
'event' is declared but its value is never read.
Node.js v18.18.2: src/adapter/aws-lambda/handler.ts#L338
'headers' is declared but its value is never read.
Node.js v18.18.2: src/jsx/types.ts#L26
All type parameters are unused.
Node.js v22.x: src/adapter/aws-lambda/handler.ts#L336
'event' is declared but its value is never read.
Node.js v22.x: src/adapter/aws-lambda/handler.ts#L338
'headers' is declared but its value is never read.
Node.js v22.x: src/jsx/types.ts#L26
All type parameters are unused.
workerd: src/adapter/aws-lambda/handler.ts#L336
'event' is declared but its value is never read.
workerd: src/adapter/aws-lambda/handler.ts#L338
'headers' is declared but its value is never read.
workerd: src/jsx/types.ts#L26
All type parameters are unused.
Unhandled error: src/jsx/streaming.ts#L165
TypeError: Cannot read properties of undefined (reading 'forEach') ❯ src/jsx/streaming.ts:165:19 This error originated in "src/jsx/components.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. The latest test that might've caused the error is "src/jsx/components.test.tsx". It might mean one of the following: - The error was thrown, while Vitest was running this test. - If the error occurred after the test had been completed, this was the last documented test before it was thrown.
Unhandled error: src/jsx/streaming.ts#L165
TypeError: Cannot read properties of undefined (reading 'forEach') ❯ src/jsx/streaming.ts:165:19 This error originated in "src/jsx/components.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. The latest test that might've caused the error is "src/jsx/components.test.tsx". It might mean one of the following: - The error was thrown, while Vitest was running this test. - If the error occurred after the test had been completed, this was the last documented test before it was thrown.
Unhandled error: src/jsx/streaming.ts#L165
TypeError: Cannot read properties of undefined (reading 'forEach') ❯ src/jsx/streaming.ts:165:19 This error originated in "src/jsx/components.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. The latest test that might've caused the error is "src/jsx/components.test.tsx". It might mean one of the following: - The error was thrown, while Vitest was running this test. - If the error occurred after the test had been completed, this was the last documented test before it was thrown.
src/jsx/components.test.tsx > ErrorBoundary > streaming > no error: src/jsx/components.test.tsx#L245
AssertionError: expected [ …(2) ] to deeply equal [ …(3) ] - Expected + Received Array [ "<template id=\"E:9\"></template><!--E:9-->", "<template data-hono-target=\"E:9\"><template id=\"H:0\"></template><p>Loading...</p><!--/$--></template><script> ((d,c) => { c=d.currentScript.previousSibling d=d.getElementById('E:9') if(!d)return d.parentElement.insertBefore(c.content,d.nextSibling) })(document) </script>", - "<template data-hono-target=\"H:0\"><div>Hello</div></template><script> - ((d,c,n) => { - c=d.currentScript.previousSibling - d=d.getElementById('H:0') - if(!d)return - do{n=d.nextSibling;n.remove()}while(n.nodeType!=8||n.nodeValue!='/$') - d.replaceWith(c.content) - })(document) - </script><script> - ((d,c,n) => { - d=d.getElementById('E:9') - if(!d)return - n=d.nextSibling - while(n.nodeType!=8||n.nodeValue!='E:9'){n=n.nextSibling} - n.remove() - d.remove() - })(document) - </script>", ] ❯ src/jsx/components.test.tsx:245:22
src/jsx/components.test.tsx > ErrorBoundary > streaming : contains multiple suspense > no error: src/jsx/components.test.tsx#L323
AssertionError: expected '<p>Loading...</p><!--/$--><p>Loading.…' to deeply equal '<div>1</div><div>2</div><div>3</div>' Expected: "<div>1</div><div>2</div><div>3</div>" Received: "<p>Loading...</p><!--/$--><p>Loading...</p><!--/$--><p>Loading...</p><!--/$--><!--E:11-->" ❯ src/jsx/components.test.tsx:323:81
src/jsx/components.test.tsx > ErrorBoundary > streaming : contains multiple suspense > error: src/jsx/components.test.tsx#L353
AssertionError: expected '<p>Loading...</p><!--/$--><p>Loading.…' to deeply equal '<div>Out Of Service</div>' Expected: "<div>Out Of Service</div>" Received: "<p>Loading...</p><!--/$--><p>Loading...</p><!--/$--><p>Loading...</p><!--/$--><!--E:12-->" ❯ src/jsx/components.test.tsx:353:81
src/jsx/components.test.tsx > ErrorBoundary > streaming : nested > no error: src/jsx/components.test.tsx#L388
AssertionError: expected '<p>Loading...</p><!--/$--><!--E:13-->…' to deeply equal '<div>1</div><div>2</div>' Expected: "<div>1</div><div>2</div>" Received: "<p>Loading...</p><!--/$--><!--E:13--><!--E:14-->" ❯ src/jsx/components.test.tsx:388:81
src/jsx/components.test.tsx > ErrorBoundary > streaming : nested > error in parent: src/jsx/components.test.tsx#L416
AssertionError: expected '<p>Loading...</p><!--/$--><!--E:15-->…' to deeply equal '<div>Out Of Service</div>' Expected: "<div>Out Of Service</div>" Received: "<p>Loading...</p><!--/$--><!--E:15--><!--E:16-->" ❯ src/jsx/components.test.tsx:416:81
src/jsx/components.test.tsx > ErrorBoundary > streaming : nested > error in child: src/jsx/components.test.tsx#L444
AssertionError: expected '<p>Loading...</p><!--/$--><!--E:17-->…' to deeply equal '<div>1</div><div>Out Of Service</div>' Expected: "<div>1</div><div>Out Of Service</div>" Received: "<p>Loading...</p><!--/$--><!--E:17--><!--E:18-->" ❯ src/jsx/components.test.tsx:444:81
src/jsx/index.test.tsx > Context > with Suspence > Should preserve context in async component: src/jsx/index.test.tsx#L950
AssertionError: expected [ Array(1) ] to deeply equal [ …(2) ] - Expected + Received Array [ "<template id=\"H:0\"></template><span>red</span><!--/$-->", - "<template data-hono-target=\"H:0\"><span>dark</span><span>black</span></template><script> - ((d,c,n) => { - c=d.currentScript.previousSibling - d=d.getElementById('H:0') - if(!d)return - do{n=d.nextSibling;n.remove()}while(n.nodeType!=8||n.nodeValue!='/$') - d.replaceWith(c.content) - })(document) - </script>", ] ❯ src/jsx/index.test.tsx:950:22
Main: src/adapter/aws-lambda/handler.ts#L336
'event' is declared but its value is never read.
Main: src/adapter/aws-lambda/handler.ts#L338
'headers' is declared but its value is never read.
Main: src/jsx/types.ts#L26
All type parameters are unused.
Main: perf-measures/type-check/client.ts#L4
'client' is assigned a value but never used

Artifacts

Produced during runtime
Name Size
coverage-bun
11.9 KB
coverage-fastly
683 KB
coverage-lambda
691 KB
coverage-lambda-edge
685 KB
coverage-node
688 KB
coverage-workerd
668 KB