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 unnecessary dependency on server-services-client package #17478
Conversation
|
did we consider reducing our dependency over all here. I think in general we could just replace this with uuid. they are a bit less nice, but dropping the dependency overall is probably worth it. |
Good point... the uses I saw were basically to generate fake user names, where we already use uuid() for a fake user id. Using the first two segments of the same uuid as |
it should be all test/demo/example. a more involved change would be to allow name injections, but default to uuid, and then directly depend on silly name in the webpack fluid loader, which is what our examples generally use |
|
Files listed below depend on
I think we can replace the |
| @@ -49,9 +48,12 @@ export function generateToken( | |||
| } | |||
|
|
|||
| export function generateUser(): IUser { | |||
| const userId = uuid(); | |||
| const userName = userId.match(/^([\da-f]{8})-([\da-f]{4})/); // userName takes the first two segments of the userId. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes the intention a bit clearer, can we update them all?
| const userName = userId.match(/^([\da-f]{8})-([\da-f]{4})/); // userName takes the first two segments of the userId. | |
| const userName = userId.match(/^([\da-f]{8})-([\da-f]{4})/); // Just use the first two segments of the (fake) userId as a fake name |
|
The title of the pr is misleading. Maybe "remove unnecessary dependency on server packages"? |
aeb1f23
to
b1ecc29
Compare
#### Description While removing dependency on `server-services-client` package (#17478), found that the `local-driver` and `webpack-fluid-loader` packages do not have `types/uuid` package which enables type definition for uuid.
Description
5659
This PR replaces
@fluidframework/server-services-clientto@fluid-internal/client-utilsin the@fluidframework/tinylicious-driver.