You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(commonjs)!: dynamic require root check was broken in some cases (#1461)
* fix(commonjs): dynamic require root check was broken in some cases
* fix(commonjs): fixed a commonjs unit test based on OS paths
* test(commonjs): attempt 2 at having tests not fail in CI
Using the normalized path in _all_ the properties of the error
* test: 1st try at the test
* test(commonjs): the dynamic root must ignore conflicting backslashes
* test(commonjs): added a test specifically for Windows
message: `"${id}" contains dynamic require statements but it is not within the current dynamicRequireRoot "${dynamicRequireRoot}". You should set dynamicRequireRoot to "${dirname(
150
-
id
151
+
message: `"${normalizedId}" contains dynamic require statements but it is not within the current dynamicRequireRoot "${normalizedRequireRoot}". You should set dynamicRequireRoot to "${dirname(
message: `"${id}" contains dynamic require statements but it is not within the current dynamicRequireRoot "${dynamicRequireRoot}". You should set dynamicRequireRoot to "${minimalDynamicRequireRoot}" or one of its parent directories.`,
723
735
pluginCode: 'DYNAMIC_REQUIRE_OUTSIDE_ROOT',
@@ -726,6 +738,52 @@ test('throws when there is a dynamic require from outside dynamicRequireRoot', a
726
738
});
727
739
});
728
740
741
+
test('does not throw when a dynamic require uses different slashes than dynamicRequireRoot',async(t)=>{
0 commit comments