file-type
Advanced tools
+2
-1
| { | ||
| "name": "file-type", | ||
| "version": "22.0.0", | ||
| "version": "22.0.1", | ||
| "description": "Detect the file type of a file, stream, or data", | ||
@@ -244,2 +244,3 @@ "license": "MIT", | ||
| "commonmark": "^0.31.2", | ||
| "esbuild": "^0.28.0", | ||
| "get-stream": "^9.0.1", | ||
@@ -246,0 +247,0 @@ "tsd": "^0.33.0", |
+7
-2
@@ -65,2 +65,7 @@ /** | ||
| // Keep the specifier non-literal at the call site so browser bundlers do not try to resolve Node-only imports. | ||
| function importAtRuntime(specifier) { | ||
| return import(specifier); | ||
| } | ||
| // Wrap stream in an identity TransformStream to avoid BYOB readers. | ||
@@ -262,4 +267,4 @@ // Node.js has a bug where calling controller.close() inside a BYOB stream's | ||
| const [{default: fsPromises}, {FileTokenizer}] = await Promise.all([ | ||
| import('node:fs/promises'), | ||
| import('strtok3'), | ||
| importAtRuntime('node:fs/promises'), | ||
| importAtRuntime('strtok3'), | ||
| ]); | ||
@@ -266,0 +271,0 @@ const fileHandle = await fsPromises.open(path, fsPromises.constants.O_RDONLY | fsPromises.constants.O_NONBLOCK); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
135669
0.16%3244
0.12%0
-100%8
14.29%