Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dependencies to Backstage v1.20.3 #61

Merged
merged 4 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backstage.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.17.4"
"version": "1.20.3"
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
]
},
"devDependencies": {
"@backstage/cli": "^0.22.12",
"@backstage/cli": "^0.24.0",
"@spotify/prettier-config": "^12.0.0",
"concurrently": "^6.0.0",
"lerna": "^4.0.0",
Expand All @@ -39,8 +39,8 @@
"typescript": "~5.0.0"
},
"resolutions": {
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15"
"@types/react": "^17",
"@types/react-dom": "^17"
},
"prettier": "@spotify/prettier-config",
"lint-staged": {
Expand Down
60 changes: 30 additions & 30 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,47 +18,47 @@
"cy:run": "cypress run --browser chrome"
},
"dependencies": {
"@backstage/app-defaults": "^1.4.2",
"@backstage/catalog-model": "^1.4.1",
"@backstage/cli": "^0.22.12",
"@backstage/core-app-api": "^1.9.1",
"@backstage/core-components": "^0.13.4",
"@backstage/core-plugin-api": "^1.5.3",
"@backstage/integration-react": "^1.1.18",
"@backstage/plugin-api-docs": "^0.9.10",
"@backstage/plugin-catalog": "^1.12.4",
"@backstage/plugin-catalog-common": "^1.0.15",
"@backstage/plugin-catalog-graph": "^0.2.35",
"@backstage/plugin-catalog-import": "^0.9.13",
"@backstage/plugin-catalog-react": "^1.8.3",
"@backstage/plugin-github-actions": "^0.6.4",
"@backstage/plugin-kubernetes": "^0.10.2",
"@backstage/plugin-org": "^0.6.13",
"@backstage/plugin-permission-react": "^0.4.14",
"@backstage/plugin-scaffolder": "^1.14.4",
"@backstage/plugin-search": "^1.3.6",
"@backstage/plugin-search-react": "^1.6.4",
"@backstage/plugin-tech-radar": "^0.6.7",
"@backstage/plugin-techdocs": "^1.6.8",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.0.18",
"@backstage/plugin-techdocs-react": "^1.1.9",
"@backstage/plugin-user-settings": "^0.7.8",
"@backstage/theme": "^0.4.1",
"@backstage/app-defaults": "^1.4.5",
"@backstage/catalog-model": "^1.4.3",
"@backstage/cli": "^0.24.0",
"@backstage/core-app-api": "^1.11.1",
"@backstage/core-components": "^0.13.8",
"@backstage/core-plugin-api": "^1.8.0",
"@backstage/integration-react": "^1.1.21",
"@backstage/plugin-api-docs": "^0.10.1",
"@backstage/plugin-catalog": "^1.15.1",
"@backstage/plugin-catalog-common": "^1.0.18",
"@backstage/plugin-catalog-graph": "^0.3.1",
"@backstage/plugin-catalog-import": "^0.10.3",
"@backstage/plugin-catalog-react": "^1.9.1",
"@backstage/plugin-github-actions": "^0.6.8",
"@backstage/plugin-kubernetes": "^0.11.2",
"@backstage/plugin-org": "^0.6.17",
"@backstage/plugin-permission-react": "^0.4.17",
"@backstage/plugin-scaffolder": "^1.16.1",
"@backstage/plugin-search": "^1.4.3",
"@backstage/plugin-search-react": "^1.7.3",
"@backstage/plugin-tech-radar": "^0.6.10",
"@backstage/plugin-techdocs": "^1.9.1",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.2",
"@backstage/plugin-techdocs-react": "^1.1.13",
"@backstage/plugin-user-settings": "^0.7.13",
"@backstage/theme": "^0.4.4",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@weaveworksoss/backstage-plugin-flux": "^0.1.0",
"history": "^5.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router": "^6.3.0",
"react-router-dom": "^6.3.0",
"react-use": "^17.2.4"
},
"devDependencies": {
"@backstage/test-utils": "1.4.5",
"@backstage/test-utils": "^1.4.5",
"@testing-library/dom": "^8.0.0",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^14.1.2",
"@testing-library/react": "^12.1.3",
"@testing-library/user-event": "^14.0.0",
"@types/node": "^16.11.26",
"@types/react-dom": "*",
Expand Down
6 changes: 2 additions & 4 deletions packages/app/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import '@backstage/cli/asset-types';
import { createRoot } from 'react-dom/client';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

const rootElement = document.getElementById('root');
const root = createRoot(rootElement!);
root.render(<App />);
ReactDOM.render(<App />, document.getElementById('root'));
38 changes: 19 additions & 19 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@
"build-image": "docker build ../.. -f Dockerfile --tag backstage"
},
"dependencies": {
"@backstage/backend-common": "^0.19.4",
"@backstage/backend-tasks": "^0.5.7",
"@backstage/catalog-client": "^1.4.3",
"@backstage/catalog-model": "^1.4.1",
"@backstage/config": "^1.0.8",
"@backstage/plugin-app-backend": "^0.3.50",
"@backstage/plugin-auth-backend": "^0.18.8",
"@backstage/plugin-auth-node": "^0.2.19",
"@backstage/plugin-catalog-backend": "^1.12.3",
"@backstage/plugin-kubernetes-backend": "^0.11.5",
"@backstage/plugin-permission-common": "^0.7.7",
"@backstage/plugin-permission-node": "^0.7.13",
"@backstage/plugin-proxy-backend": "^0.3.2",
"@backstage/plugin-scaffolder-backend": "^1.16.4",
"@backstage/plugin-search-backend": "^1.4.2",
"@backstage/plugin-search-backend-module-pg": "^0.5.11",
"@backstage/plugin-search-backend-node": "^1.2.6",
"@backstage/plugin-techdocs-backend": "^1.6.7",
"@backstage/backend-common": "^0.19.9",
"@backstage/backend-tasks": "^0.5.12",
"@backstage/catalog-client": "^1.4.6",
"@backstage/catalog-model": "^1.4.3",
"@backstage/config": "^1.1.1",
"@backstage/plugin-app-backend": "^0.3.55",
"@backstage/plugin-auth-backend": "^0.20.0",
"@backstage/plugin-auth-node": "^0.4.1",
"@backstage/plugin-catalog-backend": "^1.15.0",
"@backstage/plugin-kubernetes-backend": "^0.13.1",
"@backstage/plugin-permission-common": "^0.7.10",
"@backstage/plugin-permission-node": "^0.7.18",
"@backstage/plugin-proxy-backend": "^0.4.5",
"@backstage/plugin-scaffolder-backend": "^1.19.1",
"@backstage/plugin-search-backend": "^1.4.7",
"@backstage/plugin-search-backend-module-pg": "^0.5.16",
"@backstage/plugin-search-backend-node": "^1.2.11",
"@backstage/plugin-techdocs-backend": "^1.9.0",
"app": "link:../app",
"better-sqlite3": "^8.0.0",
"dockerode": "^3.3.1",
Expand All @@ -43,7 +43,7 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@backstage/cli": "^0.22.12",
"@backstage/cli": "^0.24.0",
"@types/dockerode": "^3.3.0",
"@types/express": "^4.17.6",
"@types/express-serve-static-core": "^4.17.5",
Expand Down
12 changes: 12 additions & 0 deletions plugins/backstage-plugin-flux/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@ class StubKubernetesClient implements KubernetesApi {
this.resources = resources;
}

getCluster(_: string): Promise<
| {
name: string;
authProvider: string;
oidcTokenProvider?: string | undefined;
dashboardUrl?: string | undefined;
}
| undefined
> {
throw new Error('getCluster not implemented.');
}

getObjectsByEntity(
_: KubernetesRequestBody,
): Promise<ObjectsByEntityResponse> {
Expand Down
35 changes: 18 additions & 17 deletions plugins/backstage-plugin-flux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,42 +27,43 @@
"postpack": "backstage-cli package postpack"
},
"dependencies": {
"@backstage/catalog-model": "^1.4.1",
"@backstage/core-components": "^0.13.4",
"@backstage/core-plugin-api": "^1.5.3",
"@backstage/plugin-catalog-react": "^1.8.3",
"@backstage/plugin-kubernetes": "^0.10.2",
"@backstage/plugin-kubernetes-common": "^0.6.5",
"@backstage/theme": "^0.4.1",
"@backstage/catalog-model": "^1.4.3",
"@backstage/core-components": "^0.13.8",
"@backstage/core-plugin-api": "^1.8.0",
"@backstage/plugin-catalog-react": "^1.9.1",
"@backstage/plugin-kubernetes": "^0.11.2",
"@backstage/plugin-kubernetes-common": "^0.7.1",
"@backstage/theme": "^0.4.4",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "4.0.0-alpha.61",
"@tanstack/query-sync-storage-persister": "^5.8.3",
"@tanstack/react-query": "^5.8.4",
"@tanstack/react-query-persist-client": "^5.8.4",
"@tanstack/query-sync-storage-persister": "^4.36.1",
"@tanstack/react-query": "^4.36.1",
"@tanstack/react-query-persist-client": "^4.36.1",
"classnames": "^2.3.2",
"compare-versions": "^6.1.0",
"lodash": "^4.17.21",
"luxon": "^3.3.0",
"react": "^18.2.0",
"react-use": "^17.4.0",
"styled-components": "^6.1.1",
"use-deep-compare": "^1.1.0",
"yaml": "^2.3.1"
},
"peerDependencies": {
"react": "^18.2.0"
"react": "^16.13.1 || ^17.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.22.12",
"@backstage/core-app-api": "^1.9.1",
"@backstage/dev-utils": "^1.0.20",
"@backstage/test-utils": "1.4.5",
"@backstage/cli": "^0.24.0",
"@backstage/core-app-api": "^1.11.1",
"@backstage/dev-utils": "^1.0.24",
"@backstage/test-utils": "^1.4.5",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^14.1.2",
"@testing-library/react": "^12.1.3",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.0.0",
"@types/node": "*",
"@types/styled-components": "^5.1.26",
"canvas": "^2.11.2",
"cross-fetch": "^3.1.5",
"msw": "^1.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ const makeTestHelmRelease = (name: string, chart: string, version: string) => {
class StubKubernetesClient implements KubernetesApi {
getObjectsByEntity = jest.fn();

getCluster = jest.fn();

async getClusters(): Promise<{ name: string; authProvider: string }[]> {
return [{ name: 'mock-cluster', authProvider: 'serviceAccount' }];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ const makeTestGitRepository = (name: string, url: string, branch: string) => {
class StubKubernetesClient implements KubernetesApi {
getObjectsByEntity = jest.fn();

getCluster = jest.fn();

async getClusters(): Promise<{ name: string; authProvider: string }[]> {
return [{ name: 'mock-cluster', authProvider: 'serviceAccount' }];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ const makeTestHelmRelease = (name: string, chart: string, version: string) => {
class StubKubernetesClient implements KubernetesApi {
getObjectsByEntity = jest.fn();

getCluster = jest.fn();

async getClusters(): Promise<{ name: string; authProvider: string }[]> {
return [{ name: 'mock-cluster', authProvider: 'serviceAccount' }];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const makeTestHelmRepository = (name: string, url: string) => {
class StubKubernetesClient implements KubernetesApi {
getObjectsByEntity = jest.fn();

getCluster = jest.fn();

async getClusters(): Promise<{ name: string; authProvider: string }[]> {
return [{ name: 'mock-cluster', authProvider: 'serviceAccount' }];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ const makeTestImagePolicy = (
class StubKubernetesClient implements KubernetesApi {
getObjectsByEntity = jest.fn();

getCluster = jest.fn();

async getClusters(): Promise<{ name: string; authProvider: string }[]> {
return [{ name: 'mock-cluster', authProvider: 'serviceAccount' }];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ const makeTestKustomization = (name: string, path: string) => {
class StubKubernetesClient implements KubernetesApi {
getObjectsByEntity = jest.fn();

getCluster = jest.fn();

async getClusters(): Promise<{ name: string; authProvider: string }[]> {
return [{ name: 'mock-cluster', authProvider: 'serviceAccount' }];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ const makeTestOCIRepository = (name: string, url: string) => {
class StubKubernetesClient implements KubernetesApi {
getObjectsByEntity = jest.fn();

getCluster = jest.fn();

async getClusters(): Promise<{ name: string; authProvider: string }[]> {
return [{ name: 'mock-cluster', authProvider: 'serviceAccount' }];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import { shortenSha } from '../helpers';
class StubKubernetesClient implements KubernetesApi {
getObjectsByEntity = jest.fn();

getCluster = jest.fn();

async getClusters(): Promise<{ name: string; authProvider: string }[]> {
return [{ name: 'mock-cluster', authProvider: 'serviceAccount' }];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ const makeTestFluxController = (
class StubKubernetesClient implements KubernetesApi {
getObjectsByEntity = jest.fn();

getCluster = jest.fn();

async getClusters(): Promise<{ name: string; authProvider: string }[]> {
return [
{ name: 'mock-cluster-1', authProvider: 'serviceAccount1' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ const FluxRuntimePanel: FC<{ many?: boolean }> = ({ many }) => {
*/
export const FluxRuntimeCard = ({ many = true }: { many?: boolean }) => {
// Set both the garbage collection time and max-age to 1 hour
// gcTime should be higher than max-age to avoid removing things too soon.
const gcTime = 1000 * 60 * 60;
const maxAge = gcTime;
// cacheTime should be higher than max-age to avoid removing things too soon.
const cacheTime = 1000 * 60 * 60;
const maxAge = cacheTime;

const queryClient = new QueryClient({
defaultOptions: {
queries: {
gcTime,
cacheTime,
},
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { FluxController, Namespace } from '../objects';
function makeMockKubernetesApi() {
return {
getObjectsByEntity: jest.fn(),
getCluster: jest.fn(),
getClusters: jest.fn(),
getWorkloadsByEntity: jest.fn(),
getCustomObjectsByEntity: jest.fn(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ describe('getRequest', () => {
function makeMockKubernetesApi() {
return {
getObjectsByEntity: jest.fn(),
getCluster: jest.fn(),
getClusters: jest.fn(),
getWorkloadsByEntity: jest.fn(),
getCustomObjectsByEntity: jest.fn(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ describe('getRequest', () => {
function makeMockKubernetesApi() {
return {
getObjectsByEntity: jest.fn(),
getCluster: jest.fn(),
getClusters: jest.fn(),
getWorkloadsByEntity: jest.fn(),
getCustomObjectsByEntity: jest.fn(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ConfigApi, configApiRef } from '@backstage/core-plugin-api';
import { TestApiProvider } from '@backstage/test-utils';
import { renderHook } from '@testing-library/react';
import { renderHook } from '@testing-library/react-hooks';
import React, { PropsWithChildren } from 'react';
import { useWeaveFluxDeepLink } from './useWeaveFluxDeepLink';
import { GitRepository, HelmRelease, OCIRepository } from '../objects';
Expand Down
Loading