find-cypress-specs 1.38.6 → 1.40.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.
- package/bin/find.js +1 -1
- package/package.json +2 -2
- package/src/index.js +10 -1
package/bin/find.js
CHANGED
|
@@ -117,7 +117,7 @@ if (args['--test-counts']) {
|
|
|
117
117
|
const absoluteFolder = path.join(process.cwd(), args['--trace-imports'])
|
|
118
118
|
const depsOptions = {
|
|
119
119
|
folder: absoluteFolder,
|
|
120
|
-
time: args['--time-trace'],
|
|
120
|
+
time: Boolean(args['--time-trace']),
|
|
121
121
|
}
|
|
122
122
|
if (args['--cache-trace']) {
|
|
123
123
|
depsOptions.saveDepsFilename = saveDependenciesFile
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "find-cypress-specs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.40.0",
|
|
4
4
|
"description": "Find Cypress spec files using the config settings",
|
|
5
5
|
"main": "src",
|
|
6
6
|
"files": [
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"pluralize": "^8.0.0",
|
|
76
76
|
"require-and-forget": "^1.0.1",
|
|
77
77
|
"shelljs": "^0.8.5",
|
|
78
|
-
"spec-change": "^1.
|
|
78
|
+
"spec-change": "^1.9.0",
|
|
79
79
|
"ts-node": "^10.9.1"
|
|
80
80
|
}
|
|
81
81
|
}
|
package/src/index.js
CHANGED
|
@@ -37,10 +37,19 @@ function getConfigJs(filename) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function getConfigTs(filename) {
|
|
40
|
-
|
|
40
|
+
// handle ts modules without "type: module"
|
|
41
|
+
// https://github.com/bahmutov/find-cypress-specs/issues/222
|
|
42
|
+
const tsNode = require('ts-node')
|
|
43
|
+
tsNode.register({
|
|
44
|
+
transpileOnly: true,
|
|
45
|
+
compilerOptions: {
|
|
46
|
+
module: 'commonjs',
|
|
47
|
+
},
|
|
48
|
+
})
|
|
41
49
|
const configFilename = path.join(process.cwd(), filename)
|
|
42
50
|
debug('loading Cypress config from %s', configFilename)
|
|
43
51
|
const definedConfig = requireEveryTime(configFilename)
|
|
52
|
+
debug('loaded config %o', definedConfig)
|
|
44
53
|
if (definedConfig && definedConfig.default) {
|
|
45
54
|
// due to TS / ES6 module transpile we got the default export
|
|
46
55
|
debug('returning default export as config from %s', filename)
|