Skip to content

Commit aa2fee6

Browse files
authored
Fix CDS extractor for cds-indexer private package dependency installation (#359)
* Fix CDS extractor cds-indexer deps Attempt to fix the CDS extractor's support for private "cds-indexer" package installation by ensuring that the associated project's entire node_modules directory is copied instead of just the cachable subset of the CAP projects NodeJS dependencies. * CDS extractor fix dist & test * fix: CDS extractor support for Windows OS (#360) * CDS extractor windows fixes - 1 * Fix Windows ENOENT: add shell:true to npm/npx spawn calls On Windows, npm and npx are .cmd files. execFileSync('npm', ...) and spawnSync('npx', ...) fail with ENOENT because they bypass the shell and cannot resolve .cmd extensions. Adding shell: true fixes this on Windows while being a no-op on Linux/macOS. Affected files: - cacheInstaller.ts: execFileSync('npm', ['install', ...]) - projectInstaller.ts: execFileSync('npm', ['install', ...]) - indexer.ts: spawnSync('npx', ['--yes', ...]) * Fix Windows: shell:true for npx spawn, posix paths in LGTM_INDEX_FILTERS - compile.ts: change shell:false to shell:true so npx (a .cmd on Windows) can be resolved during CDS compilation - environment.ts: use explicit forward-slash paths ('exclude:**/*.*') instead of join() which produces backslashes on Windows, causing 'Illegal use of **' errors in the JS extractor * Address review feedback for PR #359 (#361)
1 parent df30a28 commit aa2fee6

16 files changed

Lines changed: 6095 additions & 5875 deletions

extractors/cds/tools/cds-extractor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ try {
115115
new Set([
116116
...globSync(join(sourceRoot, '**/*.cds'), {
117117
ignore: ['**/node_modules/**', '**/.git/**'],
118+
windowsPathsNoEscape: true,
118119
}),
119120
]),
120121
);

0 commit comments

Comments
 (0)