Skip to content

Bundle Dependabot NPM updates with ESM compatibility fixes for @actions/github v9#14512

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/update-dependencies-actions-setup-js
Draft

Bundle Dependabot NPM updates with ESM compatibility fixes for @actions/github v9#14512
Copilot wants to merge 2 commits intomainfrom
copilot/update-dependencies-actions-setup-js

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Bundles 5 Dependabot updates for actions/setup/js/: @actions/core (3.0.0), @actions/io (3.0.2), @actions/github (9.0.0), @actions/glob (0.6.1), and vitest (4.0.18).

ESM Migration

@actions/github v9.0.0 is ESM-only ("type": "module"), breaking CommonJS require() imports. Converted to dynamic imports:

// Before: synchronous require
const { getOctokit } = require("@actions/github");
const octokit = getOctokit(token);

// After: async dynamic import
async function setupProjectGitHubClient() {
  const { getOctokit } = await import("@actions/github");
  const octokit = getOctokit(token);
  return octokit;
}

Changes

  • safe_output_unified_handler_manager.cjs: Made setupProjectGitHubClient() async, uses dynamic import, updated call site with await
  • frontmatter_hash_github_api.test.cjs: Moved import inside test function that conditionally uses GitHub API
  • test-live-github-api.cjs: Moved import into async main function
  • safe_output_unified_handler_manager.test.cjs: Updated assertions for async function (expect(...).rejects instead of expect(() => ...))

Package lock regenerated with npm install.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Dependabot Burner] Dependabot: NPM Dependencies - actions/setup/js/ directory</issue_title>
<issue_description>## 📦 Dependency Update Bundle

This issue tracks Dependabot dependency updates for the actions/setup/js/ directory (npm/yarn packages).

Pull Requests Included

Summary

Runtime: npm/yarn
Manifest: /actions/setup/js
PRs: 5

⚠️ Breaking Changes: Several of these updates involve breaking changes (ESM-only packages). Careful testing required.

Next Steps

  1. Review all PRs together for compatibility
  2. Test the combined changes locally (especially ESM migration)
  3. Merge all PRs in sequence or create a combined PR
  4. Close this parent issue once complete

This issue was created by the Dependabot Burner workflow to bundle related dependency updates.

AI generated by Dependabot Burner

  • expires on Feb 15, 2026, 12:29 PM UTC

Comments on the Issue (you are @copilot in this section)

  • Fixes github/gh-aw#14508

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Update @actions/core from 2.0.2 to 3.0.0
- Update @actions/io from 2.0.0 to 3.0.2
- Update @actions/github from 7.0.0 to 9.0.0
- Update @actions/glob from 0.5.0 to 0.6.1
- Update vitest from 4.0.17 to 4.0.18
- Update @vitest/coverage-v8 and @vitest/ui to 4.0.18

Convert @actions/github imports to dynamic imports for ESM compatibility:
- @actions/github v9.0.0 is now ESM-only
- Use dynamic import() in safe_output_unified_handler_manager.cjs
- Use dynamic import() in frontmatter_hash_github_api.test.cjs
- Use dynamic import() in test-live-github-api.cjs
- Update setupProjectGitHubClient to be async
- Update tests to await setupProjectGitHubClient calls

All 164 JavaScript test files pass (3400 tests)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update NPM dependencies in actions/setup/js directory Bundle Dependabot NPM updates with ESM compatibility fixes for @actions/github v9 Feb 8, 2026
Copilot AI requested a review from pelikhan February 8, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants