-
Notifications
You must be signed in to change notification settings - Fork 29
chore: switch to @mongodb-js/device-id
#196
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
Conversation
This package is meant to minimize code replication and to make sure the approach we're taking with hashing is consistent.
@@ -1,5 +1,5 @@ | |||
/** @type {import('ts-jest').JestConfigWithTsJest} **/ | |||
export default { |
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 ran into jestjs/jest#15312, possibly because of a TypeScript update, so just going to keep it as a .cjs
file for the time being
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!
this.deviceIdPromise = getDeviceId({ | ||
getMachineId: () => this.getRawMachineId(), | ||
onError: (reason, error) => { | ||
switch (reason) { |
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.
honestly seeing this used like this does make me think we should instead throw typed error objects and check instanceof
as reason feels a bit redundant but this is fine
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.
Yeah, I was debating between the two for a while - ended up going with a reason
because that was more explicit about the possible values as opposed to Error
inheritors, where you'd need to figure out what the options are.
* main: (21 commits) fix: updates count tool (#254) fix: docker security warnings (#259) feat: docker support (#238) docs: list alerts docs (#250) chore: add hints and update mcp (#249) chore: base model SEO change (#248) chore(ci): add a PR title check workflow (#247) docs: bump node.js version (#246) chore: corrects the description of atlas-create-db-user (#240) chore: auto-close stale issues (#237) chore(deps-dev): bump globals from 16.0.0 to 16.1.0 (#231) chore(deps-dev): bump @types/node from 22.15.9 to 22.15.17 (#233) chore(deps-dev): bump eslint-config-prettier from 10.1.2 to 10.1.5 (#234) feat: Alerts Listing (#230) chore(deps-dev): bump @redocly/cli from 1.34.2 to 1.34.3 (#235) chore(deps-dev): bump openapi-typescript from 7.6.1 to 7.8.0 (#232) chore: release v0.1.1 (#223) fix: improve uncaught exception for getAccessToken (#224) chore: update issue template (#227) chore: switch to `@mongodb-js/device-id` (#196) ...
This package is meant to minimize code replication and to make sure the approach we're taking with hashing is consistent and timeouts are automatically handled.
See mongodb-js/devtools-shared#532