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@25 update in devDependencies #240

Closed
wants to merge 3 commits into from
Closed

jest@25 update in devDependencies #240

wants to merge 3 commits into from

Conversation

brodycj
Copy link
Owner

@brodycj brodycj commented Feb 12, 2020

removes the transitive handlebars dependency that has security update proposed in PR #235

TODO items:

  • drop Node.js 8 support first
  • Stryker needs to be fixed to work correctly with jest@25 (see below)
  • there seem to be more @babel dependencies in yarn.lock, some older @babel dependency versions seem to be not superseded for some reason

Here is the crash report from Stryker:

09:24:09 (90055) ERROR InitialTestExecutor One or more tests resulted in an error:
	Test runner crashed. Tried twice to restart it without any luck. Last time the error message was: Error: TypeError: Cannot read property 'runCLI' of undefined
TypeError: Cannot read property 'runCLI' of undefined
    at JestPromiseTestAdapter.run (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/jest-runner/src/jestTestAdapters/JestPromiseTestAdapter.js:17:31)
    at JestTestRunner.run (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/jest-runner/src/JestTestRunner.js:43:56)
    at ChildProcessTestRunnerWorker.run (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/core/src/test-runner/ChildProcessTestRunnerWorker.js:24:56)
    at ChildProcessProxyWorker.doCall (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/core/src/child-proxy/ChildProcessProxyWorker.js:74:56)
    at Promise.then.send.correlationId (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/core/src/child-proxy/ChildProcessProxyWorker.js:46:53)
    at new Promise (<anonymous>)
    at ChildProcessProxyWorker.handleMessage (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/core/src/child-proxy/ChildProcessProxyWorker.js:46:17)
    at process.emit (events.js:223:5)
    at emit (internal/child_process.js:876:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
Error: TypeError: Cannot read property 'runCLI' of undefined
TypeError: Cannot read property 'runCLI' of undefined
    at JestPromiseTestAdapter.run (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/jest-runner/src/jestTestAdapters/JestPromiseTestAdapter.js:17:31)
    at JestTestRunner.run (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/jest-runner/src/JestTestRunner.js:43:56)
    at ChildProcessTestRunnerWorker.run (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/core/src/test-runner/ChildProcessTestRunnerWorker.js:24:56)
    at ChildProcessProxyWorker.doCall (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/core/src/child-proxy/ChildProcessProxyWorker.js:74:56)
    at Promise.then.send.correlationId (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/core/src/child-proxy/ChildProcessProxyWorker.js:46:53)
    at new Promise (<anonymous>)
    at ChildProcessProxyWorker.handleMessage (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/core/src/child-proxy/ChildProcessProxyWorker.js:46:17)
    at process.emit (events.js:223:5)
    at emit (internal/child_process.js:876:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
    at ChildProcess.<anonymous> (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/core/src/child-proxy/ChildProcessProxy.js:133:68)
    at ChildProcess.emit (events.js:223:5)
    at emit (internal/child_process.js:876:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
09:24:09 (90055) ERROR StrykerCli an error occurred Error: Something went wrong in the initial test run
    at InitialTestExecutor.validateResult (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/core/src/process/InitialTestExecutor.js:86:15)
    at InitialTestExecutor.run (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/core/src/process/InitialTestExecutor.js:41:14)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at async Stryker.runMutationTest (/Users/brodybits/dev/create-react-native-module/node_modules/@stryker-mutator/core/src/Stryker.js:56:38)
09:24:09 (90055) INFO StrykerCli Trouble figuring out what went wrong? Try `npx stryker run --fileLogLevel trace --logLevel debug` to get some more info.
error Command failed with signal "SIGINT".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Stryker 2.5.0 updates do not seem to resolve this crash.

@brodycj brodycj self-assigned this Feb 12, 2020
package.json Outdated
@@ -61,7 +61,7 @@
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"jest": "^24.9.0",
"jest": "25",
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"jest": "25",
"jest": "^25.1.0",

(and update yarn.lock)

which would be done by using yarn add --dev jest@latest instead of yarn add --dev jest@25

Copy link
Owner Author

@brodycj brodycj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for a solution to stryker-mutator/stryker-js#1983 (my bad for raising the duplicate bug report on Stryker).

brodycj pushed a commit that referenced this pull request Feb 12, 2020
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.2 to 4.7.3. **This update includes a security fix.**
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](handlebars-lang/handlebars.js@v4.1.2...v4.7.3)

NOTES from @brodybits:

This is a workaround solution until this project is ready to use Jest 25 as proposed in PR #240.

This seems to be the equivalent to adding Yarn resolutions as follows
(then removing after Yarn update):

diff --git a/package.json b/package.json
index 59ab6c9..5b31113 100644
--- a/package.json
+++ b/package.json
@@ -63,5 +63,9 @@
     "eslint-plugin-standard": "^4.0.1",
     "jest": "^24.9.0",
     "recursive-readdir": "^2.2.2"
+  },
+  "resolutions": {
+    "handlebars": "4.7.3",
+    "uglify-js": "^3.7.7"
   }
 }

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: @brodybits (Christopher J. Brody) <chris.brody+brodybits@gmail.com>
@brodycj
Copy link
Owner Author

brodycj commented Apr 2, 2020

done in 8c34628

@brodycj brodycj closed this Apr 2, 2020
@brodycj brodycj deleted the jest-25-update branch April 2, 2020 03:26
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.

1 participant