find-cypress-specs 1.11.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +11 -1
  2. package/bin/find.js +6 -1
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # find-cypress-specs [![renovate-app badge][renovate-badge]][renovate-app] ![cypress version](https://img.shields.io/badge/cypress-9.2.0-brightgreen) [![ci](https://github.com/bahmutov/find-cypress-specs/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/bahmutov/find-cypress-specs/actions/workflows/ci.yml)
1
+ # find-cypress-specs [![renovate-app badge][renovate-badge]][renovate-app] ![cypress version](https://img.shields.io/badge/cypress-9.4.1-brightgreen) [![ci](https://github.com/bahmutov/find-cypress-specs/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/bahmutov/find-cypress-specs/actions/workflows/ci.yml)
2
2
 
3
3
  > Find Cypress spec files using the config settings
4
4
 
@@ -17,6 +17,16 @@ $ npx find-cypress-specs --branch main
17
17
  # prints only some specs, the ones that have changed against the "origin/main"
18
18
  ```
19
19
 
20
+ ### number of changed files
21
+
22
+ You can print just the number of changed specs
23
+
24
+ ```bash
25
+ $ npx find-cypress-specs --branch main --count
26
+ # prints the number of spec files changed against the branch "origin/main"
27
+ 5
28
+ ```
29
+
20
30
  ## Test names
21
31
 
22
32
  You can print each spec file with the suite and test names inside of it (found using [find-test-names](https://github.com/bahmutov/find-test-names))
package/bin/find.js CHANGED
@@ -15,6 +15,7 @@ const args = arg({
15
15
  '--json': Boolean,
16
16
  // find the specs that have changed against this Git branch
17
17
  '--branch': String,
18
+ '--count': Number,
18
19
 
19
20
  // aliases
20
21
  '-n': '--names',
@@ -126,7 +127,11 @@ if (args['--names'] || args['--tags']) {
126
127
  const changedFiles = findChangedFiles(args['--branch'])
127
128
  debug('changed files %o', changedFiles)
128
129
  const changedSpecs = specs.filter((file) => changedFiles.includes(file))
129
- console.log(changedSpecs.join(','))
130
+ if (args['--count']) {
131
+ console.log(changedSpecs.length)
132
+ } else {
133
+ console.log(changedSpecs.join(','))
134
+ }
130
135
  } else {
131
136
  console.log(specs.join(','))
132
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "find-cypress-specs",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "description": "Find Cypress spec files using the config settings",
5
5
  "main": "src",
6
6
  "files": [
@@ -38,10 +38,10 @@
38
38
  "homepage": "https://github.com/bahmutov/find-cypress-specs#readme",
39
39
  "devDependencies": {
40
40
  "ava": "^4.0.0",
41
- "cypress": "^9.2.0",
41
+ "cypress": "9.4.1",
42
42
  "execa-wrap": "^1.4.0",
43
43
  "prettier": "^2.5.1",
44
- "semantic-release": "^18.0.1"
44
+ "semantic-release": "19.0.2"
45
45
  },
46
46
  "dependencies": {
47
47
  "arg": "^5.0.1",