Skip to content

Commit bad8ebd

Browse files
chore(release): 1.0.1 [skip ci]
1 parent 521c9c8 commit bad8ebd

File tree

7 files changed

+35
-41
lines changed

7 files changed

+35
-41
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
## [1.0.1](https://github.com/atom-community/atom-ide-code-format/compare/v1.0.0...v1.0.1) (2021-07-15)
2+
3+
4+
### Bug Fixes
5+
6+
* fix formatting on typing and saving ([51c2f7f](https://github.com/atom-community/atom-ide-code-format/commit/51c2f7f320e4740fc3dbd8e1f2d7e02f9cb52eef))
7+
* fix success check of applyTextEditsToBuffer ([e13720e](https://github.com/atom-community/atom-ide-code-format/commit/e13720e1a66af75140c77dda907d0f1c2993fb6f))
8+
* remove _onWillSaveProvider ([7614553](https://github.com/atom-community/atom-ide-code-format/commit/761455316a61579eb40125a473a0ebca7a5788ad))
9+
* remove featureConfig ([4299de2](https://github.com/atom-community/atom-ide-code-format/commit/4299de2e3746f9c0707a1c342406dff08ed6b57b))
10+
* remove redundant checks ([b2e2bdf](https://github.com/atom-community/atom-ide-code-format/commit/b2e2bdf9b87f52b073f163ff79c3d710a714c208))
11+
* remove rxjs from _formatCodeInTextEditor ([83032f9](https://github.com/atom-community/atom-ide-code-format/commit/83032f95dfeabe3f8ca841682da9956e1f3c5f8a))
12+
* remove rxjs from _formatCodeOnSaveInTextEditor ([4ab7bfa](https://github.com/atom-community/atom-ide-code-format/commit/4ab7bfa898c9c38bb29eab6f10d7c6574a07cdff))
13+
* remove rxjs from _formatCodeOnTypeInTextEditor ([a0d865f](https://github.com/atom-community/atom-ide-code-format/commit/a0d865f995b03bd37734e180f13feac184949324))
14+
* remove rxjs from _handleEvent command case ([a92d37d](https://github.com/atom-community/atom-ide-code-format/commit/a92d37d61bb5339e37ffec15649754717e70fdd4))
15+
* remove rxjs from code-format:format-code ([0795945](https://github.com/atom-community/atom-ide-code-format/commit/07959453d602a5f63cc66877aa23830d37e1d53e))
16+
* remove UniversalDisposable ([83c27d2](https://github.com/atom-community/atom-ide-code-format/commit/83c27d226ca87e70e3cdb057a944b2005f1991ed))
17+
* set format on save to true ([4f5aa64](https://github.com/atom-community/atom-ide-code-format/commit/4f5aa6418331e2358af13275dd7393030c9e8c48))
18+
* update log4js ([dcd97af](https://github.com/atom-community/atom-ide-code-format/commit/dcd97afbdd243f24c189783ffd892a35bca9bf40))
19+
* use atom-ide-base's ProviderRegistry ([16c31a6](https://github.com/atom-community/atom-ide-code-format/commit/16c31a6605a2c68958c59d0837c236943c5094d2))
20+
* use atom-ide-base's TextEdit ([84459d6](https://github.com/atom-community/atom-ide-code-format/commit/84459d67254c1e2cc6c1116f0200adc3d880cbef))
21+
* use event.currentTarget to get editor ([6722c9d](https://github.com/atom-community/atom-ide-code-format/commit/6722c9d7bbf3f311841e08b27392cbeb45787fbc))
22+
123
# 1.0.0 (2021-07-15)
224

325

dist/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/CodeFormatManager.d.ts

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,19 @@
1-
import type { TextEditor, TextChange, Disposable } from "atom";
2-
declare type AggregatedTextChange = {
3-
changes: Array<TextChange>;
4-
};
5-
import type { TextEdit } from "@atom-ide-community/nuclide-commons-atom/text-edit";
6-
import type { BusySignalService } from "atom-ide-base";
1+
import { Range, CompositeDisposable, TextEditor, Disposable, BufferStoppedChangingEvent } from "atom";
2+
import type { TextEdit, BusySignalService } from "atom-ide-base";
73
import type { FileCodeFormatProvider, OnSaveCodeFormatProvider, OnTypeCodeFormatProvider, RangeCodeFormatProvider } from "./types";
8-
import { Range } from "atom";
9-
import ProviderRegistry from "@atom-ide-community/nuclide-commons-atom/ProviderRegistry";
10-
import UniversalDisposable from "@atom-ide-community/nuclide-commons/UniversalDisposable";
11-
import { Observable } from "rxjs-compat/bundles/rxjs-compat.umd.min.js";
12-
import type { Subscription } from "rxjs";
4+
import { ProviderRegistry } from "atom-ide-base/commons-atom/ProviderRegistry";
135
export declare const SAVE_TIMEOUT = 2500;
14-
declare type FormatEvent = {
15-
type: "command" | "save" | "new-save";
16-
editor: TextEditor;
17-
} | {
18-
type: "type";
19-
editor: TextEditor;
20-
edit: AggregatedTextChange;
21-
};
226
export default class CodeFormatManager {
23-
_subscriptions: UniversalDisposable;
7+
_subscriptions: CompositeDisposable;
248
_rangeProviders: ProviderRegistry<RangeCodeFormatProvider>;
259
_fileProviders: ProviderRegistry<FileCodeFormatProvider>;
2610
_onTypeProviders: ProviderRegistry<OnTypeCodeFormatProvider>;
2711
_onSaveProviders: ProviderRegistry<OnSaveCodeFormatProvider>;
28-
_busySignalService: BusySignalService | undefined | null;
12+
_busySignalService: BusySignalService | undefined;
2913
constructor();
30-
/**
31-
* Subscribe to all formatting events (commands, saves, edits) and dispatch formatters as necessary. By handling all
32-
* events in a central location, we ensure that no buffer runs into race conditions with simultaneous formatters.
33-
*/
34-
_subscribeToEvents(): Subscription;
35-
_handleEvent(event: FormatEvent): Observable<unknown>;
36-
_formatCodeInTextEditor(editor: TextEditor, range?: Range): Observable<Array<TextEdit>>;
37-
_formatCodeOnTypeInTextEditor(editor: TextEditor, aggregatedEvent: AggregatedTextChange): Observable<Array<TextEdit>>;
38-
_onWillSaveProvider(): {
39-
priority: number;
40-
timeout: number;
41-
callback: (editor: TextEditor) => any;
42-
};
43-
_formatCodeOnSaveInTextEditor(editor: TextEditor): Observable<TextEdit>;
14+
_formatCodeInTextEditor(editor: TextEditor, range?: Range): Promise<Array<TextEdit>>;
15+
_formatCodeOnTypeInTextEditor(editor: TextEditor, aggregatedEvent: BufferStoppedChangingEvent): Promise<Array<TextEdit>>;
16+
_formatCodeOnSaveInTextEditor(editor: TextEditor): Promise<TextEdit[]>;
4417
_reportBusy<T>(editor: TextEditor, promise: Promise<T>, revealTooltip?: boolean): Promise<T>;
4518
addRangeProvider(provider: RangeCodeFormatProvider): Disposable;
4619
addFileProvider(provider: FileCodeFormatProvider): Disposable;
@@ -49,4 +22,3 @@ export default class CodeFormatManager {
4922
consumeBusySignal(busySignalService: BusySignalService): Disposable;
5023
dispose(): void;
5124
}
52-
export {};

dist/src/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { TextEditor, Range, Point } from "atom";
2-
import type { TextEdit } from "@atom-ide-community/nuclide-commons-atom/text-edit";
2+
import type { TextEdit } from "atom-ide-base";
33
/**
44
* A brief overview of the different code formatting providers:
55
*

dist/tsconfig.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Code Formatting for Atom IDE",
44
"repository": "https://github.com/atom-community/atom-ide-code-format",
55
"main": "./dist/main.js",
6-
"version": "1.0.0",
6+
"version": "1.0.1",
77
"description": "Provides a code-formatting provider API",
88
"scripts": {
99
"format": "prettier --write .",

0 commit comments

Comments
 (0)