Commit graph

206 commits

Author SHA1 Message Date
Steven
8258c872c4
Bump @vercel/nft@0.22.1 (#40164)
Bump `@vercel/nft` to version [0.22.1](https://github.com/vercel/nft/releases/tag/0.22.1)

- Fixes #40130
2022-09-01 14:46:39 -07:00
JJ Kasper
008da124ed
v12.2.6-canary.8 2022-08-31 17:47:07 -07:00
JJ Kasper
dddc60df15
v12.2.6-canary.7 2022-08-30 12:57:31 -07:00
Jiachi Liu
8668020a54
Upgrade typescript to 4.8.2 (#39979)
Typescript published 4.8.2 today and it fails CI, bump our typescript version to 4.8.2 and tweak some typings to make existing e2e typescript tests work properly

* Bump web-vitals from 3.0.0-beta to 3.0.0 stable for typing fix (there's an undefined type but it wasn't caught by ts 4.7), also force compiled it as CJS for pre-compiled
* Bump ncc to 3.34.0 for ts-loader compatibility for new typescript version, ncc 3.33.x cannot work with ts 4.8
* Update pre-compiled
2022-08-29 16:56:02 +00:00
JJ Kasper
decc00d0d2
v12.2.6-canary.6 2022-08-29 08:53:20 -07:00
Jiachi Liu
b4f74ee1c1
Handle async module for client components (#39953)
### Problem

esm modules imports from client components will be compiled to `m = import('module-name')` when webpack bundles them for server components flight rendering. In this case, they will all become async modules since dyanmic imports will return a promise which react flight cannot handle it then results into module resolving error on server flight rendering.

### Solution

* React flight renderer supports handling async modules in https://github.com/facebook/react/pull/25138
* On next.js side leverage the module proxy change for each client reference, to make sure it always resolve the correct client module

The idea is wrapping each module with a module proxy, and if the module is async and accessed as thenable, it will return a new module reference with `async` label to tell react to handle it as async modules:

exported client reference `*` --> not async module (non thenable) --> original module reference `''`
exported client reference `*` --> it's async module (thenable) --> wrapped module reference `'*'` with `async` label

### Note

Since we need to check if user having incorrect gSSP/gSP specifying in layout client componet, so we still need to parse it and assign those info to the proxy (Does client module containing `ssr`, `ssg` exports). Otherwise the proxy will return the cached module reference
2022-08-29 14:47:06 +00:00
Kiko Beats
8958867d91
build: upgrade edge-runtime (#39898)
https://github.com/vercel/edge-runtime/compare/v1.1.0-beta.27...v1.1.0-beta.31

Related: https://github.com/vercel/next.js/issues/38658
2022-08-24 23:59:12 +00:00
JJ Kasper
bd82f690e5
v12.2.6-canary.5 2022-08-24 15:18:19 -05:00
Steven
b757db4378
Bump @vercel/nft@0.22.0 (#39906)
This PR bumps `@vercel/nft` to version [0.22.0](https://github.com/vercel/nft/releases/tag/0.22.0)
2022-08-24 15:30:25 +00:00
JJ Kasper
34e10f302a
v12.2.6-canary.4 2022-08-23 23:30:54 -05:00
JJ Kasper
1c61eff67d
v12.2.6-canary.3 2022-08-23 19:00:15 -05:00
JJ Kasper
cb430cce90
v12.2.6-canary.2 2022-08-23 09:29:24 -05:00
Kiko Beats
28746520b6
build: upgrade edge-runtime (#39749)
https://github.com/vercel/edge-runtime/compare/v1.1.0-beta.26...v1.1.0-beta.27
2022-08-22 09:28:58 +00:00
JJ Kasper
b24b1d8421
v12.2.6-canary.1 2022-08-17 14:12:52 +01:00
Shu Ding
c79b67cced
Improved server CSS handling (#39664)
Upgrade experimental React, and render link tags directly in the tree during development. The client bundle won't import CSS anymore, and server CSS imports will be transpiled into no-op strings just for HMR to use.

## Follow Ups
- [ ] Flash of unstyled elements when reloading styles
- [ ] Collect client style imports
- [ ] Console warning for duplicated resources
- [ ] Tests

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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 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.md#adding-examples)
2022-08-17 10:56:52 +00:00
Steven
53f0e2b31c
Update image tests files from *.js to *.ts (#39663)
Let's utilize typescript for our tests
2022-08-16 23:29:55 +00:00
JJ Kasper
6fd2a7fa31
Remove webpack4 types (#39631)
These types are no longer needed as we are only leveraging webpack 5 so this finishes migrating our types away from webpack 4's types.
2022-08-16 09:55:37 +00:00
JJ Kasper
d8809164ad
v12.2.6-canary.0 2022-08-13 12:27:25 -05:00
Jiachi Liu
3c9ad33c69
Remove precopied styled-jsx (#39520)
follow-up for #39518

* revert `styled-jsx/style` import path to `next/dist/shared/styled-jsx`
* Since `styled-jsx` cannot be resolved through `node_modules/next/node_modules` by external resolving, we forcedly resolve styled-jsx as cjs external in webpack


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-08-12 17:08:38 +00:00
JJ Kasper
911ba233d9
v12.2.5 2022-08-11 20:50:08 -05:00
JJ Kasper
d06fc0f0c4
v12.2.5-canary.7 2022-08-11 19:17:02 -05:00
JJ Kasper
4049cd7cb5
Re-add styled-jsx as a normal dependency (#39518)
This re-adds `styled-jsx` as a normal dependency for now leaving the require hook in place so that we can correctly handle mis-matching versions in the module tree. 

x-ref: [slack thread](https://vercel.slack.com/archives/C02CDC2ALJH/p1660254377444709)

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2022-08-11 23:54:26 +00:00
JJ Kasper
de1bf3e471
v12.2.5-canary.6 2022-08-11 16:46:44 -05:00
JJ Kasper
a9b415b850
v12.2.5-canary.5 2022-08-11 12:09:48 -05:00
Jiachi Liu
7f54585f8d
Bump styled-jsx and remove manual types creation (#39506) 2022-08-11 10:13:26 -05:00
JJ Kasper
f863ba7193
v12.2.5-canary.4 2022-08-10 23:00:59 -05:00
JJ Kasper
d246257602
v12.2.5-canary.3 2022-08-10 18:18:54 -05:00
JJ Kasper
44eea0c9c9
v12.2.5-canary.2 2022-08-10 15:32:25 -05:00
Gal Schlezinger
b899d01fff
Bump edge-runtime packages (#39450)
This version fixes a bug where [crypto buffers (ArrayBuffer, Uint8Array) not compatible with text decoding](17475e4df7).
2022-08-10 09:19:48 +00:00
JJ Kasper
a6bc38799a
v12.2.5-canary.1 2022-08-09 18:03:15 -05:00
Jiachi Liu
3e19ad5c5f
typing: upgrade styled-jsx to remove workaround in build script (#39408)
Improve styled-jsx types in next.js, previously there's no `declare module` for styled-jsx and there's type name conflicts in `styled-jsx/index.d.ts` and we use a rename hack to avoid the conflicts. Now styled-jsx 5.0.3 fixed those issues.

x-ref: https://github.com/vercel/styled-jsx/pull/805
2022-08-09 17:10:33 +00:00
Jiachi Liu
71f5f258ab
Setup require hook in next-server for styled-jsx resolving (#39305)
* Use require hook and alias to resolve styled-jsx

* re-export styled-jsx types from compiled

* fix lint

* add test for styled-jsx css

* setup require hook in server

* compile import path to styled-jsx/style

* revert require hook

* add test for server styled-jsx resolving

* update test

* pre copy styled-jsx assets

* fix styled-jsx dts

* add npmrc for styled-jsx e2e test

* load require hook directly

* rm legacy test

* fix lint

* fix pnpm install error

* split require hook

* only alias styled-jsx

* make styled-jsx resolving statically analyzable

* update test

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-08-08 20:27:42 -05:00
JJ Kasper
b0f590162c
v12.2.5-canary.0 2022-08-08 18:44:10 -05:00
Michael Novotny
ab48f54786
Adds eslint-plugin-eslint-plugin to ensure eslint-plugin-next rules follow ESLint rule best practices along with enforcing some consistency. (#37920)
* Adds eslint-plugin-eslint-plugin and recommended rules.

* Removes `fixable` as none of the rules contain fixers.

* Adds description and url rules.

* Adds message format.

* Removes optional dependencies.

* Lints eslint-plugin-next tests too.

* Removes optional dependencies from pnpm lock file.

* Resets pnpm lock file.

* Resets package.json too.

* Fixes pnpm lockfile.
2022-08-07 23:52:02 -05:00
JJ Kasper
d6cb795fc6
v12.2.4 2022-08-04 12:24:58 -05:00
JJ Kasper
dbc38d607e
v12.2.4-canary.12 2022-08-04 09:29:59 -05:00
JJ Kasper
ad687c9304
v12.2.4-canary.11 2022-08-03 16:15:59 -05:00
Sukka
45ae757ff5
feat(config): implement a human readable ajv errors (#39291) 2022-08-03 15:12:16 -05:00
Jiachi Liu
4d0783d9be
Flush styles effects (#39268)
Use flush effects to custom apply css-in-js solution to app. Re-introduce flush effects to app-render, and remove default support of styled-jsx in `app/`. So that users will choose their own css-in-js solution if they need any customization. styled-jsx won't appear in client bundle if you didn't use it.

For now we have to inject the initial styles before `</head>` to avoid hydration errors. Later on we can remove this once react can handle it.

- [x] inject styles before end of head element
- [x] add tests
2022-08-03 16:21:20 +00:00
JJ Kasper
b7efce6437
v12.2.4-canary.10 2022-08-03 10:54:33 -05:00
Gal Schlezinger
e3181c2d77
Export URLPattern from next/server (#39219)
This commit allows the users to import URLPattern from `next/server`,
by defining a key that uses `global.URLPattern`.

Why is this any good? or: why don't we add URLPattern to the global namespace?

URLPattern is exposed as global on Edge Runtime _only_. This means that if we define a
constructor in global namespace in our TypeScript definitions, people might
have runtime errors in their Node.js functions.

Importing from `next/server` enables users to get the constructor without
risking in runtime errors and wrong type definitions.

Keep in mind, that with the current implementation, we do not check if the
constructor actually exists, but `next/server` shouldn't be imported in
Node.js functions, AFAIK.

## Related

- Fixes #38131

## Bug

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


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-08-02 02:04:08 +00:00
JJ Kasper
ad75204b34
v12.2.4-canary.9 2022-08-01 17:51:35 -05:00
Jessica Franco
97ab23fb6f
Add missing @napi-rs/cli devDependency to next-swc (#39164)
Otherwise build-native fails with "napi: command not found.".

Alternatively, this is missing from this package's devDependencies.



## Documentation / Examples

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

P.S.: local copy fails `pnpm lint` due to the `target` subfolder with intermediate rust build artifacts... should I add a `.prettierignore` update to exclude `/packages/next-swc/target/`?

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-07-30 22:08:50 +00:00
JJ Kasper
48405e6bd7
v12.2.4-canary.8 2022-07-28 23:34:07 -05:00
JJ Kasper
d091c818c5
v12.2.4-canary.7 2022-07-28 20:24:34 -05:00
JJ Kasper
a08415be32
v12.2.4-canary.6 2022-07-28 16:03:26 -05:00
JJ Kasper
ec2f0a8c4b
v12.2.4-canary.5 2022-07-28 12:00:28 -05:00
Tim Neutkens
70e4cf6d28 v12.2.4-canary.4 2022-07-28 10:49:03 +02:00
JJ Kasper
84fcbd56bc
v12.2.4-canary.3 2022-07-27 20:00:50 -05:00
Kiko Beats
0ebd53fdb5
fix: print Request & Response properties (#38903)
* Add inspect symbol for request

WIP

* Add inspect symbol for response

* build: upgrade edge-runtime
2022-07-27 09:16:16 -05:00
JJ Kasper
90ddd0dc83
Replace node-sass test dependency with sass (#39053)
* Replace node-sass test dependency with sass

* breakup css/scss tests for more parallelism

* update compiled
2022-07-26 23:12:54 -05:00
JJ Kasper
8017d69a68
v12.2.4-canary.2 2022-07-26 15:24:27 -05:00
JJ Kasper
8c902b61d1
v12.2.4-canary.1 2022-07-25 15:50:59 -05:00
Tobias Koppers
8324cf5218
update webpack (#38988)
https://github.com/webpack/webpack/releases/tag/v5.74.0

There is a nice little performance fix for rebuild performance in this release.
It also fixes the edge case @Kikobeats did run into: https://vercel.slack.com/archives/CGU8HUTUH/p1656505879286119
2022-07-25 15:47:11 +00:00
JJ Kasper
6b915cc34e
v12.2.4-canary.0 2022-07-22 17:51:32 -05:00
JJ Kasper
0f99768f98
Update to latest version of @vercel/nft (#38878) 2022-07-21 21:43:51 -05:00
JJ Kasper
4b6cb447d1
v12.2.3 2022-07-21 19:53:45 -05:00
JJ Kasper
12b7c584f9
v12.2.3-canary.17 2022-07-21 16:30:46 -05:00
Javi Velasco
14463ddd10
Update Edge Runtime (#38862)
This PR updates the Edge Runtime to use a new version that loads dependencies differently. This addresses https://github.com/vercel/next.js/pull/38766 so `instanceof` works as expected.

It involved a few code changes, mostly regarding to types. The most important change is that the `Runner` function in the sandbox doesn't take a `ReadableStream` as `body` anymore since this implies creating the instance on "node land" and makes the runtime `fetch` function not to be able to compare with `ReadableStream` using `instanceof`.  Instead we introduce a "clonable body" abstraction that allows to create the `ReadableStream` from `Readable` by using the edge runtime primitive which would hold the correct prototype.

Also, this PR changes the way we pre-compile the Edge Runtime to adapt it to the new version.
2022-07-21 18:29:19 +00:00
Tim Neutkens
5dafe472bc v12.2.3-canary.16 2022-07-21 14:44:35 +02:00
Maia Teegarden
ea9f855253
v12.2.3-canary.15 2022-07-20 14:52:31 -07:00
JJ Kasper
a2554c09a4
v12.2.3-canary.14 2022-07-18 18:21:55 -05:00
Tim Neutkens
aa664868c1 v12.2.3-canary.13 2022-07-18 19:20:48 +02:00
Sukka
97df2bb095
refactor: rewrite etag (#38568)
x-ref: https://github.com/vercel/next.js/issues/38235#issuecomment-1182283358

Rewrite ETag generate function with `fnv1a` hash.

FNV hashes are designed to be fast while maintaining a low collision rate. The FNV speed allows one to quickly hash lots of data while maintaining a reasonable collision rate (https://softwareengineering.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and-speed/145633).

[fastify-etag](https://github.com/fastify/fastify-etag) also uses `fnv1a` algorithm by default.

cc @shuding: Should `experimental-edge` also switch to `fnv1a` for ETag, for consistency?
2022-07-18 09:20:44 +00:00
Tim Neutkens
0610f9ac0d v12.2.3-canary.12 2022-07-18 10:32:26 +02:00
Tim Neutkens
3017b606e0 v12.2.3-canary.11 2022-07-15 17:09:39 +02:00
Tim Neutkens
e685214cec v12.2.3-canary.10 2022-07-15 14:21:49 +02:00
Tim Neutkens
3ebdf1988a v12.2.3-canary.9 2022-07-15 13:44:11 +02:00
Tim Neutkens
c1ce6bfe1b v12.2.3-canary.8 2022-07-14 17:06:56 +02:00
Tim Neutkens
f5af5bb0db v12.2.3-canary.7 2022-07-14 12:58:55 +02:00
JJ Kasper
ff148a0fb4
Update to latest version of turbo (#38629)
Updates to latest turbo which includes patches for cached files. 

x-ref: [slack thread](https://vercel.slack.com/archives/C02CDC2ALJH/p1657767763630359?thread_ts=1657757803.039099&cid=C02CDC2ALJH)

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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 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.md#adding-examples)
2022-07-14 09:03:35 +00:00
JJ Kasper
62f3f87891
Add next.config.js validation with ajv (#38498)
* Add next.config.js validation with ajv

* update manifest

* update lib type

* remove old tests

* update to pre-build validation code

* ensure validate output is ncced

* Apply suggestions from code review

Co-authored-by: Steven <steven@ceriously.com>

* Add example of typing next.config.js

Co-authored-by: Steven <steven@ceriously.com>
2022-07-13 13:31:55 -05:00
Jiachi Liu
5a15c5fb85 v12.2.3-canary.6 2022-07-13 19:33:11 +02:00
Tim Neutkens
1e09d9bd40 v12.2.3-canary.5 2022-07-13 14:45:36 +02:00
Tim Neutkens
722e64f06d v12.2.3-canary.4 2022-07-13 12:01:33 +02:00
Tim Neutkens
c1b2ee635f v12.2.3-canary.3 2022-07-13 09:30:15 +02:00
Gal Schlezinger
62eb16b603
Upgrade edge-runtime + make EdgeRuntime value overridable with an env var on compilation (#38331)
This PR introduces an environment variable that allows to modify the `EdgeRuntime` value on compilation time.
This is done to allow cloud providers like Vercel to have a different value, and enable user code and 3rd party libraries to have different code paths depending on the Edge Functions provider.

## Related

- Related to #30739

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2022-07-12 15:18:59 +00:00
Tim Neutkens
114e151c23 v12.2.3-canary.2 2022-07-12 14:46:07 +02:00
JJ Kasper
883a52ede9
v12.2.3-canary.1 2022-07-11 18:12:44 -05:00
Sanjaiyan Parthipan
8ee05b749b
Update some dependencies' versions :) (#38427)
Hi,

I have updated some version of packages. 

- @swc/helper
- json5
- terser
- postcss
- nanoid
- use-sync-external-store (ReactJs pollyfill)
- microbundle

Updated version of #38328 

_Extremely sorry if I made any mistakes :(_

Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
2022-07-11 20:32:49 +00:00
Tim Neutkens
0887d283e1 v12.2.3-canary.0 2022-07-11 14:35:12 +02:00
Tim Neutkens
689626c6a4 v12.2.2 2022-07-09 13:18:55 +02:00
Tim Neutkens
4e21a240a5 v12.2.2-canary.0 2022-07-09 11:44:49 +02:00
JJ Kasper
ef90539968
v12.2.1 2022-07-07 18:01:56 -05:00
JJ Kasper
e9ffd9bec4
v12.2.1-canary.5 2022-07-07 15:49:30 -05:00
JJ Kasper
3411794607
v12.2.1-canary.4 2022-07-06 16:33:16 -05:00
Tim Neutkens
f113141389
Implement new client-side router (#37551)
## Client-side router for `app` directory

This PR implements the new router that leverages React 18 concurrent features like Suspense and startTransition.
It also integrates with React Server Components and builds on top of it to allow server-centric routing that only renders the part of the page that has to change.

It's one of the pieces of the implementation of https://nextjs.org/blog/layouts-rfc.

## Details

I'm going to document the differences with the current router here (will be reworked for the upgrade guide)

### Client-side cache

In the current router we have an in-memory cache for getStaticProps data so that if you prefetch and then navigate to a route that has been prefetched it'll be near-instant. For getServerSideProps the behavior is different, any navigation to a page with getServerSideProps fetches the data again.

In the new model the cache is a fundamental piece, it's more granular than at the page level and is set up to ensure consistency across concurrent renders. It can also be invalidated at any level.

#### Push/Replace (also applies to next/link)

The new router still has a `router.push` / `router.replace` method.

There are a few differences in how it works though:

- It only takes `href` as an argument, historically you had to provide `href` (the page path) and `as` (the actual url path) to do dynamic routing. In later versions of Next.js this is no longer required and in the majority of cases `as` was no longer needed. In the new router there's no way to reason about `href` vs `as` because there is no notion of "pages" in the browser.
- Both methods now use `startTransition`, you can wrap these in your own `startTransition` to get `isPending`
- The push/replace support concurrent rendering. When a render is bailed by clicking a different link to navigate to a completely different page that still works and doesn't cause race conditions.
- Support for optimistic loading states when navigating

##### Hard/Soft push/replace

Because of the client-side cache being reworked this now allows us to cover two cases: hard push and soft push.

The main difference between the two is if the cache is reused while navigating. The default for `next/link` is a `hard` push which means that the part of the cache affected by the navigation will be invalidated, e.g. if you already navigated to `/dashboard` and you `router.push('/dashboard')` again it'll get the latest version. This is similar to the existing `getServerSideProps` handling.

In case of a soft push (API to be defined but for testing added `router.softPush('/')`) it'll reuse the existing cache and not invalidate parts that are already filled in. In practice this means it's more like the `getStaticProps` client-side navigation because it does not fetch on navigation except if a part of the page is missing.

#### Back/Forward navigation

Back and Forward navigation ([popstate](https://developer.mozilla.org/en-US/docs/Web/API/Window/popstate_event)) are always handled as a soft navigation, meaning that the cache is reused, this ensures back/forward navigation is near-instant when it's in the client-side cache. This will also allow back/forward navigation to be a high priority update instead of a transition as it is based on user interaction. Note: in this PR it still uses `startTransition` as there's no way to handle the high priority update suspending which happens in case of missing data in the cache. We're working with the React team on a solution for this particular case.

### Layouts

Note: this section assumes you've read [The layouts RFC](https://nextjs.org/blog/layouts-rfc) and [React Server Components RFC](https://reactjs.org/blog/2020/12/21/data-fetching-with-react-server-components.html)

React Server Components rendering leverages the Flight streaming mechanism in React 18, this allows sending a serializable representation of the rendered React tree on the server to the browser, the client-side React can use this serialized representation to render components client-side without the JavaScript being sent to the browser. This is one of the building blocks of Server Components. This allows a bunch of interesting features but for now I'll keep it to how it affects layouts.

When you have a `app/dashboard/layout.js` and `app/dashboard/page.js` the page will render as children of the layout, when you add another page like `app/dashboard/integrations/page.js` that page falls under the dashboard layout as well. When client-side navigating the new router automatically figures out if the page you're navigating to can be a smaller render than the whole page, in this case `app/dashboard/page.js` and `app/dashboard/integrations/page.js` share the `app/dashboard/layout.js` so instead of rendering the whole page we render below the layout component, this means the layout itself does not get re-rendered, the layout's `getServerSideProps` would not be called, and the Flight response would only hold the result of `app/dashboard/integrations/page.js`, effectively giving you the smallest patch for the UI.

---

Note: the commits in this PR were mostly work in progress to ensure it wasn't lost along the way. The implementation was reworked a bunch of times to where it is now.

Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-07-06 21:16:47 +00:00
JJ Kasper
9573174196
Replace pre-commit with husky (#38350)
* Replace pre-commit with husky

* update lock

* actually update lock
2022-07-06 11:14:16 -05:00
JJ Kasper
764f7d42d4
v12.2.1-canary.3 2022-07-05 12:09:24 -05:00
JJ Kasper
274980f057
v12.2.1-canary.2 2022-07-01 19:49:58 -05:00
Jiachi Liu
bfaffbdd3f
Alias react and react-dom by default (#38245)
Previously we use custom webpack alias for specific react versions for non server side node runtime aliases. This PR alias the entire folders of `react/` and `react-dom/` so that no more alias in next.config is required but only the nodejs require hook.

* Alias `react` and `react-dom` by default
* Use `react@experimental` to run server components integration test
* Drop with-react-17 test util, add `__NEXT_REACT_CHANNEL` as an env var for testing and development to specify the react channel is 17 or new experimental version
2022-07-01 23:57:45 +00:00
Michael Novotny
edd395a7d3
Adds tests to ensure eslint-plugin-next's available rules are properly exported and recommended rules are correctly defined. (#38183)
* Adds tests to ensure `eslint-plugin-next`'s available rules are properly exported and recommended rules are defined correctly.

* Condenses imports.

* Sets default recommended value.

* replace Object.hasOwn for node 14

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-30 11:31:33 -05:00
Wyatt Johnson
23b8b982df
Fix missing trace script devDependencies (#38172)
Adds missing devDependencies required by the `trace-to-tree.mjs` script used here to the workspace root.

c64af8aa34/scripts/trace-to-tree.mjs (L2-L3)
2022-06-29 20:57:51 +00:00
JJ Kasper
c64af8aa34
v12.2.1-canary.1 2022-06-29 15:06:44 -05:00
JJ Kasper
70c0b20885
v12.2.1-canary.0 2022-06-29 13:57:24 -05:00
JJ Kasper
632feb6b73
v12.2.0 2022-06-28 09:21:07 -05:00
JJ Kasper
ed35138edc
v12.1.7-canary.52 2022-06-28 08:35:37 -05:00
Kiko Beats
9cc1c3c576
Upgrade Edge Runtime (#38105) 2022-06-28 07:48:23 -05:00
JJ Kasper
3eb9caeb6a
v12.1.7-canary.51 2022-06-27 23:35:41 -05:00
JJ Kasper
52763de94a
v12.1.7-canary.50 2022-06-27 18:52:05 -05:00