canirequire

canirequireDual (CommonJS + ESM) › file-entry-cache

Is file-entry-cache ESM-only? Can you require() it?

A lightweight cache for file metadata, ideal for processes that work on a specific set of files and only need to reprocess files that have changed since the last run

Last verified Sep 9, 2026 against file-entry-cache@11.1.5. JSON

Dual (CommonJS + ESM) Dual package — both require() and import work

file-entry-cache publishes both a CommonJS entry and a native ESM entry (ESM added in 10.0.0). require("file-entry-cache") and import "file-entry-cache" both work on every supported Node.js version and in Bun.

Latest
11.1.5 (Jun 27, 2026)
Module format
Dual (CommonJS + ESM)
Last CommonJS version
11.1.5
Native ESM since
10.0.0
TypeScript types
Bundled
Node engines
not declared
Weekly downloads
134.5M
License
MIT

Does file-entry-cache@11.1.5 actually load? Runtime test results

Installed and executed on Sep 9, 2026 with require("file-entry-cache") from a CommonJS file and import "file-entry-cache" from an ES module.

Runtimerequire("file-entry-cache")import "file-entry-cache"
Node.js 18✓ works✓ works
Node.js 20✓ works✓ works
Node.js 22✓ works✓ works
Node.js 24✓ works✓ works
Node.js 26✓ works✓ works
Bun 1.4✓ works✓ works

How to import file-entry-cache

ES modules (import)

import fileEntryCache from "file-entry-cache";

CommonJS (require)

const fileEntryCache = require("file-entry-cache");

Module format by version

Derived from the type, main and exports fields of every stable release on npm (39 versions; the newest 39 shown).

VersionsFormatFirst published
10.0.0 – 11.1.5Dual (CommonJS + ESM)Oct 4, 2024
1.0.0 – 9.1.0CommonJSMar 2, 2015

Frequently asked

Is file-entry-cache ESM-only?

file-entry-cache@11.1.5 ships CommonJS and ESM builds. file-entry-cache publishes both a CommonJS entry and a native ESM entry (ESM added in 10.0.0). require("file-entry-cache") and import "file-entry-cache" both work on every supported Node.js version and in Bun.

Can I require file-entry-cache?

Yes. file-entry-cache ships a CommonJS entry, so require("file-entry-cache") works on every Node.js version, alongside the native ESM entry for import.

Does file-entry-cache work in Bun?

Yes. import "file-entry-cache" loaded successfully in Bun 1.4 on Sep 9, 2026.

Does file-entry-cache ship TypeScript types?

Yes. file-entry-cache bundles its own type declarations; no @types package is needed.

Links

Other dual (commonjs + esm) packages

Similar popularity