Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove nested index files #492

Merged
merged 4 commits into from
Jan 25, 2022
Merged

Remove nested index files #492

merged 4 commits into from
Jan 25, 2022

Conversation

TwitchBronBron
Copy link
Member

@TwitchBronBron TwitchBronBron commented Jan 25, 2022

Having export barrels regularly causes debugging issues within this project, because ts-node doesn't handle circular dependencies well, and sometimes neither does typescript.

  • removes all barrels except for the primary src/index.ts file which is used by external consumers.
  • change all internal imports from barrels into explicit file imports

@@ -8,8 +8,18 @@ export { Watcher } from './Watcher';
export * from './interfaces';
export * from './LanguageServer';
export * from './XmlScope';
export * from './lexer';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the imports from these removed lines were expanded out to their individual file exports. This ensures that our "public" api hasn't changed. One caveat, if plugin authors doing things like import { createVisitor } from 'brighterscript/astUtils' then this is technically a breaking change. However, since we were already exporting those directly from src/index.ts`, I'd argue they were not using our library properly.

Thoughts?

@TwitchBronBron TwitchBronBron merged commit d6cff91 into master Jan 25, 2022
@TwitchBronBron TwitchBronBron deleted the remove-nested-index-files branch January 25, 2022 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants