@backstage/plugin-events-backend-module-github 0.2.0-next.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,84 @@
1
1
  # @backstage/plugin-events-backend-module-github
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - eff3ca9: BREAKING CHANGE: Migrate `EventRouter` implementations from `EventBroker` to `EventsService`.
8
+
9
+ `EventRouter` uses the new `EventsService` instead of the `EventBroker` now,
10
+ causing a breaking change to its signature.
11
+
12
+ All of its extensions and implementations got adjusted accordingly.
13
+ (`SubTopicEventRouter`, `AzureDevOpsEventRouter`, `BitbucketCloudEventRouter`,
14
+ `GerritEventRouter`, `GithubEventRouter`, `GitlabEventRouter`)
15
+
16
+ Required adjustments were made to all backend modules for the new backend system,
17
+ now also making use of the `eventsServiceRef` instead of the `eventsExtensionPoint`.
18
+
19
+ **Migration:**
20
+
21
+ Example for implementations of `SubTopicEventRouter`:
22
+
23
+ ```diff
24
+ import {
25
+ EventParams,
26
+ + EventsService,
27
+ SubTopicEventRouter,
28
+ } from '@backstage/plugin-events-node';
29
+
30
+ export class GithubEventRouter extends SubTopicEventRouter {
31
+ - constructor() {
32
+ - super('github');
33
+ + constructor(options: { events: EventsService }) {
34
+ + super({
35
+ + events: options.events,
36
+ + topic: 'github',
37
+ + });
38
+ }
39
+
40
+ + protected getSubscriberId(): string {
41
+ + return 'GithubEventRouter';
42
+ + }
43
+ +
44
+ // ...
45
+ }
46
+ ```
47
+
48
+ Example for a direct extension of `EventRouter`:
49
+
50
+ ```diff
51
+ class MyEventRouter extends EventRouter {
52
+ - constructor(/* ... */) {
53
+ + constructor(options: {
54
+ + events: EventsService;
55
+ + // ...
56
+ + }) {
57
+ - super();
58
+ // ...
59
+ + super({
60
+ + events: options.events,
61
+ + topics: topics,
62
+ + });
63
+ }
64
+ +
65
+ + protected getSubscriberId(): string {
66
+ + return 'MyEventRouter';
67
+ + }
68
+ -
69
+ - supportsEventTopics(): string[] {
70
+ - return this.topics;
71
+ - }
72
+ }
73
+ ```
74
+
75
+ ### Patch Changes
76
+
77
+ - Updated dependencies
78
+ - @backstage/plugin-events-node@0.3.0
79
+ - @backstage/config@1.2.0
80
+ - @backstage/backend-plugin-api@0.6.14
81
+
3
82
  ## 0.2.0-next.2
4
83
 
5
84
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-events-backend-module-github",
3
- "version": "0.2.0-next.2",
3
+ "version": "0.2.0",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-events-backend-module-github",
3
- "version": "0.2.0-next.2",
3
+ "version": "0.2.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -39,15 +39,15 @@
39
39
  "postpack": "backstage-cli package postpack"
40
40
  },
41
41
  "dependencies": {
42
- "@backstage/backend-plugin-api": "^0.6.14-next.2",
43
- "@backstage/config": "^1.2.0-next.1",
44
- "@backstage/plugin-events-node": "^0.3.0-next.2",
42
+ "@backstage/backend-plugin-api": "^0.6.14",
43
+ "@backstage/config": "^1.2.0",
44
+ "@backstage/plugin-events-node": "^0.3.0",
45
45
  "@octokit/webhooks-methods": "^3.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@backstage/backend-test-utils": "^0.3.4-next.2",
49
- "@backstage/cli": "^0.25.3-next.2",
50
- "@backstage/plugin-events-backend-test-utils": "^0.1.24-next.2"
48
+ "@backstage/backend-test-utils": "^0.3.4",
49
+ "@backstage/cli": "^0.26.0",
50
+ "@backstage/plugin-events-backend-test-utils": "^0.1.24"
51
51
  },
52
52
  "files": [
53
53
  "config.d.ts",