Skip to content

build: adopt the Vite+ contract with type checking on - #1

Merged
bryanfawcett merged 4 commits into
masterfrom
build/adopt-vite-plus
Oct 2, 2026
Merged

bryanfawcett merged 4 commits into
masterfrom
build/adopt-vite-plus

Conversation

@bryanfawcett

Copy link
Copy Markdown
Member

Part of the nyuchi Vite+ rollout (owner approval: pilot in mzizi-dev, then the other orgs). The org-required workflow now publishes vite-plus / fmt|check|test|build (nyuchi/.github#72, advisory for now).

  • vite-plus ^1.0.0 replaces jest and @types/jest. jest.config.js named the ts-jest preset, which was never a dependency, so npm test failed before any test ran. The two test files now import expect and test from vite-plus/test, and test is vp test (9/9 pass).
  • vite.config.ts carries the org fmt settings (same values as nyuchi/.github/.oxfmtrc.json) and lint.options typeAware + typeCheck. dist/ (committed tsc output) is in fmt and lint ignorePatterns.
  • tsconfig.json: vp check type checks with TypeScript 7, which rejects four options. Fixes:
    • baseUrl and paths removed. They pointed at a types/ directory that does not exist.
    • target es5 → es2019. ES5 is gone in TypeScript 7, and engines already says Node >= 14.
    • rootDir: "src" keeps the dist/index.js layout.
    • strict: false and types: ["node"] are stated explicitly. TypeScript 7 changed both defaults, and these values are what tsc 5.7 has always used here.
  • Scripts: check / lint / fmt run vp; build is unchanged. packageManager is pinned to npm 11.12.1. The lockfile stays gitignored, as upstream has it.
  • vp fmt reformatted the sources, README and .travis.yml. No behaviour change.

Note: dist/ is not rebuilt in this PR. The next npm run build will emit ES2019 instead of ES5.

Locally: vp check gives 0 errors and 20 warnings (mostly no-wrapper-object-types for String, left as is). tsc --noEmit is clean and vp test passes 9/9.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GHjaH1Vt2dVLWU68iz8tFq

vite.config.ts carries the org format settings and turns on type-aware
linting and type checking. vp test replaces jest, whose ts-jest preset was
never installed, so the tests had not run. tsconfig drops the options
TypeScript 7 removed (baseUrl, a non-relative paths entry, target es5),
sets rootDir to keep the dist layout, and states strict: false and the
node types, which TypeScript 7 no longer defaults. dist/ is untouched and
excluded from fmt and lint. Sources are reformatted by vp fmt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHjaH1Vt2dVLWU68iz8tFq
bryanfawcett and others added 3 commits October 3, 2026 02:25
nyuchi/.github#73 stops setup-node caching in the tool-only jobs, which
failed here because packageManager is pinned and there is no lockfile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHjaH1Vt2dVLWU68iz8tFq
MD030 (two spaces after the list markers) and MD014 ($ prompts on
commands with no output).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHjaH1Vt2dVLWU68iz8tFq
The reformat made CodeQL report the existing js/redos alert on
isValidEmail as new. The rewritten pattern accepts the same language
(300,000 random strings agree) without the nested optional quantifier,
and addresses over 254 characters (the SMTP limit) are refused before
the regex runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHjaH1Vt2dVLWU68iz8tFq
@bryanfawcett
bryanfawcett merged commit e3ae2fe into master Oct 2, 2026
11 checks passed
@bryanfawcett
bryanfawcett deleted the build/adopt-vite-plus branch October 2, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant