Commit graph

270 commits

Author SHA1 Message Date
JJ Kasper
1c1b5031d9
v13.0.1-canary.4 2022-10-31 12:40:18 -07:00
JJ Kasper
76dc2dcf97
v13.0.1-canary.3 2022-10-31 09:01:43 -07:00
汪心禾 Wang, Xinhe
0affdebf67
Fix typo pnpm-lock.yam in .prettierignore_staged (#42212)
Fix typo `pnpm-lock.yam` in #38915

Regenerate pnpm-lock.yaml without formatting (#42208)

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

None of the above

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-10-30 22:58:45 -07:00
C. Lewis
389c77f205
feat(create-next-app): JS/TS prompt (with appDir support); enhanced testing (#42012)
Resubmitting this PR following this comment from Tim. This work has been done already and we can build off of it to get this in faster. 

> Just to be clear we're planning to rework create-next-app to give you the option to choose between JavaScript or TypeScript so it'll solve this request. For `app` right now it'll stay TypeScript till that is implemented.
> 
> _Originally posted by @timneutkens in https://github.com/vercel/next.js/discussions/41745#discussioncomment-3985833_

---

I added the `--ts, --typescript` flag to `create-next-app` in https://github.com/vercel/next.js/pull/24655, and since then I have seen it used very frequently, including in recent issues (such as https://github.com/vercel/next.js/issues/33314) and most Next.js tutorials on YouTube. I noticed the template logic added in this PR was also used to add the `appDir` configuration as well.

We discussed a while ago adding the following user flow:

- `create-next-app --js, --javascript` creates a JS project
- `create-next-app --ts, --typescript` creates a TS project
- `create-next-app [name]` (no `--js, --ts`) prompts the user to choose either JS or TS, with TS selected by default.

### Review

Adding support for appDir and refactoring the templates brought the pain-of-review up a bit, but it's not so bad when broken into increments.

The original 8-file diff is here:
1f47d9b0bf

And the PR that brought the diff up to 59 files (mostly owed to `app` template dirs and file structure refactors):
bd3ae4afd3 ([PR link](https://github.com/ctjlewis/next.js/pull/3/files))

### Demo

https://user-images.githubusercontent.com/1657236/198586216-4691ff4c-48d4-4c6c-b7c1-705c38dd0194.mov


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-10-31 05:43:39 +00:00
Tim Neutkens
e2b6c87af0 v13.0.1-canary.2 2022-10-30 17:29:49 +01:00
JJ Kasper
6d53e8b34f
v13.0.1-canary.1 2022-10-30 01:54:04 -07:00
Jiachi Liu
70e7e58c37
Update react next channel (#42021)
Update react channel for `fetch` patching updates 

x-ref: [slack
thread](https://vercel.slack.com/archives/C03ENM5HB4K/p1666802006931969?thread_ts=1666799939.726859&cid=C03ENM5HB4K)
2022-10-27 17:33:47 -07:00
Kiko Beats
288144c7e5
Upgrade Edge Runtime (#41987)
dropped node12 support

Co-authored-by: Steven <steven@ceriously.com>
2022-10-27 15:07:05 -04:00
JJ Kasper
0beed3563c
v13.0.1-canary.0 2022-10-27 00:22:43 -07:00
Lee Robinson
a05a0c7784
Update the documentation. (#41758)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Matt Kane <m@mk.gg>
Co-authored-by: Ismael <ismael.rumzan@gmail.com>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-10-26 14:04:45 -07:00
JJ Kasper
63aab20a2c
v13.0.0 2022-10-25 09:16:28 -07:00
JJ Kasper
bee5215407
v12.3.2-canary.43 2022-10-25 05:14:49 -07:00
JJ Kasper
bd16ef3c1b
v12.3.2-canary.42 2022-10-25 02:59:20 -07:00
JJ Kasper
fe5a502d51
v12.3.2-canary.41 2022-10-25 01:36:20 -07:00
Jiachi Liu
78bf0a792b
Update react next channel (#41761)
apply react updates x-ref: https://github.com/facebook/react/pull/25560
2022-10-25 02:32:20 +00:00
JJ Kasper
17a4f6a69f
v12.3.2-canary.40 2022-10-24 16:23:32 -07:00
Kiko Beats
89355298f2
Upgrade Edge Runtime v.1.1.0 (#41727)
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-10-24 10:49:49 -07:00
JJ Kasper
997a4f3740
v12.3.2-canary.39 2022-10-24 09:07:31 -07:00
Jiachi Liu
20f5db06fa
Update precompiled react to next channel (#41708)
Precompile `react@next` and to unlock `cache` and `use` API
2022-10-24 00:31:52 -07:00
JJ Kasper
ceb07ff00c
v12.3.2-canary.38 2022-10-23 22:25:08 -07:00
JJ Kasper
49842b9e83
v12.3.2-canary.37 2022-10-23 20:32:38 -07:00
JJ Kasper
496b2eb7d3
v12.3.2-canary.36 2022-10-23 20:16:03 -07:00
JJ Kasper
2c8d29570b
v12.3.2-canary.35 2022-10-23 13:28:49 -07:00
JJ Kasper
b6ed1a7e5f
Update to latest react experimental (#41671)
x-ref: [slack
thread](https://vercel.slack.com/archives/C035J346QQL/p1666452328526929)
2022-10-23 13:10:44 -07:00
Jiachi Liu
a1a26ca7ea v12.3.2-canary.34 2022-10-22 21:00:51 -07:00
Jiachi Liu
b0f87fbc7c
Bundle ssr client layer excepts react externals (#41606)
Bundle the ssr client layer for RSC, this solves the problem when
there's an esm package is using on client components, but esm imports
the installed react instead of the built-in react version since esm
imports is not intercepted by require hook.

After bundling the ssr client layer and treating react as externals, now
react compiles as cjs externals and could be intercepted by require
hook, other code are bundled together which can also get optimized.

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

Co-authored-by: Shu Ding <g@shud.in>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-10-22 16:33:51 -07:00
Jiachi Liu
0b669a1fa7
Improve errors for invalid component export (#41657)
Checking if app dir exported components (page/layout/etc.) are valid components in dev mode, also update `react-is` to detect module reference properly

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-10-22 22:44:19 +00:00
Javi Velasco
392c4d0b7c
Update @types/node to 14.14.31 (#41634)
This PR updates `@types/node` to `14.14.31`. The most important type is
that `ParsedUrlQuery` can hold `undefined` so we are updating the code
here to explicitly handle those cases. Aside from it we are adding a
global definition taken from NodeJS for `AsyncLocalStorage` that we
export in `server.d.ts`
2022-10-22 11:19:14 -07:00
JJ Kasper
c204552ce2
v12.3.2-canary.33 2022-10-21 23:57:02 -07:00
Jiachi Liu
3a87e816fc
Disable using prebundled of react for appDir (#41635)
reverting https://github.com/vercel/next.js/pull/41337

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-10-21 23:55:19 -07:00
Jiachi Liu
897af6238e
Upgrade react-server-dom-webpack and precompiled assets (#41547)
Upgrade `react-server-dom-webpack` for exports renaming purpose

x-ref: https://github.com/facebook/react/pull/25504
2022-10-19 15:09:49 +00:00
Tim Neutkens
d27185bb9a v12.3.2-canary.32 2022-10-19 13:29:32 +02:00
Jiachi Liu
2d1f72995b v12.3.2-canary.31 2022-10-18 21:19:01 -07:00
Jiachi Liu
5d532afa71
Mark styled-jsx as client-only package (#41414)
For css-in-js libs like styled-jsx we don't recommend to use on server side since it will blow up the rsc payload during navigation. This upgration of styled-jsx includes `client-only` as dependency so that it will throw when it's been used on serevr layer

x-ref: https://github.com/vercel/styled-jsx/pull/816
2022-10-19 03:52:33 +00:00
Jiachi Liu
bc335d7ef7
Prebundle react for appDir (#41337)
Inline a react and react-dom for app dir, when `appDir` flag is enabled
opt into the built-in version for all.

For server layer react, use the react share subset for server
components.
For all server side of react-dom usage, use the server-rendering-stub.

Co-authored-by: Shu Ding <g@shud.in>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-10-18 16:32:23 -07:00
JJ Kasper
cf1c0b6075
v12.3.2-canary.30 2022-10-18 09:54:31 -07:00
Kiko Beats
ebae05eeed
Update edge runtime to 1.1.0-beta.40 (#41513)
changes: https://github.com/vercel/edge-runtime/compare/edge-runtime@1.1.0-beta.39...edge-runtime@1.1.0-beta.40
2022-10-18 13:57:11 +00:00
Tim Neutkens
bc3d8be4ee v12.3.2-canary.29 2022-10-16 11:49:30 +02:00
Kiko Beats
8c4ef5cbc7
Update edge runtime to 1.1.0-beta.39 (#41418)
https://github.com/vercel/edge-runtime/compare/edge-runtime%401.1.0-beta.37...edge-runtime%401.1.0-beta.39
2022-10-14 09:48:32 -07:00
Tim Neutkens
8f49ffc488
Upgrade React experimental (#41419) 2022-10-14 16:25:49 +02:00
JJ Kasper
560e93ef77
v12.3.2-canary.28 2022-10-13 15:30:56 -07:00
LongYinan
e505e7545b
Upgrade next-swc-napi to NAPI-RS v2 (#40094)
Build succeed https://github.com/vercel/next.js/actions/runs/3243091429
2022-10-13 13:07:14 -07:00
Tim Neutkens
4ff348cbd4 v12.3.2-canary.27 2022-10-13 15:13:48 +02:00
JJ Kasper
629fa8afa3
v12.3.2-canary.26 2022-10-12 08:45:51 -07:00
JJ Kasper
5162b64c21
v12.3.2-canary.25 2022-10-11 14:28:59 -07:00
Tim Neutkens
e3df5909cb
Handle error overlay for new router (#41325) 2022-10-11 16:11:57 +02:00
JJ Kasper
3c8727dcab
v12.3.2-canary.24 2022-10-10 17:05:15 -07:00
Hannes Bornö
05498a0988
Local font files adjust fallbacks (#41180)
When using `@next/font/local` we can't have pre calculated metrics for the font. This PR uses fontkit to read metadata about the imported local font in order to generate a fallback.

Also removes some props from the api that's better done automatically in the future.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-10 18:54:34 +00:00
Tim Neutkens
52a69e6117 v12.3.2-canary.23 2022-10-08 19:11:53 +02:00
Jiachi Liu
a415f34adf
refactor dev overlay into hot reloader (#41231)
Move react-dev-overlay into hot reloader client components, and let it imported by app router. So then we don't need to have hot reloader and react tree as adjacent sibilings but the overlay with error boundary is wrapping the react tree


Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
2022-10-07 13:25:22 +00:00