Comparing version 1.3.0 to 2.0.0-beta.0
@@ -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 @@ |
{ | ||
"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" | ||
] | ||
} | ||
} |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
31393
23
639
108
18
2
8
3