fix(matrix): sort safe wrapper sdk subpaths

This commit is contained in:
Vincent Koc
2026-04-14 17:51:06 +01:00
parent 16851e2d55
commit 30073feb6f
2 changed files with 51 additions and 3 deletions

View File

@@ -83,12 +83,12 @@ function buildPluginSdkAliasMap(moduleUrl) {
}
}
for (const exportKey of Object.keys(packageJson.exports ?? {})) {
for (const exportKey of Object.keys(packageJson.exports ?? {}).toSorted()) {
if (!exportKey.startsWith(PLUGIN_SDK_EXPORT_PREFIX)) {
continue;
}
const subpath = exportKey.slice(PLUGIN_SDK_EXPORT_PREFIX.length);
if (!subpath) {
if (!/^[A-Za-z0-9][A-Za-z0-9_-]*$/.test(subpath)) {
continue;
}
const resolvedPath =