-
Notifications
You must be signed in to change notification settings - Fork 21
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
Bumped jest-config version to fix vulnerabilities #12
Bumped jest-config version to fix vulnerabilities #12
Conversation
Thank you for the PR! |
Oh, really? That's not supposed to happen - EDIT: jsdom/cssstyle#95 (comment) You can probably do some lockfile trickery to keep a version of The semver range didn't change, so just reverting the changes to |
Since (according to jest's changelog) [email protected] only introduced one fix, are there any objections against merging? |
hmm... remember we were talking about removing |
Lol. I'm trying fix an issue in It depends on whether you'd consider this functionality a core part of the API that you are providing as a support library to editor plugins. I'm happy if you want to remove, I'll just copy the code into that repository (or find another way to solve the problem). |
I see... wasn't aware there is any library depends on @stephtr I have no objection with the merge. |
What about removing the default values of @rossknudsen Would that be fine for you? |
@stephtr that sounds like a really good idea. The default values are probably not what I want and the actual values configured are. What would happen if the user didn't configure either |
@rossknudsen it should work since it does However (while clever) that's pretty hacky. Feel free to open up an issue with Jest asking for a |
I just ran {
// ...
"testMatch": [
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[tj]s?(x)"
],
"testRegex": [],
// ...
} Which should be reasonable and when I specify either value, the other one is defaulted to an empty array. However, at the moment, the callback passed to |
I would be in favor of dropping. We only import it for two default values of jest, which often don't represent the actual environment. All for the price of significantly increasing the amount of (unnecessary) dependencies. @rossknudsen: I just tested it, the following sample works for me (in an empty folder where
|
I meant you'd do |
@stephtr thanks heaps for the code sample. It does seem to work mostly for me too. Except if I create a // jest.config.js
module.exports = {
testMatch: [
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[tj]s?(x)",
"**/bogus.js"
]
}; Running on the command line displays the extra entry I added to the array but when I run the code sample, I only get the default config. Even if I add the const { Settings, ProjectWorkspace } = require("jest-editor-support");
const workspace = new ProjectWorkspace(
".",
"node_modules/.bin/jest.cmd",
"./jest.config.js"
);
const settings = new Settings(workspace);
settings.getConfig(() => {
console.log(settings.settings.testMatch);
}); Output: |
Oh sorry, I was blinded by the output. On Windows you have to use backslashes for the path, with them instead of the slashes it is working correctly. |
Nice, thanks for that. Would be good if both path separators were handled, maybe a future PR. I think I've solved the issues I had and based on the discussion here and in #14, I think I'll close this in favor of that PR. |
Lots of vulnerabilities observed using
yarn audit
. Bumping the version ofjest-config
seems to fix the issues.