Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/remove-cap-root-dir-convention-warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@salesforce/b2c-tooling-sdk': patch
---

Remove the CAP validation warning that flagged a root directory not matching the `{id}-v{version}` naming convention. This convention is no longer required, so the check has been dropped from `b2c cap validate` (and `b2c cap install`).
8 changes: 0 additions & 8 deletions packages/b2c-tooling-sdk/src/operations/cap/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,6 @@ export async function validateCap(target: string): Promise<CapValidationResult>
if (errors.filter((e) => e.startsWith('commerce-app.json:')).length === 0) {
manifest = raw as unknown as CommerceAppManifest;
}
// Check root dir naming convention
const dirName = path.basename(capDir);
if (manifest && dirName !== '.' && dirName !== tempDir) {
const expectedName = `${manifest.id}-v${manifest.version}`;
if (dirName !== expectedName) {
warnings.push(`Root directory "${dirName}" does not match expected convention "${expectedName}"`);
}
}
} catch {
errors.push('commerce-app.json: file exists but is not valid JSON');
}
Expand Down
Loading