canirequire

canirequireDual (CommonJS + ESM) › release-it

Is release-it ESM-only? Can you require() it?

Generic CLI tool to automate versioning and package publishing-related tasks.

Last verified Sep 9, 2026 against release-it@21.0.2. JSON

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

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

Latest
21.0.2 (Aug 9, 2026)
Module format
Dual (CommonJS + ESM)
Last CommonJS version
21.0.2
Native ESM since
15.0.0
TypeScript types
Bundled
Node engines
^22.21.0 || >=24.0.0
Weekly downloads
815K
License
MIT

Does release-it@21.0.2 actually load? Runtime test results

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

Runtimerequire("release-it")import "release-it"
Node.js 18✗ failsERR_REQUIRE_ESM✗ failsSyntaxError
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

A failing require() on a CommonJS package usually means the package needs a browser/DOM global, a peer dependency, or a native binary that is not available in a bare Node.js process.

How to import release-it

ES modules (import)

import releaseIt from "release-it";

CommonJS (require)

const releaseIt = require("release-it");

Module format by version

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

VersionsFormatFirst published
17.4.1 – 21.0.2Dual (CommonJS + ESM)Jul 1, 2024
15.10.5 – 17.4.0ESM-onlyJun 2, 2023

Frequently asked

Is release-it ESM-only?

release-it@21.0.2 ships CommonJS and ESM builds. release-it publishes both a CommonJS entry and a native ESM entry (ESM added in 15.0.0). require("release-it") and import "release-it" both work on every supported Node.js version and in Bun.

Can I require release-it?

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

Does release-it work in Bun?

Yes. import "release-it" loaded successfully in Bun 1.4 on Sep 9, 2026.

Does release-it ship TypeScript types?

Yes. release-it bundles its own type declarations; no @types package is needed.

Links

Other dual (commonjs + esm) packages

Similar popularity