From 6bbe5a82a88eaefeea0f09d26a39088d1c6b2f60 Mon Sep 17 00:00:00 2001 From: Simon Lamon Date: Sat, 15 Oct 2022 07:28:21 +0000 Subject: [PATCH 1/2] Remove check proposed api checks --- src/browser/public/Terminal.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/browser/public/Terminal.ts b/src/browser/public/Terminal.ts index c693950ccb..7263d06dde 100644 --- a/src/browser/public/Terminal.ts +++ b/src/browser/public/Terminal.ts @@ -78,7 +78,6 @@ export class Terminal implements ITerminalApi { public get element(): HTMLElement | undefined { return this._core.element; } public get parser(): IParser { - this._checkProposedApi(); if (!this._parser) { this._parser = new ParserApi(this._core); } @@ -92,7 +91,6 @@ export class Terminal implements ITerminalApi { public get rows(): number { return this._core.rows; } public get cols(): number { return this._core.cols; } public get buffer(): IBufferNamespaceApi { - this._checkProposedApi(); if (!this._buffer) { this._buffer = new BufferNamespaceApi(this._core); } @@ -148,7 +146,6 @@ export class Terminal implements ITerminalApi { this._core.attachCustomKeyEventHandler(customKeyEventHandler); } public registerLinkProvider(linkProvider: ILinkProvider): IDisposable { - this._checkProposedApi(); return this._core.registerLinkProvider(linkProvider); } public registerCharacterJoiner(handler: (text: string) => [number, number][]): number { From 073aa6d439b7e025d355d0be9ebc84677f3f7208 Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Sat, 15 Oct 2022 10:25:39 +0200 Subject: [PATCH 2/2] Fix test "Proposed API check" --- src/headless/public/Terminal.test.ts | 2 +- test/api/Terminal.api.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/headless/public/Terminal.test.ts b/src/headless/public/Terminal.test.ts index 43aaf62860..c7acc81828 100644 --- a/src/headless/public/Terminal.test.ts +++ b/src/headless/public/Terminal.test.ts @@ -22,7 +22,7 @@ describe('Headless API Tests', function (): void { it('Proposed API check', async () => { term = new Terminal({ allowProposedApi: false }); - throws(() => term.buffer, (error) => error.message === 'You must set the allowProposedApi option to true to use proposed API'); + throws(() => term.markers, (error) => error.message === 'You must set the allowProposedApi option to true to use proposed API'); }); it('write', async () => { diff --git a/test/api/Terminal.api.ts b/test/api/Terminal.api.ts index 502f438ce0..27fb51a71a 100644 --- a/test/api/Terminal.api.ts +++ b/test/api/Terminal.api.ts @@ -35,7 +35,7 @@ describe('API Integration Tests', function(): void { await openTerminal(page, { allowProposedApi: false }); await page.evaluate(` try { - window.term.buffer; + window.term.markers; } catch (e) { window.throwMessage = e.message; }