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

Make packages/sdk/shared JS-environment-agnostic (Works on browser / node) #1333

Closed
tonyanziano opened this issue Feb 27, 2019 · 1 comment
Closed

Comments

@tonyanziano
Copy link
Contributor

sdk/shared needs to be made environment agnostic so that it can be imported in both browser (client, luis extension, etc.) and node projects (main).

This caused the issue #1328

@tonyanziano
Copy link
Contributor Author

Upon further investigation this might not be possible due to that fact that sdk-shared exports the CommandServiceImpl class that depends on the uuid package (node dependency) to generate transaction ids, as well as the ConversationService which uses the uuid package to generated a bot id when starting a conversation.

A better approach might be to just separate code using node-reliant packages, such as uuid, into its own directory that is not exported at the root level via barrel files. Then any package that wants to use that code would just have to import it explicitly from that file:

import { someFunctionThatUsesNode } from '@bfemulator/sdk-shared/node'

@OEvgeny OEvgeny closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2024
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

No branches or pull requests

2 participants