- 21 Jun, 2022 11 commits
-
-
JJ Kasper authored
-
JJ Kasper authored
As noticed in https://github.com/vercel/next.js/pull/37596 it seems we aren't locking the `next-server` tracing to the tracing root which can allow files outside of the folder to be included unexpectedly. ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
-
Gal Schlezinger authored
This resolves #35573 I can't seem to reproduce the issue so I only created a unit test that verifies that it has the correct behavior. @tavvy can you also check this PR out to see if it makes sense or not? ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
-
Donny/강동윤 authored
* Update swc * Update again * fixup * Bump * Update * fixup * Update test refs * Update minifier * Parser * Update swc * Bump version * Update * fixup * Update test refs * Bump * Update `@swc/helpers` * lockfile * lints * FIx * [TRY] Update @swc/core
-
Balázs Orbán authored
## 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)
-
Jan Nicklas authored
This PR uses `require.resolve` to allow using node module paths as SWC plugin names similar to Babel. This works for: - absolute file paths - node modules - node module paths ## Bug - [x] Related issues: fixes #37409
-
Sukka authored
The PR fixes `<Image />` and `<Link />` components' extra re-renders, `lazyRoot` has no effect, and applies some other optimizations.
-
rodrigo authored
### Example - added declaration file types for the used theme [Create a declarations file](https://styled-components.com/docs/api#create-a-declarations-file) - added custom styled component that wraps an `<a>` tag like the next js docs as example [Next link DOCS](https://nextjs.org/docs/api-reference/next/link#if-the-child-is-a-custom-component-that-wraps-an-a-tag) - changed the ui page like the `create-next-app` examples ### Dependencies - updated deps to latest - added types for SC => @types/styled-components - removed react-is, unused in this example [Example deploy](https://stylednextexample.vercel.app/) ## Documentation / Examples - [ ] 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)
-
Christian Nielsen authored
Under the dynamic import section of dynamic-import.md, I've corrected "libaries" to "libraries".
-
JJ Kasper authored
-
Lee Robinson authored
-
- 20 Jun, 2022 12 commits
-
-
Javi Velasco authored
When generating the RegExp for middleware using the `matcher` option we are not taking into consideration i18n and basePath. In this PR we include them always which should we the middleware default. In a followup PR we will provide an option to opt-out in the same way we do with rewrites and redirects defined from Next.js config.
-
Lee Robinson authored
Feedback: > Hello :D may it be that the types should be imported in a TS file, so I think the extension of the file should be updated here :) /middleware.js -> /middleware.ts (or no types)
-
JJ Kasper authored
-
Eric Burel authored
* Update i18n-routing.md * lint-fix Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
JJ Kasper authored
-
Saurabh authored
fixes #37421
-
Tony Spiro authored
Thank you
🙏 🏻 -
Gal Schlezinger authored
Co-authored-by:kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Yuddomack authored
Hi~ I added the missing parentheses in document. https://github.com/vercel/next.js/blob/4ed0b78ab662399200db46f777773f8e33bbba65/docs/advanced-features/middleware.md?plain=1#L38-L40 ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm lint` Co-authored-by:
Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
-
JJ Kasper authored
This adds a guard for whenever we do a hard navigation over a client-navigation to ensure we aren't redirecting to the same URL that we are currently on as this can cause infinite redirecting. This also fixes some cases with middleware rewrites without i18n enabled and expands our middleware suite to test both with i18n and without. This also fixes a race condition with the query updating where a user could attempt a route transition and it then gets overridden by the query updating and prevents firing router events during the query updating as these can be false signals of a transition. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` Fixes: https://github.com/vercel/next.js/issues/37804
-
Ekampreet Singh authored
change "in page's the" to "in the page's"
-
Gal Schlezinger authored
This PR enables Edge API endpoints to receive a body. This wasn't in the original PR, as thankfully pointed out by @zaiste in [this comment](https://github.com/vercel/next.js/pull/37481#discussion_r899440567)
🙏 ## Related - Fixes #37821 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
-
- 19 Jun, 2022 7 commits
-
-
Lee Robinson authored
Going to https://nextjs.org/docs/messages/no-script-in-document-page incorrectly redirects to https://nextjs.org/errors/no-script-in-document.
-
Dongho authored
There's a missing type in with-styled-coponents example's _document.tsx file ## 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)
-
Sukka authored
* chore: enable `externalHelpers` for pre-compile * chore(devDeps): update @swc/core@1.2.203
-
Gal Schlezinger authored
Serverless target is deprecated, so we don't support it in Middleware as it's a new feature, but we need to have a good error message for that. This commit solves that. ## Related * Fixes #37433 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
-
JJ Kasper authored
This ensures we properly detect `pnpm` when installing missing dependencies. This also adds test coverage to ensure we properly detect the correct package manager. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` x-ref: [slack thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1655568091661719)
-
Hannes Bornö authored
If you end up in a state where an error happened and you also should be warned about a full refresh - you get stuck. The full refresh is blocked by the warning but the error is shown instead. Tests didn't catch this because the refresh warning never showed in `__NEXT_TEST_MODE`. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
-
- 18 Jun, 2022 3 commits
-
-
Simon Richard authored
A small change, but eslint wasn't happy until I added this. ## 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 - [x] 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 <22380829+ijjk@users.noreply.github.com>
-
Max Proske authored
Converted AMP example over to TypeScript to match the Contribution guidelines, updated all dependencies, and made some necessary changes to allow AMP apps to build in TypeScript. I added an additional .d.ts file, and referenced it in the tsconfig.json include array, as per the [Next.js docs](https://nextjs.org/docs/basic-features/typescript#existing-projects). These additional types are required to allow lowercase AMP elements to be a property on JSX.IntrinsicElements. Fixes: > Property 'amp-img' does not exist on type 'JSX.IntrinsicElements'.ts I also replaced all occurrences of styled JSX with [@ijjk's workaround](https://github.com/vercel/next.js/issues/7584#issuecomment-503376412) to get styles in the head at build time for AMP-only pages, hybrid AMP pages, and normal pages (non-AMP). I tried using the useAmp hook first with multiple `<style jsx>` like this [Next.js discussion](https://github.com/vercel/next.js/discussions/16755), however AMP expects a [single `<style amp-custom>` tag in the head](https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#stylesheets). Fixes: > The parent tag of tag 'style amp-custom' is 'body', but it can only be 'head' ## 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) Co-authored-by:
JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
Sukka 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: --> ```js // next.config.js module.exports = { experimental: { legacyBrowsers: false, sharedPool: true, newNextLinkBehavior: false } } ``` With the current implementation, using the config above will warn the usage of experimental features. However, those are the preset values that are defined in `defaultConfig` which means actually no experimental feature has been enabled at all. The PR changes to only check if experimental features are actually enabled (have different values than the ones defined in `defaultConfig`).
-
- 17 Jun, 2022 7 commits
-
-
Alex Castle authored
This PR switches to using an SVG filter for blurring placeholder images, rather than a CSS filter. It's based on the technique described in @cramforce's [blog post](https://www.industrialempathy.com/posts/image-optimizations/#blurry-placeholder). One change I made to @cramforce's version was to increase the stdDeviation property of the SVG (which controls the gaussian blur strength) from .5 to 50. Smaller values than this tended to look bad, as our technique for generating the blurry placeholder image tends to produce images with sharp contrast between the pixels, which looks bad when blown up unless it's blurred by a substantial amount. This PR currently only affects the experimental `layout="raw"` but I expect to eventually apply it to all images. CC: @styfle @kara
-
JJ Kasper authored
* Update to use latest version of pnpm * add packageManager field
-
Qiushi Pan authored
## Documentation / Examples The markdown format for blog-starter example was broken, so fixed it. - [x] Make sure the linting passes by running `pnpm lint` It failed, without my changes. - [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
-
JJ Kasper authored
* Ensure query params are populated correctly with middleware * update test * dont match edge ssr * fix query hydrate check * fix lint * update test
-
Damien Simonin Feugas authored
### What's in there? This is a followup of https://github.com/vercel/next.js/pull/37695. For the dev server to clean stacktraces, we're decorating errors caught during code evaluation (`getServerSideProps` or middleware). However, when these errors are asynchronously raised, we can't decorate them before processing them, leading to this fallback logic: https://github.com/vercel/next.js/blob/bf7bf8217f0d3df37d740a0cebf2f140e9c518b6/packages/next/server/dev/next-dev-server.ts#L775-L779 Thanks to latest improvement of the edge-runtime in 1.1.0-beta.4, we can now catch unhandled rejection and uncaught exception, and decorate them. ### How to test? Please reuse the existing tests who already covered these cases: `pnpm testheadless --testPathPattern middleware-dev-errors` Co-authored-by:
JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
dfelsie authored
Title self-explanatory: the package.json inside of the with-chakra-ui example template has been updated to newer versions Co-authored-by:JJ Kasper <22380829+ijjk@users.noreply.github.com>
-