File tree Expand file tree Collapse file tree 3 files changed +29
-29
lines changed Expand file tree Collapse file tree 3 files changed +29
-29
lines changed Original file line number Diff line number Diff line change @@ -1131,6 +1131,7 @@ async function ready (options: ReadyOptions) {
11311131 socketId,
11321132 parallel,
11331133 onError,
1134+ // @ts -expect-error - browser is not typed correctly
11341135 browser,
11351136 project,
11361137 runUrl,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import debugModule from 'debug'
2+ const debug = debugModule ( 'cypress:server:plugins' )
3+
4+ /**
5+ * Resolves the path to 'typescript' module.
6+ *
7+ * @param {projectRoot } path to the project root
8+ * @returns {string|null } path if typescript exists, otherwise null
9+ */
10+ export const typescript = ( projectRoot ) => {
11+ if ( process . env [ 'CYPRESS_INTERNAL_NO_TYPESCRIPT' ] === '1' || ! projectRoot ) {
12+ return null
13+ }
14+
15+ try {
16+ debug ( 'resolving typescript with projectRoot %o' , projectRoot )
17+
18+ const resolved = require . resolve ( 'typescript' , { paths : [ projectRoot ] } )
19+
20+ debug ( 'resolved typescript %s' , resolved )
21+
22+ return resolved
23+ } catch ( e ) {
24+ debug ( 'could not resolve typescript, error: %s' , e . message )
25+
26+ return null
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments