Skip to content

chore: modernize tooling/build to 2026#53

Merged
kirbysayshi merged 15 commits into
mainfrom
ksh/modernize-2026
May 27, 2026
Merged

chore: modernize tooling/build to 2026#53
kirbysayshi merged 15 commits into
mainfrom
ksh/modernize-2026

Conversation

@kirbysayshi
Copy link
Copy Markdown
Contributor

No description provided.

- 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)
@kirbysayshi kirbysayshi merged commit 6391854 into main May 27, 2026
1 check passed
@kirbysayshi kirbysayshi deleted the ksh/modernize-2026 branch May 27, 2026 17:08
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