-
Notifications
You must be signed in to change notification settings - Fork 19
feat: index jlcpcb basic parts #89
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
base: main
Are you sure you want to change the base?
Conversation
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.
why are you adding in as any?
| expect(typeof c.lcsc).toBe("number") | ||
| if ("key" in c) { | ||
| expect(typeof c.key).toBe("string") | ||
| } |
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.
NEVER HAVE CONDITIONAL ASSERTIONS IN TESTS!
| const components = fullComponents.map((c) => ({ | ||
| const fullWithBasic = fullComponents.map((c) => { | ||
| const { basic, ...rest } = c | ||
| return { ...rest, is_basic_part: basic === 1 } |
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.
do this in the sql
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.
you need to set is_basic_part in the database like all the other properties, not remap
| ? null | ||
| : { | ||
| ...c, | ||
| is_basic_part: components[i].basic === 1, |
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.
why is this property special? Don't remap
Ref github.com/tscircuit/tscircuit/issues/781