Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update swc_core to v0.90.10 #62222

Merged
merged 3 commits into from Feb 20, 2024
Merged

Update swc_core to v0.90.10 #62222

merged 3 commits into from Feb 20, 2024

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Feb 19, 2024

What?

Update SWC crates.

Why?

There was an important bug fix in SWC.

How?

Closes PACK-2529

@kdy1 kdy1 self-assigned this Feb 19, 2024
@ijjk ijjk added the created-by: Turbopack team PRs by the turbopack team label Feb 19, 2024
@ijjk
Copy link
Member

ijjk commented Feb 19, 2024

Stats from current PR

Default Build (Increase detected ⚠️)
General
vercel/next.js canary vercel/next.js kdy1/swc-core-0-90-3 Change
buildDuration 14.3s 14.4s N/A
buildDurationCached 9s 8.2s N/A
nodeModulesSize 197 MB 197 MB
nextStartRea..uration (ms) 404ms 410ms N/A
Client Bundles (main, webpack)
vercel/next.js canary vercel/next.js kdy1/swc-core-0-90-3 Change
1068-HASH.js gzip 30.3 kB 30.3 kB N/A
3f784ff6-HASH.js gzip 53.5 kB 53.5 kB N/A
4944-HASH.js gzip 5.04 kB 5.03 kB N/A
8423.HASH.js gzip 181 B 181 B
framework-HASH.js gzip 45.2 kB 45.2 kB
main-app-HASH.js gzip 240 B 242 B N/A
main-HASH.js gzip 32.1 kB 32.1 kB N/A
webpack-HASH.js gzip 1.7 kB 1.7 kB
Overall change 47.1 kB 47.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js kdy1/swc-core-0-90-3 Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary vercel/next.js kdy1/swc-core-0-90-3 Change
_app-HASH.js gzip 196 B 196 B
_error-HASH.js gzip 184 B 183 B N/A
amp-HASH.js gzip 503 B 504 B N/A
css-HASH.js gzip 323 B 324 B N/A
dynamic-HASH.js gzip 2.5 kB 2.51 kB N/A
edge-ssr-HASH.js gzip 258 B 259 B N/A
head-HASH.js gzip 353 B 351 B N/A
hooks-HASH.js gzip 370 B 370 B
image-HASH.js gzip 4.21 kB 4.2 kB N/A
index-HASH.js gzip 259 B 259 B
link-HASH.js gzip 2.68 kB 2.67 kB N/A
routerDirect..HASH.js gzip 313 B 314 B N/A
script-HASH.js gzip 386 B 385 B N/A
withRouter-HASH.js gzip 309 B 311 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 931 B 931 B
Client Build Manifests
vercel/next.js canary vercel/next.js kdy1/swc-core-0-90-3 Change
_buildManifest.js gzip 485 B 484 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js kdy1/swc-core-0-90-3 Change
index.html gzip 528 B 526 B N/A
link.html gzip 540 B 540 B
withRouter.html gzip 523 B 522 B N/A
Overall change 540 B 540 B
Edge SSR bundle Size
vercel/next.js canary vercel/next.js kdy1/swc-core-0-90-3 Change
edge-ssr.js gzip 2.29 kB 2.29 kB N/A
page.js gzip 2.97 kB 2.97 kB
Overall change 2.97 kB 2.97 kB
Middleware size
vercel/next.js canary vercel/next.js kdy1/swc-core-0-90-3 Change
middleware-b..fest.js gzip 624 B 627 B N/A
middleware-r..fest.js gzip 151 B 151 B
middleware.js gzip 466 B 464 B N/A
edge-runtime..pack.js gzip 839 B 839 B
Overall change 990 B 990 B
Next Runtimes
vercel/next.js canary vercel/next.js kdy1/swc-core-0-90-3 Change
app-page-exp...dev.js gzip 166 kB 166 kB
app-page-exp..prod.js gzip 95.9 kB 95.9 kB
app-page-tur..prod.js gzip 97.6 kB 97.6 kB
app-page-tur..prod.js gzip 92 kB 92 kB
app-page.run...dev.js gzip 136 kB 136 kB
app-page.run..prod.js gzip 90.6 kB 90.6 kB
app-route-ex...dev.js gzip 22 kB 22 kB
app-route-ex..prod.js gzip 14.9 kB 14.9 kB
app-route-tu..prod.js gzip 14.9 kB 14.9 kB
app-route-tu..prod.js gzip 14.6 kB 14.6 kB
app-route.ru...dev.js gzip 21.7 kB 21.7 kB
app-route.ru..prod.js gzip 14.6 kB 14.6 kB
pages-api-tu..prod.js gzip 9.47 kB 9.47 kB
pages-api.ru...dev.js gzip 9.74 kB 9.74 kB
pages-api.ru..prod.js gzip 9.47 kB 9.47 kB
pages-turbo...prod.js gzip 22.1 kB 22.1 kB
pages.runtim...dev.js gzip 22.8 kB 22.8 kB
pages.runtim..prod.js gzip 22.1 kB 22.1 kB
server.runti..prod.js gzip 50.2 kB 50.2 kB
Overall change 927 kB 927 kB
build cache Overall increase ⚠️
vercel/next.js canary vercel/next.js kdy1/swc-core-0-90-3 Change
0.pack gzip 1.49 MB 1.49 MB N/A
index.pack gzip 104 kB 104 kB ⚠️ +199 B
Overall change 104 kB 104 kB ⚠️ +199 B
Commit: eb555e3

