chore: modernize tooling/build to 2026#53
Merged
Conversation
- demo becomes a real pnpm workspace member; drop its npm lockfile and hand-maintained nf-player/nf-grapher .d.ts copies - split single tsconfig into solution + package.tsconfig + demo.tsconfig - add MODERNIZE.md plan
- typescript 3.8 → 6.0, prettier 1 → 3, eslint 6 → 10 flat config, debug
4.1 → 4.4, typedoc 0.17 → 0.28, husky 4 → 9, lint-staged 10 → 17
- demo: react 16 → 19, styled-components 5 → 6, monaco 0.20 → 0.55
- add: vitest, tsdown, @arethetypeswrong/cli, publint, vite,
@vitejs/plugin-react, typescript-eslint, @eslint/js
- remove: parcel-bundler, npm-run-all, jest, ts-jest, @commitlint/*,
gh-pages, eslint-plugin-{prettier,notice}; old @typescript-eslint/*
packages replaced by combined typescript-eslint
- migrate jest → vitest (globals: true, no jsdom needed after
window.performance.now() → performance.now())
- husky v4 → v9 (.husky/pre-commit, prepare script), drop commitlint
- TS 6.0 fixes: import Debug from 'debug', Float32Array<ArrayBuffer>
generics in XAudioBuffer, catch(e as Error) casts
- typecheck is package-only until Phase 4 fixes demo
- tsdown emits ESM + CJS + per-condition .d.ts/.d.cts (points at the
package leaf tsconfig, not the root solution)
- package.json: "type": "module", sideEffects: false, per-condition
exports map, main/module/types/bin pointed at dist/, files: [dist],
prepack runs build
- CLI cleanup: drop cross-fetch (native fetch), tempy → node:fs +
randomUUID, require('../package.json') → import attribute
- index.ts re-exports split into value vs `export type` blocks; enable
verbatimModuleSyntax + isolatedModules; bulk add inline `type`
modifier via typescript-eslint consistent-type-imports autofix
- publint clean; attw deferred (its bundled TS 5.6.1-rc can't parse
Float32Array<ArrayBuffer> generics)
- demo/vite.config.ts with @vitejs/plugin-react, multi-entry (index.html + debug.html), base './' for GH Pages - HTML moved from demo/src/ to demo/ (Vite-idiomatic layout) - debug-harness/ folded into demo as debug.html + src/debug.ts - Monaco.tsx collapsed from ~220 to ~85 lines (kills the 90-line Parcel-era side-effect import wall; workers via Vite ?worker) - React 16 → 19 fallout: createRoot, React.FC, React.ReactNode, React.JSX.Element, drop `private state` modifier, fix CODEEditor duplicate componentDidMount, MonacoEditor onChange defaults - demo imports `from '../../../src'` → `from 'nf-player'` (workspace) - expose XAudioContext from nf-player public exports (demo needs it) - (nextRenderer as any).processor cast for FFT analyzer poke - root `pnpm typecheck` flipped back to `tsc -b` (whole solution)
- ci.yml: push + PR — install --frozen-lockfile, typecheck, lint,
vitest, build, validate (publint), build demo
- release.yml: on release published — build/validate/test, then
`pnpm publish --provenance --access public` with NPM_TOKEN
(gated by a protected `npm` environment)
- pages.yml: push to main — build demo, deploy via
actions/{configure,upload-pages-artifact,deploy}-pages (kills the
gh-pages npm dep + branch-pushing flow)
- injection hardening: read-only default permissions, id-token/pages
scoped to the jobs that need them, persist-credentials: false on
checkout, pull_request not pull_request_target, no untrusted
${{ github.event.* }} in run blocks, concurrency cancel-stale
- third-party actions still on @v4 tags with `# TODO: SHA-pin`
markers — one Dependabot pass converts
- delete .travis.yml (stale encrypted npm token + spotify/-vs-
nativeformat/ repo mismatch)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.