question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Convert to a real node_module, deprecate `cypress-cli`, and use Github Releases

See original GitHub issue

It is possible for us to no longer split up the binary from the CLI tool; thus ending the reign of npm install cypress-cli.

Instead we should just publish the cypress node_module and as part of the postinstall hook it could download the actual Cypress binary, just like how Electron works.

This would fix a few things:

  1. You would no longer have a separate cypress install step (that command would go away)
  2. Versioning would be done completely by npm convention because cypress could be checked into package.json
  3. We could enforce that all users of a project have the same cypress version, and prevent booting a project if we see the cypress version installed does not match package.json
  4. This removes the concept of a global Cypress install (which won’t work well when multiple projects need different Cypress version)
  5. CI scripts would be simplified
  6. We wouldn’t need to publish cypress-cli separately, instead this could actually be the cypress node_module
  7. We could further extend the CLI and enable it to be an actual requireable node_module
  8. We could publish binaries and do proper Github Releases.

Users could still go to Github Releases and download a tar or zip of Cypress as a standalone app outside of node_modules. They could do this to try out Cypress on non-node projects.

Considerations The biggest problem I see is that the Desktop GUI’s UI is designed to expect multiple projects, whereas this would move Cypress to be installed once per project.

Cypress also writes global app-data that is irrespective of its installed location. This means it behaves as both a locally installed application and a globally installed application. We would then have to be very careful not to have multiple versions obliterate settings or migrations. Instead these would have to co-exist together without problems.

OSX Sierra has a “translocation” feature that really screws us when applications are installed outside of /Applications. This could potentially be very problematic.

By suggesting users install Cypress via node_modules we are further excluding ourselves to development communities outside of node but because all tests in Cypress will always be written in Javascript and because we’ve baked in a lot of natural support for node_modules I don’t see this as being a problem.

This could also potentially enable us to remove the concept of in-app updates. Instead while we could notify users of updates to Cypress, the actual versioning would take place in cypress.json.

To take it one step further, we could detect how Cypress is installed and show different messages. If installed globally or via a standalone download, we could link to the Github Releases. If installed via package.json we could automatically update the version akin to npm install --save XXX.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jennifer-shehanecommented, Jul 7, 2017

The code for this is done, but this has yet to be released. We’ll update the issue and reference the changelog when it’s released.

0reactions
brian-manncommented, Sep 14, 2017

Fixed in 0.20.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Watch non-spec files for changes and reload specs #456
brian-mann mentioned this issue on Mar 13, 2017. Convert to a real node_module, deprecate cypress-cli , and use Github Releases #316.
Read more >
Releases · browserstack/browserstack-cypress-cli - GitHub
NPM package for the customers to run Cypress on Browserstack Infra - Releases · browserstack/browserstack-cypress-cli.
Read more >
Remove deprecated before:browser:launch mitigation ...
Since several major releases have passed with this deprecation in place, we should remove these mitigations and warnings from the code.
Read more >
Failure to start Cypress on a fresh install nvm #3116 - GitHub
I installed cypress given the npm installation guide using the latest Node.js and ... true 2019-05-04T11:03:42.384Z cypress:cli binaryDir is ...
Read more >
Is this action missing some required dependency for Cypress ...
If you use ubuntu-16.04 it works. (Did github recently change the latest to use 18.04?) 1
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found