Skip to content

Commit 6081751

Browse files
fix: change how tsconfig is aliased in webpack-batteries-included-preprocessor (#27706)
* chore: change how tsconfig is aliased in webpack-batteries-included-preprocessor * use --target-reference so snyk analyzes current branch * fix missing space * use pull_request instead of pull_request_target for snyk actions
1 parent cee7dfc commit 6081751

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

.github/workflows/snyk_sca_scan.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: Snyk Software Composition Analysis Scan
2-
# This git workflow leverages Snyk actions to perform a Software Composition
2+
# This git workflow leverages Snyk actions to perform a Software Composition
33
# Analysis scan on our Opensource libraries upon Pull Requests to the
4-
# "develop" branch. We use this as a control to prevent vulnerable packages
5-
# from being introduced into the codebase.
4+
# "develop" branch. We use this as a control to prevent vulnerable packages
5+
# from being introduced into the codebase.
66
# Enhancements were made to this action to build the yarn packages to reduce
7-
# Snyk scan errors that were complaining about the yarn.locks etc. Also
7+
# Snyk scan errors that were complaining about the yarn.locks etc. Also
88
# implemented PAT token for actions to resolve an issue with the action not
99
# running and reporting back to the PR status checks
1010
on:
11-
pull_request_target:
12-
branches:
11+
pull_request:
12+
branches:
1313
- develop
1414
jobs:
1515
Snyk_SCA_Scan:

.github/workflows/snyk_static_analysis_scan.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: Snyk Static Analysis Scan
2-
# This git workflow leverages Snyk actions to perform a Static Application
2+
# This git workflow leverages Snyk actions to perform a Static Application
33
# Testing scan (SAST) on our first-party code upon Pull Requests to the
4-
# "develop" branch. We use this as a control to prevent vulnerabilities
5-
# from being introduced into the codebase.
4+
# "develop" branch. We use this as a control to prevent vulnerabilities
5+
# from being introduced into the codebase.
66
on:
7-
pull_request_target:
8-
branches:
7+
pull_request:
8+
branches:
99
- develop
1010
jobs:
1111
Snyk_SAST_Scan :

npm/webpack-batteries-included-preprocessor/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const addTypeScriptConfig = (file, options) => {
2727

2828
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin')
2929
// node will try to load a projects tsconfig.json instead of the node
30-
// package using require('tsconfig'), so we alias it as 'tsconfig-package'
31-
const configFile = require('tsconfig-package').findSync(path.dirname(file.filePath))
30+
// package using require('tsconfig'), so we alias it as 'tsconfig-aliased-for-wbip'
31+
const configFile = require('tsconfig-aliased-for-wbip').findSync(path.dirname(file.filePath))
3232

3333
webpackOptions.module.rules.push({
3434
test: /\.tsx?$/,

npm/webpack-batteries-included-preprocessor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"stream-http": "^3.2.0",
3838
"timers-browserify": "^2.0.12",
3939
"ts-loader": "9.4.4",
40-
"tsconfig-package": "npm:tsconfig@^7.0.0",
40+
"tsconfig-aliased-for-wbip": "npm:tsconfig@^7.0.0",
4141
"tsconfig-paths-webpack-plugin": "^3.5.2",
4242
"tty-browserify": "^0.0.1",
4343
"url": "^0.11.1",

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28692,7 +28692,7 @@ ts-pnp@^1.1.6:
2869228692
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.1.6.tgz#389a24396d425a0d3162e96d2b4638900fdc289a"
2869328693
integrity sha512-CrG5GqAAzMT7144Cl+UIFP7mz/iIhiy+xQ6GGcnjTezhALT02uPMRw7tgDSESgB5MsfKt55+GPWw4ir1kVtMIQ==
2869428694

28695-
"tsconfig-package@npm:tsconfig@^7.0.0":
28695+
"tsconfig-aliased-for-wbip@npm:tsconfig@^7.0.0":
2869628696
version "7.0.0"
2869728697
resolved "https://registry.yarnpkg.com/tsconfig/-/tsconfig-7.0.0.tgz#84538875a4dc216e5c4a5432b3a4dec3d54e91b7"
2869828698
integrity sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==

0 commit comments

Comments
 (0)