Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cy2

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cy2 - npm Package Compare versions

Comparing version 1.3.0 to 2.0.0-beta.0

dist/__tests__/discovery.spec.js

13

CHANGELOG.md

@@ -0,1 +1,14 @@

# [2.0.0-beta.0](https://github.com/sorry-cypress/cy2/compare/v1.3.0...v2.0.0-beta.0) (2021-09-12)
### Features
* add more discovery strategies ([f3d3b09](https://github.com/sorry-cypress/cy2/commit/f3d3b09e001578e768f7f1aac8932d57427e05c8))
* use CYPRESS_PACKAGE_CONFIG_PATH ([743a892](https://github.com/sorry-cypress/cy2/commit/743a892662aa9586ee52df2cdb6eee6479abdd7e))
### BREAKING CHANGES
* bumping major for safe release, no API changes
# [1.3.0](https://github.com/sorry-cypress/cy2/compare/v1.2.1...v1.3.0) (2021-09-08)

@@ -2,0 +15,0 @@

52

package.json
{
"name": "cy2",
"version": "1.3.0",
"main": "index.js",
"version": "2.0.0-beta.0",
"author": "Andrew Goldis",
"main": "./dist",
"typings": "./dist",
"license": "MIT",

@@ -12,4 +13,11 @@ "repository": {

"scripts": {
"test": "jest ./__tests__/*.test.js",
"release": "release-it"
"build": "run-s tsc swc",
"dev": "run-p watch:*",
"test": "jest",
"tsc": "tsc",
"swc": "swc src -d dist",
"watch:tsc": "run-s \"tsc --watch --preserveWatchOutput\"",
"watch:swc": "run-s \"swc --watch\"",
"release": "release-it",
"clean": "rimraf dist"
},

@@ -23,4 +31,3 @@ "dependencies": {

"bin/*",
"lib/*",
"index.js"
"dist/*"
],

@@ -40,6 +47,20 @@ "bin": {

"devDependencies": {
"@release-it/conventional-changelog": "^2.0.1",
"@release-it/conventional-changelog": "^3.3.0",
"@swc/cli": "^0.1.49",
"@swc/core": "^1.2.85",
"@swc/jest": "^0.2.3",
"@types/debug": "^4.1.7",
"@types/jest": "^27.0.1",
"@types/js-yaml": "^4.0.3",
"@types/node": "^16.9.1",
"@types/npm-which": "^3.0.1",
"chokidar": "^3.5.2",
"esbuild": "^0.12.26",
"jest": "^26.6.3",
"release-it": "^14.6.2",
"shelljs": "^0.8.4"
"nanoid": "^3.1.25",
"npm-run-all": "^4.1.5",
"release-it": "^14.11.5",
"rimraf": "^3.0.2",
"shelljs": "^0.8.4",
"typescript": "^4.4.2"
},

@@ -58,4 +79,17 @@ "release-it": {

}
},
"hooks": {
"before:init": "run-s clean build"
}
},
"jest": {
"transform": {
"^.+\\.(t|j)sx?$": [
"@swc/jest"
]
},
"testMatch": [
"**/*.spec.ts"
]
}
}

55

README.md

@@ -16,5 +16,6 @@ # cy2

Use `http://localhost:1234` as Cypress API URL:
```sh
CYPRESS_API_URL="http://localhost:1234/" cy2 open
CYPRESS_API_URL="http://localhost:1234/" cy2 run --parallel --record --key somekey --ci-build-id hello-cypress
```

@@ -25,23 +26,26 @@

```sh
CYPRESS_API_URL="https://sorry-cypress.domain.com" cy2 run --parallel --record --key somekey --ci-build-id hello-cypress
CYPRESS_API_URL="https://sorry-cypress-demo-director.herokuapp.com" cy2 run --parallel --record --key somekey --ci-build-id hello-cypress
```
When `CYPRESS_API_URL` is not available, it just uses the default API server.
When `CYPRESS_API_URL` is not set, it just uses the default API server `https://api.cypress.io`
## API
Patch `cypress` package
### Patch Cypress
```ts
patch(apiURL: string) => Promise<void>
/**
* Patch Cypress with a custom API URL.
*
* Tries to discover the location of `app.yml`
* and patch it with a custom URL.
*
* @param {string} apiURL - new API URL to use
* @param {string} [cypressConfigFilePath] - explicitly provide the path to Cypress app.yml and disable auto-discovery
*/
patch(apiURL: string, cypressConfigPath?: string) => Promise<void>
```
Patch and run `cypress`
Example
```ts
run(apiURL?: string = 'https://yourserver.io/'), label?: string = 'cy2')=> Promise<void>
```
### Examples
```js

@@ -57,2 +61,13 @@ const { patch } = require('cy2');

### Patch and run cypress
```ts
/**
* Run Cypress programmatically as a child process
*/
run(apiURL?: string = 'https://api.cypress.io/'), label?: string = 'cy2')=> Promise<void>
```
Example
```js

@@ -82,1 +97,15 @@ #!/usr/bin/env node

```
## Explicit config file location (since 1.4.0)
Sometimes `cy2` is not able to automatically detect the location of cypress package on your system. In that case you should explicitly provide environment variable `CYPRESS_PACKAGE_CONFIG_PATH` with the location of cypress's `app.yml` configuration file.
Example:
```sh
CYPRESS_API_URL="http://localhost:1234/" \
CYPRESS_PACKAGE_CONFIG_PATH="/Users/John/Cypress/8.3.0/Cypress.app/Contents/Resources/app/packages/server/config/app.yml" \
npx cy2 run --parallel --record --key somekey --ci-build-id hello-cypress
```
See [cypress agent configuration](https://docs.sorry-cypress.dev/cypress-agent/configuring-cypress-agent) for locating `app.yml` file on your system.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc