Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: autoActiavte to autoActivate, keeped to kept #4716

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/__tests__/modules/extensionManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe('ExtensionManager', () => {
expect(fn).toThrow(Error)
})

it('should not throw when autoActiavte throws', async () => {
it('should not throw when autoActivated throws', async () => {
tmpfolder = createFolder()
createExtension(tmpfolder, {
name: 'name',
Expand All @@ -148,7 +148,7 @@ describe('ExtensionManager', () => {
let spy = jest.spyOn(manager, 'checkAutoActivate' as any).mockImplementation(() => {
throw new Error('test error')
})
await manager.autoActiavte('name', extension)
await manager.autoActivate('name', extension)
spy.mockRestore()
})

Expand Down
2 changes: 1 addition & 1 deletion src/completion/source-language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class LanguageSource implements ISource<CompletionItem> {
private itemDefaults: ItemDefaults = {}
// cursor position on trigger
private triggerContext: TriggerContext | undefined
// Keeped Promise for resolve
// Kept Promise for resolve
private resolving: WeakMap<CompletionItem, Promise<void>> = new WeakMap()
constructor(
public readonly name: string,
Expand Down
8 changes: 4 additions & 4 deletions src/extension/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class ExtensionManager {
if (!activationEvents || activationEvents.includes('*')) {
promises.push(void extension.activate())
} else {
void this.autoActiavte(key, extension)
void this.autoActivate(key, extension)
}
}
return Promise.allSettled(promises)
Expand Down Expand Up @@ -394,7 +394,7 @@ export class ExtensionManager {
return extension.isActive ? 'activated' : 'loaded'
}

public async autoActiavte(id: string, extension: Extension<API>): Promise<void> {
public async autoActivate(id: string, extension: Extension<API>): Promise<void> {
try {
let checked = await this.checkAutoActivate(extension.packageJSON)
if (checked) await Promise.resolve(extension.activate())
Expand Down Expand Up @@ -514,7 +514,7 @@ export class ExtensionManager {
})
this.registContribution(id, packageJSON, root, filename)
this._onDidLoadExtension.fire(extension)
if (this.activated && !noActive) await this.autoActiavte(id, extension)
if (this.activated && !noActive) await this.autoActivate(id, extension)
}

public unregistContribution(id: string): void {
Expand All @@ -540,7 +540,7 @@ export class ExtensionManager {
})
this.registContribution(id, packageJSON, __dirname)
this._onDidLoadExtension.fire(extension)
await this.autoActiavte(id, extension)
await this.autoActivate(id, extension)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export class Workspace {
}

/**
* Keeped for backward compatible
* Kept for backward compatible
*/
public get completeOpt(): string {
return ''
Expand Down