Remove RegExp.escape call

This commit is contained in:
Henry Mercer
2026-05-14 16:33:36 +01:00
parent 3c41d8f998
commit ab95e32825
+2 -1
View File
@@ -65,7 +65,8 @@ const virtualEntrypointPlugin = {
name: "virtual-actions-entrypoint",
setup(build) {
const namespace = "actions-entrypoint";
build.onResolve({ filter: new RegExp(`^${RegExp.escape(SHARED_ENTRYPOINT)}$`) }, () => ({
// Ideally, we'd `RegExp.escape` the entrypoint here, but that API isn't supported in Node 20. Since we're dealing with a hardcoded string, this isn't too much of a problem.
build.onResolve({ filter: new RegExp(`^${SHARED_ENTRYPOINT}$`) }, () => ({
path: SHARED_ENTRYPOINT,
namespace,
}));