Skip to content

v0.8.1

Choose a tag to compare

@github-actions github-actions released this 20 May 17:38
v0.8.1
396bf2c

Added

  • React component feature slices. New react-component / FeatureKind::Library seed source, one feature per .tsx / .jsx file under conventional component dirs (src/pages, src/components, top-level components/) of every package that declares a React dependency. Capped at 100 components per package. Stories / .storybook/ / fixtures / testdata/ / .d.ts / .test.tsx / .spec.tsx files are excluded. Files already owned by a react-router-route, next-app-route, next-app-page, or next-pages-route seed are skipped so a route declaration file doesn't double-emit. Gives find_feature("src/components/Button.tsx") an answer (previously returned nothing for unrouted components) and feature_bundle a single-component target for review. Ports clawpatch react.ts componentSeeds (commit af0ad0e). Component name is derived from the basename stem; tags are [language, "react", "react-component"]. Five new regression tests cover: per-file emission across both src/pages and src/components; stories / tests / .d.ts / stories / fixtures exclusion; route-owned file deduplication via the shared exclusion set; the no-React-dependency gate; and the 100-per-package cap enforced at the file walker.

Changed

  • CMake test-executable classification. add_executable(target …) where the target name matches (^|[_-])tests?$ (case-insensitive) OR any source path matches the conventional C/C++ test pattern now emits a cmake-test / FeatureKind::TestSuite seed instead of cmake-bin / CliCommand. So add_executable(foo_tests test_main.cpp) lands in recommend_tests (and stays out of list_features --kind cli-command) rather than being recorded as a shippable binary. Ported from clawpatch commit f21b76c. Test-path detection uses a self-contained is_c_or_cpp_test_path helper mirroring upstream's isCOrCppTestPath: under tests/ / test/ / __tests__/, basename prefix test_ / test-, stem suffix _tests / -test (and plural), or FooTest.cpp / BarTests.cc. Four new regression tests cover name-based classification, source-path-only classification, the non-test negative case, and the helper's full pattern set.
  • Diagnostic on upstream C/C++ fix-storm (~25 commits since 2026-05-16): audited the rest of clawpatch's C/C++ mapper churn against our Rust port. The headline rewrite (cmakeCommandArgs paren-depth scanner, clawpatch 162a6fe) is now ported (see the Fixed section below). Two categories remain not ported because they don't apply: (1) regex anchoring fixes (06a7f4a, 5eea752). Our Rust port already uses (?m)^\s* line anchors and is not vulnerable to the mid-line false-match the TS regex hit. (2) catastrophic-backtracking fixes (496232f). The Rust regex crate uses NFA-based matching with linear time guarantees and isn't subject to the backtracking pathology these commits address in the JS engine. Remaining upstream commits (deferred sources, Makefile.in comments, bracket comments, header-only drop, build-tree exclusion, c-main test-path skip) were already in our 0.8.0 port of clawpatch PR #26 and didn't need re-porting.
  • Flask / FastAPI route detection matured to upstream parity. Both mappers (existing since 0.7.x) now handle four cases that previously silently dropped routes or attached the wrong metadata: (1) @app.api_route('/x', methods=[…]) variadic decorators on FastAPI; (2) multi-line decorators whose argument list wraps across newlines, via paren-depth tracking instead of the prior single-line regex; (3) methods=(…) tuple and methods={…} set literals as alternatives to the previously-only-supported methods=[…] list; (4) stacked decorators between the route decorator and the handler def (e.g. @app.get('/admin') / @auth_required / def admin_panel():). The handler function name now lands on the seed's entry_symbol, so find_feature and feature_bundle return the actual handler in addition to the route; previously the field was None for every Python route. api_route without an explicit methods= kwarg is dropped rather than guessed at, since the method set is undeterminable. The regex-driven matcher is replaced with a line-based scanner. Eight new regression tests cover api_route expansion, multi-line decorators, tuple/set method containers, function-name capture for both frameworks, stacked decorators, and the api_route-without-methods= drop. include_router(prefix=…) mount prefixes are still NOT expanded. Upstream clawpatch's commit message claims this work, but the implementation doesn't.

Fixed

  • CMake parser respects quoted args and bracket comments around ). The previous regex used [^)]* to capture the source list, which terminated at the first ) it saw, including ) characters that legitimately live inside "..." quoted args (e.g., a vendored source named "src/foo(v1).cpp") or inside message("add_executable(...)") / message([[add_library(...)]]) documentation calls. Those bugs produced two failure modes: (a) truncated source lists where everything after the first stray ) was silently lost, leaving owned_files with a half-token like "src/foo(v1; (b) phantom features when command-like text inside a string literal got picked up as a real declaration. Replaced the three add_executable / add_library / target_sources regexes with cmake_command_args, an explicit walker that tracks paren depth and skips over quoted strings ("...", including \X escapes) and bracket arguments ([[...]], [=[...]=]) so a ) inside a string is treated as ordinary content. Word-splitting moved into cmake_split_args, which preserves quoted tokens as single words (so "src/main file.cpp" survives as one source path instead of splitting on the space) and applies CMake's ; list-split rule only to unquoted words. Ports clawpatch commit 162a6fe. Six new regression tests cover string-embedded commands, bracket-arg-embedded commands, quoted paths with spaces, quoted paths containing ), library-type-keyword stripping (SHARED / STATIC etc. no longer leak as phantom sources), and direct unit tests for the walker primitives. The existing 23 C-mapper tests still pass unchanged.
  • install-hooks and doctor no longer refuse repos where core.hooksPath is set to a path that already resolves to the default <git_common>/hooks. The redundant setting (seen on PHP-extension repos that share a config template) is treated as if unset instead of erroring out.