From 161ee0503664262977358705f34d780efa7cb5b8 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Tue, 11 Jul 2023 20:10:31 -0400 Subject: [PATCH 1/2] Changes to mimic yaml on Cypress public repo (#671) --- .github/workflows/snyk_sca_scan.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/snyk_sca_scan.yaml b/.github/workflows/snyk_sca_scan.yaml index 25e77d94b..eb88f1847 100644 --- a/.github/workflows/snyk_sca_scan.yaml +++ b/.github/workflows/snyk_sca_scan.yaml @@ -18,8 +18,8 @@ jobs: with: node-version: ${{ matrix.node-version }} - name: Run Snyk to check for opensource vulnerabilities - uses: snyk/actions/node@master + uses: snyk/actions/setup@master + run: | + snyk test --all-projects --strict-out-of-sync=false --detection-depth=6 --exclude=docker,Dockerfile --severity-threshold=critical env: SNYK_TOKEN: ${{ secrets.SNYK_API_TOKEN }} - with: - args: --all-projects --strict-out-of-sync=false --detection-depth=6 --exclude=docker,Dockerfile --severity-threshold=critical \ No newline at end of file From 8015401a87ece5bd900481a2aa017a2c876d8d20 Mon Sep 17 00:00:00 2001 From: Charles Stover Date: Tue, 11 Jul 2023 17:53:47 -0700 Subject: [PATCH 2/2] feat: support CJS configs in ES packages (#553) Co-authored-by: Lachlan Miller --- task-utils.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/task-utils.js b/task-utils.js index cd4360c16..7e39cfdef 100644 --- a/task-utils.js +++ b/task-utils.js @@ -62,6 +62,16 @@ function readNycOptions(workingDirectory) { } } + const nycConfigCommonJsFilename = join(workingDirectory, 'nyc.config.cjs') + let nycConfigCommonJs = {} + if (existsSync(nycConfigCommonJsFilename)) { + try { + nycConfigCommonJs = require(nycConfigCommonJsFilename) + } catch (error) { + throw new Error(`Failed to load nyc.config.cjs: ${error.message}`) + } + } + const nycOptions = combineNycOptions( defaultNycOptions, nycrc, @@ -69,6 +79,7 @@ function readNycOptions(workingDirectory) { nycrcYaml, nycrcYml, nycConfig, + nycConfigCommonJs, pkgNycOptions ) debug('combined NYC options %o', nycOptions)