-
Notifications
You must be signed in to change notification settings - Fork 39
Feat: Enhanced TS support for browserstack-cypress-cli #982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Feat: Enhanced TS support for browserstack-cypress-cli #982
Conversation
@@ -13,6 +13,68 @@ | |||
return constants.CYPRESS_V10_AND_ABOVE_CONFIG_FILE_EXTENSIONS.includes(extension) ? extension : 'js' | |||
} | |||
|
|||
function generateTscCommandAndTempTsConfig(bsConfig, bstack_node_modules_path, complied_js_dir, cypress_config_filepath) { | |||
const working_dir = path.dirname(cypress_config_filepath); | |||
const typescript_path = path.join(bstack_node_modules_path, 'typescript', 'bin', 'tsc'); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal Warning
function generateTscCommandAndTempTsConfig(bsConfig, bstack_node_modules_path, complied_js_dir, cypress_config_filepath) { | ||
const working_dir = path.dirname(cypress_config_filepath); | ||
const typescript_path = path.join(bstack_node_modules_path, 'typescript', 'bin', 'tsc'); | ||
const tsc_alias_path = path.join(bstack_node_modules_path, 'tsc-alias', 'dist', 'bin', 'index.js'); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal Warning
} | ||
|
||
// Write the temporary tsconfig | ||
const tempTsConfigPath = path.join(working_dir, 'tsconfig.singlefile.tmp.json'); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal Warning
logger.debug(`Running: ${tsc_command}`) | ||
tsc_output = cp.execSync(tsc_command, { cwd: working_dir }) | ||
logger.debug(`Running: ${tscCommand}`) | ||
tsc_output = cp.execSync(tscCommand, { cwd: working_dir }) |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-child-process.detect-child-process Error
logger.debug(`Running: ${tsc_command}`) | ||
tsc_output = cp.execSync(tsc_command, { cwd: working_dir }) | ||
logger.debug(`Running: ${tscCommand}`) | ||
tsc_output = cp.execSync(tscCommand, { cwd: working_dir }) |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-child-process.detect-child-process Error
logger.debug(`Running: ${tsc_command}`) | ||
tsc_output = cp.execSync(tsc_command, { cwd: working_dir }) | ||
logger.debug(`Running: ${tscCommand}`) | ||
tsc_output = cp.execSync(tscCommand, { cwd: working_dir }) |
Check failure
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.detect-child-process.detect-child-process Error
…r need to install
No description provided.