stryker-mutator / stryker-js

Mutation testing for JavaScript and friends
https://stryker-mutator.io
Apache License 2.0
2.59k stars 251 forks source link

Bug: Invalid regular expression #2731

Closed HonzaMac closed 2 years ago

HonzaMac commented 3 years ago

Summary

When I do installation inside company proxy via VPN, I got error after stryker init.

This can be fixed by adding module manually, but it decrease DX with stryker. We also use custom npm repository instead of generic one, so have to have turned on VPN to be able to connect to that registry (Artifactory).

(base) ➜  server git:(develop) ✗ stryker init
Stryker is currently not installed.
? Do you want to install Stryker locally? yarn

             |STRYKER|              
       ~control the mutants~        

           ..####@####..            
        .########@########.         
      .#####################.       
     #########################      
    ###########################     
    ###########################     
    @@@#####################@@@     
    ###########################     
    ###########################     
     #########################      
      '######################'      
        '########@#########'        
           ''####@####''            

Installing: yarn add @stryker-mutator/core --dev
yarn add v1.22.5
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
warning Lockfile has incorrect entry for "@types/node@^11.9.4". Ignoring it.
warning Lockfile has incorrect entry for "jest@^24.1.0". Ignoring it.
warning Lockfile has incorrect entry for "@types/node@^8.0.47". Ignoring it.
warning Lockfile has incorrect entry for "execa@^1.0.0". Ignoring it.
warning workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > jest-cucumber > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > left-pad@1.3.0: use String.prototype.padStart()
warning workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > jest-cucumber > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > @testing-library/react@11.2.3" has unmet peer dependency "react-dom@*".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > chai-enzyme@1.0.0-beta.1" has unmet peer dependency "cheerio@0.19.x || 0.20.x || 0.22.x || ^1.0.0-0".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > chai-enzyme@1.0.0-beta.1" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0-0 || ^16.0.0-0".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > enzyme-adapter-react-16@1.15.6" has unmet peer dependency "react-dom@^16.0.0-0".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > redux-devtools-extension@2.13.8" has unmet peer dependency "redux@^3.1.0 || ^4.0.0".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > ts-loader@8.0.14" has unmet peer dependency "webpack@*".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > @digitalsdlc/client > @dg/react-ui-kit@2.0.0" has incorrect peer dependency "antd@3.23.3".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > @digitalsdlc/client > react-datalist@4.0.0" has incorrect peer dependency "react@^15.0.0".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > @digitalsdlc/client > react-datalist@4.0.0" has incorrect peer dependency "react-dom@^15.0.0".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > @digitalsdlc/client > @testing-library/user-event@12.6.0" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > @digitalsdlc/client > @pmmmwh/react-refresh-webpack-plugin@0.4.2" has incorrect peer dependency "react-refresh@^0.8.3".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > @digitalsdlc/common > @pnp/sp@1.3.11" has unmet peer dependency "@pnp/common@1.3.11".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > @digitalsdlc/common > @pnp/sp@1.3.11" has unmet peer dependency "@pnp/logging@1.3.11".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > @digitalsdlc/common > @pnp/sp@1.3.11" has unmet peer dependency "@pnp/odata@1.3.11".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > @digitalsdlc/common > pdfreader@1.2.6" has unmet peer dependency "eslint-config-prettier@^6.11.0".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > @digitalsdlc/common > pdfreader@1.2.6" has unmet peer dependency "eslint-plugin-prettier@^3.1.4".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > @digitalsdlc/sharepoint-cms > @pnp/nodejs@1.3.11" has unmet peer dependency "@pnp/common@1.3.11".
warning "workspace-aggregator-d736b628-4e44-4881-977b-79aecec64ee3 > @digitalsdlc/server > keystone > react-images > react-scrolllock > react-prop-toggle@1.0.2" has incorrect peer dependency "react-dom@^16.3.0".
[5/5] 🔨  Building fresh packages...
success Saved lockfile.
success Saved 44 new dependencies.
info Direct dependencies
info All dependencies
├─ @digitalsdlc/sharepoint-cms@3.0.2
├─ @jest/source-map@24.9.0
├─ @jest/test-sequencer@24.9.0
├─ @stryker-mutator/core@4.4.1
├─ @stryker-mutator/instrumenter@4.4.1
├─ angular-html-parser@1.7.1
├─ array-equal@1.0.0
├─ chardet@0.7.0
├─ cli-width@3.0.0
├─ date-format@3.0.0
├─ detect-newline@2.1.0
├─ external-editor@3.1.0
├─ file-url@3.0.0
├─ flatted@2.0.2
├─ for-each@0.3.3
├─ get-port@5.0.0
├─ human-signals@2.1.0
├─ inquirer@7.3.3
├─ istanbul-lib-instrument@3.3.0
├─ jest-docblock@24.9.0
├─ jest-each@24.9.0
├─ jest-environment-jsdom@24.9.0
├─ jest-environment-node@24.9.0
├─ jest-leak-detector@24.9.0
├─ left-pad@1.3.0
├─ lodash.groupby@4.6.0
├─ log4js@6.2.1
├─ mutation-testing-elements@1.5.2
├─ mutation-testing-metrics@1.5.2
├─ mutation-testing-report-schema@1.5.2
├─ mute-stream@0.0.8
├─ p-finally@1.0.0
├─ p-reduce@1.0.0
├─ pn@1.1.0
├─ rfdc@1.2.0
├─ run-async@2.4.1
├─ streamroller@2.2.4
├─ strip-eof@1.0.0
├─ test-exclude@5.2.3
├─ tunnel@0.0.6
├─ typed-inject@3.0.0
├─ typed-rest-client@1.8.1
├─ underscore@1.8.3
└─ weapon-regex@0.3.0
✨  Done in 74.14s.
Stryker installation done.
Invalid regular expression: /*.mycompany.com/: Nothing to repeat

ENVIRONMENT variables for proxy:

HTTP_PROXY=http://webproxy.mycompany.com:8080
HTTPS_PROXY=http://webproxy.mycompany.com:8081
NO_PROXY=*.mycompany.com,.node.consul,.service.consul,10.0.0.0/8,127.0.0.0/8,127.0.0.1,172.16.0.0/12,192.168.0.0/16,54.40.16.0/20,localhost

Stryker config

Stryker version: 4.4.1

Config not produced at all.

Test runner config

Using jest, but I fail on initialization of configuration

Stryker environment

ENV

<empty>
+-- jest@26.6.3

Your Environment

software version(s)
node 12.18
npm 6.14..6
Operating System Mac OS X

Add stryker.log Did not generate at all.

HonzaMac commented 3 years ago

This is maybe related fix from RestClient library.

nicojs commented 3 years ago

Thanks for opening this issue and finding out the root cause. Hope they can merge in the fix quickly.

Did you manage to circumvent the issue?

HonzaMac commented 3 years ago

This may be resolved soon in this PR

HonzaMac commented 3 years ago

I think this is duplicate of issue #2258

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.