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

chore(deps): update to backstage 1.26.x #1536

Merged
merged 43 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
023e1c6
chore(deps): update to backstage 1.26.x
schultzp2020 Apr 22, 2024
27b0ca9
update to new backend
schultzp2020 Apr 23, 2024
c01ba96
update to 1.26.4
schultzp2020 Apr 26, 2024
ca096f2
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins…
schultzp2020 Apr 26, 2024
c392d17
lint
schultzp2020 Apr 26, 2024
fd10cff
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins…
schultzp2020 Apr 29, 2024
37346e7
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins…
schultzp2020 Apr 30, 2024
dae12a1
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins…
schultzp2020 May 2, 2024
8b6be1c
fix scripts
schultzp2020 May 2, 2024
a7f277b
update frontend to match showcase
schultzp2020 May 2, 2024
df3984f
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins…
schultzp2020 May 2, 2024
333424a
format files
schultzp2020 May 2, 2024
5589305
fix keycloak test
schultzp2020 May 2, 2024
556aad8
fix(deps): remove react-router-dom from dev dependencies and as it's …
invincibleJai May 3, 2024
0cc4535
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins…
schultzp2020 May 3, 2024
fedfb0b
update to backstage 1.26.5
schultzp2020 May 3, 2024
64aad59
fix kiali
schultzp2020 May 3, 2024
22296b8
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins…
schultzp2020 May 6, 2024
e5d609a
revert to basic frontend
schultzp2020 May 6, 2024
a5ff565
fix linting
schultzp2020 May 6, 2024
600d486
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins…
schultzp2020 May 6, 2024
0d49655
fix lint config
schultzp2020 May 6, 2024
56fc59c
lint files
schultzp2020 May 6, 2024
b5199c3
update dist-dynamic
schultzp2020 May 7, 2024
f7d0ff9
fix resolutions
schultzp2020 May 7, 2024
afc6467
update react-router-dom
schultzp2020 May 7, 2024
3c32940
fix react deps
schultzp2020 May 7, 2024
5da9407
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins…
schultzp2020 May 7, 2024
f568e3f
fix deprecations
schultzp2020 May 7, 2024
9a5952d
potential fix for react
schultzp2020 May 7, 2024
2d81377
fix dep resolution
schultzp2020 May 8, 2024
a634165
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins…
schultzp2020 May 8, 2024
cefc12e
skip orchestrator test
schultzp2020 May 8, 2024
09be0f8
add eslint rule
schultzp2020 May 8, 2024
22af5c8
fix tsc error
schultzp2020 May 8, 2024
cc44a83
fix(orchestrator): force react dependency to be 18.3 and return test …
batzionb May 9, 2024
2bd5ed4
fix(e2e): update e2e tests to allow guest login (#4)
debsmita1 May 9, 2024
67b467e
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins…
schultzp2020 May 9, 2024
b273d56
update common test file
schultzp2020 May 9, 2024
0a68181
update lockfiles
schultzp2020 May 9, 2024
f3a4f19
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins…
schultzp2020 May 9, 2024
609bcf3
fix react
schultzp2020 May 9, 2024
d033bab
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins…
schultzp2020 May 9, 2024
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
74 changes: 9 additions & 65 deletions app-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
app:
title: Scaffolded Backstage App
title: Janus IDP Plugins
baseUrl: http://localhost:3000

organization:
name: My Company
name: Red Hat

backend:
# Used for enabling authentication, secret is shared by all backend plugins
Expand Down Expand Up @@ -34,21 +34,9 @@ backend:
store: memory
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir

integrations:
github:
- host: github.com
# This is a Personal Access Token or PAT from GitHub. You can find out how to generate this token, and more information
# about setting up the GitHub integration here: https://backstage.io/docs/getting-started/configuration#setting-up-a-github-integration
token: ${GITHUB_TOKEN}
### Example for how to add your GitHub Enterprise instance using the API:
# - host: ghe.example.net
# apiBaseUrl: https://ghe.example.net/api/v3
# token: ${GHE_TOKEN}
integrations: {}

proxy:
'/test':
target: 'https://example.com'
changeOrigin: true
'/quay/api':
target: 'https://quay.io'
headers:
Expand All @@ -62,10 +50,6 @@ proxy:
quay:
uiUrl: 'https://quay.io'

# Reference documentation http://backstage.io/docs/features/techdocs/configuration
# Note: After experimenting with basic setup, use CI/CD to generate docs
# and an external cloud storage when deploying TechDocs for production use-case.
# https://backstage.io/docs/features/techdocs/how-to-guides#how-to-migrate-from-techdocs-basic-to-recommended-deployment-approach
techdocs:
builder: 'local' # Alternatives - 'external'
generator:
Expand All @@ -86,53 +70,13 @@ catalog:
entityFilename: catalog-info.yaml
pullRequestBranchName: backstage-integration
rules:
- allow: [Component, System, API, Resource, Location]
- allow: [Component, System, Group, Resource, Location, Template, API]
locations:
# Local example data, file locations are relative to the backend process, typically `packages/backend`
- type: file
target: ../../examples/entities.yaml

# Local example template
- type: file
target: ../../examples/template/template.yaml
rules:
- allow: [Template]

# Local example organizational data
- type: file
target: ../../examples/org.yaml
rules:
- allow: [User, Group]
- type: url
target: https://github.com/janus-idp/backstage-showcase/blob/main/catalog-entities/all.yaml

## Uncomment these lines to add more example data
# - type: url
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml
- type: url
target: https://github.com/redhat-developer/red-hat-developer-hub-software-templates/blob/main/templates.yaml

## Uncomment these lines to add an example org
# - type: url
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml
# rules:
# - allow: [User, Group]
dynamicPlugins:
frontend:
janus.dynamic-frontend-plugin:
dynamicRoutes:
- path: '/settings'
importName: 'UserSettingsPage'
module: 'UserSettings'
- path: '/tech-radar'
width: 1500
height: 800
importName: 'TechRadarPage'
module: 'TechRadar'
- path: '/create'
importName: 'ScaffolderPage'
module: 'Scaffolder'
routeBindings:
- bindTarget: 'catalogPlugin.externalRoutes'
bindMap:
createComponent: 'remotePlugins.Scaffolder.scaffolderPlugin.routes.root'
viewTechDoc: 'techdocsPlugin.routes.docRoot'
- bindTarget: 'remotePlugins.Scaffolder.scaffolderPlugin.externalRoutes'
bindMap:
registerComponent: 'catalogImportPlugin.routes.importPage'
frontend: {}
2 changes: 1 addition & 1 deletion backstage.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.25.2"
"version": "1.26.5"
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
},
"scripts": {
"preinstall": "npx only-allow yarn",
"start:backstage": "turbo run start:backstage",
"start:backend": "turbo run start --filter=...backend",
"start:backstage": "turbo run start --filter=...app --filter=...backend",
"start:plugins": "turbo run start --filter=@janus-idp/*",
"start:storybook": "yarn --cwd packages/storybook start",
"build": "turbo run build",
"build:backstage": "turbo run build --filter=...{./packages/app} --filter=...{./packages/backend}",
"build:backstage": "turbo run build --filter=...app --filter=...backend",
"build:plugins": "turbo run build --filter=@janus-idp/*",
"build:storybook": "yarn --cwd packages/storybook build",
"tsc": "turbo run tsc",
Expand Down Expand Up @@ -39,7 +40,7 @@
]
},
"devDependencies": {
"@backstage/cli": "0.26.2",
"@backstage/cli": "0.26.4",
"@ianvs/prettier-plugin-sort-imports": "4.1.1",
"@janus-idp/cli": "*",
"@semantic-release/changelog": "6.0.3",
Expand Down
13 changes: 12 additions & 1 deletion packages/app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
const backstageConfig = require('@backstage/cli/config/eslint-factory')(
__dirname,
);

module.exports = {
...backstageConfig,
rules: {
...backstageConfig.rules,
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
},
};
89 changes: 42 additions & 47 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,63 +15,58 @@
"role": "frontend"
},
"scripts": {
"start": "yarn start:backstage",
"start:backstage": "janus-cli package start",
"build": "janus-cli package build",
"start": "backstage-cli package start",
"build": "backstage-cli package build",
"tsc": "tsc",
"clean": "backstage-cli package clean",
"test": "backstage-cli package test --passWithNoTests --coverage",
"lint": "backstage-cli package lint"
},
"dependencies": {
"@backstage/app-defaults": "^1.5.3",
"@backstage/app-defaults": "^1.5.4",
"@backstage/catalog-model": "^1.4.5",
"@backstage/core-app-api": "^1.12.3",
"@backstage/core-components": "^0.14.3",
"@backstage/core-plugin-api": "^1.9.1",
"@backstage/integration-react": "^1.1.25",
"@backstage/plugin-api-docs": "^0.11.3",
"@backstage/plugin-catalog": "^1.18.2",
"@backstage/core-app-api": "^1.12.4",
"@backstage/core-components": "^0.14.6",
"@backstage/core-plugin-api": "^1.9.2",
"@backstage/integration-react": "^1.1.26",
"@backstage/plugin-api-docs": "^0.11.4",
"@backstage/plugin-catalog": "^1.19.0",
"@backstage/plugin-catalog-common": "^1.0.22",
"@backstage/plugin-catalog-graph": "^0.4.3",
"@backstage/plugin-catalog-import": "^0.10.9",
"@backstage/plugin-catalog-react": "^1.11.2",
"@backstage/plugin-github-actions": "^0.6.14",
"@backstage/plugin-org": "^0.6.23",
"@backstage/plugin-permission-react": "^0.4.21",
"@backstage/plugin-scaffolder": "^1.19.2",
"@backstage/plugin-search": "^1.4.9",
"@backstage/plugin-search-react": "^1.7.9",
"@backstage/plugin-tech-radar": "^0.7.2",
"@backstage/plugin-techdocs": "^1.10.3",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.8",
"@backstage/plugin-techdocs-react": "^1.2.2",
"@backstage/plugin-user-settings": "^0.8.4",
"@backstage/theme": "^0.5.2",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@openshift/dynamic-plugin-sdk": "^4.0.0",
"@scalprum/core": "^0.6.1",
"@scalprum/react-core": "^0.6.1",
"history": "^5.3.0",
"lodash": "^4.17.21",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^6.17.0",
"react-router-dom": "^6.17.0",
"react-use": "^17.4.0"
"@backstage/plugin-catalog-graph": "^0.4.4",
"@backstage/plugin-catalog-import": "^0.10.10",
"@backstage/plugin-catalog-react": "^1.11.3",
"@backstage/plugin-org": "^0.6.24",
"@backstage/plugin-permission-react": "^0.4.22",
"@backstage/plugin-scaffolder": "^1.19.3",
"@backstage/plugin-search": "^1.4.10",
"@backstage/plugin-search-react": "^1.7.10",
"@backstage/plugin-techdocs": "^1.10.4",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.9",
"@backstage/plugin-techdocs-react": "^1.2.3",
"@backstage/plugin-user-settings": "^0.8.5",
"@emotion/react": "^11.11.4",
"@mui/icons-material": "^5.15.16",
"@mui/material": "^5.15.16",
"@mui/styles": "^5.15.16",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router": "^6.23.0",
"react-router-dom": "^6.23.0",
"tss-react": "^4.9.10",
"@backstage-community/plugin-github-actions": "^0.6.16",
"@backstage-community/plugin-tech-radar": "^0.7.4"
},
"devDependencies": {
"@backstage/cli": "0.26.2",
"@backstage/test-utils": "1.5.3",
"@janus-idp/cli": "*",
"@scalprum/react-test-utils": "0.0.4",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
"@testing-library/user-event": "14.5.1",
"@types/node": "18.18.5",
"@types/react-dom": "18.2.18",
"cross-env": "7.0.3"
"@backstage/cli": "0.26.4",
"@backstage/test-utils": "1.5.4",
"@playwright/test": "1.32.3",
schultzp2020 marked this conversation as resolved.
Show resolved Hide resolved
"@testing-library/dom": "9.0.0",
"@testing-library/jest-dom": "6.0.0",
"@testing-library/react": "14.0.0",
"@testing-library/user-event": "14.0.0",
"@types/node": "18.19.31",
"@types/react": "18.2.79",
"@types/react-dom": "18.2.25"
},
"browserslist": {
"production": [
Expand Down
36 changes: 6 additions & 30 deletions packages/app/src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
import React from 'react';

import { removeScalprum } from '@scalprum/core';
import { mockPluginData } from '@scalprum/react-test-utils';
import { render, waitFor } from '@testing-library/react';

import { AppBase } from './App';
import TestRoot from './utils/test/TestRoot';
import App from './App';

describe('App', () => {
beforeEach(() => {
removeScalprum();
});

it('should render', async () => {
const { TestScalprumProvider } = mockPluginData({
url: 'http://localhost:7007/foo/bar.json',
module: 'UserSettings',
pluginManifest: {
baseURL: 'http://localhost:7007',
extensions: [],
name: 'janus.dynamic-frontend-plugin',
loadScripts: [],
version: '1.0.0',
registrationMethod: 'custom',
},
});
process.env = {
NODE_ENV: 'test',
APP_CONFIG: [
Expand All @@ -41,13 +20,10 @@ describe('App', () => {
] as any,
};

const rendered = render(
<TestScalprumProvider>
<TestRoot>
<AppBase />
</TestRoot>
</TestScalprumProvider>,
);
await waitFor(() => expect(rendered.baseElement).toBeInTheDocument());
const rendered = render(<App />);

await waitFor(() => {
expect(rendered.baseElement).toBeInTheDocument();
});
});
});
Loading
Loading