Skip to content

Bump @actions/core from 2.0.2 to 3.0.1 - #108

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/actions/core-3.0.1
Closed

Bump @actions/core from 2.0.2 to 3.0.1#108
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/actions/core-3.0.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Apr 22, 2026

Copy link
Copy Markdown
Contributor

Bumps @actions/core from 2.0.2 to 3.0.1.

Changelog

Sourced from @​actions/core's changelog.

3.0.1

  • Bump undici from 6.23.0 to 6.24.1 #2348

3.0.0

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

2.0.3

  • Bump @actions/http-client to 3.0.2

2.0.1

  • Bump @​actions/exec from 1.1.1 to 2.0.0 #2199

2.0.0

  • Add support for Node 24 #2110
  • Bump @​actions/http-client from 2.0.1 to 3.0.0

1.11.1

  • Fix uses of crypto.randomUUID on Node 18 and earlier #1842

1.11.0

  • Add platform info utilities #1551
  • Remove dependency on uuid package #1824

1.10.1

  • Fix error message reference in oidc utils #1511

1.10.0

  • saveState and setOutput now use environment files if available #1178
  • getMultilineInput now correctly trims whitespace by default #1185

1.9.1

  • Randomize delimiter when calling core.exportVariable

1.9.0

  • Added toPosixPath, toWin32Path and toPlatformPath utilities #1102

1.8.2

... (truncated)

Commits

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Apr 22, 2026
@actions/core 3.0.0 is ESM-only ("type": "module", and its exports map
offers only an "import" condition). The upstream release notes state
that "CommonJS consumers must use dynamic import() instead of
require()", so a plain version bump cannot work: ncc failed with
"Package path . is not exported from package @actions/core", which
also aborted `npm ci` via the prepare script and took the units job
down with it.

Migrate the action to ESM instead:

- Add "type": "module" and convert index.js and find-python-projects.js
  to import/export. ncc then bundles dist/index.js as ESM and emits its
  own dist/package.json type marker plus sourcemap-register.cjs,
  replacing the now-stale sourcemap-register.js.
- Rewrite the test mocks. ESM namespace objects are sealed, so
  jest.spyOn can no longer patch @actions/core or the local module;
  both tests now use jest.unstable_mockModule ahead of a dynamic
  import. Native ESM in Jest needs --experimental-vm-modules, so the
  test script invokes jest through node directly.
- Point eslint at the new module system (sourceType module, ecmaVersion
  2022 for top-level await) and drop the commonjs globals.

Also declares globals, @eslint/js and @eslint/eslintrc, which
eslint.config.cjs requires but nothing depended on. These stopped being
hoisted transitives when eslint 10 landed in #113, so `npm run lint`
had been failing outright on main; declaring them is what makes the
lint change above verifiable.

action.yml is unchanged: the node20 runtime runs ESM fine, and
@actions/core 3 sets no engines constraint. All 4 snapshots still match
byte-for-byte, so behavior is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@BrandonLWhite
BrandonLWhite force-pushed the dependabot/npm_and_yarn/actions/core-3.0.1 branch from f1d3e38 to 9d72982 Compare September 1, 2026 20:24
@BrandonLWhite

Copy link
Copy Markdown
Member

This one could not be fixed by a rebuild, so I rebased it onto current main and migrated the action to ESM. Summary for review:

Why the bump was failing. @actions/core 3.0.0 is ESM-only — "type": "module", and its exports map offers only an "import" condition, no "require". The upstream release notes say CommonJS consumers must switch to dynamic import(). So require("@actions/core") from this CJS action fails:

Module not found: Package path . is not exported from package @actions/core

