Skip to content

Commit d0b2214

Browse files
authored
Merge pull request #155 from atom-community/bump
2 parents ad6b90c + fe9fc76 commit d0b2214

File tree

4 files changed

+48
-53
lines changed

4 files changed

+48
-53
lines changed

lib/adapters/apply-edit-adapter.ts

+17-19
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,24 @@ export default class ApplyEditAdapter {
5151
// Keep checkpoints from all successful buffer edits
5252
const checkpoints: Array<{ buffer: TextBuffer; checkpoint: number }> = []
5353

54-
const promises = (workspaceEdit.documentChanges || []).map(
55-
async (edit): Promise<void> => {
56-
if (!TextDocumentEdit.is(edit)) {
57-
return ApplyEditAdapter.handleResourceOperation(edit).catch((err) => {
58-
throw Error(`Error during ${edit.kind} resource operation: ${err.message}`)
59-
})
60-
}
61-
const path = Convert.uriToPath(edit.textDocument.uri)
62-
const editor = (await atom.workspace.open(path, {
63-
searchAllPanes: true,
64-
// Open new editors in the background.
65-
activatePane: false,
66-
activateItem: false,
67-
})) as TextEditor
68-
const buffer = editor.getBuffer()
69-
const edits = Convert.convertLsTextEdits(edit.edits)
70-
const checkpoint = ApplyEditAdapter.applyEdits(buffer, edits)
71-
checkpoints.push({ buffer, checkpoint })
54+
const promises = (workspaceEdit.documentChanges || []).map(async (edit): Promise<void> => {
55+
if (!TextDocumentEdit.is(edit)) {
56+
return ApplyEditAdapter.handleResourceOperation(edit).catch((err) => {
57+
throw Error(`Error during ${edit.kind} resource operation: ${err.message}`)
58+
})
7259
}
73-
)
60+
const path = Convert.uriToPath(edit.textDocument.uri)
61+
const editor = (await atom.workspace.open(path, {
62+
searchAllPanes: true,
63+
// Open new editors in the background.
64+
activatePane: false,
65+
activateItem: false,
66+
})) as TextEditor
67+
const buffer = editor.getBuffer()
68+
const edits = Convert.convertLsTextEdits(edit.edits)
69+
const checkpoint = ApplyEditAdapter.applyEdits(buffer, edits)
70+
checkpoints.push({ buffer, checkpoint })
71+
})
7472

7573
// Apply all edits or fail and revert everything
7674
const applied = await Promise.all(promises)

lib/adapters/autocomplete-adapter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export default class AutocompleteAdapter {
140140
// TODO use `ObjectArrayFilterer.setCandidate` in `_suggestionCache` to avoid creating `ObjectArrayFilterer` every time from scratch
141141
const objFilterer = new ObjectArrayFilterer(validSuggestions, "filterText")
142142
// zadeh returns an array of the selected `Suggestions`
143-
return (objFilterer.filter(request.prefix) as any) as Suggestion[]
143+
return objFilterer.filter(request.prefix) as any as Suggestion[]
144144
} else {
145145
return suggestions
146146
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
"@types/atom": "^1.40.10",
4040
"@types/node": "15.0.2",
4141
"atom-jasmine3-test-runner": "^5.2.4",
42-
"eslint-config-atomic": "^1.14.3",
43-
"prettier-config-atomic": "^2.0.4",
42+
"eslint-config-atomic": "^1.14.4",
43+
"prettier-config-atomic": "^2.0.5",
4444
"shx": "^0.3.3",
4545
"typescript": "~4.2.4"
4646
}

pnpm-lock.yaml

+28-31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)