Skip to content

Commit 6873c21

Browse files
authored
Bump yarn to latest 4.x version, run build and prettier
Bump yarn to latest 4.x version, run build and prettier
2 parents d171389 + a13a058 commit 6873c21

File tree

10 files changed

+23366
-16413
lines changed

10 files changed

+23366
-16413
lines changed

incident/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,12 @@ node_modules
22
package-lock.json
33
dist
44
dist-types
5+
6+
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
7+
.pnp.*
8+
.yarn/*
9+
!.yarn/patches
10+
!.yarn/plugins
11+
!.yarn/releases
12+
!.yarn/sdks
13+
!.yarn/versions

incident/.yarn/releases/yarn-4.10.3.cjs

Lines changed: 942 additions & 0 deletions
Large diffs are not rendered by default.

incident/.yarnrc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
compressionLevel: mixed
2+
3+
enableGlobalCache: false
4+
5+
nodeLinker: node-modules
6+
7+
yarnPath: .yarn/releases/yarn-4.10.3.cjs

incident/config.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ export interface Config {
6060
*/
6161
system?: string;
6262
/**
63-
* The custom field ID that associated Group entities to incidents.
64-
* @visibility frontend
65-
*/
63+
* The custom field ID that associated Group entities to incidents.
64+
* @visibility frontend
65+
*/
6666
group?: string;
6767
};
6868
};

incident/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"sideEffects": false,
2121
"scripts": {
2222
"start": "backstage-cli package start",
23-
"build": "backstage-cli package build",
23+
"build": "npx tsc && backstage-cli package build",
2424
"lint": "backstage-cli package lint",
2525
"test": "backstage-cli package test",
2626
"clean": "backstage-cli package clean",

incident/release.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ First install dependencies:
66
yarn
77
```
88

9-
Then transpile the Typescript:
10-
11-
```shell
12-
yarn tsc
13-
```
14-
159
Now build the plugin:
1610

1711
```shell

incident/src/api/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const DEFAULT_PROXY_PATH = "/incident/api";
4141

4242
type Options = {
4343
discoveryApi: DiscoveryApi;
44-
fetchApi: FetchApi,
44+
fetchApi: FetchApi;
4545
proxyPath?: string;
4646
};
4747

incident/src/components/HomePageIncidentCard/Content.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import { configApiRef, useApi } from "@backstage/core-plugin-api";
99

1010
export const HomePageIncidentCardContent = () => {
1111
const config = useApi(configApiRef);
12-
const baseUrl = config.getOptionalString('incident.baseUrl') || "https://app.incident.io";
12+
const baseUrl =
13+
config.getOptionalString("incident.baseUrl") || "https://app.incident.io";
1314

1415
const query = new URLSearchParams();
1516
query.set(`status_category[one_of]`, "active");

incident/src/plugin.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ import {
2020
discoveryApiRef,
2121
fetchApiRef,
2222
} from "@backstage/core-plugin-api";
23-
import {CardExtensionProps, createCardExtension} from "@backstage/plugin-home-react";
23+
import {
24+
CardExtensionProps,
25+
createCardExtension,
26+
} from "@backstage/plugin-home-react";
2427

2528
import { IncidentApi, IncidentApiRef } from "./api/client";
2629

@@ -29,8 +32,8 @@ export const incidentPlugin = createPlugin({
2932
apis: [
3033
createApiFactory({
3134
api: IncidentApiRef,
32-
deps: {
33-
discoveryApi: discoveryApiRef,
35+
deps: {
36+
discoveryApi: discoveryApiRef,
3437
fetchApi: fetchApiRef,
3538
},
3639
factory: ({ discoveryApi, fetchApi }) => {
@@ -55,7 +58,9 @@ export const EntityIncidentCard = incidentPlugin.provide(
5558
}),
5659
);
5760

58-
export const HomePageIncidentCard: (props: CardExtensionProps<unknown>) => React.JSX.Element = incidentPlugin.provide(
61+
export const HomePageIncidentCard: (
62+
props: CardExtensionProps<unknown>,
63+
) => React.JSX.Element = incidentPlugin.provide(
5964
createCardExtension({
6065
name: "HomePageIncidentCard",
6166
title: "Ongoing Incidents",

0 commit comments

Comments
 (0)