chore: changesets

Signed-off-by: benjdlambert <ben@blam.sh>

Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
benjdlambert
2025-06-05 10:43:21 +02:00
parent 04c0b15da7
commit 5863b0418c
4 changed files with 139 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
---
'@backstage/plugin-scaffolder-node': minor
---
**BREAKING CHANGES**
The legacy methods to define `createTemplateActions` have been replaced with the new native `zod` approaches for defining input and output schemas.
You can migrate actions that look like the following with the below examples:
```ts
// really old legacy json schema
createTemplateAction<{ repoUrl: string }, { repoOutput: string }>({
id: 'test',
schema: {
input: {
type: 'object'
required: ['repoUrl']
properties: {
repoUrl: {
type: 'string',
description: 'repository url description'
}
}
}
}
});
// old zod method
createTemplateAction({
id: 'test'
schema: {
input: {
repoUrl: z.string({ description: 'repository url description' })
}
}
})
// new method:
createTemplateAction({
id: 'test',
schema: {
input: {
repoUrl: z => z.string({ description: 'repository url description' })
}
}
})
// or for more complex zod types like unions
createTemplateAction({
id: 'test',
schema: {
input: z => z.object({
repoUrl: z.string({ description: 'repository url description' })
})
}
})
```
This breaking change also means that `logStream` has been removed entirely from `ActionsContext`, and that the `logger` is now just a `LoggerService` implementation instead. There is no replacement for the `logStream`, if you wish to still keep using a `logStream` we recommend that you create your own stream that writes to `ctx.logger` instead.
+33
View File
@@ -0,0 +1,33 @@
---
'@backstage/plugin-scaffolder-backend-module-github': minor
---
**BREAKING CHANGES**
The `createGithubEnvironmentAction` action no longer requires an `AuthService`, and now accepts a `CatalogService` instead of `CatalogClient`.
Unless you're providing your own override action to the default, this should be a non-breaking change.
You can migrate using the following if you're getting typescript errors:
```ts
export const myModule = createBackendModule({
pluginId: 'scaffolder',
moduleId: 'test',
register({ registerInit }) {
registerInit({
deps: {
scaffolder: scaffolderActionsExtensionPoint,
catalogService: catalogServiceRef,
},
async init({ scaffolder, catalogService }) {
scaffolder.addActions(
createGithubEnvironmentAction({
catalogService,
}),
);
},
});
},
});
```
+39
View File
@@ -0,0 +1,39 @@
---
'@backstage/plugin-scaffolder-backend': major
---
**BREAKING CHANGES**
- The `createBuiltinActions` method has been removed, as this should no longer be needed with the new backend system route, and was only useful when passing the default list of actions again in the old backend system. You should be able to rely on the default behaviour of the new backend system which is to merge the actions.
- The `createCatalogRegisterAction` and `createFetchCatalogEntityAction` actions no longer require an `AuthService`, and now accepts a `CatalogService` instead of `CatalogClient`.
Unless you're providing your own override action to the default, this should be a non-breaking change.
You can migrate using the following if you're getting typescript errors:
```ts
export const myModule = createBackendModule({
pluginId: 'scaffolder',
moduleId: 'test',
register({ registerInit }) {
registerInit({
deps: {
scaffolder: scaffolderActionsExtensionPoint,
catalogService: catalogServiceRef,
},
async init({ scaffolder, catalogService }) {
scaffolder.addActions(
createCatalogRegisterAction({
catalogService,
}),
createFetchCatalogEntityAction({
catalogService,
integrations,
}),
);
},
});
},
});
```
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/plugin-scaffolder-node': minor
---
**BREAKING CHANGES**
The soon to be removed `TaskWorker` and `CreateWorkerOptions` now take a `LoggerService` implementation as the `logger` option instead of the old `winston` logger interface. Technically this is marked as a breaking change, albeit only in rare circumstances.