fix: switch to file-type v19.1.0 (#7459)

The official `file-type` package has replaced the usage of node:buffer with Uint8Array. This change allows it to run safely in the browser now.

Related to https://github.com/sindresorhus/file-type/issues/578
This commit is contained in:
lawvs
2024-07-12 10:27:48 +00:00
parent 5ede985a3a
commit 2f784ae539
3 changed files with 45 additions and 5 deletions

View File

@@ -16,9 +16,9 @@ import {
ViewBarIcon,
} from '@blocksuite/icons/rc';
import type { BlockModel } from '@blocksuite/store';
import { fileTypeFromBuffer } from '@sgtpooki/file-type';
import { useService } from '@toeverything/infra';
import clsx from 'clsx';
import { fileTypeFromBuffer } from 'file-type';
import { useErrorBoundary } from 'foxact/use-error-boundary';
import type { PropsWithChildren, ReactElement } from 'react';
import {