From ed256d4216ba65329e792058f76b76a86b741d25 Mon Sep 17 00:00:00 2001 From: Rob Stanford Date: Thu, 4 Jul 2024 17:23:46 +0100 Subject: [PATCH] fix: correct plugin name in verification output --- src/build/verification.ts | 6 +++--- tests/integration/advanced-api-routes.test.ts | 2 +- tests/integration/netlify-forms.test.ts | 2 +- tests/smoke/deploy.test.ts | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/build/verification.ts b/src/build/verification.ts index ceec2e7a95..a4089349d5 100644 --- a/src/build/verification.ts +++ b/src/build/verification.ts @@ -57,7 +57,7 @@ export function verifyPublishDir(ctx: PluginContext) { !satisfies(ctx.nextVersion, SUPPORTED_NEXT_VERSIONS, { includePrerelease: true }) ) { ctx.failBuild( - `@netlify/plugin-next@5 requires Next.js version ${SUPPORTED_NEXT_VERSIONS}, but found ${ctx.nextVersion}. Please upgrade your project's Next.js version.`, + `@netlify/plugin-nextjs@5 requires Next.js version ${SUPPORTED_NEXT_VERSIONS}, but found ${ctx.nextVersion}. Please upgrade your project's Next.js version.`, ) } } @@ -85,7 +85,7 @@ export async function verifyAdvancedAPIRoutes(ctx: PluginContext) { if (unsupportedAPIRoutes.length !== 0) { ctx.failBuild( - `@netlify/plugin-next@5 does not support advanced API routes. The following API routes should be migrated to Netlify background or scheduled functions:\n${unsupportedAPIRoutes.map((apiRouteConfig) => ` - ${apiRouteConfig.apiRoute} (type: "${apiRouteConfig.config.type}")`).join('\n')}\n\nRefer to https://ntl.fyi/next-scheduled-bg-function-migration as migration example.`, + `@netlify/plugin-nextjs@5 does not support advanced API routes. The following API routes should be migrated to Netlify background or scheduled functions:\n${unsupportedAPIRoutes.map((apiRouteConfig) => ` - ${apiRouteConfig.apiRoute} (type: "${apiRouteConfig.config.type}")`).join('\n')}\n\nRefer to https://ntl.fyi/next-scheduled-bg-function-migration as migration example.`, ) } } @@ -118,7 +118,7 @@ export function verifyNetlifyForms(ctx: PluginContext, html: string) { formDetectionRegex.test(html) ) { console.warn( - '@netlify/plugin-next@5 requires migration steps to support Netlify Forms. Refer to https://ntl.fyi/next-runtime-forms-migration for migration example.', + '@netlify/plugin-nextjs@5 requires migration steps to support Netlify Forms. Refer to https://ntl.fyi/next-runtime-forms-migration for migration example.', ) verifications.add('netlifyForms') } diff --git a/tests/integration/advanced-api-routes.test.ts b/tests/integration/advanced-api-routes.test.ts index 41ad420936..55412df622 100644 --- a/tests/integration/advanced-api-routes.test.ts +++ b/tests/integration/advanced-api-routes.test.ts @@ -26,7 +26,7 @@ it('test', async (ctx) => { const runPluginPromise = runPlugin(ctx) await expect(runPluginPromise).rejects.toThrow( - '@netlify/plugin-next@5 does not support advanced API routes. The following API routes should be migrated to Netlify background or scheduled functions:', + '@netlify/plugin-nextjs@5 does not support advanced API routes. The following API routes should be migrated to Netlify background or scheduled functions:', ) // list API routes to migrate diff --git a/tests/integration/netlify-forms.test.ts b/tests/integration/netlify-forms.test.ts index 155abe65f1..728c377d74 100644 --- a/tests/integration/netlify-forms.test.ts +++ b/tests/integration/netlify-forms.test.ts @@ -27,7 +27,7 @@ it('should warn when netlify forms are used', async (ctx) => const runPluginPromise = await runPlugin(ctx) expect(warn).toBeCalledWith( - '@netlify/plugin-next@5 requires migration steps to support Netlify Forms. Refer to https://ntl.fyi/next-runtime-forms-migration for migration example.', + '@netlify/plugin-nextjs@5 requires migration steps to support Netlify Forms. Refer to https://ntl.fyi/next-runtime-forms-migration for migration example.', ) }) diff --git a/tests/smoke/deploy.test.ts b/tests/smoke/deploy.test.ts index 331470784c..c60a37b808 100644 --- a/tests/smoke/deploy.test.ts +++ b/tests/smoke/deploy.test.ts @@ -1,4 +1,4 @@ -import { expect, test, describe, afterEach } from 'vitest' +import { afterEach, describe, expect, test } from 'vitest' import { Fixture, fixtureFactories } from '../utils/create-e2e-fixture' const usedFixtures = new Set() @@ -66,7 +66,7 @@ describe('version check', () => { async () => { await expect(selfCleaningFixtureFactories.next12_1_0()).rejects.toThrow( new RegExp( - `@netlify/plugin-next@5 requires Next.js version >=13.5.0, but found 12.1.0. Please upgrade your project's Next.js version.`, + `@netlify/plugin-nextjs@5 requires Next.js version >=13.5.0, but found 12.1.0. Please upgrade your project's Next.js version.`, ), ) }, @@ -83,7 +83,7 @@ describe('version check', () => { selfCleaningFixtureFactories.yarnMonorepoMultipleNextVersionsSiteIncompatible(), ).rejects.toThrow( new RegExp( - `@netlify/plugin-next@5 requires Next.js version >=13.5.0, but found 13.4.1. Please upgrade your project's Next.js version.`, + `@netlify/plugin-nextjs@5 requires Next.js version >=13.5.0, but found 13.4.1. Please upgrade your project's Next.js version.`, ), ) }, @@ -101,7 +101,7 @@ describe('version check', () => { fixtureFactories.npmNestedSiteMultipleNextVersionsIncompatible(), ).rejects.toThrow( new RegExp( - `@netlify/plugin-next@5 requires Next.js version >=13.5.0, but found 13.4.1. Please upgrade your project's Next.js version.`, + `@netlify/plugin-nextjs@5 requires Next.js version >=13.5.0, but found 13.4.1. Please upgrade your project's Next.js version.`, ), ) },