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
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
node-version-file: .node-version
cache: pnpm

- name: Set up Rust
Expand All @@ -46,5 +46,10 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Set up Turborepo cache
uses: rharkor/caching-for-turbo@75f8ebf4a43d2c60b23bc2a27082cfea94ffdad9 # v2.5.0
with:
use-relative-cache-path: true

- name: Validate
run: pnpm validate
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
packages/*/node_modules/
.turbo/
packages/native/target/
packages/native/*.node
packages/studio/dist/
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.13.0
24 changes: 14 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,27 @@
"private": true,
"type": "module",
"scripts": {
"build": "pnpm --filter @patchwave/schema build && pnpm --filter @patchwave/studio build && pnpm typecheck && pnpm --filter @patchwave/native build && pnpm --filter @patchwave/cli build",
"typecheck": "pnpm exec tsc --noEmit -p tsconfig.json",
"fmt": "oxfmt && cargo fmt --manifest-path packages/native/Cargo.toml",
"fmt:check": "oxfmt --check && cargo fmt --check --manifest-path packages/native/Cargo.toml",
"lint": "cargo clippy --manifest-path packages/native/Cargo.toml --all-targets -- -D warnings",
"test": "pnpm --filter @patchwave/schema test && pnpm --filter @patchwave/studio test && pnpm --filter @patchwave/cli test && pnpm test:native",
"test:native": "cargo test --manifest-path packages/native/Cargo.toml",
"bench:callback": "cargo test --release --manifest-path packages/native/Cargo.toml realtime::tests::maximum_patch_callback_budget_matrix -- --ignored --exact --nocapture",
"check": "pnpm typecheck && pnpm fmt:check && pnpm lint",
"validate": "pnpm build && pnpm check && pnpm test",
"build": "turbo run build typecheck:root",
"typecheck": "turbo run typecheck typecheck:root",
"typecheck:root": "tsc --noEmit -p tsconfig.json",
"fmt": "turbo run fmt fmt:root --cache=local:rw",
"fmt:root": "oxfmt . '!packages/cli/**' '!packages/schema/**' '!packages/studio/**'",
"fmt:check": "turbo run fmt:check fmt:check:root",
"fmt:check:root": "oxfmt --check . '!packages/cli/**' '!packages/schema/**' '!packages/studio/**'",
"lint": "turbo run lint",
"test": "turbo run test",
"test:native": "turbo run test --filter=@patchwave/native",
"bench:callback": "turbo run bench:callback --filter=@patchwave/native --cache=local:rw",
"check": "turbo run typecheck typecheck:root fmt:check fmt:check:root lint",
"validate": "turbo run build typecheck:root typecheck fmt:check fmt:check:root lint test",
"validate:release": "pnpm validate && pnpm bench:callback",
"patchwave": "pnpm --filter @patchwave/cli patchwave"
},
"devDependencies": {
"@patchwave/schema": "workspace:*",
"@types/node": "24.13.3",
"oxfmt": "^0.59.0",
"turbo": "2.10.5",
"typescript": "7.0.2"
},
"engines": {
Expand Down
3 changes: 3 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"type": "module",
"scripts": {
"build": "tsc --noEmit",
"typecheck": "tsc --noEmit",
"test": "tsx --test test/**/*.test.ts",
"fmt": "oxfmt package.json src test tsconfig.json",
"fmt:check": "oxfmt --check package.json src test tsconfig.json",
"patchwave": "tsx src/index.ts"
},
"dependencies": {
Expand Down
7 changes: 6 additions & 1 deletion packages/native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"build": "napi build --platform --release"
"build": "napi build --platform --release",
"test": "cargo test --manifest-path Cargo.toml",
"lint": "cargo clippy --manifest-path Cargo.toml --all-targets -- -D warnings",
"fmt": "cargo fmt --manifest-path Cargo.toml",
"fmt:check": "cargo fmt --check --manifest-path Cargo.toml",
"bench:callback": "cargo test --release --manifest-path Cargo.toml realtime::tests::maximum_patch_callback_budget_matrix -- --ignored --exact --nocapture"
},
"devDependencies": {
"@napi-rs/cli": "3.7.3"
Expand Down
5 changes: 4 additions & 1 deletion packages/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
},
"scripts": {
"build": "tsc --noEmit",
"test": "tsx --test src/**/*.test.ts"
"typecheck": "tsc --noEmit",
"test": "tsx --test src/**/*.test.ts",
"fmt": "oxfmt package.json src tsconfig.json",
"fmt:check": "oxfmt --check package.json src tsconfig.json"
},
"devDependencies": {
"@types/node": "24.13.3",
Expand Down
5 changes: 4 additions & 1 deletion packages/studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
},
"scripts": {
"build": "vite build && tsc --noEmit",
"typecheck": "tsc --noEmit",
"dev": "vite",
"test": "vite build && tsx --test test/**/*.test.ts && vitest run"
"test": "tsx --test test/**/*.test.ts && vitest run",
"fmt": "oxfmt package.json client src test tsconfig.json vite.config.ts",
"fmt:check": "oxfmt --check package.json client src test tsconfig.json vite.config.ts"
},
"dependencies": {
"@babel/types": "7.28.4",
Expand Down
64 changes: 64 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "1.88.0"
components = ["clippy", "rustfmt"]
profile = "minimal"
79 changes: 79 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"$schema": "https://turborepo.com/schema.json",
"globalDependencies": [".node-version", "pnpm-lock.yaml", "rust-toolchain.toml"],
"globalEnv": ["CI", "RUNNER_ARCH", "RUNNER_OS"],
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": []
},
"@patchwave/studio#build": {
"dependsOn": ["^build"],
"env": ["NODE_ENV", "VITE_*"],
"outputs": ["dist/**"]
},
"@patchwave/native#build": {
"dependsOn": ["^build"],
"env": [
"CARGO_BUILD_TARGET",
"CARGO_ENCODED_RUSTFLAGS",
"CC",
"CFLAGS",
"CXX",
"CXXFLAGS",
"MACOSX_DEPLOYMENT_TARGET",
"NAPI_RS_CLI_VERSION",
"PKG_CONFIG_LIBDIR",
"PKG_CONFIG_PATH",
"PKG_CONFIG_SYSROOT_DIR",
"RUSTC_WORKSPACE_WRAPPER",
"RUSTC_WRAPPER",
"RUSTFLAGS"
],
"inputs": ["$TURBO_DEFAULT$", "../../rust-toolchain.toml"],
"outputs": ["patchwave-native.*.node"]
},
"typecheck": {
"dependsOn": ["^typecheck"],
"outputs": []
},
"//#typecheck:root": {
"outputs": []
},
"test": {
"dependsOn": ["^build"],
"outputs": []
},
"@patchwave/studio#test": {
"dependsOn": ["build"],
"outputs": []
},
"@patchwave/native#test": {
"inputs": ["$TURBO_DEFAULT$", "../../fixtures/**", "../../rust-toolchain.toml"],
"outputs": []
},
"lint": {
"outputs": []
},
"@patchwave/native#lint": {
"inputs": ["$TURBO_DEFAULT$", "../../fixtures/**", "../../rust-toolchain.toml"],
"outputs": []
},
"fmt": {
"cache": false
},
"//#fmt:root": {
"cache": false
},
"fmt:check": {
"outputs": []
},
"//#fmt:check:root": {
"outputs": []
},
"bench:callback": {
"cache": false,
"inputs": ["$TURBO_DEFAULT$", "../../fixtures/**", "../../rust-toolchain.toml"]
}
}
}