Skip to content

Commit

Permalink
breaking: drop deprecated registerCopilot
Browse files Browse the repository at this point in the history
  • Loading branch information
arshad-yaseen committed Dec 28, 2024
1 parent 4c9fe26 commit e2ce7a2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
4 changes: 4 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
{
"type": "chore",
"section": "🔧 Maintenance"
},
{
"type": "breaking",
"section": "💥 Breaking Changes"
}
]
}
Expand Down
13 changes: 1 addition & 12 deletions src/core/completion/register.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {deprecated, report, warn} from '../../logger';
import {report, warn} from '../../logger';
import {
CompletionRegistration,
Disposable,
Expand Down Expand Up @@ -156,14 +156,3 @@ const handleTriggerCompletion = (editor: StandaloneCodeEditor) => {
state.isManualTrigger = true;
editor.trigger('keyboard', 'editor.action.inlineSuggest.trigger', {});
};

/**
* @deprecated Use `registerCompletion` instead. This function will be removed in a future version.
*/
export const registerCopilot = (
...args: Parameters<typeof registerCompletion>
) => {
deprecated('registerCopilot', 'registerCompletion');

return registerCompletion(...args);
};
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Copilot} from './classes';
import {registerCompletion, registerCopilot} from './core/completion/register';
import {registerCompletion} from './core/completion/register';

export {registerCopilot, registerCompletion, Copilot};
export {registerCompletion, Copilot};

export type {
Monaco,
Expand Down
6 changes: 1 addition & 5 deletions tests/exports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ describe('MonacoPilot exports', () => {
});

it('should not export any unexpected items', () => {
const expectedExports = [
'registerCopilot',
'Copilot',
'registerCompletion',
];
const expectedExports = ['Copilot', 'registerCompletion'];
const actualExports = Object.keys(MonacoPilot);

expect(actualExports).toEqual(expect.arrayContaining(expectedExports));
Expand Down

0 comments on commit e2ce7a2

Please sign in to comment.