Commit graph

12 commits

Author SHA1 Message Date
JJ Kasper
ba0efe9770
Update flakey image component tests (#54526)
x-ref: https://github.com/vercel/next.js/actions/runs/5967624344/job/16189684792#step:28:1642
2023-08-24 20:15:10 +00:00
JJ Kasper
2312852e57
Update runner labels (#53925)
Adds a new label for distinguishing between runners, also fixes a couple flakey fixtures noticed while benchmarking.
2023-08-11 21:05:11 +00:00
Facundo Giuliani
a26bac9604
Update default moduleResolution in tsconfig.json from node to bundler (#51957)
This updates our `moduleResolution` to `bundler` as this matches our heuristics much more closely so is more accurate. This shouldn't be a breaking change is it should be compatible with our previous default. 

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-07-18 15:11:09 +00:00
Leah
5d54eaaf18
type check tests (and convert next-test-utils.js to ts) (#51071)
Enables type checking for tests in CI and fixes a bunch of things related to that
2023-06-23 17:42:50 +00:00
Fonger
afddb6ebda
fix(image): preload should respect referrerPolicy (#49584)
This is a bug fix PR.

We should respect referrerPolicy when preloading a priority next/image

Reproduce codesandbox: https://codesandbox.io/p/sandbox/boring-fog-4o28oi
As you can see, the image still request with `referer` header although we have `referrerPolicy="no-referrer" in img attribute.

<img width="645" alt="image" src="https://github.com/vercel/next.js/assets/5862369/6a2779d3-e0e2-4dfe-80d2-c8a4243f430b">
2023-05-13 20:33:07 +00:00
JJ Kasper
ac84542fda
Update some flakey test cases (#47556)
x-ref:
https://github.com/vercel/next.js/actions/runs/4529093785/jobs/7976512430
x-ref:
https://github.com/vercel/next.js/actions/runs/4529093785/jobs/7976517246
x-ref:
https://github.com/vercel/next.js/actions/runs/4528686011/jobs/7976058968
2023-03-26 23:41:15 -07:00
JJ Kasper
d5a188de06
Update test env variable passing (#44912) 2023-01-15 23:20:16 -08:00
Jiachi Liu
6fcb518f31
Fix image emittion for pure client image (#44831)
Fixes https://github.com/vercel/next.js/issues/44068
Fixes https://github.com/vercel/next.js/issues/44143
Fixes https://github.com/vercel/next.js/issues/44658
2023-01-12 11:24:59 -08:00
Laityned
369d6b76c4
Imageloader: collect images serverside to include images from staticp… (#41554)
In #41548, I show that I would like to provide an object with images in
getStaticProps. The StaticImageData is parsed correctly and provided as
a prop to the page. Nonetheless, the image is not available in the
static directory. Therefore the image is not shown. This is also
addressed in issue #29571. The underlying cause is that the import of
the image is removed from the client bundle and only present in the
server bundle.

Evaluating the next-image-loader shows that the file is only placed in
the static directory if emitted from the client bundle by firing
this.emitFile. By changing this to only emitting the file from the
serverside bundle in the webpackloader, static images loaded in the
getStaticProps are made available properly as well as images directly
used in componts (so present in server and client bundle).

This would PR would prevent the circumventing solution which enforces
that the StaticImageData should be present in the client side bundle
while it will also be present in the staticprops.

<!--
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

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


Closes #42783, Fixes #42443

Co-authored-by: Diederik <diederik@digitalpatrol.nl>
2022-11-23 09:28:53 -05:00
Steven
9c5bb5bfe9
BREAKING CHANGE: Remove target: serverless (#41495)
The `target: serverless` config was deprecated a year ago starting in
[Next.js 12](https://nextjs.org/blog/next-12).

Tests were disabled in #41252 so we can now remove `target: serverless`
and all usage of `target` in `next.config.js`.

Co-authored-by: Balázs Orbán <info@balazsorban.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-10-18 09:47:13 -07:00
Tim Neutkens
f260328900
BREAKING CHANGE: Enable newNextLinkBehavior (#41459)
- Enable newNextLinkBehavior. See #36436 
- Run next/link codemod on test suite

Note that from when this lands on apps trying canary will need to run
the new-link codemod in order to upgrade.
Ideally we have to detect `<a>` while rendering the new link and warn
for it.

Co-authored-by: Steven <steven@ceriously.com>
2022-10-17 21:20:28 -04:00
Steven
241195ddd6
BREAKING CHANGE: Rename next/image to next/legacy/image & rename next/future/image to next/image (#41399)
This PR introduces breaking changes by renaming components.

- Rename `next/image` to `next/legacy/image`
- Rename `next/future/image` to `next/image`

The diff is very confusing because both components are very similar so git got confused.
2022-10-14 01:59:22 +00:00