actions / actions/toolkit

Outdated import the package documentation (require) for ESM packages

Open
#2,287 0 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Situation

Latest updates to packages in this repo consist of a set of releases that are ESM only.

For instance @actions/core@3.0.0 says:

  • Breaking change: Package is now ESM-only
  • CommonJS consumers must use dynamic import() instead of require()

README > Import the package documentation continues to show:

// javascript
const core = require('@actions/core');

// typescript
import * as core from '@actions/core';

Suggestion

Please modify the documentation so that it is correct for the ESM releases. Possibly it should describe both the usage before the ESM release and after, so that it covers a transition period.

cc: danwkennedy

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/core/README.md at the “Import the package” section and compare its examples with the ESM-only guidance in packages/core/RELEASES.md for version 3.0.0. Update the documentation to accurately explain imports for ESM releases, including the relevant transition guidance, and confirm the examples no longer recommend an invalid require() usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.