@xh/hoist 59.0.2 → 59.0.3
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 +9 -0
- package/appcontainer/AppContainerModel.ts +5 -0
- package/core/XH.ts +16 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 59.0.3 - 2023-08-25
|
|
4
|
+
|
|
5
|
+
### ⚙️ Technical
|
|
6
|
+
|
|
7
|
+
* New `XH.flags` property to govern experimental, hotfix, or otherwise provisional features.
|
|
8
|
+
|
|
9
|
+
* Provide temporary workaround to chromium bug effecting BigNumber. Enabled via flag
|
|
10
|
+
`applyBigNumberWorkaround`. See https://github.com/MikeMcl/bignumber.js/issues/354.
|
|
11
|
+
|
|
3
12
|
## 59.0.2 - 2023-08-24
|
|
4
13
|
|
|
5
14
|
### 🐞 Bug Fixes
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
import {Icon} from '@xh/hoist/icon';
|
|
19
19
|
import {action, when as mobxWhen} from '@xh/hoist/mobx';
|
|
20
20
|
import {wait} from '@xh/hoist/promise';
|
|
21
|
+
import numbro from 'numbro';
|
|
21
22
|
import {createRoot} from 'react-dom/client';
|
|
22
23
|
import {
|
|
23
24
|
AlertBannerService,
|
|
@@ -191,6 +192,10 @@ export class AppContainerModel extends HoistModel {
|
|
|
191
192
|
await installServicesAsync(TrackService);
|
|
192
193
|
await installServicesAsync([EnvironmentService, PrefService, JsonBlobService]);
|
|
193
194
|
|
|
195
|
+
if (XH.flags.applyBigNumberWorkaround) {
|
|
196
|
+
numbro['BigNumber'].clone();
|
|
197
|
+
}
|
|
198
|
+
|
|
194
199
|
// Confirm hoist-core version after environment service loaded
|
|
195
200
|
const hcVersion = XH.environmentService.get('hoistCoreVersion');
|
|
196
201
|
if (!checkMinVersion(hcVersion, MIN_HOIST_CORE_VERSION)) {
|
package/core/XH.ts
CHANGED
|
@@ -361,6 +361,22 @@ export class XHApi {
|
|
|
361
361
|
return this.refreshContextModel.refreshAsync();
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
+
/**
|
|
365
|
+
* Flags for controlling experimental, hotfix, or otherwise provisional features.
|
|
366
|
+
*
|
|
367
|
+
* Configure via `xhFlags` config.
|
|
368
|
+
*
|
|
369
|
+
* Currently supported (subject to changes without API notice):
|
|
370
|
+
*
|
|
371
|
+
* - applyBigNumberWorkaround - workaround for mysterious Chromium bug that causes
|
|
372
|
+
* BigNumber to lose precision after a certain number of invocations.
|
|
373
|
+
* See https://github.com/MikeMcl/bignumber.js/issues/354
|
|
374
|
+
* See https://bugs.chromium.org/p/v8/issues/detail?id=14271#c11
|
|
375
|
+
*/
|
|
376
|
+
get flags(): PlainObject {
|
|
377
|
+
return XH.getConf('xhFlags', {});
|
|
378
|
+
}
|
|
379
|
+
|
|
364
380
|
//------------------------
|
|
365
381
|
// Theme Support
|
|
366
382
|
//------------------------
|