Skip to content

Conversation

@henrymercer
Copy link
Contributor

@henrymercer henrymercer commented Apr 23, 2021

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 PR 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.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • @github/docs-content-codeql has been cc'd in all issues for UI or other user-facing changes made by this pull request.

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.
@henrymercer henrymercer requested a review from alexet April 23, 2021 11:01
@alexet alexet merged commit fba8f51 into github:main Apr 23, 2021
@henrymercer henrymercer deleted the henrymercer/add-path-polyfill branch April 23, 2021 12:52
aofaof0907 pushed a commit to aofaof0907/vscode-codeql that referenced this pull request Jul 27, 2021
…om being loaded (github#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants