Repository navigation
fix: resolve symlinked in packageDirectory in local tracking-W-24254666 - #897
Conversation
|
I reproduced two local-source-tracking regressions against the real Dreamhouse LWC project ( The PR adapter follows every directory symlink encountered by the status walker, not only symlinks needed to reach a configured
cd dreamhouse-lwc
ln -s . force-app/source-tracking-cycle
# Run local source tracking.
rm force-app/source-tracking-cycle
The walker recursively follows the link until Node aborts the scan, preventing source tracking for the project.
cd dreamhouse-lwc
ln -s source-tracking-missing-target force-app/source-tracking-dangling
# Run local source tracking.
rm force-app/source-tracking-dangling
For a repeatable setup/cleanup, this is the complete local script I used (it is not part of this PR): import { rm, symlink } from 'node:fs/promises';
import path from 'node:path';
const packageDir = path.join(process.cwd(), 'force-app');
const scenario = process.argv[2];
const cycle = path.join(packageDir, 'source-tracking-cycle');
const dangling = path.join(packageDir, 'source-tracking-dangling');
await Promise.all([rm(cycle, { force: true }), rm(dangling, { force: true })]);
if (scenario === 'cycle') await symlink('.', cycle, 'dir');
if (scenario === 'dangling') await symlink('source-tracking-missing-target', dangling, 'file');Run it as Could we constrain directory-link following to the configured package-directory path segments, rather than overriding |
QA overviewValidated the updated implementation at
The revised path-scoped adapter preserves the intended symlinked-package-directory behavior while leaving symlinks inside a package directory untouched. That resolves both regressions from the initial global Additional verification:
Non-blocking follow-up: the |
Summary
Test plan
@W-24254666@
cli issue: forcedotcom/cli#3653