That surfaced as two separate red checks: ncc could not build (check-dist), and because prepare runs as an install script, it also aborted npm ci and took units down with it. @actions/exec 3 and @actions/http-client 4 went ESM-only too, so this unblocks the rest of the @actions/* line.

What changed.

  • "type": "module"; index.js and find-python-projects.js converted to import/export.
  • ncc now bundles dist/index.js as ESM and emits its own dist/package.json type marker plus sourcemap-register.cjs, replacing the stale sourcemap-register.js.
  • Test mocks reworked: ESM namespace objects are sealed, so jest.spyOn can no longer patch @actions/core or the local module. Both tests use jest.unstable_mockModule ahead of a dynamic import, and the test script gains --experimental-vm-modules.
  • eslint config moved to sourceType: "module" / ecmaVersion: 2022.

One bundled fix worth flagging. eslint.config.cjs requires globals, @eslint/js and @eslint/eslintrc, but none were declared — they stopped being hoisted transitives when eslint 10 landed in #113, so npm run lint has been failing on main independently of this PR. I declared them because the lint config change above is otherwise unverifiable. Happy to split that into its own PR if you'd rather keep this one to the bump.

Verification. npm run all is clean: lint passes, 12/12 tests pass, and all 4 snapshots match byte-for-byte, so behavior is unchanged. dist/index.js is byte-identical when built under Node 20 and Node 24, so CI's Node 22 build reproduces it. I also ran the built bundle directly against test-fixtures/multi-project and confirmed it still discovers all 5 projects and emits paths, projects and projects-by-command.

action.yml is unchanged — the node20 runtime executes ESM fine and @actions/core 3 declares no engines constraint.

🤖 Generated with Claude Code

@dependabot @github

dependabot Bot commented on behalf of github Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/actions/core-3.0.1 branch September 1, 2026 21:04
BrandonLWhite added a commit that referenced this pull request Sep 1, 2026
… PRs

Summary:
=======
Three Dependabot PRs (#108, #114, #120) were all stuck on a red `check-dist`
because Dependabot only edits `package.json` / `package-lock.json` and never
rebuilds the checked-in `dist/` bundle. #108 was additionally red on `units`:
`@actions/core` 3.0.0 is ESM-only and its `exports` map declares no `require`
condition, so `require("@actions/core")` fails outright with
`ERR_PACKAGE_PATH_NOT_EXPORTED` on any Node version. Taking that bump therefore
required converting the action from CommonJS to ESM, which pairs naturally with
moving the published runtime to node24.

Two latent CI defects surfaced while verifying the above and are fixed here:

- `node-version-file: package.json` never resolved, because the manifest had no
  `engines.node`. setup-node logged "Could not determine node version ...
  Falling back" and silently built `dist/` on the runner's Node 22, so CI was
  not exercising the runtime the action declares.
- The `check-dist` comparison used `git diff`, which cannot see files the build
  newly adds. ncc 0.44 emits `dist/package.json` and renames
  `sourcemap-register.js` to `.cjs`; without the untracked-file check, shipping
  the action with a missing `sourcemap-register.cjs` would have passed CI and
  failed at runtime.

Actions:
=======
- Convert `index.js` and `find-python-projects.js` to ESM named exports and set
  `"type": "module"`.
- Rewrite the test suite to mock via `jest.unstable_mockModule`, since frozen
  ESM namespaces cannot be patched by `jest.spyOn`; run jest under
  `--experimental-vm-modules`. All 12 tests and 4 snapshots pass unchanged,
  confirming the migration is behavior-neutral.
- Bump `@actions/core` to ^3.0.1 (#108) and `@vercel/ncc` to ^0.44.0 (#114).
- Apply the npm_and_yarn security group (#120): brace-expansion 1.1.12 -> 1.1.18
  and 2.1.0 -> 2.1.4, flatted 3.3.3 -> 3.4.4, undici 5.29.0 -> 6.28.0.
- Set `runs.using` to node24 in `action.yml` and add `engines.node: ^24.0.0` so
  `node-version-file: package.json` resolves.
- Add setup-node to the `units` job so unit tests run on the same pinned Node.
- Harden the `check-dist` comparison to also fail on untracked files in `dist/`.
- Repair `npm run lint`, broken since the eslint 10 bump: the flat config
  imported `globals`, `@eslint/js` and `@eslint/eslintrc`, none of which were
  declared and which eslint 10 no longer provides transitively. Declare
  `globals` and `@eslint/js`, and drop the `FlatCompat`/eslintrc shim in favor
  of `js.configs.recommended`.
- Rebuild `dist/`; add `dist/package.json` and `dist/sourcemap-register.cjs`,
  remove the now-stale `dist/sourcemap-register.js`.

BREAKING CHANGE: the action now runs on the node24 runtime and its sources are
ESM. Consumers referencing the action by tag are unaffected, but GitHub Actions
runners must support `runs.using: node24`.

ai-generated: true
BrandonLWhite added a commit that referenced this pull request Sep 1, 2026
… PRs (#121)

* chore!: migrate to ESM, adopt node24 runtime, roll up open Dependabot PRs

Summary:
=======
Three Dependabot PRs (#108, #114, #120) were all stuck on a red `check-dist`
because Dependabot only edits `package.json` / `package-lock.json` and never
rebuilds the checked-in `dist/` bundle. #108 was additionally red on `units`:
`@actions/core` 3.0.0 is ESM-only and its `exports` map declares no `require`
condition, so `require("@actions/core")` fails outright with
`ERR_PACKAGE_PATH_NOT_EXPORTED` on any Node version. Taking that bump therefore
required converting the action from CommonJS to ESM, which pairs naturally with
moving the published runtime to node24.

Two latent CI defects surfaced while verifying the above and are fixed here:

- `node-version-file: package.json` never resolved, because the manifest had no
  `engines.node`. setup-node logged "Could not determine node version ...
  Falling back" and silently built `dist/` on the runner's Node 22, so CI was
  not exercising the runtime the action declares.
- The `check-dist` comparison used `git diff`, which cannot see files the build
  newly adds. ncc 0.44 emits `dist/package.json` and renames
  `sourcemap-register.js` to `.cjs`; without the untracked-file check, shipping
  the action with a missing `sourcemap-register.cjs` would have passed CI and
  failed at runtime.

Actions:
=======
- Convert `index.js` and `find-python-projects.js` to ESM named exports and set
  `"type": "module"`.
- Rewrite the test suite to mock via `jest.unstable_mockModule`, since frozen
  ESM namespaces cannot be patched by `jest.spyOn`; run jest under
  `--experimental-vm-modules`. All 12 tests and 4 snapshots pass unchanged,
  confirming the migration is behavior-neutral.
- Bump `@actions/core` to ^3.0.1 (#108) and `@vercel/ncc` to ^0.44.0 (#114).
- Apply the npm_and_yarn security group (#120): brace-expansion 1.1.12 -> 1.1.18
  and 2.1.0 -> 2.1.4, flatted 3.3.3 -> 3.4.4, undici 5.29.0 -> 6.28.0.
- Set `runs.using` to node24 in `action.yml` and add `engines.node: ^24.0.0` so
  `node-version-file: package.json` resolves.
- Add setup-node to the `units` job so unit tests run on the same pinned Node.
- Harden the `check-dist` comparison to also fail on untracked files in `dist/`.
- Repair `npm run lint`, broken since the eslint 10 bump: the flat config
  imported `globals`, `@eslint/js` and `@eslint/eslintrc`, none of which were
  declared and which eslint 10 no longer provides transitively. Declare
  `globals` and `@eslint/js`, and drop the `FlatCompat`/eslintrc shim in favor
  of `js.configs.recommended`.
- Rebuild `dist/`; add `dist/package.json` and `dist/sourcemap-register.cjs`,
  remove the now-stale `dist/sourcemap-register.js`.

BREAKING CHANGE: the action now runs on the node24 runtime and its sources are
ESM. Consumers referencing the action by tag are unaffected, but GitHub Actions
runners must support `runs.using: node24`.

ai-generated: true

* chore: declare @jest/globals and match sibling repos' test invocation

Summary:
=======
The ESM test suite imports `jest`, `describe`, `it`, `expect` and `beforeEach`
from `@jest/globals`, but that package was only reachable transitively through
`jest`. That is the same undeclared-import bug class that had already broken
`npm run lint` on main, so declare it explicitly before it bites.

Also aligns the test script with the sibling action repos
(pipx-install-action, python-test-matrix-generator-action), which additionally
silences the VM-modules ExperimentalWarning.

Actions:
=======
- Add `@jest/globals` ^30.4.2 to devDependencies.
- Change the `test` script to
  `NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 jest`.

ai-generated: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant