Skip to content

Commit a210a61

Browse files
webdevsamrandependabot[bot]claude
authored
chore(deps): take the frontend majors, holding TypeScript at the supported version (#37)
* chore(deps-dev): bump the npm-dev group across 1 directory with 8 updates Bumps the npm-dev group with 8 updates in the /web directory: | Package | From | To | | --- | --- | --- | | [@testing-library/react](https://github.com/testing-library/react-testing-library) | `16.3.2` | `16.3.3` | | [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `19.2.4` | `19.2.7` | | [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) | `4.7.0` | `6.1.1` | | [eslint](https://github.com/eslint/eslint) | `10.9.0` | `10.9.1` | | [typescript](https://github.com/microsoft/TypeScript) | `5.6.3` | `7.0.2` | | [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.67.0` | `8.69.0` | | [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `5.4.21` | `8.2.2` | | [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) | `2.1.9` | `5.0.0` | Updates `@testing-library/react` from 16.3.2 to 16.3.3 - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](testing-library/react-testing-library@v16.3.2...v16.3.3) Updates `@types/react-dom` from 19.2.4 to 19.2.7 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom) Updates `@vitejs/plugin-react` from 4.7.0 to 6.1.1 - [Release notes](https://github.com/vitejs/vite-plugin-react/releases) - [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite-plugin-react/commits/plugin-react@6.1.1/packages/plugin-react) Updates `eslint` from 10.9.0 to 10.9.1 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](eslint/eslint@v10.9.0...v10.9.1) Updates `typescript` from 5.6.3 to 7.0.2 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](microsoft/TypeScript@v5.6.3...v7.0.2) Updates `typescript-eslint` from 8.67.0 to 8.69.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.69.0/packages/typescript-eslint) Updates `vite` from 5.4.21 to 8.2.2 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v8.2.2/packages/vite) Updates `vitest` from 2.1.9 to 5.0.0 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v5.0.0/packages/vitest) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-version: 16.3.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-dev - dependency-name: "@types/react-dom" dependency-version: 19.2.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-dev - dependency-name: "@vitejs/plugin-react" dependency-version: 6.1.1 dependency-type: direct:development update-type: version-update:semver-major dependency-group: npm-dev - dependency-name: eslint dependency-version: 10.9.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-dev - dependency-name: typescript dependency-version: 7.0.2 dependency-type: direct:development update-type: version-update:semver-major dependency-group: npm-dev - dependency-name: typescript-eslint dependency-version: 8.69.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-dev - dependency-name: vite dependency-version: 8.2.2 dependency-type: direct:development update-type: version-update:semver-major dependency-group: npm-dev - dependency-name: vitest dependency-version: 4.1.11 dependency-type: direct:development update-type: version-update:semver-major dependency-group: npm-dev ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): take the frontend majors, holding TypeScript at the supported version Supersedes #33, which could not be installed at all: `npm ci` failed with ERESOLVE. It bumped TypeScript to ~7.0.2 while keeping typescript-eslint at 8.69.0, which declares `peer typescript@">=4.8.4 <6.1.0"`. 8.69.0 is the latest published typescript-eslint, so there is currently no version that supports TypeScript 7 -- the bump is not landable yet regardless of what the code does. Taken here, all verified installed and green together: vite 5.4.11 -> 8.2.2 vitest 2.1.9 -> 5.0.0 @vitejs/plugin-react 4.7.0 -> 6.1.1 eslint 10.9.0 -> 10.10.0 typescript-eslint 8.67.0 -> 8.69.0 typescript 5.6.3 -> 6.0.3 (highest under the peer cap) TypeScript 6 surfaced one real incompatibility: TS2882 on `import './styles.css'` in main.tsx. Vite ships `declare module '*.css' {}` in `vite/client.d.ts`, but tsconfig never referenced it, so the project was relying on TypeScript 5 accepting an untyped side-effect import. Added `src/vite-env.d.ts` with the standard `/// <reference types="vite/client" />`, which is the idiomatic fix rather than a suppression. Also fixes a defect found while exercising the built app: the overview page rendered a copy-to-clipboard button reading `pip install apiverity-lab`, but the distribution is `api-verity-lab`. Anyone clicking copy got a command that cannot work. The README had it right, so nothing caught the drift; a test now rejects any source advertising a spelling of this package's own name that pyproject does not declare, and it fails when the old string is restored. Verified beyond a green typecheck: the production bundle was served and loaded in a browser -- React mounts, the dashboard renders its fixture data, and the console is clean. Bundle size is unchanged at 224 kB. Python side unaffected: 184 tests, coverage 75.5% against the 72% gate, ruff and mypy clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 47a1792 commit a210a61

5 files changed

Lines changed: 920 additions & 1716 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
"""The install command shown to users must be the real distribution name.
2+
3+
`web/src/pages/overview.tsx` renders a copy-to-clipboard button reading
4+
`pip install apiverity-lab`, while pyproject declares `api-verity-lab`. A
5+
user clicking copy got a command that cannot work. The README had it right,
6+
so nothing caught the drift.
7+
"""
8+
9+
from __future__ import annotations
10+
11+
import re
12+
import tomllib
13+
from pathlib import Path
14+
15+
_ROOT = Path(__file__).resolve().parents[2]
16+
17+
18+
def _distribution_name() -> str:
19+
with (_ROOT / "pyproject.toml").open("rb") as fh:
20+
return tomllib.load(fh)["project"]["name"]
21+
22+
23+
def test_no_source_advertises_a_wrong_install_name() -> None:
24+
name = _distribution_name()
25+
pattern = re.compile(r"pip install\s+(?!-)([A-Za-z0-9._-]+)")
26+
offenders: list[str] = []
27+
28+
searched = [
29+
*(_ROOT / "web" / "src").rglob("*.tsx"),
30+
*(_ROOT / "web" / "src").rglob("*.ts"),
31+
*_ROOT.glob("*.md"),
32+
*(_ROOT / "docs").glob("*.md"),
33+
]
34+
for path in searched:
35+
for match in pattern.finditer(path.read_text(encoding="utf-8")):
36+
advertised = match.group(1)
37+
if advertised in {name, "-e", "."}:
38+
continue
39+
# Third-party tooling installs are fine; only flag this project's
40+
# own name being spelled wrongly.
41+
if advertised.replace("-", "") == name.replace("-", ""):
42+
offenders.append(f"{path.relative_to(_ROOT)}: pip install {advertised}")
43+
44+
assert not offenders, (
45+
f"distribution is named {name!r}; these advertise a different spelling: "
46+
+ "; ".join(offenders)
47+
)

0 commit comments

Comments
 (0)