Skip to content

Commit 23f157a

Browse files
authored
Upgrade to latest backstage and switch to new react import. (#68)
Also use some more modern yarn. Signed-off-by: Łukasz Jernaś <[email protected]>
1 parent 168304a commit 23f157a

File tree

10 files changed

+21762
-15081
lines changed

10 files changed

+21762
-15081
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
node-version: ${{ matrix.node-version }}
2525
cache: yarn
26-
- run: yarn install --frozen-lockfile
26+
- run: yarn install --immutable
2727
- run: yarn tsc
2828
- run: yarn build
2929
- run: yarn test

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
node-version: 20
1414
cache: yarn
1515
registry-url: 'https://registry.npmjs.org'
16-
- run: yarn install --frozen-lockfile
16+
- run: yarn install --immutable
1717
- run: yarn tsc
1818
- run: yarn build
1919
- run: yarn publish

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ dist-types/
33
node_modules
44
.idea/
55
app-config.yaml
6-
.npmrc
6+
.npmrc
7+
.yarn/install-state.gz

.yarn/releases/yarn-4.8.1.cjs

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

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-4.8.1.cjs

backstage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "1.38.0"
2+
"version": "1.39.0"
33
}

package.json

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
"postpack": "backstage-cli package postpack"
3333
},
3434
"dependencies": {
35-
"@backstage/core-components": "^0.17.1",
36-
"@backstage/core-plugin-api": "^1.10.6",
37-
"@backstage/frontend-plugin-api": "^0.10.1",
38-
"@backstage/plugin-techdocs-react": "^1.2.16",
39-
"@backstage/theme": "^0.6.5",
35+
"@backstage/core-components": "^0.17.2",
36+
"@backstage/core-plugin-api": "^1.10.7",
37+
"@backstage/frontend-plugin-api": "^0.10.2",
38+
"@backstage/plugin-techdocs-react": "^1.2.17",
39+
"@backstage/theme": "^0.6.6",
4040
"@material-ui/core": "^4.12.2",
4141
"@material-ui/icons": "^4.11.3",
4242
"@material-ui/lab": "4.0.0-alpha.61",
@@ -47,21 +47,27 @@
4747
"react-use": "^17.2.4"
4848
},
4949
"peerDependencies": {
50-
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
51-
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
50+
"@types/react": "^17.0.0 || ^18.0.0",
51+
"react": "^17.0.0 || ^18.0.0",
52+
"react-dom": "^17.0.0 || ^18.0.0",
5253
"react-router-dom": "^6.3.0"
5354
},
55+
"peerDependenciesMeta": {
56+
"@types/react": {
57+
"optional": true
58+
}
59+
},
5460
"devDependencies": {
55-
"@backstage/cli": "^0.32.0",
56-
"@backstage/core-app-api": "^1.16.1",
57-
"@backstage/dev-utils": "^1.1.9",
58-
"@backstage/plugin-techdocs-addons-test-utils": "^1.0.47",
59-
"@backstage/test-utils": "^1.7.7",
61+
"@backstage/cli": "^0.32.1",
62+
"@backstage/core-app-api": "^1.17.0",
63+
"@backstage/dev-utils": "^1.1.10",
64+
"@backstage/plugin-techdocs-addons-test-utils": "^1.0.48",
65+
"@backstage/test-utils": "^1.7.8",
6066
"@date-io/core": "^1.3.13",
6167
"@svgr/core": "^6.0.0",
62-
"@testing-library/dom": "^9.0.0",
68+
"@testing-library/dom": "^10.0.0",
6369
"@testing-library/jest-dom": "^6.0.0",
64-
"@testing-library/react": "^14.0.0",
70+
"@testing-library/react": "^16.0.0",
6571
"@testing-library/user-event": "^14.0.0",
6672
"@types/d3": "^7.4.3",
6773
"@types/jest": "*",
@@ -72,7 +78,7 @@
7278
"react": "^18.3.1",
7379
"react-dom": "^18.3.1",
7480
"react-router-dom": "^6.3.0",
75-
"typescript": "~5.2.0"
81+
"typescript": "~5.6.0"
7682
},
7783
"files": [
7884
"dist"
@@ -82,5 +88,5 @@
8288
"url": "https://github.com/johanneswuerbach/backstage-plugin-techdocs-addon-mermaid",
8389
"directory": "."
8490
},
85-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
91+
"packageManager": "yarn@4.8.1"
8692
}

src/Mermaid/Mermaid.test.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
import { TechDocsAddonTester } from '@backstage/plugin-techdocs-addons-test-utils';
1818

19-
import React from 'react';
20-
2119
import { Mermaid } from '../plugin';
2220
import { selectConfig } from './Mermaid';
2321
import { MermaidProps } from './props';

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"compilerOptions": {
88
"outDir": "dist-types",
99
"rootDir": ".",
10-
"useUnknownInCatchVariables": false
10+
"useUnknownInCatchVariables": false,
11+
"jsx": "react-jsx"
1112
}
1213
}

0 commit comments

Comments
 (0)