fix EOL for generated extensionsApiProposals.ts

This commit is contained in:
Joao Moreno 2021-12-08 15:19:42 +01:00
parent f0e7d8545a
commit 18214d3dbd
No known key found for this signature in database
GPG key ID: 896B853774D1A575
2 changed files with 4 additions and 4 deletions

View file

@ -198,11 +198,11 @@ function apiProposalNamesGenerator() {
'// THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY.',
'',
'export const allApiProposals = Object.freeze({',
`${proposalNames.map(t => `\t${t[0]}: '${t[1]}'`).join(',\n')}`,
`${proposalNames.map(t => `\t${t[0]}: '${t[1]}'`).join(`,${os.EOL}`)}`,
'});',
'export type ApiProposalName = keyof typeof allApiProposals;',
'',
].join('\n');
].join(os.EOL);
const outFile = path.join(dtsFolder, '../vs/workbench/services/extensions/common/extensionsApiProposals.ts');
if (fs.readFileSync(outFile).toString() !== source) {
fs.writeFileSync(outFile, source);

View file

@ -240,11 +240,11 @@ function apiProposalNamesGenerator() {
'// THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY.',
'',
'export const allApiProposals = Object.freeze({',
`${proposalNames.map(t => `\t${t[0]}: '${t[1]}'`).join(',\n')}`,
`${proposalNames.map(t => `\t${t[0]}: '${t[1]}'`).join(`,${os.EOL}`)}`,
'});',
'export type ApiProposalName = keyof typeof allApiProposals;',
'',
].join('\n');
].join(os.EOL);
const outFile = path.join(dtsFolder, '../vs/workbench/services/extensions/common/extensionsApiProposals.ts');