Skip to content

Commit

Permalink
fix(nuxt): replace BigInt literal with BigInt constructor (#21427)
Browse files Browse the repository at this point in the history
  • Loading branch information
AWBroch committed Jun 7, 2023
1 parent c0b3d26 commit 0bc38b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/nuxt/src/app/plugins/revive-payload.client.ts
Expand Up @@ -5,8 +5,8 @@ import { defineNuxtPlugin } from '#app/nuxt'

const revivers = {
NuxtError: (data: any) => createError(data),
EmptyShallowRef: (data: any) => shallowRef(data === '_' ? undefined : data === '0n' ? 0n : JSON.parse(data)),
EmptyRef: (data: any) => ref(data === '_' ? undefined : data === '0n' ? 0n : JSON.parse(data)),
EmptyShallowRef: (data: any) => shallowRef(data === '_' ? undefined : data === '0n' ? BigInt(0) : JSON.parse(data)),
EmptyRef: (data: any) => ref(data === '_' ? undefined : data === '0n' ? BigInt(0) : JSON.parse(data)),
ShallowRef: (data: any) => shallowRef(data),
ShallowReactive: (data: any) => shallowReactive(data),
Ref: (data: any) => ref(data),
Expand Down
2 changes: 1 addition & 1 deletion test/bundle.test.ts
Expand Up @@ -34,7 +34,7 @@ describe.skipIf(isWindows || process.env.TEST_BUILDER === 'webpack' || process.e

it('default client bundle size', async () => {
stats.client = await analyzeSizes('**/*.js', publicDir)
expect(roundToKilobytes(stats.client.totalBytes)).toMatchInlineSnapshot('"97.7k"')
expect(roundToKilobytes(stats.client.totalBytes)).toMatchInlineSnapshot('"97.8k"')
expect(stats.client.files.map(f => f.replace(/\..*\.js/, '.js'))).toMatchInlineSnapshot(`
[
"_nuxt/entry.js",
Expand Down

0 comments on commit 0bc38b7

Please sign in to comment.