Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

YurySolovyov
Copy link

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

@@ -1,9 +1,9 @@
import qs, { IStringifyOptions } from 'qs';
import { stringify, StringifyOptions } from 'neoqs';
Copy link

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

Copy link
Author

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

Copy link

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

Copy link
Author

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

Copy link

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?

Copy link
Author

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)[];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider alternative query sting package
2 participants