canirequire

canirequire › ESM-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. Markdown · 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 with a plain require()-able CommonJS entry is 8.1.0, published May 28, 2023; it declares support for Node.js >=14.17.

On Node.js 22.12+ and newer (@semantic-release/github@12.0.9 declares Node.js ^22.14.0 || >= 24.10.0), require("@semantic-release/github") works with the latest version: Node.js loads synchronous ES modules through require(). Verified on Node.js 22, 24 and 26. Node.js 18 has no require(esm), and @semantic-release/github@12.0.9 declares Node.js ^22.14.0 || >= 24.10.0, so 18 is outside its supported range anyway.

@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.

What to do

  1. On Node.js 22.12+ and newer (@semantic-release/github@12.0.9 declares Node.js ^22.14.0 || >= 24.10.0), require("@semantic-release/github") works with the latest version: Node.js loads synchronous ES modules through require(). Verified on Node.js 22, 24 and 26.
  2. From a CommonJS file, use a dynamic import inside an async function: const github = await import("@semantic-release/github"). That works on every Node.js version the package supports (^22.14.0 || >= 24.10.0).
  3. If you need a synchronous require() or run Node.js 18: npm install @semantic-release/github@8.1.0, the last CommonJS release (published May 28, 2023); it declares Node.js >=14.17.
  4. @semantic-release/github@12.0.9 declares engines "^22.14.0 || >= 24.10.0", so Node.js 18, 20 are unsupported regardless: upgrade Node.js or pin an older release.
  5. TypeScript: no types are available for @semantic-release/github; declare the module yourself if you need them.
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
Weekly downloads
2.8M
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.0✓ works✓ works

How to import @semantic-release/github

ES modules (import)

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

Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.

CommonJS (require)

// Node.js 22.12+ and newer (verified):
const github = require("@semantic-release/github");

// Any Node.js version the package supports (^22.14.0 || >= 24.10.0), from an async function:
async function main() {
  const github = await import("@semantic-release/github");
}

// Or pin the last CommonJS release (declares Node.js >=14.17):
// 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, corrected where a runtime test of that version contradicted them (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 with a plain require()-able CommonJS entry is 8.1.0, published May 28, 2023; it declares support for Node.js >=14.17.

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; it declares Node.js >=14.17. 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?

From a CommonJS file, use a dynamic import inside an async function: const github = await import("@semantic-release/github"). That works on every Node.js version the package supports (^22.14.0 || >= 24.10.0). On Node.js 22.12+ and newer (@semantic-release/github@12.0.9 declares Node.js ^22.14.0 || >= 24.10.0), require("@semantic-release/github") works with the latest version: Node.js loads synchronous ES modules through require(). Verified on Node.js 22, 24 and 26. Alternatively pin @semantic-release/github@8.1.0 (declares Node.js >=14.17).

Does @semantic-release/github work in Bun?

Yes. import "@semantic-release/github" loaded successfully in Bun 1.4.0 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