kdy1 added a commit to vercel/turbo that referenced this pull request Feb 20, 2024
### Description

Update SWC crates, to apply swc-project/swc#8647

### Testing Instructions

See vercel/next.js#62222. It's next.js counterpart.

Closes PACK-2530
@kdy1 kdy1 changed the title Update swc_core to v0.90.10 Update swc_core to v0.90.10 and update turbopack Feb 20, 2024
@kdy1 kdy1 enabled auto-merge (squash) February 20, 2024 01:02
@ijjk
Copy link
Member

ijjk commented Feb 20, 2024

Failing test suites

Commit: e7486f6

TURBOPACK=1 pnpm test test/integration/no-page-props/test/index.test.js (turbopack)

  • Error no pageProps > dev mode > should navigate between pages correctly
Expand output

● Error no pageProps › dev mode › should navigate between pages correctly

expect(received).toEqual(expected) // deep equality

Expected: []
Received: undefined

  76 |       'Application error: a client-side exception has occurred (see the browser console for more information).'
  77 |     )
> 78 |     expect(await browser.eval('window.uncaughtErrors')).toEqual([])
     |                                                         ^
  79 |   })
  80 | }
  81 |

  at Object.toEqual (integration/no-page-props/test/index.test.js:78:57)

Read more about building and testing Next.js in contributing.md.

TURBOPACK=1 pnpm test test/integration/client-404/test/index.test.js (turbopack)

  • Client 404 > dev mode > Client Navigation 404 > should hard navigate to URL on failing to load bundle
Expand output

● Client 404 › dev mode › Client Navigation 404 › should hard navigate to URL on failing to load bundle

thrown: "Exceeded timeout of 60000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

  25 |     })
  26 |
