Skip to content
Open
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
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1655,3 +1655,38 @@ jobs:
# - name: Print rows in the user table
# if: always()
# run: spacetime sql quickstart-chat "SELECT * FROM user"

typescript-submodules:
needs: [merge_queue_noop]
if: ${{ needs.merge_queue_noop.outputs.skip != 'true' }}
name: TypeScript - Submodules
runs-on: spacetimedb-new-runner-2
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- uses: ./.github/actions/setup-pnpm
with:
run_install: true

- name: Build TypeScript SDK
run: pnpm --dir crates/bindings-typescript run build

- name: Install released SpacetimeDB toolchain
run: |
curl -sSf https://install.spacetimedb.com | sh -s -- --root-dir "$RUNNER_TEMP/spacetime" --yes
echo "$RUNNER_TEMP/spacetime" >> "$GITHUB_PATH"
"$RUNNER_TEMP/spacetime/spacetime" version install 2.8.3 --use --yes

- name: Check submodules
run: |
pnpm -r -F "./spacetime-*-ts/**" run typecheck
pnpm -r -F "./spacetime-*-ts/**" run test

- name: Build submodule packages and examples
run: pnpm -r -F "./spacetime-*-ts/**" run build
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@ __pycache__/
## JetBrains
.idea/

# TypeScript submodule development outputs
spacetime-*-ts/example/.stdb-server-token
spacetime-*-ts/example/public/app.js
spacetime-*-ts/example/public/app.js.map
spacetime-*-ts/example/public/app.css
spacetime-*-ts/example/public/app.css.map
spacetime-*-ts/ts-codegen/

/protobuf
cs-src/
crates/bench/spacetime.svg
Expand Down
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ dist
target
.github
coverage
**/public/app.js
**/public/app.js.map
**/public/app.css
**/public/app.css.map
**/src/module_bindings/**
17 changes: 17 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export default tseslint.config(
'**/dist/**',
'**/build/**',
'**/coverage/**',
'**/public/app.js',
'**/src/module_bindings/**',
'**/ts-codegen/**',
'**/templates/angular-ts/.angular/**',
],
},
Expand Down Expand Up @@ -62,6 +65,7 @@ export default tseslint.config(
'./tsconfig.json',
'./crates/bindings-typescript/tsconfig.json',
'./crates/bindings-typescript/test-app/tsconfig.json',
'./spacetime-submodule-shared-ts/tsconfig.json',
'./templates/react-ts/tsconfig.json',
'./templates/chat-react-ts/tsconfig.json',
'./templates/money-exchange-react-ts/tsconfig.json',
Expand Down Expand Up @@ -118,6 +122,19 @@ export default tseslint.config(
],
},
},
{
files: ['spacetime-*-ts/**/example/public/ui.js'],
languageOptions: {
sourceType: 'script',
globals: globals.browser,
},
},
{
files: ['spacetime-*-ts/**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
},
},
{
files: ['templates/angular-ts/src/**/*.ts'],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"type": "module",
"scripts": {
"run-all": "pnpm -r -F ./crates/bindings-typescript -F ./crates/bindings-typescript/examples/quickstart-chat -F ./crates/bindings-typescript/test-app -F ./docs -F \"./templates/**\" run",
"run-all": "pnpm -r -F ./crates/bindings-typescript -F ./crates/bindings-typescript/test-app -F ./docs -F \"./templates/**\" -F \"./spacetime-*-ts/**\" run",
"format": "pnpm run-all format && prettier eslint.config.js --write",
"lint": "pnpm run-all lint && prettier eslint.config.js --check",
"build": "pnpm run-all build",
Expand Down
Loading
Loading