allow to package proposed
This commit is contained in:
parent
3d1890998d
commit
83060c333a
3 changed files with 4 additions and 15 deletions
|
@ -447,10 +447,6 @@ export function validateManifest(manifest: Manifest): Manifest {
|
|||
|
||||
validateEngineCompatibility(manifest.engines['vscode']);
|
||||
|
||||
if (manifest.enableProposedApi) {
|
||||
throw new Error('Extensions using proposed API (enableProposedApi: true) cannot be published');
|
||||
}
|
||||
|
||||
return manifest;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,6 +134,10 @@ export function publish(options: IPublishOptions = {}): Promise<any> {
|
|||
}
|
||||
|
||||
return promise.then(({ manifest, packagePath }) => {
|
||||
if (manifest.enableProposedApi) {
|
||||
throw new Error('Extensions using proposed API (enableProposedApi: true) can\'t be published to the Marketplace');
|
||||
}
|
||||
|
||||
const patPromise = options.pat
|
||||
? Promise.resolve(options.pat)
|
||||
: getPublisher(manifest.publisher).then(p => p.pat);
|
||||
|
|
|
@ -178,17 +178,6 @@ describe('validateManifest', () => {
|
|||
assert.throws(() => { validateManifest({ publisher: 'demo', name: 'demo', version: '1.0.0', engines: null }); });
|
||||
assert.throws(() => { validateManifest({ publisher: 'demo', name: 'demo', version: '1.0.0', engines: { vscode: null } }); });
|
||||
});
|
||||
|
||||
it('should not allow proposed API', () => {
|
||||
assert.throws(() => { validateManifest({ enableProposedApi: true, publisher: 'demo', name: 'demo', version: '1.0.0', engines: { vscode: '0.10.1' } }); });
|
||||
assert.throws(() => { validateManifest({ enableProposedApi: <any>1, publisher: 'demo', name: 'demo', version: '1.0.0', engines: { vscode: '0.10.1' } }); });
|
||||
|
||||
let mani1: Manifest = { enableProposedApi: false, publisher: 'demo', name: 'demo', version: '1.0.0', engines: { vscode: '0.10.1' } };
|
||||
assert.ok(validateManifest(mani1) === mani1);
|
||||
|
||||
let mani2: Manifest = { publisher: 'demo', name: 'demo', version: '1.0.0', engines: { vscode: '0.10.1' } };
|
||||
assert.ok(validateManifest(mani2) === mani2);
|
||||
});
|
||||
});
|
||||
|
||||
describe('toVsixManifest', () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue