* Bump required node version of cli to 8.0.0+ * Bump chalk to 3.0.0 - previously required Node 8 support * bump debug to 4.1.1 - Drops Node 4 support, adds Node 10 support - They mentioned no breaking changes, so we’ll see. * bump is-ci to 2.0.0 - removes Node end of lives - supports more CIs for detection * bump is-installed-globally - drops support for Node 6 + improvements on detection * bump log-symbols dep - requires Node 8 * bump supports-color - Requires Node 8 * bump untildify - require Node 8 * bump commander to 4.0.1 - require Node 8 - may break some snapshots - they changed some quotes like 'this' instead of `this' * bump execa to 3.3.0 - removes Node 6 support - some breaking changes, but I didn’t find us using any of them on first pass. * bump cachedir * bump fs-extra Drops various node version support including 6 * bump bluebird * bump ramda
CLI
The CLI is used to build the cypress npm module to be run within a terminal.
The CLI has the following responsibilities:
- Allow users to print CLI commands
- Allow users to install the Cypress executable
- Allow users to print their current Cypress version
- Allow users to run Cypress tests from the terminal
- Allow users to open Cypress in the interactive Test Runner.
- Allow users to verify that Cypress is installed correctly and executable
- Allow users to manages the Cypress binary cache
- Allow users to pass in options that change way tests are ran or recorded (browsers used, specfiles ran, grouping, parallelization)
Installing
The CLI's dependencies can be installed with:
cd cli
npm install
Building
See scripts/build.js. Note that the built npm package will include NPM_README.md as its public README file.
Testing
Automated
You can run unit tests with:
npm test
This will take and compare snapshots of the CLI output. To update snapshots, see snap-shot-it instructions: https://github.com/bahmutov/snap-shot-it#advanced-use
Manual
To build and test an NPM package:
npm installnpm run build
This creates build folder.
cd build; npm pack
This creates an archive, usually named cypress-<version>.tgz. You can install this archive from other projects, but because there is no corresponding binary yet (probably), skip binary download. For example from inside cypress-example-kitchensink folder
npm i ~/{your-dirs}/cypress/cli/build/cypress-3.3.1.tgz --ignore-scripts
Which installs the tgz file we have just built from folder Users/jane-lane/{your-dirs}/cypress/cli/build.