@tolgee/svelte 2.7.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/TolgeeProvider.svelte +13 -16
- package/TolgeeProvider.svelte.d.ts +1 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,46 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.0.0](https://github.com/tolgee/tolgee-js/compare/v2.8.2...v3.0.0) (2021-12-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Performance Improvements
|
|
10
|
+
|
|
11
|
+
* modularize core ([fe5abca](https://github.com/tolgee/tolgee-js/commit/fe5abca13987c34d27c39fb6ca162336106d9efc))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* Tolgee constructor private
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [2.8.2](https://github.com/tolgee/tolgee-js/compare/v2.8.1...v2.8.2) (2021-12-15)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @tolgee/svelte
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [2.8.1](https://github.com/tolgee/tolgee-js/compare/v2.8.0...v2.8.1) (2021-12-07)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @tolgee/svelte
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# [2.8.0](https://github.com/tolgee/tolgee-js/compare/v2.7.0...v2.8.0) (2021-11-25)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @tolgee/svelte
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
6
46
|
# [2.7.0](https://github.com/tolgee/tolgee-js/compare/v2.6.0...v2.7.0) (2021-11-23)
|
|
7
47
|
|
|
8
48
|
|
package/TolgeeProvider.svelte
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
<script >import { onDestroy, onMount, setContext } from
|
|
2
|
-
import { Tolgee, TolgeeConfig } from
|
|
1
|
+
<script >import { onDestroy, onMount, setContext } from 'svelte';
|
|
2
|
+
import { IcuFormatter, Tolgee, TolgeeConfig } from '@tolgee/core';
|
|
3
3
|
export let config;
|
|
4
|
-
const tolgee =
|
|
4
|
+
const tolgee = Tolgee.use(IcuFormatter).init(config || new TolgeeConfig());
|
|
5
5
|
let tolgeeRunPromise;
|
|
6
|
-
setContext(
|
|
7
|
-
tolgee
|
|
6
|
+
setContext('tolgeeContext', {
|
|
7
|
+
tolgee,
|
|
8
8
|
});
|
|
9
|
-
if (typeof window !==
|
|
10
|
-
onMount(() => tolgeeRunPromise = tolgee.run());
|
|
9
|
+
if (typeof window !== 'undefined') {
|
|
10
|
+
onMount(() => (tolgeeRunPromise = tolgee.run()));
|
|
11
11
|
onDestroy(tolgee.stop);
|
|
12
12
|
}
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
{#if !tolgee.initialLoading}
|
|
16
16
|
<slot />
|
|
17
|
+
{:else if !tolgeeRunPromise}
|
|
18
|
+
<slot name="loading-fallback" />
|
|
17
19
|
{:else}
|
|
18
|
-
{#
|
|
20
|
+
{#await tolgeeRunPromise}
|
|
19
21
|
<slot name="loading-fallback" />
|
|
20
|
-
{:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<slot name="loading-fallback" />
|
|
24
|
-
{:then _}
|
|
25
|
-
<slot />
|
|
26
|
-
{/await}
|
|
27
|
-
{/if}
|
|
22
|
+
{:then _}
|
|
23
|
+
<slot />
|
|
24
|
+
{/await}
|
|
28
25
|
{/if}
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tolgee/svelte",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@tolgee/core": "^
|
|
5
|
+
"@tolgee/core": "^3.0.0"
|
|
6
6
|
},
|
|
7
7
|
"devDependencies": {
|
|
8
8
|
"@sveltejs/kit": "next",
|
|
9
|
-
"@testing-library/jest-dom": "5.
|
|
9
|
+
"@testing-library/jest-dom": "5.16.1",
|
|
10
10
|
"@testing-library/svelte": "3.0.3",
|
|
11
|
-
"@types/jest": "27.0.
|
|
12
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
13
|
-
"@typescript-eslint/parser": "^
|
|
14
|
-
"eslint": "^8.
|
|
11
|
+
"@types/jest": "27.0.3",
|
|
12
|
+
"@typescript-eslint/eslint-plugin": "^5.7.0",
|
|
13
|
+
"@typescript-eslint/parser": "^5.7.0",
|
|
14
|
+
"eslint": "^8.4.1",
|
|
15
15
|
"eslint-config-prettier": "^8.3.0",
|
|
16
16
|
"eslint-plugin-svelte3": "^3.2.1",
|
|
17
|
-
"jest": "27.
|
|
18
|
-
"prettier": "^2.
|
|
19
|
-
"prettier-plugin-svelte": "^2.5.
|
|
20
|
-
"svelte": "^3.44.
|
|
17
|
+
"jest": "27.4.5",
|
|
18
|
+
"prettier": "^2.5.1",
|
|
19
|
+
"prettier-plugin-svelte": "^2.5.1",
|
|
20
|
+
"svelte": "^3.44.3",
|
|
21
21
|
"svelte-check": "^2.2.10",
|
|
22
22
|
"svelte-jester": "2.1.5",
|
|
23
|
-
"svelte-preprocess": "^4.
|
|
24
|
-
"svelte2tsx": "0.4.
|
|
25
|
-
"ts-jest": "27.
|
|
23
|
+
"svelte-preprocess": "^4.10.0",
|
|
24
|
+
"svelte2tsx": "0.4.11",
|
|
25
|
+
"ts-jest": "27.1.2",
|
|
26
26
|
"tslib": "^2.3.1",
|
|
27
|
-
"typescript": "^4.5.
|
|
27
|
+
"typescript": "^4.5.4"
|
|
28
28
|
},
|
|
29
29
|
"type": "module",
|
|
30
30
|
"publishConfig": {
|