Convert to a real node_module, deprecate `cypress-cli`, and use Github Releases
See original GitHub issueIt 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:
- You would no longer have a separate
cypress install
step (that command would go away) - Versioning would be done completely by npm convention because
cypress
could be checked intopackage.json
- 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
- This removes the concept of a global Cypress install (which won’t work well when multiple projects need different Cypress version)
- CI scripts would be simplified
- We wouldn’t need to publish
cypress-cli
separately, instead this could actually be thecypress
node_module - We could further extend the CLI and enable it to be an actual requireable node_module
- 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:
- Created 7 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top GitHub Comments
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.
Fixed in
0.20.0