Skip to content

Commit 3c4feae

Browse files
authored
fix: set all runtimes minVersion to 0.0.1 (#511)
The version is currently the latest version of node that these engines were tested again, rather than the version of the engine that added support. This fixes it so the version is hard coded as `0.0.1` since we don't know which one introduced each feature.
1 parent 385d8be commit 3c4feae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/update-engines-runtimes.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ function isFeatureSupported(
6868
moduleName: string,
6969
exportName?: string
7070
): boolean {
71-
const moduleSupport = runtimeData.builtinModules[moduleName];
71+
let moduleSupport = runtimeData.builtinModules[moduleName];
72+
73+
if (moduleSupport === undefined && !moduleName.startsWith('node:')) {
74+
moduleSupport = runtimeData.builtinModules[`node:${moduleName}`];
75+
}
7276

7377
if (moduleSupport === false || moduleSupport === undefined) {
7478
return false;
@@ -105,7 +109,7 @@ function extractRuntimeEngines(
105109
if (isFeatureSupported(runtimeData, moduleName, exportName)) {
106110
engines.push({
107111
engine: runtimeName,
108-
minVersion: runtimeData.version
112+
minVersion: '0.0.1' // Assuming all versions support it
109113
});
110114
}
111115
}

0 commit comments

Comments
 (0)