diff --git a/src/package.ts b/src/package.ts index e93479fb..7167f3ed 100644 --- a/src/package.ts +++ b/src/package.ts @@ -328,7 +328,7 @@ export class MarkdownProcessor extends BaseProcessor { let contents = await read(file); if (/This is the README for your extension /.test(contents)) { - throw new Error(`Make sure to edit the README.md file before you publish your extension.`); + throw new Error(`Make sure to edit the README.md file before you package or publish your extension.`); } const markdownPathRegex = /(!?)\[([^\]\[]*|!\[[^\]\[]*]\([^\)]+\))\]\(([^\)]+)\)/g; diff --git a/src/test/package.test.ts b/src/test/package.test.ts index ecc07f0a..bb144a9c 100644 --- a/src/test/package.test.ts +++ b/src/test/package.test.ts @@ -1594,4 +1594,13 @@ describe('MarkdownProcessor', () => { await throws(() => processor.onFile(readme)); }); + + it('should catch an unchanged README.md', async () => { + const manifest = { name: 'test', publisher: 'mocha', version: '0.0.1', engines: Object.create(null), repository: 'https://github.com/username/repository' }; + const contents = `This is the README for your extension `; + const processor = new ReadmeProcessor(manifest, {}); + const readme = { path: 'extension/readme.md', contents }; + + await throws(() => processor.onFile(readme)); + }) });