Skip to content

Commit de910ea

Browse files
authored
chore: add feature flag for Next plugin (#703)
* chore: add feature flag for Next plugin * chore: fix test
1 parent 08df2b8 commit de910ea

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

site/plugins.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,10 @@
479479
"repo": "https://github.com/netlify/netlify-plugin-nextjs",
480480
"version": "4.2.8",
481481
"compatibility": [
482+
{
483+
"version": "4.3.1",
484+
"featureFlag": "build_plugins_use_prerelease"
485+
},
482486
{
483487
"version": "4.2.8",
484488
"migrationGuide": "https://ntl.fyi/next-plugin-migration"

test/main.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ pluginsList.forEach((plugin) => {
110110
}
111111

112112
test(`Plugin compatibility are sorted from highest to lowest version and with different major versions in each entry: ${packageName}`, (t) => {
113+
const filtered = compatibility.filter(
114+
(compatField) => validVersion(compatField.version) !== null && compatField.featureFlag === undefined,
115+
)
113116
t.true(
114-
compatibility
115-
.filter((compatField) => validVersion(compatField.version) !== null)
116-
.every(
117-
(compatField, index) =>
118-
index === compatibility.length - 1 ||
119-
isPreviousMajor(compatibility[index + 1].version, compatField.version),
120-
),
117+
filtered.every(
118+
(compatField, index) =>
119+
index === filtered.length - 1 || isPreviousMajor(filtered[index + 1].version, compatField.version),
120+
),
121121
)
122122
})
123123

0 commit comments

Comments
 (0)