> 27 |     it('should hard navigate to URL on failing to load bundle', async () => {
     |     ^
  28 |       const browser = await webdriver(context.appPort, '/invalid-link')
  29 |       await browser.eval(() => (window.beforeNav = 'hi'))
  30 |       await browser.elementByCss('#to-nonexistent').click()

  at it (integration/client-404/test/client-navigation.js:27:5)
  at describe (integration/client-404/test/client-navigation.js:6:3)
  at runTests (integration/client-404/test/index.test.js:22:19)
  at runTests (integration/client-404/test/index.test.js:36:5)
  at describe (integration/client-404/test/index.test.js:26:3)
  at Object.describe (integration/client-404/test/index.test.js:25:1)

Read more about building and testing Next.js in contributing.md.

pnpm test-dev test/e2e/app-dir/interception-route-prefetch-cache/interception-route-prefetch-cache.test.ts (PPR)

  • interception-route-prefetch-cache > runtime = edge > should render the correct interception when two distinct layouts share the same path structure
Expand output

● interception-route-prefetch-cache › runtime = edge › should render the correct interception when two distinct layouts share the same path structure

thrown: "Exceeded timeout of 120000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

   6 | describe('interception-route-prefetch-cache', () => {
   7 |   function runTests({ next }: ReturnType<typeof nextTestSetup>) {
>  8 |     it('should render the correct interception when two distinct layouts share the same path structure', async () => {
     |     ^
   9 |       const browser = await next.browser('/')
  10 |
  11 |       await browser.elementByCss('[href="/foo"]').click()

  at it (e2e/app-dir/interception-route-prefetch-cache/interception-route-prefetch-cache.test.ts:8:5)
  at runTests (e2e/app-dir/interception-route-prefetch-cache/interception-route-prefetch-cache.test.ts:91:5)
  at describe (e2e/app-dir/interception-route-prefetch-cache/interception-route-prefetch-cache.test.ts:90:3)
  at Object.describe (e2e/app-dir/interception-route-prefetch-cache/interception-route-prefetch-cache.test.ts:6:1)

Read more about building and testing Next.js in contributing.md.

TURBOPACK=1 pnpm test test/integration/next-image-legacy/default/test/index.test.ts (turbopack)

  • Image Component Tests > dev mode > should update the image on src change
  • Image Component Tests > dev mode > should work with image with blob src
  • Image Component Tests > dev mode > should handle the styles prop appropriately
  • Image Component Tests > dev mode > should show error when not numeric string width or height
  • Image Component Tests > dev mode > should warn when priority prop is missing on LCP image
  • Image Component Tests > dev mode > should warn when loader is missing width
  • Image Component Tests > dev mode > should emit image for next/dynamic with non ssr case
Expand output

● Image Component Tests › dev mode › should update the image on src change

TIMED OUT: /test\.jpg/

data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7

undefined

  636 |
  637 |   if (hardError) {
> 638 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |           ^
  639 |   }
  640 |   return false
  641 | }

  at check (lib/next-test-utils.ts:638:11)
  at Object.<anonymous> (integration/next-image-legacy/default/test/index.test.ts:218:7)

● Image Component Tests › dev mode › should work with image with blob src

TIMED OUT: /^blob:/

null

undefined

  636 |
  637 |   if (hardError) {
> 638 |     throw new Error('TIMED OUT: ' + regex + '\n\n' + content + '\n\n' + lastErr)
      |           ^
  639 |   }
  640 |   return false
  641 | }

  at check (lib/next-test-utils.ts:638:11)
  at Object.<anonymous> (integration/next-image-legacy/default/test/index.test.ts:428:7)

● Image Component Tests › dev mode › should handle the styles prop appropriately

expect(received).toMatch(expected)

Expected pattern: /Image with src \/test.png is assigned the following styles, which are overwritten by automatically-generated styles: padding/gm
Received string:  ""

  780 |           .map((log) => log.message)
  781 |           .join('\n')
> 782 |         expect(warnings).toMatch(
      |                          ^
  783 |           /Image with src \/test.png is assigned the following styles, which are overwritten by automatically-generated styles: padding/gm
  784 |         )
  785 |         expect(warnings).toMatch(

  at Object.toMatch (integration/next-image-legacy/default/test/index.test.ts:782:26)

● Image Component Tests › dev mode › should show error when not numeric string width or height

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  838 |       const browser = await webdriver(appPort, '/invalid-width-or-height')
  839 |
> 840 |       expect(await hasRedbox(browser)).toBe(true)
      |                                        ^
  841 |       expect(await getRedboxHeader(browser)).toContain(
  842 |         `Image with src "/test.jpg" has invalid "width" or "height" property. These should be numeric values.`
  843 |       )

  at Object.toBe (integration/next-image-legacy/default/test/index.test.ts:840:40)

● Image Component Tests › dev mode › should warn when priority prop is missing on LCP image

expect(received).toMatch(expected)

Expected pattern: /Image with src (.*)test(.*) was detected as the Largest Contentful Paint/gm
Received string:  ""

  933 |           .join('\n')
  934 |         expect(await hasRedbox(browser)).toBe(false)
> 935 |         expect(warnings).toMatch(
      |                          ^
  936 |           /Image with src (.*)test(.*) was detected as the Largest Contentful Paint/gm
  937 |         )
  938 |       } finally {

  at Object.toMatch (integration/next-image-legacy/default/test/index.test.ts:935:26)

● Image Component Tests › dev mode › should warn when loader is missing width

expect(received).toMatch(expected)

Expected pattern: /Image with src (.*)png(.*) has a "loader" property that does not implement width/gm
Received string:  ""

  948 |         .join('\n')
  949 |       expect(await hasRedbox(browser)).toBe(false)
> 950 |       expect(warnings).toMatch(
      |                        ^
  951 |         /Image with src (.*)png(.*) has a "loader" property that does not implement width/gm
  952 |       )
  953 |       expect(warnings).not.toMatch(

  at Object.toMatch (integration/next-image-legacy/default/test/index.test.ts:950:24)

● Image Component Tests › dev mode › should emit image for next/dynamic with non ssr case

thrown: "Exceeded timeout of 60000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

  1154 |   })
  1155 |
> 1156 |   it('should emit image for next/dynamic with non ssr case', async () => {
       |   ^
  1157 |     let browser = await webdriver(appPort, '/dynamic-static-img')
  1158 |     const img = await browser.elementById('dynamic-loaded-static-jpg')
  1159 |     const src = await img.getAttribute('src')

  at it (integration/next-image-legacy/default/test/index.test.ts:1156:3)
  at runTests (integration/next-image-legacy/default/test/index.test.ts:1481:5)
  at describe (integration/next-image-legacy/default/test/index.test.ts:1472:3)
  at Object.describe (integration/next-image-legacy/default/test/index.test.ts:1471:1)

Read more about building and testing Next.js in contributing.md.

@kdy1 kdy1 changed the title Update swc_core to v0.90.10 and update turbopack Update swc_core to v0.90.10 Feb 20, 2024
@kdy1 kdy1 disabled auto-merge February 20, 2024 02:24
@kdy1 kdy1 enabled auto-merge (squash) February 20, 2024 02:35
@kdy1 kdy1 merged commit a78ed66 into canary Feb 20, 2024
69 of 70 checks passed
@kdy1 kdy1 deleted the kdy1/swc-core-0-90-3 branch February 20, 2024 03:20
@github-actions github-actions bot added the locked label Mar 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants