Skip to content

Outdated import the package documentation (require) for ESM packages #2287

@MikeMcC399

Description

@MikeMcC399

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions