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

Commit

Permalink
TINY-10394: Made logs argument optional for VersionLoader.setup (#75)
Browse files Browse the repository at this point in the history
* TINY-10394: Made logs argument optional for VersionLoader.setup

* TINY-10394: Added pLoadVersion

* TINY-10394: Restored removed export

* TINY-10394: Fixed promise return value

* TINY-10394: Updated dependencies
  • Loading branch information
spocke authored Nov 28, 2023
1 parent 9fd1f15 commit 0960778
Show file tree
Hide file tree
Showing 5 changed files with 292 additions and 164 deletions.
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
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
"author": "Tiny Technologies",
"license": "Apache-2.0",
"dependencies": {
"@ephox/agar": "^7.1.1",
"@ephox/katamari": "^9.0.3",
"@ephox/mcagar": "^8.0.3",
"@ephox/sugar": "^9.0.3"
"@ephox/agar": "^8.0.0",
"@ephox/katamari": "^9.1.5",
"@ephox/mcagar": "^9.0.0",
"@ephox/sugar": "^9.3.0"
},
"devDependencies": {
"@ephox/bedrock-client": "^13.0.0",
"@ephox/bedrock-server": "^13.3.0",
"@ephox/bedrock-server": "^13.6.0",
"@tinymce/beehive-flow": "^0.19.0",
"@tinymce/eslint-plugin": "^2.2.1",
"fork-ts-checker-webpack-plugin": "^6.5.0",
Expand Down
11 changes: 9 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,10 @@ export const sSetupVersion = <T, U>(version: string, testPlugins: string[], call
}, settings, next, die, initLogs)
);

export const sWithVersion = TinyVersions.sWithVersion;
export const sWithVersion = TinyVersions.sWithVersion;

export const pLoadVersion = (version: string): Promise<void> => {
return 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 };
Loading

0 comments on commit 0960778

Please sign in to comment.