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 #36745

Merged
merged 18 commits into from May 16, 2022
Merged

Update swc #36745

merged 18 commits into from May 16, 2022

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented May 7, 2022

This PR

image

  • applies various bugfixes

@ijjk
Copy link
Member

ijjk commented May 7, 2022

Stats from current PR

Default Build (Decrease detected ✓)
General
vercel/next.js canary kdy1/next.js swc-up-unknown Change
buildDuration 15.2s 15.1s -73ms
buildDurationCached 6.2s 6.2s ⚠️ +15ms
nodeModulesSize 478 MB 478 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary kdy1/next.js swc-up-unknown Change
/ failed reqs 0 0
/ total time (seconds) 3.665 3.687 ⚠️ +0.02
/ avg req/sec 682.11 678 ⚠️ -4.11
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.121 1.15 ⚠️ +0.03
/error-in-render avg req/sec 2230.42 2174.29 ⚠️ -56.13
Client Bundles (main, webpack)
vercel/next.js canary kdy1/next.js swc-up-unknown Change
925.HASH.js gzip 179 B 179 B
framework-HASH.js gzip 42 kB 42 kB
main-HASH.js gzip 28.7 kB 28.7 kB
webpack-HASH.js gzip 1.44 kB 1.44 kB
Overall change 72.4 kB 72.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary kdy1/next.js swc-up-unknown Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary kdy1/next.js swc-up-unknown Change
_app-HASH.js gzip 1.36 kB 1.36 kB
_error-HASH.js gzip 193 B 193 B
amp-HASH.js gzip 308 B 308 B
css-HASH.js gzip 327 B 327 B
dynamic-HASH.js gzip 2.7 kB 2.7 kB
head-HASH.js gzip 359 B 359 B
hooks-HASH.js gzip 920 B 920 B
image-HASH.js gzip 5.71 kB 5.71 kB
index-HASH.js gzip 263 B 263 B
link-HASH.js gzip 2.65 kB 2.65 kB
routerDirect..HASH.js gzip 320 B 320 B
script-HASH.js gzip 391 B 391 B
withRouter-HASH.js gzip 318 B 318 B
85e02e95b279..7e3.css gzip 107 B 107 B
Overall change 15.9 kB 15.9 kB
Client Build Manifests
vercel/next.js canary kdy1/next.js swc-up-unknown Change
_buildManifest.js gzip 458 B 458 B
Overall change 458 B 458 B
Rendered Page Sizes
vercel/next.js canary kdy1/next.js swc-up-unknown Change
index.html gzip 532 B 532 B
link.html gzip 544 B 544 B
withRouter.html gzip 527 B 527 B
Overall change 1.6 kB 1.6 kB

Default Build with SWC
General
vercel/next.js canary kdy1/next.js swc-up-unknown Change
buildDuration 17.4s 17.2s -142ms
buildDurationCached 6.2s 6.2s ⚠️ +44ms
nodeModulesSize 478 MB 478 MB
Page Load Tests Overall increase ✓
vercel/next.js canary kdy1/next.js swc-up-unknown Change
/ failed reqs 0 0
/ total time (seconds) 3.7 3.705 0
/ avg req/sec 675.75 674.8 ⚠️ -0.95
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.151 1.149 0
/error-in-render avg req/sec 2171.69 2175.81 +4.12
Client Bundles (main, webpack)
vercel/next.js canary kdy1/next.js swc-up-unknown Change
925.HASH.js gzip 178 B 178 B
framework-HASH.js gzip 42.7 kB 42.7 kB
main-HASH.js gzip 29.2 kB 29.2 kB
webpack-HASH.js gzip 1.45 kB 1.45 kB
Overall change 73.5 kB 73.5 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary kdy1/next.js swc-up-unknown Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary kdy1/next.js swc-up-unknown Change
_app-HASH.js gzip 1.35 kB 1.35 kB
_error-HASH.js gzip 179 B 179 B
amp-HASH.js gzip 311 B 311 B
css-HASH.js gzip 324 B 324 B
dynamic-HASH.js gzip 2.89 kB 2.89 kB
head-HASH.js gzip 357 B 357 B
hooks-HASH.js gzip 920 B 920 B
image-HASH.js gzip 5.8 kB 5.8 kB
index-HASH.js gzip 261 B 261 B
link-HASH.js gzip 2.77 kB 2.77 kB
routerDirect..HASH.js gzip 322 B 322 B
script-HASH.js gzip 392 B 392 B
withRouter-HASH.js gzip 317 B 317 B
85e02e95b279..7e3.css gzip 107 B 107 B
Overall change 16.3 kB 16.3 kB
Client Build Manifests
vercel/next.js canary kdy1/next.js swc-up-unknown Change
_buildManifest.js gzip 457 B 457 B
Overall change 457 B 457 B
Rendered Page Sizes
vercel/next.js canary kdy1/next.js swc-up-unknown Change
index.html gzip 532 B 532 B
link.html gzip 547 B 547 B
withRouter.html gzip 528 B 528 B
Overall change 1.61 kB 1.61 kB
Commit: 572ef61

