From c60a1cad893b7a7346963d115484d0dfb880ec93 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 1 Apr 2022 11:35:00 +0100 Subject: [PATCH 1/2] chore: add feature flag for Next plugin --- site/plugins.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site/plugins.json b/site/plugins.json index b918e6267..28aa63a6a 100644 --- a/site/plugins.json +++ b/site/plugins.json @@ -479,6 +479,10 @@ "repo": "https://github.com/netlify/netlify-plugin-nextjs", "version": "4.2.8", "compatibility": [ + { + "version": "4.3.1", + "featureFlag": "build_plugins_use_prerelease" + }, { "version": "4.2.8", "migrationGuide": "https://ntl.fyi/next-plugin-migration" From 2a0422a8ff697497c9957713b0fff2150fe87ad1 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 1 Apr 2022 12:04:33 +0100 Subject: [PATCH 2/2] chore: fix test --- test/main.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/main.js b/test/main.js index 991b5999c..c8493daa3 100644 --- a/test/main.js +++ b/test/main.js @@ -110,14 +110,14 @@ pluginsList.forEach((plugin) => { } test(`Plugin compatibility are sorted from highest to lowest version and with different major versions in each entry: ${packageName}`, (t) => { + const filtered = compatibility.filter( + (compatField) => validVersion(compatField.version) !== null && compatField.featureFlag === undefined, + ) t.true( - compatibility - .filter((compatField) => validVersion(compatField.version) !== null) - .every( - (compatField, index) => - index === compatibility.length - 1 || - isPreviousMajor(compatibility[index + 1].version, compatField.version), - ), + filtered.every( + (compatField, index) => + index === filtered.length - 1 || isPreviousMajor(filtered[index + 1].version, compatField.version), + ), ) })