🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

file-type

Package Overview
Dependencies
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-type - npm Package Compare versions

Comparing version
22.0.0
to
22.0.1
+2
-1
package.json
{
"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",

@@ -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);