👍update changelog entry to include instructions for upgrade
Signed-off-by: Charles Lowell <cowboyd@frontside.com>
This commit is contained in:
@@ -2,4 +2,37 @@
|
||||
'@backstage/plugin-catalog-backend-module-incremental-ingestion': minor
|
||||
---
|
||||
|
||||
Allow incremental event handlers to be async; Force event handler to indicate if it made a change
|
||||
**BREAKING** Allow incremental event handlers to be async; Force event handler
|
||||
to indicate if it made a change. Instead of returning `null` or `undefined` from an event
|
||||
handler to indicate no-oop, instead return the value { type: "ignored" }.
|
||||
|
||||
**before**
|
||||
|
||||
```javascript
|
||||
import { createDelta, shouldIgnore } from "./my-delta-creater";
|
||||
|
||||
eventHandler: {
|
||||
onEvent(params) {
|
||||
if (shouldIgnore(params)) {
|
||||
return;
|
||||
}
|
||||
return createDelta(params);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**after**
|
||||
|
||||
```javascript
|
||||
import { createDelta, shouldIgnore } from "./my-delta-creater";
|
||||
|
||||
eventHandler: {
|
||||
async onEvent(params) {
|
||||
if (shouldIgnore(params) {
|
||||
return { type: "ignored" };
|
||||
}
|
||||
// code to create delta can now be async if needed
|
||||
return await createDelta(params);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user