BridgeJS: exposeToGlobal configuration option to control declare global declaration #469
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.
Introduction
Final part of improvements to address #451 and discussions from: #448 (comment)
Overview
exposeToGlobaloption to BridgeJS configurationexposeToGlobalis carried over via .json skeleton filestsFullPathto include full paths in namespaced declarations in d.ts when nodeclare globalis available:exposeToGlobaltofalse, sodeclare globalis omittedexposeToGlobal: truemarked with suffix:.GlobalTesting
On that part I'm not convinced with current setup for end-to-end tests but hadn't had better ideas.
I've setup separate
preludethat includes global this access tests and removed those from mainprelude. I've addedunittest-with-globalto makefile, so we can test it via CLI, but I haven't added this to CI / CD pipelines.Let's discuss whether this approach is fine and we should extend CI or should I revert those changes, and we should just keep single prelude.
Main issue that I have with current changes is that I was unable to find any way to filter tests, so needed to duplicate couple of test cases