-
Notifications
You must be signed in to change notification settings - Fork 57
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
refactor: use neoqs and vitest #268
base: master
Are you sure you want to change the base?
Conversation
@@ -1,9 +1,9 @@ | |||
import qs, { IStringifyOptions } from 'qs'; | |||
import { stringify, StringifyOptions } from 'neoqs'; |
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.
Should be neoqs/legacy
, as neoqs doesn't support CJS, but legacy subpath does
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 would that matter? my understanding is it's getting built into both esm and cjs by tsup from esm source
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.
Im not sure if current setup builds qs also in, based on my experience it prolly doesn't.
If it builds it in then its good, otherwise it should be switched to /legacy
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.
yes, I wish CI would trigger, but locally all tests pass
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.
tests won't catch this issue. Can you locally build and inspect whether the output file is importing qs or is it fully inlined?
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.
Good catch! Added noExternal from: https://www.jsdocs.io/package/tsup#Options
/** Always bundle modules matching given patterns */
noExternal?: (string | RegExp)[];
Summary
Fixes #267
Details
I couldn't get jest to work, so I converted to
vitest
which works for me, but I can revert if that unacceptable