Skip to content

Commit c8e0b60

Browse files
authored
fix(cap): remove root directory naming convention validation warning (#470)
1 parent e6f41b0 commit c8e0b60

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@salesforce/b2c-tooling-sdk': patch
3+
---
4+
5+
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`).

packages/b2c-tooling-sdk/src/operations/cap/validate.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,6 @@ export async function validateCap(target: string): Promise<CapValidationResult>
116116
if (errors.filter((e) => e.startsWith('commerce-app.json:')).length === 0) {
117117
manifest = raw as unknown as CommerceAppManifest;
118118
}
119-
// Check root dir naming convention
120-
const dirName = path.basename(capDir);
121-
if (manifest && dirName !== '.' && dirName !== tempDir) {
122-
const expectedName = `${manifest.id}-v${manifest.version}`;
123-
if (dirName !== expectedName) {
124-
warnings.push(`Root directory "${dirName}" does not match expected convention "${expectedName}"`);
125-
}
126-
}
127119
} catch {
128120
errors.push('commerce-app.json: file exists but is not valid JSON');
129121
}

0 commit comments

Comments
 (0)