Closed ryanwilsonperkin closed 1 year ago
@all-contributors please add @ryanwilsonperkin for code, test
@smeijer
I've put up a pull request to add @ryanwilsonperkin! :tada:
I've also added you as a collaborator on the project. Please continue to make PRs as you feel the need. You can now make your branches directly on the repo rather than your fork if you want.
Thanks for your contributions! Much appreciated. :heart:
Thanks! Had started building a similar tool to help me do some dead code analysis and then came across this tool. Happy to be able to contribute to it
:tada: This PR is included in version 1.30.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Fixes #118
Introduces
cosmiconfig
as requested in #118 in order to support loading the config from alternative file formats like:I'm using
cosmiconfigSync
utilities instead of the async version, despite them being available since thegetConfig
is an async method. When we use the async equivalent, we hit a segfault in Node as a result ofcosmiconfig
trying to call a dynamic import on the file within a Jest context that doesn't allow it to. Patched in a recent version of Node, and once the test infra can require the latest version it should be fine to switch to the async version.See https://github.com/nodejs/node/issues/35889 and https://github.com/jestjs/jest/issues/11438
I haven't made any efforts to change the
update
function to write updates to the loaded files, as this would be difficult/impossible to update something like a .js or .yml (if using features like anchors) in a meaningful way.A few notes on the other changes included:
cosmiconfig
pulls in a newer version of TypeScript which was incompatible with the version of@types/node
we used, updated itcosmiconfig
tries to read and parse the JSON. Updated it to be valid to fulfill the spirit of the test.