find-cypress-specs 1.29.0 → 1.29.2

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 (2) hide show
  1. package/package.json +3 -2
  2. package/src/index.js +16 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "find-cypress-specs",
3
- "version": "1.29.0",
3
+ "version": "1.29.2",
4
4
  "description": "Find Cypress spec files using the config settings",
5
5
  "main": "src",
6
6
  "files": [
@@ -12,6 +12,7 @@
12
12
  },
13
13
  "scripts": {
14
14
  "test": "ava",
15
+ "prod-deps": "npm audit --report --omit dev",
15
16
  "cy:run": "DEBUG=cypress:cli,cypress:server:specs cypress run",
16
17
  "demo": "DEBUG=find-cypress-specs node ./bin/find",
17
18
  "demo-names": "DEBUG=find-cypress-specs node ./bin/find --names",
@@ -63,7 +64,7 @@
63
64
  "globby": "^11.0.4",
64
65
  "minimatch": "^3.0.4",
65
66
  "pluralize": "^8.0.0",
66
- "require-and-forget": "^1.0.0",
67
+ "require-and-forget": "^1.0.1",
67
68
  "shelljs": "^0.8.5",
68
69
  "spec-change": "^1.6.0",
69
70
  "ts-node": "^10.9.1"
package/src/index.js CHANGED
@@ -145,6 +145,7 @@ function findCypressSpecsV10(opts = {}, type = 'e2e') {
145
145
 
146
146
  debug('options v10 %o', options)
147
147
 
148
+ /** @type string[] */
148
149
  const files = globby.sync(options.specPattern, {
149
150
  sort: true,
150
151
  ignore: options.excludeSpecPattern,
@@ -208,10 +209,23 @@ function getSpecs(options, type) {
208
209
  }
209
210
 
210
211
  function findCypressSpecs(options, type = 'e2e') {
211
- debug('finding specs of type %s', type)
212
+ debug(
213
+ 'finding specs of type %s for Cypress version %s',
214
+ type,
215
+ options.version,
216
+ )
217
+
218
+ if (typeof options.version !== 'string') {
219
+ if ('integrationFolder' in options) {
220
+ options.version = '9.0.0'
221
+ } else {
222
+ options.version = '10.0.0'
223
+ }
224
+ }
225
+ const [major] = options.version.split('.').map(Number)
212
226
 
213
227
  if (type === 'e2e') {
214
- if (options.e2e) {
228
+ if (major >= 10) {
215
229
  debug('config has "e2e" property, treating as Cypress v10+')
216
230
  const specs = findCypressSpecsV10(options, type)
217
231
  return specs