Skip to content

Commit

Permalink
fix: autoActiavte to autoActivate, keeped to kept (#4716)
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleBill committed Aug 2, 2023
1 parent f7545f2 commit eba04ac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
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

0 comments on commit eba04ac

Please sign in to comment.