Skip to content

Commit fba8f51

Browse files
authored
Add polyfill for path to fix a bug that prevented the results view from being loaded (#842)
* Add a polyfill for the Node.js path module Webpack >v5 doesn't include polyfills for core modules from Node.js by default. Since we use `path` in the results table UI, we need to include our own polyfill. This commit adds `path-browserify` to the distributed extension. As future work, we could move SARIF location rendering into the core extension so we don't need to use `path.basename` in the UI. This would allow us to remove the polyfill. * Add changelog note
1 parent 31ee3cb commit fba8f51

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

extensions/ql-vscode/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [UNRELEASED]
44

5+
- Fix a bug that prevented the results view from being loaded. [#842](https://github.com/github/vscode-codeql/pull/842)
6+
57
## 1.4.6 - 21 April 2021
68

79
- Avoid showing an error popup when running a query with `@kind table` metadata. [#814](https://github.com/github/vscode-codeql/pull/814)

extensions/ql-vscode/gulpfile.ts/webpack.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const config: webpack.Configuration = {
1515
resolve: {
1616
extensions: ['.js', '.ts', '.tsx', '.json'],
1717
fallback: {
18-
path: false
18+
path: require.resolve('path-browserify')
1919
}
2020
},
2121
module: {

extensions/ql-vscode/package-lock.json

+11-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/ql-vscode/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@
853853
"js-yaml": "^3.14.0",
854854
"minimist": "~1.2.5",
855855
"node-fetch": "~2.6.0",
856+
"path-browserify": "^1.0.1",
856857
"react": "^16.8.6",
857858
"react-dom": "^16.8.6",
858859
"semver": "~7.3.2",

0 commit comments

Comments
 (0)