-
Notifications
You must be signed in to change notification settings - Fork 6
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
Niko/node new template #547
base: main
Are you sure you want to change the base?
Conversation
* add precomputed assignments documentation for JS client * very nice! * globally * Update docs/sdks/client-sdks/javascript/precomputed-assignments.mdx Co-authored-by: Sameeran Kunche <[email protected]> --------- Co-authored-by: Sameeran Kunche <[email protected]>
* Update precomputed-assignments.mdx evaluation example * Update docs/sdks/client-sdks/javascript/precomputed-assignments.mdx Co-authored-by: Sameeran Kunche <[email protected]> --------- Co-authored-by: Sameeran Kunche <[email protected]>
* add precomputed assignments documentation for JS client * very nice! * globally * Update docs/sdks/client-sdks/javascript/precomputed-assignments.mdx Co-authored-by: Sameeran Kunche <[email protected]> --------- Co-authored-by: Sameeran Kunche <[email protected]>
Adding Node.js specific verbiage.
* Opportunistic fix of an issue with JS initialization.
* Updating with node specific details.
❌ Deploy Preview for eppo-data-docs failed.
|
* add precomputed assignments documentation for JS client * very nice! * globally * Update docs/sdks/client-sdks/javascript/precomputed-assignments.mdx Co-authored-by: Sameeran Kunche <[email protected]> --------- Co-authored-by: Sameeran Kunche <[email protected]>
This reverts commit 756e664. Accidentally committed dot net files to node branch. Undoing. Changes to be committed: deleted: docs/sdks/server-sdks/dotnet/_category_.json deleted: docs/sdks/server-sdks/dotnet/assignments.mdx deleted: docs/sdks/server-sdks/dotnet/bandits.mdx deleted: docs/sdks/server-sdks/dotnet/initialization.mdx deleted: docs/sdks/server-sdks/dotnet/intro.mdx deleted: docs/sdks/server-sdks/dotnet/quickstart.mdx
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.
Thanks for all the improvements--these docs are really shaping up! I have some random comments here and there on the content. Regarding the code examples ,there are a couple of issues I spotted:
- The Node.js package name is
@eppo/node-server-sdk
- Our
init()
method type requires anassignmentLogger
to be defined--although I think we should adjust our types in the SDK itself. - We are inconsistent with our string quoting (we probably want to conform to
"
) - We are inconsistent with our use of TypeScript and Vanilla JS (we probably want to conform to TypeScript)
Also, there are quite a few places we link to the client JavaScript documentation, which could confuse people as they navigate. We'll want to make sure all links, language, and examples are backend-related
|
||
```javascript | ||
import * as EppoSdk from "@eppo/js-client-sdk"; |
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.
We need this same change in Quickstart.
Also, unfortunately*, our TypeScript types require assignmentLogger
to be defined:
import { init } from "@eppo/js-client-sdk";
// One-time initialization to put in application bootup
await init({
apiKey: "SDK_KEY",
assignmentLogger: { logAssignment: (assignmentEvent)=> console.log('Send to warehouse: ', assignmentEvent) },
});
*this is probably something we should consider changing for dev-friendliess
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.
My two cents are that changing this in the code depends on whether there are practical situations where you would want to not log assignments. In the meantime, I've updated code samples where init gets invoked to include the placeholder assignmentLogger you put there.
* Removing old node.mdx docs page. * Aligned on using double quotes in code samples. * Set all JS code samples to use TS syntax highlighting. * Updated Bandit docs to have better attributes. * Fixing the JS intro being for node and the node intro being for JS.
* Updating netlify redirects to force redirect.
Adding variant of docs for Node.js following the new information architecture and doc structure as the client.js docs.
Most of this content is duplicate boilerplate between client and server js.
Dependencies
These docs are built on top of the Docusaurus 2.x -> 3.x major version update. They shouldn't be merged before that PR is merged.