- 24 Aug, 2022 1 commit
-
-
JJ Kasper authored
-
- 23 Aug, 2022 12 commits
-
-
Steven authored
This PR is a follow up to PR #39190 so that we can dynamically set the `feComponentTransfer` when we know the image doesn't have transparency (at this time its just jpeg). We also set the stdDeviation to 1 and the viewbox to the placeholder's width/height to avoid any rounding issues. Finally, we also fix the conversion from `objectPosition` to `backgroundPosition` because they have different default values according to the spec.
-
OJ Kwon authored
<!-- Thanks for opening a PR! Your contribution is much appreciated. In order 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: --> This PR enables a path to loading wasm binding first for the few platforms we'll attempt to remove native binaries. As a first step, this change does not actually removes native bindings, but will try to load wasm binding first and use it if loading success. It may take some time to actually remove native bindings, I expect we may need to fix few regressions from wasm bindings for some places like loading / installing itself for the platforms not being used widely, meanwhile native bindings can be used as a fallback. ## 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) Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Wyatt Johnson authored
<!-- Thanks for opening a PR! Your contribution is much appreciated. In order 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: --> Added tests to ensure that the `next/router` returns null for `useRouter` and `withRouter` when used with the app directory.
-
Henrik Wenz authored
## Changes - Migrate class based `_document`s to functional documents - Removed `_document.js` where default - Removed `MyDocument.getInitialProps` where default ## Motivation This removes some boilerplate and prepares examples for server components. ## 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)
-
JJ Kasper authored
We shouldn't be warning when no eslint config file is present as it's valid not to use eslint. The warning is still shown if an empty eslint config file is added as this gives intent to using eslint. x-ref: [slack thread](https://vercel.slack.com/archives/CGU8HUTUH/p1661268593890619?thread_ts=1661266342.496699&cid=CGU8HUTUH) ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
-
JJ Kasper authored
Implements `check` on relay analytics test as the timing can be indeterminate. Fixes: https://github.com/vercel/next.js/runs/7979410199?check_suite_focus=true#step:9:230
-
JJ Kasper authored
This adds handling for auto-detecting TypeScript being added to a project and installing the necessary dependencies instead of printing the command and requiring the user run the command. We have been testing the auto install handling for a while now with the `next lint` command and it has worked out pretty well. This also adds HMR handling for `jsconfig.json`/`tsconfig.json` in development so if the `baseURL` or `paths` configs are modified it doesn't require a dev server restart for the updates to be picked up. This also corrects our required dependencies detection as previously an incorrect `paths: []` value was being passed to `require.resolve` causing it to fail in specific situations. Closes: https://github.com/vercel/next.js/issues/36201 ### `next build` before https://user-images.githubusercontent.com/22380829/186039578-75f8c128-a13d-4e07-b5da-13bf186ee011.mp4 ### `next build` after https://user-images.githubusercontent.com/22380829/186039662-57af22a4-da5c-4ede-94ea-96541a032cca.mp4 ### `next dev` automatic setup and HMR handling https://user-images.githubusercontent.com/22380829/186039678-d78469ef-d00b-4ee6-8163-a4706394a7b4.mp4 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md`
-
Sukka authored
Fixes #39807. When statically importing an image, the `width` and `height` will always be provided alongside the `src` by the Webpack. `next/image` will ignore `width` and `height` come from Webpack when `layout === 'fill'`, while `next/future/image` will not, hence the issue. The PR fixes that. The corresponding integration test cases are also added. cc @styfle ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
-
JJ Kasper authored
-
Henrik Wenz authored
## Changelog - Updated deps - Migrated to Typescript - Replaced `div` with `Fragment` ## 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)
-
Hannes Bornö authored
## 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)
-
JJ Kasper authored
As noticed in https://github.com/markdoc/markdoc/issues/131 it seems we are incorrectly disposing active entries causing HMR to fail after the configured `maxInactiveAge`. To fix this instead of only updating lastActiveTime for one compiler type's entry we update all active compiler types for the active entry. This also updates an existing test to catch this by waiting the `maxInactiveAge` before attempting a change that should trigger HMR. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md` Fixes: https://github.com/markdoc/markdoc/issues/131
-
- 22 Aug, 2022 19 commits
-
-
JJ Kasper authored
This removes the usage of `Node12` from the `parsedValues` for `moduleResolution` as this caused false detection of `undefined` being a valid value when it was removed in TypeScript. This also copies over the test from https://github.com/vercel/next.js/pull/37302 to ensure we don't regress on this. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md` Fixes: https://github.com/vercel/next.js/issues/37296 Closes: https://github.com/vercel/next.js/pull/37302
-
Shu Ding authored
Removed the hack of client-side CSS injection via `chunk`. Instead collect them with the manifest plugin and SSR them as link tags. Next step is to adjust HMR to not relying on mini-css-extract plugin and webpack.
-
Steven authored
Improve PR improves the error message on `next/future/image` when `objectFit` or `objectPosition` is provided and suggests using `style` instead. It also prints the stack trace so its clear where the error came from.
-
Steven authored
This PR fixes a race condition where the `onError` handler was never called because the error happened before react attached the error handler.
-
Miguel Oller authored
Upgrade @makeswift/runtime to the latest version. This removes the need for the MAKESWIFT_API_HOST environment variable and improves error messages when integrating Next.js with Makeswift. ## 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)
-
sumiren authored
The term client-side rendering is ambiguous and misleading. Some people would assume the architecture where a blank page is returned from the server and HTML generation is totally done on the frontend. So I changed the term to `client-side data fetching`, which is widely used throughout the rest of the document. ## 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 - [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)
-
Arthur Denner authored
The documentation is concise and straightforward, so I just added a sentence. Let me know if you'd like to describe more, add an example, etc. Co-authored-by:JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
Steven authored
The browser support for this feature was added to caniuse so we can link there instead of linking to each browser bug tracker.
-
JJ Kasper authored
Follow-up to #39826 this skips ensuring the /500 page when in development as it's not used since we use the error overlay instead. This also fixes the case where we don't clear the stalled timeout debug log when an error is thrown during ensuring.
-
JJ Kasper authored
This updates the stalled ensure log to use debug instead the log isn't really actionable by the user and is more so meant for debugging purposes. x-ref: slack thread
-
JJ Kasper authored
This updates our next-e2e test deploy mode to auto pass along the VERCEL_CLI_VERSION env variable to allow testing builder changes easier. cc @nkzawa who encountered this.
-
Michael Oliver authored
Documentation / Examples Make sure the linting passes by running pnpm lint The examples guidelines are followed from our contributing doc The Vitest docs state that /// <reference types="vitest" /> is only required when importing defineConfig from vite.
-
Adrian Bienias authored
Initial links were pointing to basic features which don't describe redirections.
-
Maedah Batool authored
This PR adds a warning note for using the exportPathMap function with getStaticPaths. Any routes defined with EPM will get overridden if that page uses GSP. Bug Related issues linked using #534 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
-
Henrik Wenz authored
Changelog Migrated example to typescript Remove obsolete Link->as prop Normalize Module exports Documentation / Examples Make sure the linting passes by running pnpm lint The examples guidelines are followed from our contributing doc Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
JJ Kasper authored
GitHub actions is deprecating the Ubuntu 18.04 runner so this updates our CI to no longer leverage it in favor of the latest Ubuntu runner. x-ref: https://github.com/vercel/next.js/actions/runs/2904029539 x-ref: https://github.com/actions/runner-images
-
Dave Welsh authored
By making `NextPageWithLayout` generic and passing the type parameters to `NextPage`, our pages can continue to specify the props explicitly. This gives us type safety in `getInitialProps`, for example. ## 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 - [x] Make sure the linting passes by running `yarn lint`
-
Faris Masad authored
See https://github.com/vercel/next.js/issues/39144 It's not completely clear that `/_error` should not be used as a normal page. Added a note under `Caveats` in the custom error page article
-
- 21 Aug, 2022 7 commits
-
-
Chase Adams authored
# Bug I would assume that this should be generated from TypeScript, but based on the [original PR](https://github.com/vercel/next.js/pull/38498/files) it wasn't clear that there was a way to generate these automatically. Fixes the type of `styledComponents. topLevelImportPaths` and `styledComponents.meaninglessFileNames` so that it matches the [TypeScript type](https://github.com/vercel/next.js/blob/canary/packages/next/server/config-shared.ts#L457). This was causing a warning here: ``` warn - Invalid next.config.js options detected: - The value at .compiler.styledComponents must be a boolean but it was an object. - The value at .compiler.styledComponents.meaninglessFileNames must be a boolean but it was an array. - The value at .compiler.styledComponents must match exactly one schema in oneOf. ``` ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm lint` Co-authored-by:
chaseadamsio <103162876+chaseadamsio@users.noreply.github.com>
-
Kasper Aamodt authored
## Documentation / Examples - [x] Make sure the linting passes by running `pnpm lint` - [x] The examples guidelines are followed from [our contributing doc] Co-authored-by:JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
Henrik Wenz authored
## Changelog - Updated deps - Migrated to typescript ## 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)
-
greeble authored
-
Gal Schlezinger authored
When a user tried to have the following Edge Function: ```ts export default () => fetch("https://example.vercel.sh"); ``` The Edge Function were failing. Why is that? When `fetch` was called, an implicit `Accept-Encoding` header was added to allow the origin to return a compressed response. Then, the origin will set the `Content-Encoding` header in the response, to let the client know that the body needs to be decompressed in order to be read. That creates an issue though: `response.body` will be a `ReadableStream<Uint8Array>`, or, a stream that contains binary data that decodes into _the uncompressed data_ (or, plain text!). What it means, is that `response.body` is uncompressed data, while `response.headers.get('content-encoding')` is marking the response body as compressed payload. This confuses the HTTP clients and makes them fail. This commit removes the `content-encoding`, `transfer-encoding` and `content-length` headers from the response, as the Next.js server _always_ streams Edge Function responses. ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` -
Sukka authored
The PR neither fixes a bug nor introduces a new feature. It just makes the current code be more clearer. We track the `unobserve` method (to clear the side-effect) in a ref before this PR which is not required anymore: - The `unobserve` method can only be created during the `useEffect` - The `unobserve` method will be called during `useEffect` cleans up. In short, the "life cycle" of the `unobserve` method now only lives inside the `useEffect`. So we can remove the usage of `useRef`.
-
Sukka authored
The PR is similar to #39791. Currently, `<Portal />` saves the container in a ref (with initial value as `null`). The update of the ref happens during the `useEffect`, after creating the corresponding HTMLElement. However, `<Portal />` has to use `forceUpdate` since mutating a ref will not cause the component to update. The PR fixes that by saving the container of the `Portal` in a state, so no more `forceUpdate`.
-
- 20 Aug, 2022 1 commit
-
-
Naoyuki Kanezawa authored
Fixes https://github.com/vercel/next.js/issues/39532 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
-