diff --git a/src/helpers/verification.js b/src/helpers/verification.js index dc10813b5f..b3b2887c79 100644 --- a/src/helpers/verification.js +++ b/src/helpers/verification.js @@ -13,14 +13,14 @@ exports.verifyBuildTarget = (target) => { } } -// This is when the esbuild dynamic import support was added -const REQUIRED_BUILD_VERSION = '>=15.11.5' +// This is when nft support was added +const REQUIRED_BUILD_VERSION = '>=18.16.0' exports.verifyNetlifyBuildVersion = ({ IS_LOCAL, NETLIFY_BUILD_VERSION, failBuild }) => { // We check for build version because that's what's available to us, but prompt about the cli because that's what they can upgrade if (IS_LOCAL && !satisfies(NETLIFY_BUILD_VERSION, REQUIRED_BUILD_VERSION, { includePrerelease: true })) { return failBuild(outdent` - This version of the Essential Next.js plugin requires netlify-cli@4.4.2 or higher. Please upgrade and try again. + This version of the Essential Next.js plugin requires netlify-cli@6.12.4 or higher. Please upgrade and try again. You can do this by running: "npm install -g netlify-cli@latest" or "yarn global add netlify-cli@latest" `) } diff --git a/test/index.js b/test/index.js index cedfcf9952..20169c97cc 100644 --- a/test/index.js +++ b/test/index.js @@ -97,16 +97,16 @@ describe('preBuild()', () => { expect( plugin.onPreBuild({ ...defaultArgs, - constants: { IS_LOCAL: true, NETLIFY_BUILD_VERSION: '15.11.4' }, + constants: { IS_LOCAL: true, NETLIFY_BUILD_VERSION: '18.15.0' }, }), - ).rejects.toThrow('This version of the Essential Next.js plugin requires netlify-cli@4.4.2 or higher') + ).rejects.toThrow('This version of the Essential Next.js plugin requires netlify-cli') }) test('passes if the build version is new enough', async () => { expect( plugin.onPreBuild({ ...defaultArgs, - constants: { IS_LOCAL: true, NETLIFY_BUILD_VERSION: '15.12.2' }, + constants: { IS_LOCAL: true, NETLIFY_BUILD_VERSION: '18.16.1' }, }), ).resolves.not.toThrow() })