Skip to content

Commit

Permalink
feat: error when publishing an extension that uses enabledApiProposals
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Nov 11, 2021
1 parent a38657e commit 6a0c946
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export interface Manifest {
_bundling?: { [name: string]: string }[];
_testing?: string;
enableProposedApi?: boolean;
enabledApiProposals?: readonly string[];
qna?: 'marketplace' | string | false;
extensionKind?: ExtensionKind | ExtensionKind[];

Expand Down
3 changes: 3 additions & 0 deletions src/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ async function _publish(packagePath: string, manifest: Manifest, options: IInter
if (!options.noVerify && manifest.enableProposedApi) {
throw new Error("Extensions using proposed API (enableProposedApi: true) can't be published to the Marketplace");
}
if (!options.noVerify && manifest.enabledApiProposals) {
throw new Error("Extensions using proposed API (enabledApiProposals: [...]) can't be published to the Marketplace");
}

if (semver.prerelease(manifest.version)) {
throw new Error(`The VS Marketplace doesn't support prerelease versions: '${manifest.version}'`);
Expand Down

0 comments on commit 6a0c946

Please sign in to comment.