canirequire

canirequireESM-only › @semantic-release/github

Is @semantic-release/github ESM-only? Can you require() it?

semantic-release plugin to publish a GitHub release and comment on released Pull Requests/Issues

Last verified Sep 9, 2026 against @semantic-release/github@12.0.9. JSON

ESM-only ESM-only since 9.0.0 — last CommonJS version is 8.1.0

@semantic-release/github dropped its CommonJS build in 9.0.0 (June 2023). The last version you can require() on every Node.js version, including 18 and older, is 8.1.0, published May 28, 2023.

On Node.js 20.19+, 22.12+ and every newer release, require("@semantic-release/github") works anyway: Node can load synchronous ES modules through require(). Verified on Node 22, 24, 26. Node.js 18 and older still fail with ERR_REQUIRE_ESM.

@semantic-release/github@12.0.9 declares engines "^22.14.0 || >= 24.10.0", so Node.js 18, 20 are outside its supported range regardless of module format.

Latest
12.0.9 (Jul 1, 2026)
Module format
ESM-only
Last CommonJS version
8.1.0
ESM-only since
9.0.0 (Jun 2, 2023)
TypeScript types
None
Node engines
^22.14.0 || >= 24.10.0
License
MIT

Does @semantic-release/github@12.0.9 actually load? Runtime test results

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

Runtimerequire("@semantic-release/github")import "@semantic-release/github"
Node.js 18✗ failsERR_REQUIRE_ESM✗ failsReferenceError
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 @semantic-release/github

ES modules (import)

import github from "@semantic-release/github";

CommonJS (require)

// Node.js 20.19+ / 22.12+ / newer (package has no top-level await):
const github = require("@semantic-release/github");

// Any Node.js version:
const github = await import("@semantic-release/github");

// Or pin the last CommonJS release:
// npm install @semantic-release/github@8.1.0

Module format by version

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

VersionsFormatFirst published
9.0.0 – 12.0.9ESM-onlyJun 2, 2023
8.0.7 – 8.1.0CommonJSNov 28, 2022

Frequently asked

Is @semantic-release/github ESM-only?

@semantic-release/github@12.0.9 is ESM-only. @semantic-release/github dropped its CommonJS build in 9.0.0 (June 2023). The last version you can require() on every Node.js version, including 18 and older, is 8.1.0, published May 28, 2023.

Which version of @semantic-release/github still supports CommonJS / require()?

8.1.0 is the last version of @semantic-release/github with a CommonJS build. Install it with "npm install @semantic-release/github@8.1.0". Every version from 9.0.0 on is ESM-only.

How do I use @semantic-release/github from a CommonJS file?

Use a dynamic import: const mod = await import("@semantic-release/github"). On Node.js 20.19+, 22.12+ and newer, a plain require("@semantic-release/github") also works for ESM packages that do not use top-level await. Alternatively pin @semantic-release/github@8.1.0.

Does @semantic-release/github work in Bun?

Yes. import "@semantic-release/github" loaded successfully in Bun 1.4 on Sep 9, 2026.

Does @semantic-release/github ship TypeScript types?

No. @semantic-release/github ships no type declarations and there is no @types package for it.

Links

Other esm-only packages

Similar popularity