-
Notifications
You must be signed in to change notification settings - Fork 89
chore: replace next/legacy/image with next/image #1722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
f5e94a5
1de22f8
ab989a5
262f0c6
6da578a
3d516e4
dbd8558
c865a9f
5cf563d
9c2689c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,7 @@ module.exports = { | |
}, | ||
// https://nextjs.org/docs/basic-features/image-optimization#domains | ||
images: { | ||
domains: ['raw.githubusercontent.com', 'upload.wikimedia.org'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
domains: ['raw.githubusercontent.com'], | ||
remotePatterns: [ | ||
{ | ||
hostname: '*.imgur.com', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -255,11 +255,11 @@ describe('onBuild()', () => { | |
expect(config.config.env.NEXTAUTH_URL).toEqual(mockUserDefinedSiteUrl) | ||
}) | ||
|
||
test('sets the NEXTAUTH_URL to the DEPLOY_PRIME_URL when CONTEXT env variable is not \'production\'', async () => { | ||
test("sets the NEXTAUTH_URL to the DEPLOY_PRIME_URL when CONTEXT env variable is not 'production'", async () => { | ||
nickytonline marked this conversation as resolved.
Show resolved
Hide resolved
|
||
const mockUserDefinedSiteUrl = chance.url() | ||
process.env.DEPLOY_PRIME_URL = mockUserDefinedSiteUrl | ||
process.env.URL = chance.url() | ||
|
||
// See https://docs.netlify.com/configure-builds/environment-variables/#build-metadata for all possible values | ||
process.env.CONTEXT = 'deploy-preview' | ||
|
||
|
@@ -277,8 +277,8 @@ describe('onBuild()', () => { | |
|
||
expect(config.config.env.NEXTAUTH_URL).toEqual(mockUserDefinedSiteUrl) | ||
}) | ||
test('sets the NEXTAUTH_URL to the user defined site URL when CONTEXT env variable is \'production\'', async () => { | ||
|
||
test("sets the NEXTAUTH_URL to the user defined site URL when CONTEXT env variable is 'production'", async () => { | ||
nickytonline marked this conversation as resolved.
Show resolved
Hide resolved
|
||
const mockUserDefinedSiteUrl = chance.url() | ||
process.env.DEPLOY_PRIME_URL = chance.url() | ||
process.env.URL = mockUserDefinedSiteUrl | ||
|
@@ -300,7 +300,6 @@ describe('onBuild()', () => { | |
|
||
expect(config.config.env.NEXTAUTH_URL).toEqual(mockUserDefinedSiteUrl) | ||
}) | ||
|
||
|
||
test('sets the NEXTAUTH_URL specified in the netlify.toml or in the Netlify UI', async () => { | ||
const mockSiteUrl = chance.url() | ||
|
@@ -615,7 +614,7 @@ describe('onBuild()', () => { | |
const imageConfigPath = path.join(constants.INTERNAL_FUNCTIONS_SRC, IMAGE_FUNCTION_NAME, 'imageconfig.json') | ||
const imageConfigJson = await readJson(imageConfigPath) | ||
|
||
expect(imageConfigJson.domains.length).toBe(2) | ||
expect(imageConfigJson.domains.length).toBe(1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The wikipedia domain was removed, so now there is only one domain. See https://github.com/netlify/next-runtime/pull/1722/files#diff-f3bc73930689da34c69d4dd219fb06b3965a303551a6b4fe527b2492534511e6L74 |
||
expect(imageConfigJson.remotePatterns.length).toBe(1) | ||
expect(imageConfigJson.responseHeaders).toStrictEqual({ | ||
'X-Foo': mockHeaderValue, | ||
|
Uh oh!
There was an error while loading. Please reload this page.