@tolgee/core 4.7.2 → 4.7.3-rc.c880d75c.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/dist/tolgee.cjs.js +1447 -7
- package/dist/tolgee.cjs.js.map +1 -1
- package/dist/tolgee.cjs.min.js +1 -1
- package/dist/tolgee.cjs.min.js.map +1 -1
- package/dist/tolgee.esm.min.mjs +1 -1
- package/dist/tolgee.esm.min.mjs.map +1 -1
- package/dist/tolgee.esm.mjs +1447 -7
- package/dist/tolgee.esm.mjs.map +1 -1
- package/dist/tolgee.umd.js +1447 -7
- package/dist/tolgee.umd.js.map +1 -1
- package/dist/tolgee.umd.min.js +1 -1
- package/dist/tolgee.umd.min.js.map +1 -1
- package/package.json +6 -5
- package/src/.DS_Store +0 -0
- package/src/Properties.test.ts +1 -1
- package/src/Tolgee.test.ts +1 -1
- package/src/__testFixtures/createTestDom.ts +8 -7
- package/src/__testFixtures/mocked.ts +1 -1
- package/src/services/CoreService.test.ts +1 -1
- package/src/services/DependencyService.test.ts +1 -1
- package/src/wrappers/text/AttributeHandler.test.ts +1 -0
- package/src/wrappers/text/CoreHandler.test.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tolgee/core",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.3-rc.c880d75c.0",
|
|
4
4
|
"description": "Library providing ability to translate messages directly in context of developed application.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "./dist/tolgee.esm.mjs",
|
|
@@ -42,16 +42,17 @@
|
|
|
42
42
|
],
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@rollup/plugin-node-resolve": "13.3.0",
|
|
45
|
-
"@rollup/plugin-replace": "^
|
|
46
|
-
"@rollup/plugin-typescript": "8.3.
|
|
45
|
+
"@rollup/plugin-replace": "^4.0.0",
|
|
46
|
+
"@rollup/plugin-typescript": "8.3.3",
|
|
47
47
|
"@testing-library/dom": "^8.7.1",
|
|
48
48
|
"@testing-library/jest-dom": "^5.11.4",
|
|
49
|
-
"@types/intl-messageformat": "^3.0.0",
|
|
50
49
|
"@types/jest": "^27.0.2",
|
|
51
50
|
"@types/node": "^17.0.8",
|
|
51
|
+
"@types/testing-library__jest-dom": "^5.14.5",
|
|
52
52
|
"concurrently": "7.2.2",
|
|
53
53
|
"intl-messageformat": "^9.9.1",
|
|
54
54
|
"jest": "^27.2.4",
|
|
55
|
+
"jest-environment-jsdom": "^27.5.1",
|
|
55
56
|
"jest-fetch-mock": "^3.0.3",
|
|
56
57
|
"openapi-typescript": "^4.3.0",
|
|
57
58
|
"rollup": "^2.56.3",
|
|
@@ -66,7 +67,7 @@
|
|
|
66
67
|
"require": "./dist/tolgee.cjs.js",
|
|
67
68
|
"import": "./dist/tolgee.esm.mjs"
|
|
68
69
|
},
|
|
69
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "b2fe465202b06b75b7c03ef9ed7f779a921d7dbc",
|
|
70
71
|
"publishConfig": {
|
|
71
72
|
"access": "public"
|
|
72
73
|
}
|
package/src/.DS_Store
ADDED
|
Binary file
|
package/src/Properties.test.ts
CHANGED
|
@@ -2,7 +2,7 @@ jest.dontMock('./Properties');
|
|
|
2
2
|
jest.dontMock('./TolgeeConfig');
|
|
3
3
|
|
|
4
4
|
import '@testing-library/jest-dom/extend-expect';
|
|
5
|
-
import { mocked } from '
|
|
5
|
+
import { mocked } from 'jest-mock';
|
|
6
6
|
import { TolgeeConfig } from './TolgeeConfig';
|
|
7
7
|
import { Properties } from './Properties';
|
|
8
8
|
|
package/src/Tolgee.test.ts
CHANGED
|
@@ -2,7 +2,7 @@ jest.dontMock('./Tolgee');
|
|
|
2
2
|
jest.dontMock('./services/DependencyService');
|
|
3
3
|
|
|
4
4
|
import '@testing-library/jest-dom/extend-expect';
|
|
5
|
-
import { mocked } from '
|
|
5
|
+
import { mocked } from 'jest-mock';
|
|
6
6
|
import { Tolgee } from './Tolgee';
|
|
7
7
|
import {
|
|
8
8
|
configMock,
|
|
@@ -10,13 +10,14 @@ export const createTestDom = (document: Document) => {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
document.body = document.createElement('body');
|
|
13
|
-
document.body.innerHTML =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
document.body.innerHTML =
|
|
14
|
+
`{{${c.keyInRoot}}}` +
|
|
15
|
+
`<div id="rootDiv">Some trash... {{${c.keyInRootDiv}}}` +
|
|
16
|
+
` <div>Some other text to translate <span>{{${c.hereKey}}} and {{${c.hereTooKey}}}</span> text continues.</div>` +
|
|
17
|
+
` <div id="multipleTextNodes">Before text</div>` +
|
|
18
|
+
` <div aria-label="this is {{${c.ariaLabelKey}}} label"></div>` +
|
|
19
|
+
` <select><option>{{${c.optionKey}}}</option></select>` +
|
|
20
|
+
`<div>`;
|
|
20
21
|
document.getElementById('multipleTextNodes').append('some text node');
|
|
21
22
|
document.getElementById('multipleTextNodes').append(`{{${c.appendedKey}}}`);
|
|
22
23
|
document.getElementById('multipleTextNodes').append(` after text`);
|
|
@@ -2,7 +2,7 @@ import { TolgeeConfig } from '../TolgeeConfig';
|
|
|
2
2
|
import { Properties } from '../Properties';
|
|
3
3
|
import { CoreService } from '../services/CoreService';
|
|
4
4
|
import { Observer } from '../Observer';
|
|
5
|
-
import { mocked } from '
|
|
5
|
+
import { mocked } from 'jest-mock';
|
|
6
6
|
import { TranslationService } from '../services/TranslationService';
|
|
7
7
|
import { TextService } from '../services/TextService';
|
|
8
8
|
import { EventService } from '../services/EventService';
|
|
@@ -5,7 +5,7 @@ import '@testing-library/jest-dom/extend-expect';
|
|
|
5
5
|
import { CoreService } from './CoreService';
|
|
6
6
|
import { getMockedInstance } from '@testFixtures/mocked';
|
|
7
7
|
import { ApiHttpService } from './ApiHttpService';
|
|
8
|
-
import { mocked } from '
|
|
8
|
+
import { mocked } from 'jest-mock';
|
|
9
9
|
import { Properties } from '../Properties';
|
|
10
10
|
import { Scope } from '../types';
|
|
11
11
|
import { DependencyService } from './DependencyService';
|
|
@@ -2,7 +2,7 @@ jest.dontMock('./DependencyService');
|
|
|
2
2
|
jest.dontMock('../TolgeeConfig');
|
|
3
3
|
|
|
4
4
|
import { getMockedInstance } from '@testFixtures/mocked';
|
|
5
|
-
import { mocked } from '
|
|
5
|
+
import { mocked } from 'jest-mock';
|
|
6
6
|
import { InvisibleWrapper } from '../wrappers/invisible/InvisibleWrapper';
|
|
7
7
|
import { TextWrapper } from '../wrappers/text/TextWrapper';
|
|
8
8
|
import { DependencyService } from './DependencyService';
|
|
@@ -10,7 +10,7 @@ import { ContentHandler } from './ContentHandler';
|
|
|
10
10
|
import { AttributeHandler } from './AttributeHandler';
|
|
11
11
|
import { EventService } from '../../services/EventService';
|
|
12
12
|
import { EventEmitterImpl } from '../../services/EventEmitter';
|
|
13
|
-
import { mocked } from '
|
|
13
|
+
import { mocked } from 'jest-mock';
|
|
14
14
|
import { TranslationData } from '../../types/DTOs';
|
|
15
15
|
import { Properties } from '../../Properties';
|
|
16
16
|
import { ElementMeta, NodeMeta, NodeWithMeta, Unwrapped } from '../../types';
|