chore: it's safe by default now, so we can remove the nesting
This commit is contained in:
@@ -303,7 +303,7 @@ describe('helpers', () => {
|
||||
const updatedMkdocsYml = await fs.readFile('/mkdocs.yml');
|
||||
|
||||
expect(updatedMkdocsYml.toString()).toContain(
|
||||
"repo_url: 'https://github.com/backstage/backstage'",
|
||||
'repo_url: https://github.com/backstage/backstage',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -322,10 +322,10 @@ describe('helpers', () => {
|
||||
const updatedMkdocsYml = await fs.readFile('/mkdocs_with_repo_url.yml');
|
||||
|
||||
expect(updatedMkdocsYml.toString()).toContain(
|
||||
"repo_url: 'https://github.com/backstage/backstage'",
|
||||
'repo_url: https://github.com/backstage/backstage',
|
||||
);
|
||||
expect(updatedMkdocsYml.toString()).not.toContain(
|
||||
"repo_url: 'https://github.com/neworg/newrepo'",
|
||||
'repo_url: https://github.com/neworg/newrepo',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -267,7 +267,7 @@ export const patchMkdocsYmlPreBuild = async (
|
||||
}
|
||||
|
||||
try {
|
||||
await fs.writeFile(mkdocsYmlPath, yaml.safeDump(mkdocsYml), 'utf8');
|
||||
await fs.writeFile(mkdocsYmlPath, yaml.dump(mkdocsYml), 'utf8');
|
||||
} catch (error) {
|
||||
logger.warn(
|
||||
`Could not write to ${mkdocsYmlPath} after updating it before running the generator. ${error.message}`,
|
||||
|
||||
Reference in New Issue
Block a user