Refactor CDS extractor for compatibility with upgraded CodeQL v2.23.5
#254
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Primary Changes in this PR
v2.23.5and update associated qlpack dependencies.cds-extractor-marker.jsfile with dummy/placeholder content of a given/scannedSOURCE_ROOTdirectory, which is a workaround for a change in CodeQL'sjavascriptextractor behavior (starting inv2.23.5).Outline of Changes in this PR
Extraction flow and error handling improvements:
cds-extractor.tsto use new utility functions (handleEarlyExitandrunJavaScriptExtractionWithMarker) for early exit scenarios and JavaScript extraction, resulting in cleaner code and more consistent error handling. [1] [2] [3]Code organization and reuse:
codeql.tsfor running JavaScript extraction with marker file handling and for handling early exit scenarios, promoting code reuse and reducing duplication.cds-extractor.tsto reflect the new utility functions and streamline the script.Dependency and compatibility updates:
package.jsonto their latest versions, improving compatibility and security.spawnSyncincompiler/version.tsandcodeql.tsto avoid Node.js deprecation warnings and ensure proper command execution. [1] [2][1] [2] [3] [4] [5] [6] [7]