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 type of preferredRegion #49003

Merged
merged 3 commits into from Apr 30, 2023
Merged

Conversation

timneutkens
Copy link
Member

@timneutkens timneutkens commented Apr 30, 2023

Follow-up to #48959, adds the right types after the renames of properties.

@timneutkens timneutkens requested review from ijjk, shuding, a team and huozhi as code owners April 30, 2023 12:40
@ijjk ijjk added created-by: Next.js team PRs by the Next.js team type: next labels Apr 30, 2023
@timneutkens
Copy link
Member Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

shuding
shuding previously approved these changes Apr 30, 2023
@ijjk
Copy link
Member

ijjk commented Apr 30, 2023

Failing test suites

Commit: 8073e56

pnpm testheadless test/development/correct-tsconfig-defaults/index.test.ts

  • correct tsconfig.json defaults > should add moduleResolution when generating tsconfig.json in dev
Expand output

● correct tsconfig.json defaults › should add moduleResolution when generating tsconfig.json in dev

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

Expected: ObjectContaining {"moduleResolution": "node"}
Received: undefined

  38 |       expect(next.cliOutput).not.toContain('moduleResolution')
  39 |
> 40 |       expect(tsconfig.compilerOptions).toEqual(
     |                                        ^
  41 |         expect.objectContaining({ moduleResolution: 'node' })
  42 |       )
  43 |     } finally {

  at Object.<anonymous> (development/correct-tsconfig-defaults/index.test.ts:40:40)

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

pnpm testheadless test/e2e/app-dir/app/index.test.ts

  • app dir > should have correct preferredRegion values in manifest
Expand output

● app dir › should have correct preferredRegion values in manifest

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

- Expected  - 1
+ Received  + 1

  Array [
-   "edge",
+   "global",
  ]

  25 |         expect(
  26 |           middlewareManifest.functions['/slow-page-no-loading/page'].regions
> 27 |         ).toEqual(['edge'])
     |           ^
  28 |
  29 |         expect(middlewareManifest.functions['/test-page/page'].regions).toEqual(
  30 |           ['home']

  at Object.<anonymous> (e2e/app-dir/app/index.test.ts:27:11)

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

@timneutkens timneutkens force-pushed the 04-30-Update_type_of_preferredRegion branch from 8073e56 to 0de6349 Compare April 30, 2023 13:21
@timneutkens timneutkens enabled auto-merge (squash) April 30, 2023 13:21
@timneutkens timneutkens merged commit 1d410c8 into canary Apr 30, 2023
9 of 12 checks passed
@timneutkens timneutkens deleted the 04-30-Update_type_of_preferredRegion branch April 30, 2023 13:21
kodiakhq bot pushed a commit that referenced this pull request Apr 30, 2023
Related change: #49003. This PR makes sure that these related IntelliSense features are updated:

### Invalid

<img width="842" alt="CleanShot 2023-04-30 at 19 33 06@2x" src="https://user-images.githubusercontent.com/3676859/235367543-3c64ebb9-47fd-48d9-a846-60ec39bf0d3b.png">

### Region (`string`)

<img width="822" alt="CleanShot 2023-04-30 at 19 33 29@2x" src="https://user-images.githubusercontent.com/3676859/235367567-249041cb-9f2b-4693-815d-347ff200244f.png">

### Regions (`string[]`)

<img width="487" alt="CleanShot 2023-04-30 at 19 34 20@2x" src="https://user-images.githubusercontent.com/3676859/235367609-503294d1-ec9b-4d04-9aa7-4e76636eca60.png">

### Docs

<img width="679" alt="CleanShot 2023-04-30 at 19 34 41@2x" src="https://user-images.githubusercontent.com/3676859/235367630-74be18ed-ffc7-4b2d-ae3f-0ad6a187b166.png">
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2023
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

3 participants