Handle namespaces that reexport themselves #3077
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Resolves #3071
Description
This turned out to be a really small fix. Basically I separated the namespace creation from its initialisation so that during initialisation, a namespace is already able to reference itself. With this fix, this:
https://rollupjs.org/repl/?version=1.19.4&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmltcG9ydCUyMCU3QiUyMG90aGVyJTIwJTdEJTIwZnJvbSUyMCU1QyUyMi4lMkZvdGhlciU1QyUyMiUzQiU1Q24lNUNuY29uc29sZS5sb2cob3RoZXIuZm9vMSklM0IlNUNuJTIyJTJDJTIyaXNFbnRyeSUyMiUzQXRydWUlN0QlMkMlN0IlMjJuYW1lJTIyJTNBJTIyb3RoZXIuanMlMjIlMkMlMjJjb2RlJTIyJTNBJTIyZXhwb3J0JTIwY29uc3QlMjBmb28xJTIwJTNEJTIwMSUzQiU1Q25leHBvcnQlMjBjb25zdCUyMGZvbzIlMjAlM0QlMjAyJTNCJTVDbiU1Q25pbXBvcnQlMjAqJTIwYXMlMjBvdGhlciUyMGZyb20lMjAlNUMlMjIuJTJGb3RoZXIlNUMlMjIlM0IlNUNuZXhwb3J0JTIwJTdCJTIwb3RoZXIlMjAlN0QlM0IlMjIlN0QlNUQlMkMlMjJvcHRpb25zJTIyJTNBJTdCJTIyZm9ybWF0JTIyJTNBJTIyY2pzJTIyJTJDJTIybmFtZSUyMiUzQSUyMm15QnVuZGxlJTIyJTJDJTIyYW1kJTIyJTNBJTdCJTIyaWQlMjIlM0ElMjIlMjIlN0QlMkMlMjJnbG9iYWxzJTIyJTNBJTdCJTdEJTdEJTJDJTIyZXhhbXBsZSUyMiUzQW51bGwlN0Q=
becomes this:
I also changed
form
tests to throw an error when an unexpected warning is encountered and fixed the resulting errors. This should very much reduce test noise and improve the tests.