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

Jest builds unable to exit #190

Closed
isTravis opened this issue Sep 5, 2019 · 6 comments
Closed

Jest builds unable to exit #190

isTravis opened this issue Sep 5, 2019 · 6 comments

Comments

@isTravis
Copy link

isTravis commented Sep 5, 2019

citation-js requires sync-request which in turn uses sync-rpc. Simply importing the citation-js package causes my CI build to fail as Jest doesn't exit and throws the following warning:

Screen Shot 2019-09-05 at 1 50 28 PM

This happens when running jest 24.5.0 on node 10.14.1. I've submitted an issue on sync-rcp here - but am unsure where in the stack this open handler needs to be addressed.

Any suggestions for working around this?

Thanks!

@larsgw
Copy link
Owner

larsgw commented Sep 5, 2019

I'd really like to drop the sync-request dependency for a number of reasons, although I hadn't discovered this one yet. I developed sync-fetch for this (which doesn't use a separate process for the server), however I don't want to replace it and introduce regressions without a new major version. Additionally, I'd have to drop Node 6 support probably.

@isTravis
Copy link
Author

isTravis commented Sep 5, 2019

Thanks for the context. Any hope of a @x.0.0-beta in the interim?

Node 6 appears to be out of "maintenance" on the nodejs release chart since May 2019 - so a major version update that loses support for Node 6 doesn't seem like an egregious decision from my (biased) perspective 🙂

larsgw added a commit to citation-js/citation-js that referenced this issue Sep 7, 2019
@larsgw
Copy link
Owner

larsgw commented Sep 7, 2019

Can you try citation-js@0.5.0-alpha.0?

@isTravis
Copy link
Author

isTravis commented Sep 10, 2019

Coming from successful tests with citation-js@0.4.10 and running tests with citation-js@0.5.0-alpha.0 I get a new error in a path that seems unrelated to sync-fetch:

[0] Err TypeError: Cannot use 'in' operator to search for 'literal' in null
[0]     at correctDate (.../node_modules/@citation-js/core/lib/plugins/input/csl.js:142:24)
[0]     at correctField (.../node_modules/@citation-js/core/lib/plugins/input/csl.js:158:14)
[0]     at .../node_modules/@citation-js/core/lib/plugins/input/csl.js:183:26
[0]     at Array.map (<anonymous>)
[0]     at parseCsl (.../node_modules/@citation-js/core/lib/plugins/input/csl.js:179:15)
[0]     at Cite.format (.../node_modules/@citation-js/core/lib/Cite/get.js:21:53)
[0]     at Cite.get (.../node_modules/@citation-js/core/lib/Cite/get.js:66:23)
[0]     at get (.../server/utils/citations.js:80:6)
[0]     at tryCatch (.../node_modules/regenerator-runtime/runtime.js:45:40)
[0]     at Generator.invoke [as _invoke] (.../node_modules/regenerator-runtime/runtime.js:271:22)
[0]     at Generator.prototype.(anonymous function) [as next] (.../node_modules/regenerator-runtime/runtime.js:97:21)
[0]     at asyncGeneratorStep (.../node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
[0]     at _next (.../node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
[0]     at process._tickCallback (internal/process/next_tick.js:68:7)

Seems to come from this recent line change: citation-js/citation-js@08da3e7#diff-040f2ba621ded4a0338c7ba7939eeed6R191

larsgw added a commit to citation-js/citation-js that referenced this issue Sep 10, 2019
@larsgw
Copy link
Owner

larsgw commented Sep 10, 2019

I've just released 0.5.0-alpha.2 with a fix. Sorry for the peer dependency warnings, I'll fix that next release.

@isTravis
Copy link
Author

That did the trick! Smooth sailing on my end now.

Thanks so much!

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

No branches or pull requests

2 participants