From 509de93d05c6f6ae0db4971ad6541bce4cfa1665 Mon Sep 17 00:00:00 2001 From: Developer Date: Thu, 3 Dec 2020 02:34:31 -0700 Subject: [PATCH] Fix: (#5816) Trailing slash breaks workspace --- src/util/normalize-manifest/fix.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/util/normalize-manifest/fix.js b/src/util/normalize-manifest/fix.js index ef7b7798d6..841d841fca 100644 --- a/src/util/normalize-manifest/fix.js +++ b/src/util/normalize-manifest/fix.js @@ -350,4 +350,12 @@ export default (async function( } } } + + // Sanitize workspaces patterns + if (info.workspaces) { + // Workspaces will not match if the pattern starts with ./ or ends with / + const sanitizedWorkspaces = info.workspaces.map((workspace): string => + workspace.replace(/\/$/, '').replace(/^.\//, '')); + info.workspaces = sanitizedWorkspaces; + } });