Skip to content

Commit

Permalink
feat: allow $schema prop on scratch org def (#1124)
Browse files Browse the repository at this point in the history
* feat(generateScratchOrgInfo): allow shema key

* test(generateScratchOrgInfo): add unit test on $schema key removal from ScratchOrgInfo json

* test: reorganize ut

---------

Co-authored-by: Alan Jaouen <[email protected]>
Co-authored-by: Alan Jaouen <[email protected]>
  • Loading branch information
3 people authored Aug 8, 2024
1 parent e8b0980 commit bbf56f0
Show file tree
Hide file tree
Showing 2 changed files with 213 additions and 188 deletions.
2 changes: 2 additions & 0 deletions src/org/scratchOrgInfoGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ const parseDefinitionFile = async (definitionFile: string): Promise<Record<strin
try {
const fileData = await fs.readFile(definitionFile, 'utf8');
const defFileContents = parseJson(fileData) as Record<string, unknown>;
// remove key '$schema' from the definition file
delete defFileContents['$schema'];
return defFileContents;
} catch (err) {
const error = err as Error;
Expand Down
Loading

0 comments on commit bbf56f0

Please sign in to comment.