Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

TINY-10394: Made logs argument optional for VersionLoader.setup #75

Merged
merged 5 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Added
- `VersionLoader.pLoadVersion` function. #TINY-10394

### Removed
- Removed support for TinyMCE 4.x. #TINY-10142

### Changed
- Made the `VersionLoader.setup` functions logs argument optional. #TINY-10394

## 5.0.1 - 2022-06-29

### Changed
Expand Down
5 changes: 3 additions & 2 deletions src/main/ts/api/VersionLoader.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Pipeline, Step, TestLogs } from '@ephox/agar';
import { TinyLoader } from '@ephox/mcagar';

import * as Loader from '../loader/Loader';
import { readPlugins, registerPlugins, sRegisterPlugins } from '../loader/Plugins';
import * as TinyVersions from '../loader/Versions';

Expand All @@ -18,7 +19,7 @@ export const setupVersion = (
settings: Record<string, any>,
success: SuccessCallback,
failure: FailureCallback,
logs: TestLogs
logs: TestLogs = TestLogs.init()
): void => {
const plugins = readPlugins(testPlugins);

Expand All @@ -42,4 +43,4 @@ export const sSetupVersion = <T, U>(version: string, testPlugins: string[], call
}, settings, next, die, initLogs)
);

export const sWithVersion = TinyVersions.sWithVersion;
export const pLoadVersion = (version: string): Promise<void> => new Promise((resolve, reject) => Loader.load(version, resolve, reject));
2 changes: 1 addition & 1 deletion src/main/ts/loader/Versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ const sWithVersion = (version: string, step: Step<any, any>): Step<unknown, unkn
]);
};

export { sWithVersion, sLoad, sLoadFrom, sUnload };
export { sWithVersion, sLoad, sLoadFrom, sUnload };