diff --git a/CHANGELOG.md b/CHANGELOG.md index 75c05a7367..baca2aa0a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [4.0.0-beta.1](https://www.github.com/netlify/netlify-plugin-nextjs/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2021-10-15) + + +### Bug Fixes + +* pass correct path to odb ([#702](https://www.github.com/netlify/netlify-plugin-nextjs/issues/702)) ([7c5a8ae](https://www.github.com/netlify/netlify-plugin-nextjs/commit/7c5a8ae9def9d23a6e9a05a8f52ef22181dd7572)) + + +### Miscellaneous Chores + +* update min build version ([#704](https://www.github.com/netlify/netlify-plugin-nextjs/issues/704)) ([3e1930f](https://www.github.com/netlify/netlify-plugin-nextjs/commit/3e1930f5ea62a7332bdace7e9a95b68dc32ab954)) + ## [4.0.0-beta.0](https://www.github.com/netlify/netlify-plugin-nextjs/compare/v3.9.1...v4.0.0-beta.0) (2021-10-15) diff --git a/package-lock.json b/package-lock.json index a8821caa8a..78ce7e3549 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@netlify/plugin-nextjs", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@netlify/plugin-nextjs", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "license": "MIT", "dependencies": { "@netlify/functions": "^0.7.2", diff --git a/package.json b/package.json index 9377f9733b..89533d74a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@netlify/plugin-nextjs", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "Run Next.js seamlessly on Netlify", "main": "lib/index.js", "files": [ 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/src/templates/getHandler.js b/src/templates/getHandler.js index ed0d11457c..276646fbcc 100644 --- a/src/templates/getHandler.js +++ b/src/templates/getHandler.js @@ -87,7 +87,9 @@ const { builder } = require("@netlify/functions"); const { config } = require("${publishDir}/required-server-files.json") const path = require("path"); exports.handler = ${ - isODB ? `builder((${makeHandler().toString()})(config));` : `(${makeHandler().toString()})(config, "${appDir}");` + isODB + ? `builder((${makeHandler().toString()})(config, "${appDir}"));` + : `(${makeHandler().toString()})(config, "${appDir}");` } ` 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() })