mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 11:36:25 +08:00
chore(core): remove deprecated intl polyfill (#8526)
This commit is contained in:
@@ -51,7 +51,6 @@
|
|||||||
"idb": "^8.0.0",
|
"idb": "^8.0.0",
|
||||||
"idb-keyval": "^6.2.1",
|
"idb-keyval": "^6.2.1",
|
||||||
"image-blob-reduce": "^4.1.0",
|
"image-blob-reduce": "^4.1.0",
|
||||||
"intl-segmenter-polyfill-rs": "^0.1.7",
|
|
||||||
"is-svg": "^5.0.0",
|
"is-svg": "^5.0.0",
|
||||||
"jotai": "^2.8.0",
|
"jotai": "^2.8.0",
|
||||||
"jotai-scope": "^0.7.0",
|
"jotai-scope": "^0.7.0",
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { polyfillDispose } from './dispose';
|
import { polyfillDispose } from './dispose';
|
||||||
import { polyfillI18n } from './intl-segmenter';
|
|
||||||
import { polyfillPromise } from './promise-with-resolvers';
|
import { polyfillPromise } from './promise-with-resolvers';
|
||||||
import { polyfillEventLoop } from './request-idle-callback';
|
import { polyfillEventLoop } from './request-idle-callback';
|
||||||
import { polyfillResizeObserver } from './resize-observer';
|
import { polyfillResizeObserver } from './resize-observer';
|
||||||
@@ -11,7 +10,6 @@ export function polyfillElectron() {
|
|||||||
export async function polyfillBrowser() {
|
export async function polyfillBrowser() {
|
||||||
polyfillResizeObserver();
|
polyfillResizeObserver();
|
||||||
polyfillEventLoop();
|
polyfillEventLoop();
|
||||||
await polyfillI18n();
|
|
||||||
await polyfillPromise();
|
await polyfillPromise();
|
||||||
await polyfillDispose();
|
await polyfillDispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
export async function polyfillI18n() {
|
|
||||||
if (Intl.Segmenter === undefined) {
|
|
||||||
await import('intl-segmenter-polyfill-rs').then(({ Segmenter }) => {
|
|
||||||
Object.defineProperty(Intl, 'Segmenter', {
|
|
||||||
value: Segmenter,
|
|
||||||
configurable: true,
|
|
||||||
writable: true,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -406,7 +406,6 @@ __metadata:
|
|||||||
idb: "npm:^8.0.0"
|
idb: "npm:^8.0.0"
|
||||||
idb-keyval: "npm:^6.2.1"
|
idb-keyval: "npm:^6.2.1"
|
||||||
image-blob-reduce: "npm:^4.1.0"
|
image-blob-reduce: "npm:^4.1.0"
|
||||||
intl-segmenter-polyfill-rs: "npm:^0.1.7"
|
|
||||||
is-svg: "npm:^5.0.0"
|
is-svg: "npm:^5.0.0"
|
||||||
jotai: "npm:^2.8.0"
|
jotai: "npm:^2.8.0"
|
||||||
jotai-scope: "npm:^0.7.0"
|
jotai-scope: "npm:^0.7.0"
|
||||||
@@ -22567,13 +22566,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"intl-segmenter-polyfill-rs@npm:^0.1.7":
|
|
||||||
version: 0.1.7
|
|
||||||
resolution: "intl-segmenter-polyfill-rs@npm:0.1.7"
|
|
||||||
checksum: 10/e216d8e4c299ea319f8098fbf03df6a06e841fcbbfcfbb4735d3df8cf8088e2d644398b70ff21b14514f818424833efb03ff6cb9fee3d43df57f9588ee3a07f9
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"invariant@npm:^2.2.4":
|
"invariant@npm:^2.2.4":
|
||||||
version: 2.2.4
|
version: 2.2.4
|
||||||
resolution: "invariant@npm:2.2.4"
|
resolution: "invariant@npm:2.2.4"
|
||||||
|
|||||||
Reference in New Issue
Block a user