Skip to content
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
21 changes: 21 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Development

## Verification

Run the repository checks through mise after installing dependencies.

```bash
mise run install
mise run typecheck
mise run lint
mise run test
mise run build
```

`mise run typecheck` checks the source in every workspace without emitting files
or using an incremental cache. `mise run lint` runs the same compiler check before
ESLint, so the pull request workflow catches type errors as well as lint errors.
The compiler inherits Backstage's defaults from `@backstage/cli/config/tsconfig.json`.
Keep the root and GitHub theme TypeScript versions aligned with the app template
for the installed Backstage release when upgrading.

`mise run build` builds the Docker image locally. It does not publish an image.

## Creating a New Plugin

On the command line, run the following command to create a new plugin.
Expand Down
4 changes: 4 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ run = 'bash -c "set -euo pipefail; git fetch --tags --force; echo version=$(./sc
description = "Run linting and type checking"
run = './scripts/lint'

[tasks.typecheck]
description = "Check TypeScript across all workspaces without emitting files"
run = 'yarn typecheck'

[tasks.test]
description = "Run the test suite"
run = 'yarn test --watchAll=false'
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"build-image": "yarn workspace backend build-image",
"tsc": "tsc",
"tsc:full": "tsc --skipLibCheck false --incremental false",
"typecheck": "tsc --noEmit --emitDeclarationOnly false --incremental false",
"clean": "backstage-cli repo clean",
"test": "backstage-cli repo test",
"test:all": "backstage-cli repo test --coverage",
Expand Down Expand Up @@ -42,7 +43,7 @@
"lerna": "^7.3.0",
"node-gyp": "^9.0.0",
"prettier": "^2.3.2",
"typescript": "~5.3.0"
"typescript": "~5.8.0"
},
"resolutions": {
"@yarnpkg/core": "4.9.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/backstage-theme-github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.0.0",
"typescript": "~5.3.0"
"typescript": "~5.8.0"
},
"eslintConfig": {
"root": false,
Expand Down
3 changes: 2 additions & 1 deletion scripts/lint
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
yarn lint:all
yarn typecheck
yarn lint:all
36 changes: 18 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7372,7 +7372,7 @@ __metadata:
react: "npm:^18.0.0"
react-dom: "npm:^18.0.0"
react-router-dom: "npm:^6.0.0"
typescript: "npm:~5.3.0"
typescript: "npm:~5.8.0"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -33695,7 +33695,7 @@ __metadata:
lerna: "npm:^7.3.0"
node-gyp: "npm:^9.0.0"
prettier: "npm:^2.3.2"
typescript: "npm:~5.3.0"
typescript: "npm:~5.8.0"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -36756,23 +36756,23 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:~5.3.0":
version: 5.3.3
resolution: "typescript@npm:5.3.3"
"typescript@npm:~5.5.0":
version: 5.5.4
resolution: "typescript@npm:5.5.4"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/e33cef99d82573624fc0f854a2980322714986bc35b9cb4d1ce736ed182aeab78e2cb32b385efa493b2a976ef52c53e20d6c6918312353a91850e2b76f1ea44f
checksum: 10c0/422be60f89e661eab29ac488c974b6cc0a660fb2228003b297c3d10c32c90f3bcffc1009b43876a082515a3c376b1eefcce823d6e78982e6878408b9a923199c
languageName: node
linkType: hard

"typescript@npm:~5.5.0":
version: 5.5.4
resolution: "typescript@npm:5.5.4"
"typescript@npm:~5.8.0":
version: 5.8.3
resolution: "typescript@npm:5.8.3"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/422be60f89e661eab29ac488c974b6cc0a660fb2228003b297c3d10c32c90f3bcffc1009b43876a082515a3c376b1eefcce823d6e78982e6878408b9a923199c
checksum: 10c0/5f8bb01196e542e64d44db3d16ee0e4063ce4f3e3966df6005f2588e86d91c03e1fb131c2581baf0fb65ee79669eea6e161cd448178986587e9f6844446dbb48
languageName: node
linkType: hard

Expand Down Expand Up @@ -36806,23 +36806,23 @@ __metadata:
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A~5.3.0#optional!builtin<compat/typescript>":
version: 5.3.3
resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"
"typescript@patch:typescript@npm%3A~5.5.0#optional!builtin<compat/typescript>":
version: 5.5.4
resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin<compat/typescript>::version=5.5.4&hash=379a07"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/1d0a5f4ce496c42caa9a30e659c467c5686eae15d54b027ee7866744952547f1be1262f2d40de911618c242b510029d51d43ff605dba8fb740ec85ca2d3f9500
checksum: 10c0/73409d7b9196a5a1217b3aaad929bf76294d3ce7d6e9766dd880ece296ee91cf7d7db6b16c6c6c630ee5096eccde726c0ef17c7dfa52b01a243e57ae1f09ef07
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A~5.5.0#optional!builtin<compat/typescript>":
version: 5.5.4
resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin<compat/typescript>::version=5.5.4&hash=379a07"
"typescript@patch:typescript@npm%3A~5.8.0#optional!builtin<compat/typescript>":
version: 5.8.3
resolution: "typescript@patch:typescript@npm%3A5.8.3#optional!builtin<compat/typescript>::version=5.8.3&hash=379a07"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/73409d7b9196a5a1217b3aaad929bf76294d3ce7d6e9766dd880ece296ee91cf7d7db6b16c6c6c630ee5096eccde726c0ef17c7dfa52b01a243e57ae1f09ef07
checksum: 10c0/92ea03509e06598948559ddcdd8a4ae5a7ab475766d5589f1b796f5731b3d631a4c7ddfb86a3bd44d58d10102b132cd4b4994dda9b63e6273c66d77d6a271dbd
languageName: node
linkType: hard

Expand Down
Loading