@kdy1 kdy1 requested review from Brooooooklyn and padmaia May 7, 2022 10:43
Brooooooklyn
Brooooooklyn previously approved these changes May 7, 2022
@kdy1 kdy1 marked this pull request as draft May 7, 2022 13:37
@kdy1
Copy link
Member Author

kdy1 commented May 7, 2022

I'll undraft this after applying swc-project/swc#4563

@kdy1 kdy1 marked this pull request as ready for review May 8, 2022 03:16
@kdy1 kdy1 requested a review from Brooooooklyn May 8, 2022 03:16
@kdy1 kdy1 marked this pull request as draft May 13, 2022 03:29
@kdy1 kdy1 marked this pull request as ready for review May 14, 2022 05:39
@kdy1 kdy1 dismissed a stale review via c1d6724 May 15, 2022 12:49
@ijjk
Copy link
Member

ijjk commented May 15, 2022

Failing test suites

Commit: c1d6724

yarn testheadless test/integration/create-next-app/index.test.ts

  • create next app > valid example
  • create next app > should allow example with GitHub URL
  • create next app > should allow example with GitHub URL and example-path
  • create next app > should use --example-path over the file path in the GitHub URL
  • create next app > should use npm as the package manager on supplying --use-npm with example
  • create next app > should use pnpm as the package manager on supplying --use-pnpm with example
Expand output

● create next app › valid example

