Open zmully opened 4 months ago
@zmully Can you create a repository that replicates the issue?
Hmm. So there is something weird going on between @oclif/test
, @oclif/plugin-warn-if-update-available
, jest
and the node versions above. mocha
doesn't appear to have this problem.
So github.com/zmully/oclif-test-mocha works fine with the @oclif/plugin-warn-if-update-available
plugin enabled, and any version of node I tested.
But github.com/zmully/oclif-test-jest segfaults when the @oclif/plugin-warn-if-update-available
is enabled, and the node versions above are used. If you disable the plugin, the test runs fine with jest.
I don't really know where to look next, but please let me know if you're also getting segfaults with jest repository...
@zmully I believe this is related to jest's ESM support since plugin-warn-if-update is ESM and the tests seem to be failing when attempting to import a path from the plugin.
You might be able to figure out how to workaround it by following either of these guides: https://jestjs.io/docs/ecmascript-modules https://kulshekhar.github.io/ts-jest/docs/guides/esm-support/
I don't have bandwidth to figure it out but if you do, it'd be great if you could post it here so that others can see.
Also worth noting that you can workaround this issue by either downgrading plugin-warn-if-update to v2 (which isn't ESM) or use a newer version of node (v20.13.1 is working for me)
Describe the bug
Updated our internal cli to use
@oclif/test@4.0.2
and the newrunCommand
segFaults on linux node < 18.20.0 and <20.8.0. I've replicated this on linux x86 and linux arm. This does not happen on macOS for any versions of 18.x or 20.x that I spot tested.To Reproduce Steps to reproduce the behavior:
runCommand
method:await expect(runCommand<{ name: string }>(['jira:watch', '-p', 'plat'])).resolves.not.toThrow();
and it segfaults when executed using any of the above node versions.👾 test | jest --passWithNoTests --ci jira
RUNS test/commands/jira/watch.test.ts Segmentation fault (core dumped)