fix(deps): update dependency probot to v14
This PR contains the following updates:
| Package | Change | Age | Confidence |
|---|---|---|---|
| probot (source) | ^13.0.0 -> ^14.0.0 |
Release Notes
probot/probot (probot)
v14.2.1
Bug Fixes
v14.2.0
Features
v14.1.0
Features
v14.0.6
Bug Fixes
v14.0.5
Bug Fixes
v14.0.4
Bug Fixes
- deps: update dependency @octokit/types to v15 (#2245) (8018566)
v14.0.3
Bug Fixes
v14.0.2
Bug Fixes
- deps: update @probot/octokit-plugin-config (6f2d021)
v14.0.1
Bug Fixes
v14.0.0
BREAKING CHANGES
- Probot is now an ESM only library
- drop Node > 20.17 and Node 21 support
- Switch to GitHub's OpenAPI specification for Webhooks (from
@octokit/webhooksv13) - Remove legacy REST enpoint method access. Users will now have to use the
octokit.rest.*methods - Remove express server from within Probot.
- All properties marked as
privatein Typescript, includingProbot#state, are now private class fields. -
createNodeMiddleware()is now an async function -
@sentry/nodeneeds to be installed separately if needed -
ioredisneeds to be installed separately if needed - The built-in server now listens on
localhostby default instead of0.0.0.0.
Probot v14 Migration Guide
ESM Only Package
Probot is now exclusively an ESM package. Either migrate to ESM (recommended), or use `require(esm).
Migrating to ESM:
- Update
package.json:
{
"type": "module"
}
- Replace all CommonJS
require()statements with ESMimportsyntax - Update your TypeScript configuration:
{
"compilerOptions": {
"module": "node16",
"moduleResolution": "node16"
}
}
For require(esm):
- For TypeScript 5.7-5.8: Use
"module": "nodenext"and"moduleResolution": "nodenext" - For TypeScript 5.9+: Use
"module": "node20"and"moduleResolution": "node20"
Node.js Version Requirements
- Minimum supported version: Node.js 20.18+ and 22+
- Node.js 21 support has been dropped
Webhook Type Definitions
Replace webhook type imports:
// Before
import { WebhookEvent } from "@​octokit/webhooks-types";
// After
import { WebhookEvent } from "@​octokit/openapi-webhooks-types-migration";
REST API Access Pattern
Legacy endpoint methods have been removed:
app.on("issues.opened", async (context) => {
// Before
// const issue = await context.octokit.issues.get(context.issue());
// After
const issue = await context.octokit.rest.issues.get(context.issue());
});
Express Server Removal
The built-in Express server has been removed. To use Express:
- Install Express:
npm install express
- Update your Probot setup:
import Express from "express";
import { createNodeMiddleware, createProbot } from "probot";
const express = Express();
const app = (probot) => {
probot.on("push", async () => {
probot.log.info("Push event received");
});
};
const middleware = await createNodeMiddleware(app, {
webhooksPath: "/api/github/webhooks",
probot: createProbot({
env: {
APP_ID,
PRIVATE_KEY,
WEBHOOK_SECRET,
},
}),
});
express.use(middleware);
express.use(Express.json());
express.get("/custom-route", (req, res) => {
res.json({ status: "ok" });
});
express.listen(3000, () => {
console.log(`Server is running at http://localhost:3000`);
});
HTTP Server no longer listens on 0.0.0.0 by default
The built-in HTTP server will now listen on localhost by default, instead of listening on all available interfaces.
If you wish to change this behaviour, you can use the HOST environment variable, or the --host variable for the probot run command.
env HOST=0.0.0.0 <start script>
probot run --host=0.0.0.0 app.js
Asynchronous Middleware Initialization
createNodeMiddleware() is now asynchronous:
import { createNodeMiddleware } from "probot";
import app from "../app.js";
// Before
// const middleware = createNodeMiddleware(app);
// After
const middleware = await createNodeMiddleware(app);
v13.4.7
Bug Fixes
v13.4.6
Bug Fixes
- update @octokit/auth-app and @octokit/core to fix logger binding issues (058878b)
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.