Review of Bump @octokit/rest from 20.1.1 to 21.0.0
Overview
The Dependabot-generated PR #7041 is a notification the package octokit/rest, used by the "Schedule Daily" workflow, has an update from v20.1.1 to v21.0.0. The new version use ES Modules (ESM) and no longer supports Common JS modules, which necessitates minor changes to the "Schedule Daily" workflow.
Details
The main difference between ESM and Common JS modules is that modules need to be dynamically imported, and require() is not supported.
Action Items
This issue involves testing GitHub Actions, and you will need to have a testing environment and Projects Beta set up in your repo. See "Resources/Instructions" below. [^1] [^2]
Starting from PR #7041 [^3] copy the branch as if you are reviewing the PR, therefore:
- [ ] Update package-lock.json per the PR
- [ ] In package.json line 10, replace the existing octokit version number and update to:
"@octokit/rest": "^21.0.0",
From the recommendations provide in the Pure ESM Package [^4]:
- In package.json:
- [ ] At line 5, replace:
with:"main": "./github-actions/get-project-data.js","exports": "./github-actions/get-project-data.js", "type":"module", "engines": { "node": ">=18" }, - [ ] On line 3, since we are making significant changes update the version number:
"version": "3.0.0",
- [ ] At line 5, replace:
- [ ] In get-project-data.js:
- [ ] Delete line 1:
@actions/coreis not being used - [ ] For the next four lines, replace:
with:const fs = require("fs"); const { Octokit } = require("@octokit/rest"); const trueContributorsMixin = require("true-github-contributors"); const _ = require('lodash');// @octokit/rest revised from v20.0.1 to v21.0.0 suggested // by dependabot. *** Package v21.0.0 is now ESM *** import fs from "fs"; import { Octokit } from "@octokit/rest"; import trueContributorsMixin from "true-github-contributors"; import _ from 'lodash';
- [ ] Delete line 1:
- [ ] Confirm that "Schedule Daily" workflow runs as expected in your repo.
Resources/Instructions
[^1]: Hack for LA's GitHub Actions [^2]: "Schedule Daily 1100" wiki [^3]: #7041 [^4]: Pure ESM Package for moving from CommonJS to ESM
Hi @t-will-gillis, thank you for taking up this issue! Hfla appreciates you :)
Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)
You're awesome!
P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)
Hi @mrodz, thank you for taking up this issue! Hfla appreciates you :)
Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)
You're awesome!
P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)
Apologies, I jumped the gun and assigned myself to this issue while having an outstanding PR. I would like to work on it once I am freed!
Hello @mrodz, we appreciate you taking on this issue, however it looks like you're already working on another issue at this time. Please wait until your current issue is merged before taking on another issue. :)
We are going to unassign you from this issue so you can focus on your current issue.
Hfla appreciates you! :)
Hi @mrodz, thank you for taking up this issue! Hfla appreciates you :)
Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)
You're awesome!
P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)
Availability: Weekdays from 9am-9pm ETA: EOD 7/16/2024