@magic-translate/react 1.17.0 → 1.17.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic-translate/react",
3
- "version": "1.17.0",
3
+ "version": "1.17.2",
4
4
  "keywords": [],
5
5
  "description": "",
6
6
  "main": "dist/index.min.js",
@@ -12,21 +12,11 @@
12
12
  "author": "i42 GmbH <info@i42.ch>",
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "https://github.com/omnibrain/magic-translate-react.git"
15
+ "url": "git+https://github.com/magic-translate/magic-translate.git",
16
+ "directory": "packages/react"
16
17
  },
17
- "homepage": "",
18
+ "homepage": "https://magictranslate.io",
18
19
  "license": "MIT",
19
- "scripts": {
20
- "start": "rollup -c rollup.config.mjs -w",
21
- "build": "tsc && rollup -c rollup.config.mjs && yarn make:docs",
22
- "make:docs": "typedoc",
23
- "coverage": "codecov -e TRAVIS_NODE_VERSION -f coverage/*.json",
24
- "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage",
25
- "test:watch": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage --watch",
26
- "deploy": "gh-pages -d example/build",
27
- "prepare": "husky",
28
- "lint": "eslint ."
29
- },
30
20
  "engines": {
31
21
  "node": ">=22.22.1"
32
22
  },
@@ -35,8 +25,6 @@
35
25
  "react-dom": ">=17"
36
26
  },
37
27
  "devDependencies": {
38
- "@commitlint/cli": "^21.2.2",
39
- "@commitlint/config-conventional": "^21.2.2",
40
28
  "@eslint/js": "^10.0.1",
41
29
  "@rollup/plugin-commonjs": "^29.0.3",
42
30
  "@rollup/plugin-json": "^6.1.0",
@@ -46,7 +34,7 @@
46
34
  "@testing-library/jest-dom": "^7.0.1",
47
35
  "@testing-library/react": "^16.3.3",
48
36
  "@types/jest": "^30.0.0",
49
- "@types/node": "^24.13.4",
37
+ "@types/node": "^26.5.1",
50
38
  "@types/react": "^19.3.0",
51
39
  "@types/react-dom": "^19.3.0",
52
40
  "colors": "^1.4.0",
@@ -58,12 +46,10 @@
58
46
  "eslint-plugin-react-hooks": "^7.1.1",
59
47
  "gh-pages": "^6.3.0",
60
48
  "globals": "^17.12.0",
61
- "husky": "^9.1.7",
62
49
  "identity-obj-proxy": "^3.0.0",
63
50
  "jest": "^30.5.1",
64
51
  "jest-environment-jsdom": "^30.5.1",
65
52
  "jest-fetch-mock": "^4.2.0",
66
- "lint-staged": "^17.5.1",
67
53
  "prettier": "^3.9.6",
68
54
  "prompt": "^1.3.0",
69
55
  "react": "^19.3.0",
@@ -80,8 +66,21 @@
80
66
  "typescript-eslint": "^8.70.0"
81
67
  },
82
68
  "dependencies": {
83
- "@magic-translate/core": "^1.3.0",
69
+ "@magic-translate/core": "^1.4.1",
84
70
  "dataloader": "^2.2.3",
85
71
  "html-react-parser": "^6.1.7"
72
+ },
73
+ "bugs": {
74
+ "url": "https://github.com/magic-translate/magic-translate/issues"
75
+ },
76
+ "scripts": {
77
+ "start": "rollup -c rollup.config.mjs -w",
78
+ "build": "tsc && rollup -c rollup.config.mjs && pnpm make:docs",
79
+ "make:docs": "typedoc",
80
+ "coverage": "codecov -e TRAVIS_NODE_VERSION -f coverage/*.json",
81
+ "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage",
82
+ "test:watch": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage --watch",
83
+ "deploy": "gh-pages -d example/build",
84
+ "lint": "eslint ."
86
85
  }
87
- }
86
+ }
package/CHANGELOG.md DELETED
@@ -1,208 +0,0 @@
1
- # Changelog
2
-
3
- ## [1.17.0](https://github.com/magic-translate/magic-translate-react/compare/v1.16.0...v1.17.0) (2026-09-11)
4
-
5
-
6
- ### Features
7
-
8
- * support React 19 and modernize build output ([b86b024](https://github.com/magic-translate/magic-translate-react/commit/b86b024036043fda9fbc9e14984dc7a32f959b43))
9
-
10
-
11
- ### Bug Fixes
12
-
13
- * use the target language in the useTranslate cache key ([ea950b4](https://github.com/magic-translate/magic-translate-react/commit/ea950b46e7a020ca91ee818b189905c7585b2c08))
14
-
15
- ## [1.16.0](https://github.com/magic-translate/magic-translate-react/compare/v1.15.1...v1.16.0) (2025-02-28)
16
-
17
-
18
- ### Features
19
-
20
- * add language switcher hook ([dff729f](https://github.com/magic-translate/magic-translate-react/commit/dff729f1e8395a0c992a5f614d80fa00445be0ec))
21
-
22
- ## [1.15.1](https://github.com/magic-translate/magic-translate-react/compare/v1.15.0...v1.15.1) (2023-09-26)
23
-
24
-
25
- ### Bug Fixes
26
-
27
- * fix conflicting types in translate component ([76a29b4](https://github.com/magic-translate/magic-translate-react/commit/76a29b41402826806f269138a8689761013a7f86))
28
-
29
- ## [1.15.0](https://github.com/magic-translate/magic-translate-react/compare/v1.14.0...v1.15.0) (2023-09-25)
30
-
31
-
32
- ### Features
33
-
34
- * allow using string literal for language parameter ([e3c1607](https://github.com/magic-translate/magic-translate-react/commit/e3c1607e3ea52ee5d1b13e5be8c21f93ff05ee62))
35
-
36
- ## [1.14.0](https://github.com/magic-translate/magic-translate-react/compare/v1.13.1...v1.14.0) (2023-08-17)
37
-
38
-
39
- ### Features
40
-
41
- * import shared code from magic translate core ([6e0c6b7](https://github.com/magic-translate/magic-translate-react/commit/6e0c6b7c689f6d031ac695ce6dc5a1adaa559621))
42
-
43
- ## [1.13.1](https://github.com/magic-translate/magic-translate-react/compare/v1.13.0...v1.13.1) (2023-07-31)
44
-
45
-
46
- ### Bug Fixes
47
-
48
- * make the useT hook work with multiple translations in the same component ([4b38b27](https://github.com/magic-translate/magic-translate-react/commit/4b38b27b6eac11bf96437cabf076ca3a9bddb94c))
49
-
50
- ## [1.13.0](https://github.com/magic-translate/magic-translate-react/compare/v1.12.0...v1.13.0) (2023-07-18)
51
-
52
-
53
- ### Features
54
-
55
- * allow overriding language on individual items ([f863d06](https://github.com/magic-translate/magic-translate-react/commit/f863d06f082b9af2aed5f90278a90bb142131bdd))
56
-
57
- ## [1.12.0](https://github.com/magic-translate/magic-translate-react/compare/v1.11.0...v1.12.0) (2023-07-17)
58
-
59
-
60
- ### Features
61
-
62
- * build caching key more dynamically from params ([5f9afb9](https://github.com/magic-translate/magic-translate-react/commit/5f9afb9784f845f77895a2f47322bed7ea750ecb))
63
-
64
- ## [1.11.0](https://github.com/magic-translate/magic-translate-react/compare/v1.10.0...v1.11.0) (2023-07-13)
65
-
66
-
67
- ### Features
68
-
69
- * introduce loader setup factory for normal async calls to the api ([7899338](https://github.com/magic-translate/magic-translate-react/commit/7899338a80bb3919b083eb5683d02cf4126a1ee8))
70
-
71
-
72
- ### Bug Fixes
73
-
74
- * use only the most recent translation in the T component ([8a8fab6](https://github.com/magic-translate/magic-translate-react/commit/8a8fab649f54088403e09d6536f9e55743c96dc0))
75
-
76
- ## [1.10.0](https://github.com/magic-translate/magic-translate-react/compare/v1.9.0...v1.10.0) (2023-07-12)
77
-
78
-
79
- ### Features
80
-
81
- * prevent option requests when sending requests to the translate API ([dc9109c](https://github.com/magic-translate/magic-translate-react/commit/dc9109c3192a019e49b188a830d9ee3bc2a2db6e))
82
-
83
- ## [1.9.0](https://github.com/magic-translate/magic-translate-react/compare/v1.8.1...v1.9.0) (2023-07-05)
84
-
85
-
86
- ### Features
87
-
88
- * implement translation hook ([705175b](https://github.com/magic-translate/magic-translate-react/commit/705175bee5d94c99027f27612c3017bcace59958))
89
-
90
- ## [1.8.1](https://github.com/magic-translate/magic-translate-react/compare/v1.8.0...v1.8.1) (2023-07-05)
91
-
92
-
93
- ### Bug Fixes
94
-
95
- * remove debugging output ([b2962c2](https://github.com/magic-translate/magic-translate-react/commit/b2962c2ac851f00257772af45cf3887f5a05d8c7))
96
-
97
- ## [1.8.0](https://github.com/magic-translate/magic-translate-react/compare/v1.7.0...v1.8.0) (2023-07-05)
98
-
99
-
100
- ### Features
101
-
102
- * add formality option to translate component and provider ([fb7a4d6](https://github.com/magic-translate/magic-translate-react/commit/fb7a4d6089a7f14c87688b1e8e8b204e6a224520))
103
-
104
- ## [1.7.0](https://github.com/omnibrain/magic-translate-react/compare/v1.6.0...v1.7.0) (2023-06-18)
105
-
106
-
107
- ### Features
108
-
109
- * add use client directive to make library compatible with react server components ([9977ad1](https://github.com/omnibrain/magic-translate-react/commit/9977ad1907939d0de018e97b465b0ba15e500e60))
110
-
111
- ## [1.6.0](https://github.com/omnibrain/magic-translate-react/compare/v1.5.0...v1.6.0) (2023-06-18)
112
-
113
-
114
- ### Features
115
-
116
- * log error when backend returns an error ([f8471c3](https://github.com/omnibrain/magic-translate-react/commit/f8471c369cd72903944cee5dfd9c343fb2d12fe5))
117
- * make default data loader cope with more error types ([5709fa5](https://github.com/omnibrain/magic-translate-react/commit/5709fa5ebfbd456b6b4d27c027b5f764b4bc235a))
118
-
119
- ## [1.5.0](https://github.com/omnibrain/magic-translate-react/compare/v1.4.1...v1.5.0) (2023-01-06)
120
-
121
-
122
- ### Features
123
-
124
- * auto detect language, and allow overriding settings per text ([9fc7715](https://github.com/omnibrain/magic-translate-react/commit/9fc7715f7eb1037ec4cb229b3c60dc1f13467dc6))
125
- * expose _apiUrl prop to the provider ([e18a746](https://github.com/omnibrain/magic-translate-react/commit/e18a746d22f07bdabc62206263a2f77b04297871))
126
-
127
-
128
- ### Bug Fixes
129
-
130
- * remove unused sleep function ([b2804e6](https://github.com/omnibrain/magic-translate-react/commit/b2804e6cf4d01934d871854a059894080ea208b3))
131
-
132
- ## [1.4.1](https://github.com/omnibrain/magic-translate-react/compare/v1.4.0...v1.4.1) (2023-01-05)
133
-
134
-
135
- ### Bug Fixes
136
-
137
- * don't send content to translation service if source and target languages are the same ([c13c22e](https://github.com/omnibrain/magic-translate-react/commit/c13c22ec8442c9b530462da318b8f2885b1f2ad5))
138
-
139
- ## [1.4.0](https://github.com/omnibrain/magic-translate-react/compare/v1.3.0...v1.4.0) (2023-01-05)
140
-
141
-
142
- ### Features
143
-
144
- * add util function to map from UTS locale to language ([8f67a16](https://github.com/omnibrain/magic-translate-react/commit/8f67a16ac6c06dd22f70c80cf627dfdb8a60f192))
145
-
146
- ## [1.3.0](https://github.com/omnibrain/magic-translate-react/compare/v1.2.5...v1.3.0) (2023-01-04)
147
-
148
-
149
- ### Features
150
-
151
- * change api to pass a loader factory ([945b6bb](https://github.com/omnibrain/magic-translate-react/commit/945b6bb248ba914e580338d39945b0290cc99005))
152
- * introduce api key ([e1cc81b](https://github.com/omnibrain/magic-translate-react/commit/e1cc81be5b286e206d43f279b9649202fc6144fa))
153
-
154
- ## [1.2.5](https://github.com/omnibrain/magic-translate-react/compare/v1.2.4...v1.2.5) (2022-12-21)
155
-
156
-
157
- ### Bug Fixes
158
-
159
- * fix package by removing HTML sanitizing ([cf2a1b9](https://github.com/omnibrain/magic-translate-react/commit/cf2a1b9368428defb9e988f6d66c441d31613019))
160
-
161
- ## [1.2.4](https://github.com/omnibrain/magic-translate-react/compare/v1.2.3...v1.2.4) (2022-12-21)
162
-
163
-
164
- ### Bug Fixes
165
-
166
- * cast type of react comonent to fix ts build ([75a6a12](https://github.com/omnibrain/magic-translate-react/commit/75a6a120c2fe27bc876f69dbd864a72e3c428e37))
167
-
168
- ## [1.2.3](https://github.com/omnibrain/magic-translate-react/compare/v1.2.2...v1.2.3) (2022-12-21)
169
-
170
-
171
- ### Bug Fixes
172
-
173
- * use node 16 in release please action ([2c97b76](https://github.com/omnibrain/magic-translate-react/commit/2c97b767bc8de117b297121b0d872554e5c76f5c))
174
-
175
- ## [1.2.2](https://github.com/omnibrain/magic-translate-react/compare/v1.2.1...v1.2.2) (2022-12-21)
176
-
177
-
178
- ### Bug Fixes
179
-
180
- * add id to the release please action ([8cfd387](https://github.com/omnibrain/magic-translate-react/commit/8cfd387160310871d885edc2ceb4ff999c5be3a5))
181
-
182
- ## [1.2.1](https://github.com/omnibrain/magic-translate-react/compare/v1.2.0...v1.2.1) (2022-12-21)
183
-
184
-
185
- ### Bug Fixes
186
-
187
- * fix check if release was created in release action ([31e9de8](https://github.com/omnibrain/magic-translate-react/commit/31e9de8a9ac27bba22d4eb95f1042f4d0af5e567))
188
-
189
- ## [1.2.0](https://github.com/omnibrain/magic-translate-react/compare/v1.1.0...v1.2.0) (2022-12-21)
190
-
191
-
192
- ### Features
193
-
194
- * add release to npm to release-please action ([691e31d](https://github.com/omnibrain/magic-translate-react/commit/691e31d0c34500db88625563fcd65c439fc83e8e))
195
-
196
- ## [1.1.0](https://github.com/omnibrain/magic-translate-react/compare/v1.0.0...v1.1.0) (2022-12-21)
197
-
198
-
199
- ### Features
200
-
201
- * pass content with options to the data loader ([9ef16c3](https://github.com/omnibrain/magic-translate-react/commit/9ef16c358a57e214f9550e1d8a7594b8c25f5275))
202
-
203
- ## 1.0.0 (2022-12-19)
204
-
205
-
206
- ### Features
207
-
208
- * initial implementation of translate component ([e59e874](https://github.com/omnibrain/magic-translate-react/commit/e59e874f7cebfba3e78430d8cd8e207217c94524))