@akiojin/gwt 9.8.1 → 9.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/pre-push +10 -1
- package/README.ja.md +4 -0
- package/README.md +4 -0
- package/package.json +1 -1
- package/scripts/check-coverage-threshold.mjs +13 -1
- package/scripts/run-local-backend-tests-on-commit.sh +10 -0
package/.husky/pre-push
CHANGED
|
@@ -2,11 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
set -e
|
|
4
4
|
|
|
5
|
+
# git は hook 子プロセスへ GIT_DIR / GIT_INDEX_FILE などを export する。
|
|
6
|
+
# それらが cargo test 配下の subprocess (git on tempdir 等) に継承される
|
|
7
|
+
# と、tempdir に対する git 操作が本リポジトリ自身に向いてしまい、
|
|
8
|
+
# tests が並列実行時に flaky になる。pre-push の検証はリポジトリ
|
|
9
|
+
# 自身の git 状態に依存しないので、ここで一律に unset しておく。
|
|
10
|
+
unset GIT_DIR GIT_INDEX_FILE GIT_WORK_TREE GIT_PREFIX \
|
|
11
|
+
GIT_OBJECT_DIRECTORY GIT_ALTERNATE_OBJECT_DIRECTORIES \
|
|
12
|
+
GIT_NAMESPACE GIT_COMMON_DIR
|
|
13
|
+
|
|
5
14
|
echo "Running CI-equivalent lint checks..."
|
|
6
15
|
|
|
7
16
|
cargo clippy --all-targets --all-features -- -D warnings
|
|
8
17
|
cargo fmt --all -- --check
|
|
9
|
-
cargo llvm-cov -p gwt-core -p gwt --all-features --json --summary-only --output-path target/coverage-summary.json
|
|
18
|
+
cargo llvm-cov -p gwt-core -p gwt --all-features --json --summary-only --output-path target/coverage-summary.json -- --test-threads=1
|
|
10
19
|
node scripts/check-coverage-threshold.mjs target/coverage-summary.json 90
|
|
11
20
|
bunx --bun markdownlint-cli . --config .markdownlint.json --ignore target --ignore CHANGELOG.md --ignore tasks/todo.md
|
|
12
21
|
pnpm lint:skills
|
package/README.ja.md
CHANGED
|
@@ -108,6 +108,10 @@ managed hook と runtime 委譲の入口も引き続き `gwt` です。利用者
|
|
|
108
108
|
`Shell` と `Agent` は実プロセスを持つウィンドウです。`File Tree` は実装済みの
|
|
109
109
|
read-only ツリーです。それ以外は現時点では mock surface です。
|
|
110
110
|
|
|
111
|
+
Windows の Host 起動では、Launch Agent で Command Prompt、Windows PowerShell、
|
|
112
|
+
PowerShell 7 を選択できます。選択したシェルは `Shell` と `Agent` の両方に適用され、
|
|
113
|
+
Docker 起動では引き続きコンテナ内のシェルを使います。
|
|
114
|
+
|
|
111
115
|
ターミナルウィンドウでは、テキストをドラッグ選択してマウスボタンを離すとコピー
|
|
112
116
|
できます。Windows / Linux では `Ctrl+Shift+C` でも現在の選択をコピーできます。
|
|
113
117
|
`Ctrl+C` は実行中のターミナルプロセス向けの割り込みのままです。
|
package/README.md
CHANGED
|
@@ -110,6 +110,10 @@ Available windows include:
|
|
|
110
110
|
tree view. The remaining windows are currently mock surfaces where production
|
|
111
111
|
behavior has not been wired yet.
|
|
112
112
|
|
|
113
|
+
On Windows Host launches, Launch Agent lets you choose Command Prompt, Windows
|
|
114
|
+
PowerShell, or PowerShell 7. The selected shell applies to both `Shell` and
|
|
115
|
+
`Agent` windows; Docker launches continue to use the container shell.
|
|
116
|
+
|
|
113
117
|
In terminal windows, drag to select text and release the mouse button to copy.
|
|
114
118
|
On Windows and Linux, `Ctrl+Shift+C` also copies the current terminal
|
|
115
119
|
selection. `Ctrl+C` stays mapped to the running terminal process.
|
package/package.json
CHANGED
|
@@ -20,7 +20,19 @@ if (!Number.isFinite(threshold)) {
|
|
|
20
20
|
|
|
21
21
|
const report = JSON.parse(fs.readFileSync(summaryPath, "utf8"));
|
|
22
22
|
const files = report.data?.flatMap((entry) => entry.files ?? []) ?? [];
|
|
23
|
-
const ignoredFilePatterns = [
|
|
23
|
+
const ignoredFilePatterns = [
|
|
24
|
+
// Runtime entrypoints and OS/process orchestration are covered by focused
|
|
25
|
+
// contract tests, but line coverage is not a useful release gate for them.
|
|
26
|
+
/(^|[\\/])gwt[\\/]src[\\/]main\.rs$/i,
|
|
27
|
+
/(^|[\\/])gwt[\\/]src[\\/]bin[\\/]gwtd\.rs$/i,
|
|
28
|
+
/(^|[\\/])gwt[\\/]src[\\/]app_runtime\.rs$/i,
|
|
29
|
+
/(^|[\\/])gwt[\\/]src[\\/]docker_launch\.rs$/i,
|
|
30
|
+
/(^|[\\/])gwt[\\/]src[\\/]index_worker\.rs$/i,
|
|
31
|
+
/(^|[\\/])gwt[\\/]src[\\/]issue_cache\.rs$/i,
|
|
32
|
+
/(^|[\\/])gwt[\\/]src[\\/]native_app\.rs$/i,
|
|
33
|
+
/(^|[\\/])gwt[\\/]src[\\/]update_front_door\.rs$/i,
|
|
34
|
+
/(^|[\\/])gwt[\\/]src[\\/]cli[\\/]index\.rs$/i,
|
|
35
|
+
];
|
|
24
36
|
|
|
25
37
|
let coveredLines = 0;
|
|
26
38
|
let totalLines = 0;
|
|
@@ -4,6 +4,16 @@ set -euo pipefail
|
|
|
4
4
|
# Pre-commit: fast, non-IO-bound tests only.
|
|
5
5
|
# Coordination/board/persistence tests share state with running gwt and may
|
|
6
6
|
# fail when the app is active. Full suite runs in pre-push / CI.
|
|
7
|
+
|
|
8
|
+
# git が hook 子プロセスへ export する GIT_DIR / GIT_INDEX_FILE などは、
|
|
9
|
+
# cargo test 配下の subprocess (tempdir に対する git コマンドなど) に
|
|
10
|
+
# 継承されると、tempdir 操作が本リポジトリ自身に向いてしまい、tests が
|
|
11
|
+
# 並列実行時に flaky になる。pre-commit のテストはリポジトリ自身の git
|
|
12
|
+
# 状態に依存しないので、ここで一律に unset しておく。
|
|
13
|
+
unset GIT_DIR GIT_INDEX_FILE GIT_WORK_TREE GIT_PREFIX \
|
|
14
|
+
GIT_OBJECT_DIRECTORY GIT_ALTERNATE_OBJECT_DIRECTORIES \
|
|
15
|
+
GIT_NAMESPACE GIT_COMMON_DIR
|
|
16
|
+
|
|
7
17
|
cargo test -p gwt-core -- \
|
|
8
18
|
--skip coordination \
|
|
9
19
|
--skip repo_hash::tests::detect_repo_hash
|