Command failed with exit code 1 (EPERM): node /home/runner/work/next.js/next.js/packages/create-next-app/dist/index.js valid-example --example basic-css

  81 |     await usingTempDir(async (cwd) => {
  82 |       const projectName = 'valid-example'
> 83 |       const res = await run([projectName, '--example', 'basic-css'], { cwd })
     |                   ^
  84 |       expect(res.exitCode).toBe(0)
  85 |
  86 |       expect(

  at makeError (../node_modules/execa/lib/error.js:58:11)
  at handlePromise (../node_modules/execa/index.js:112:26)
  at integration/create-next-app/index.test.ts:83:19
  at usingTempDir (integration/create-next-app/index.test.ts:19:5)
  at Object.<anonymous> (integration/create-next-app/index.test.ts:81:5)

● create next app › should allow example with GitHub URL

Command failed with exit code 1 (EPERM): node /home/runner/work/next.js/next.js/packages/create-next-app/dist/index.js github-app --example https://github.com/vercel/next.js/tree/canary/examples/basic-css

  146 |     await usingTempDir(async (cwd) => {
  147 |       const projectName = 'github-app'
> 148 |       const res = await run(
      |                   ^
  149 |         [projectName, '--example', `${exampleRepo}/${examplePath}`],
  150 |         {
  151 |           cwd,

  at makeError (../node_modules/execa/lib/error.js:58:11)
  at handlePromise (../node_modules/execa/index.js:112:26)
  at integration/create-next-app/index.test.ts:148:19
  at usingTempDir (integration/create-next-app/index.test.ts:19:5)
  at Object.<anonymous> (integration/create-next-app/index.test.ts:146:5)

● create next app › should allow example with GitHub URL and example-path

Command failed with exit code 1 (EPERM): node /home/runner/work/next.js/next.js/packages/create-next-app/dist/index.js github-example-path --example https://github.com/vercel/next.js/tree/canary --example-path examples/basic-css

  172 |     await usingTempDir(async (cwd) => {
  173 |       const projectName = 'github-example-path'
> 174 |       const res = await run(
      |                   ^
  175 |         [projectName, '--example', exampleRepo, '--example-path', examplePath],
  176 |         {
  177 |           cwd,

  at makeError (../node_modules/execa/lib/error.js:58:11)
  at handlePromise (../node_modules/execa/index.js:112:26)
  at integration/create-next-app/index.test.ts:174:19
  at usingTempDir (integration/create-next-app/index.test.ts:19:5)
  at Object.<anonymous> (integration/create-next-app/index.test.ts:172:5)

● create next app › should use --example-path over the file path in the GitHub URL

Command failed with exit code 1 (EPERM): node /home/runner/work/next.js/next.js/packages/create-next-app/dist/index.js github-example-path-2 --example https://github.com/vercel/next.js/tree/canary/examples/basic-css --example-path examples/basic-css

  198 |     await usingTempDir(async (cwd) => {
  199 |       const projectName = 'github-example-path-2'
> 200 |       const res = await run(
      |                   ^
  201 |         [
  202 |           projectName,
  203 |           '--example',

  at makeError (../node_modules/execa/lib/error.js:58:11)
  at handlePromise (../node_modules/execa/index.js:112:26)
  at integration/create-next-app/index.test.ts:200:19
  at usingTempDir (integration/create-next-app/index.test.ts:19:5)
  at Object.<anonymous> (integration/create-next-app/index.test.ts:198:5)

● create next app › should use npm as the package manager on supplying --use-npm with example

Command failed with exit code 1 (EPERM): node /home/runner/work/next.js/next.js/packages/create-next-app/dist/index.js use-npm --use-npm --example https://github.com/vercel/next.js/tree/canary/examples/basic-css

  387 |     await usingTempDir(async (cwd) => {
  388 |       const projectName = 'use-npm'
> 389 |       const res = await run(
      |                   ^
  390 |         [
  391 |           projectName,
  392 |           '--use-npm',

  at makeError (../node_modules/execa/lib/error.js:58:11)
  at handlePromise (../node_modules/execa/index.js:112:26)
  at integration/create-next-app/index.test.ts:389:19
  at usingTempDir (integration/create-next-app/index.test.ts:19:5)
  at Object.<anonymous> (integration/create-next-app/index.test.ts:387:5)

● create next app › should use pnpm as the package manager on supplying --use-pnpm with example

Command failed with exit code 1 (EPERM): node /home/runner/work/next.js/next.js/packages/create-next-app/dist/index.js use-pnpm --use-pnpm --example https://github.com/vercel/next.js/tree/canary/examples/basic-css

  434 |     await usingTempDir(async (cwd) => {
  435 |       const projectName = 'use-pnpm'
> 436 |       const res = await run(
      |                   ^
  437 |         [
  438 |           projectName,
  439 |           '--use-pnpm',

  at makeError (../node_modules/execa/lib/error.js:58:11)
  at handlePromise (../node_modules/execa/index.js:112:26)
  at integration/create-next-app/index.test.ts:436:19
  at usingTempDir (integration/create-next-app/index.test.ts:19:5)
  at Object.<anonymous> (integration/create-next-app/index.test.ts:434:5)

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

@kodiakhq kodiakhq bot merged commit 359d03f into vercel:canary May 16, 2022
@timneutkens timneutkens deleted the swc-up-unknown branch May 16, 2022 11:15
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants