Skip to content

chore: deep overhaul — New Architecture fix, modern build/tooling, tests, CI & docs (v2) - #50

Open
kuraydev wants to merge 9 commits into
masterfrom
chore/deep-overhaul-2026
Open

kuraydev wants to merge 9 commits into
masterfrom
chore/deep-overhaul-2026

Conversation

@kuraydev

@kuraydev kuraydev commented Jun 29, 2026 •

Copy link
Copy Markdown
Owner

Automated deep-overhaul PR — review before merge.

Review fixes applied: moved the react-native-builder-bob esm: true flag from the top-level config into the module target ([["commonjs"],["module",{"esm":true}],["typescript"]]) to silence the cosmetic ⚠ The esm option is disabled, but the exports['.'].require/import field is set build warning. Output is unchanged. package.json version left at 2.0.0 (matches the documented major bump; no tag or npm publish triggered).

⚠️ Maintainer note before reading

This branch (chore/deep-overhaul-2026) was produced by a concurrent agent that shared the same local checkout as me. While I was doing the overhaul, a sibling claude process was independently committing and pushing the same branch (HEAD is already == origin/chore/deep-overhaul-2026). Its git reset/checkout operations repeatedly wiped my working-tree edits within seconds, so I could not land an independent commit without risking its already-pushed work. The diff described below is the sibling agent's committed overhaul (8 commits ahead of master), which I inspected via git show. Treat the "Open items" section as a review checklist before merge. This is the exact "never share a checkout" hazard noted in the project's own history.

Summary

Brings the 3.75-year-stale library up to 2026 standards: fixes the New Architecture crash, removes dead/heavy native dependencies, migrates the build to react-native-builder-bob with a proper exports map, replaces dead tslint tooling, adds a real Jest test suite + GitHub Actions CI, and rewrites the README with an accurate props table.

Non-breaking improvements

  • Repointed repository/bugs/homepage from the legacy WrathChaos/freakycoder URLs to github.com/kuraydev/... (npm package name unchanged).
  • Declared react / react-native peerDependencies (none existed before) + peerDependenciesMeta.
  • Replaced the dead tslint lint script with ESLint; migrated to a flat config; upgraded TypeScript 4→5, ESLint 7→9-era, Prettier 2→3; removed obsolete devDeps (react-native-typescript-transformer, npm-post-install, prettier-format, @types/react-native, @react-native-community/eslint-config, eslint-config-airbnb).
  • Removed the nested FlatList (inner cards now render with map) — kills the VirtualizedList-nesting warning.
  • Replaced launch-time Dimensions.get('screen') captures with useWindowDimensions so the timeline reflows on rotation; dropped the Android half-screen maxHeight hack and the 30%-of-screen bottom contentInset that caused the empty space in Styling Issue #49.
  • Stable keys derived from item dates instead of array index; React.memo on leaf components.
  • Fixed the fragile import { ITimelineData } from "lib/models" baseUrl import → relative.
  • Added a full props/API table, TypeScript usage, Expo + New Architecture notes, fixed badges/links, CHANGELOG/CONTRIBUTING links to the README.
  • Added CHANGELOG.md (Keep a Changelog), CONTRIBUTING.md, issue templates + PR template, and a Node 18/20 CI matrix (install + prettier + lint + typecheck + test + build).
  • Added a Jest + @testing-library/react-native suite.

Breaking changes (recommend major: 1.0.1 → 2.0.0)

  • Removed runtime deps react-native-androw (the New Architecture crash Cannot read property 'bubblingEventTypes' of null, (NOBRIDGE) ERROR Warning: TypeError: Cannot read property 'bubblingEventTypes' of null #48) and @freakycoder/react-native-helpers; card shadows now use native shadow* + Android elevation. Android shadow rendering changes slightly.
  • Build output migrated to builder-bob; main moved from ./build/dist/Timeline.js to dist/commonjs/index.js with an exports/module/types/react-native map. Bare react-native-beautiful-timeline import + default export still resolve.
  • react-native peer floor raised to >=0.61.

Verification

Local checks (run against my rewrite before the working tree was reset by the sibling agent): tsc --noEmit clean, eslint clean, prettier --check clean, bob build produced dual CJS/ESM + d.ts with default+named exports, 14 Jest tests passing. The committed branch state was not re-verified with a fresh build because the shared checkout was being reset continuously.

Open items the reviewer should confirm before merge

  1. package.json version was self-bumped to 2.0.0 in-branch — the overhaul brief said to recommend a bump, not set it. Confirm this is intended (it should be done by the release flow, not the PR).
  2. The branch initially shipped both lib/index.ts and lib/index.tsx (duplicate entry, ambiguous resolution); a later commit removed index.ts keeping index.tsx. Verify the canonical entry resolves and source/exports point at it.
  3. With builder-bob esm enabled, top-level types is dist/typescript/index.d.ts but esm output emits dist/typescript/{commonjs,module}/index.d.ts — confirm the types path isn't dangling.
  4. moment was kept (not swapped for dayjs) — fine and conservative, but the 2.0.0 install still ships moment; reconsider if install size was a goal.

Closes #48. Addresses #49.

kuraydev added 9 commits June 29, 2026 15:58
- Replace react-native-androw bitmap shadows with native shadow*/elevation,
  fixing the (NOBRIDGE) 'bubblingEventTypes of null' crash on bridgeless RN (#48)
- Render inner day cards with map() instead of a nested FlatList, removing the
  VirtualizedList nesting warning and related layout glitches (#48, #49)
- Use flex:1 container + trimmed contentInset, dropping the ScreenHeight/maxHeight
  hacks that left large empty space on Android (#49)
- Derive stable keys from date/title instead of array index
- Type renderItem as ListRenderItem<ITimeline> (no more item: any)
- Stop spreading rest props onto the FlatList; useWindowDimensions for reflow
- Memoize leaf components; fix Card's baseUrl-relative models import
- Add per-card accessibilityLabel; hide the decorative point from screen readers
- Add named exports + typed forwarded props via lib/index.tsx
- Migrate build to react-native-builder-bob (CJS + ESM + types in dist/) with a
  proper exports/module/react-native/types field map; keep default export and
  bare package-name import resolvable
- Repoint repository/bugs/homepage to kuraydev (npm name unchanged)
- Declare react/react-native peerDependencies (wide ranges) + peerDependenciesMeta
- Remove react-native-androw and @freakycoder/react-native-helpers runtime deps
- Replace dead tslint script + legacy .eslintrc.js with ESLint 9 flat config
- Drop obsolete devDeps (typescript-transformer, npm-post-install, prettier-format,
  @types/react-native, community eslint config); upgrade TS 5 / Prettier 3 / husky 9
- Add files allowlist, source field, lint-staged config; fix husky hooks
Covers rendering, default/custom dateFormat, style forwarding, empty data,
accessibility labels, the single-VirtualizedList regression for #48, and
absence of the legacy Androw component.
…lates

Node 18/20 matrix runs install, typecheck, lint, format check, tests, and build
on push/PR, replacing the dead Travis-era setup.
- Full props/API table (data, timelineStyle, dateFormat, *TextStyle, point/dash)
- TypeScript usage, Expo + New Architecture note, migration guide
- Fix badges/links to kuraydev; label moment/dash as bundled deps and react/
  react-native as the real peers
- Keep-a-Changelog CHANGELOG, CONTRIBUTING with backward-compat rules
@kuraydev kuraydev changed the title Deep overhaul: fix New Architecture crash (#48), bundle/tooling modernization, tests, CI & docs chore: deep overhaul — New Architecture fix, modern build/tooling, tests, CI & docs (v2) Jun 29, 2026
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.

(NOBRIDGE) ERROR Warning: TypeError: Cannot read property 'bubblingEventTypes' of null

1 participant