Merge branch 'master' into update-roadie-plugin-versions
This commit is contained in:
@@ -43,10 +43,10 @@
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@octokit/rest": "^18.5.3",
|
||||
"@roadiehq/backstage-plugin-buildkite": "^1.0.5",
|
||||
"@roadiehq/backstage-plugin-github-insights": "^1.1.16",
|
||||
"@roadiehq/backstage-plugin-github-pull-requests": "^1.0.9",
|
||||
"@roadiehq/backstage-plugin-travis-ci": "^1.0.5",
|
||||
"@roadiehq/backstage-plugin-buildkite": "^1.0.6",
|
||||
"@roadiehq/backstage-plugin-github-insights": "^1.1.20",
|
||||
"@roadiehq/backstage-plugin-github-pull-requests": "^1.0.10",
|
||||
"@roadiehq/backstage-plugin-travis-ci": "^1.0.8",
|
||||
"history": "^5.0.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.12.0",
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
"@types/start-server-webpack-plugin": "^2.2.0",
|
||||
"@types/webpack-env": "^1.15.2",
|
||||
"@types/webpack-node-externals": "^2.5.0",
|
||||
"@typescript-eslint/eslint-plugin": "^v4.27.0",
|
||||
"@typescript-eslint/parser": "^v4.27.0",
|
||||
"@typescript-eslint/eslint-plugin": "^v4.28.3",
|
||||
"@typescript-eslint/parser": "^v4.28.3",
|
||||
"@yarnpkg/lockfile": "^1.1.0",
|
||||
"babel-plugin-dynamic-import-node": "^2.3.3",
|
||||
"bfj": "^7.0.2",
|
||||
|
||||
@@ -100,7 +100,6 @@ describe('FlatRoutes', () => {
|
||||
return <>Outlet: {useOutlet()}</>;
|
||||
};
|
||||
|
||||
// The '/*' suffixes here are intentional and will be ignored by FlatRoutes
|
||||
const routes = (
|
||||
<>
|
||||
<Route path="/a" element={<MyPage />}>
|
||||
@@ -112,11 +111,15 @@ describe('FlatRoutes', () => {
|
||||
<Route path="/b" element={<MyPage />}>
|
||||
b
|
||||
</Route>
|
||||
<Route path="/" element={<MyPage />}>
|
||||
c
|
||||
</Route>
|
||||
</>
|
||||
);
|
||||
const renderRoute = makeRouteRenderer(<FlatRoutes>{routes}</FlatRoutes>);
|
||||
expect(renderRoute('/a').getByText('Outlet: a')).toBeInTheDocument();
|
||||
expect(renderRoute('/a/b').getByText('Outlet: a-b')).toBeInTheDocument();
|
||||
expect(renderRoute('/b').getByText('Outlet: b')).toBeInTheDocument();
|
||||
expect(renderRoute('/').getByText('Outlet: c')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -49,8 +49,10 @@ export const FlatRoutes = (props: FlatRoutesProps): JSX.Element | null => {
|
||||
element: child,
|
||||
children: child.props.children
|
||||
? [
|
||||
// These are the children of each route, which we all add in under a catch-all
|
||||
// subroute in order to make them available to `useOutlet`
|
||||
{
|
||||
path: '/*',
|
||||
path: path === '/' ? '/' : '/*', // The root path must require an exact match
|
||||
element: child.props.children,
|
||||
},
|
||||
]
|
||||
|
||||
@@ -100,11 +100,11 @@ catalog:
|
||||
|
||||
# Backstage example templates
|
||||
- type: url
|
||||
target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/react-ssr-template/template.yaml
|
||||
target: https://github.com/backstage/software-templates/blob/master/scaffolder-templates/react-ssr-template/template.yaml
|
||||
rules:
|
||||
- allow: [Template]
|
||||
- type: url
|
||||
target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/template.yaml
|
||||
target: https://github.com/backstage/software-templates/blob/master/scaffolder-templates/springboot-grpc-template/template.yaml
|
||||
rules:
|
||||
- allow: [Template]
|
||||
- type: url
|
||||
@@ -112,6 +112,6 @@ catalog:
|
||||
rules:
|
||||
- allow: [Template]
|
||||
- type: url
|
||||
target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/docs-template/template.yaml
|
||||
target: https://github.com/backstage/software-templates/blob/master/scaffolder-templates/docs-template/template.yaml
|
||||
rules:
|
||||
- allow: [Template]
|
||||
|
||||
Reference in New Issue
Block a user