Skip to content

chore: no-issue: replace deprecated react-beautiful-dnd and shortid#10077

Draft
passcod wants to merge 2 commits into
build/loader-approach-wipfrom
chore/replace-deprecated-deps
Draft

chore: no-issue: replace deprecated react-beautiful-dnd and shortid#10077
passcod wants to merge 2 commits into
build/loader-approach-wipfrom
chore/replace-deprecated-deps

Conversation

@passcod

@passcod passcod commented Jun 17, 2026

Copy link
Copy Markdown
Member

Changes

🤖 Replace two deprecated, unmaintained packages:

  • react-beautiful-dnd@hello-pangea/dnd (maintained drop-in fork, same API; pinned to ^16 for React-18 / react-redux-8 compatibility).
  • shortidnanoid (already a dependency) for unique id generation.

shortid is only ever called with no input (random ids — device/process/run ids, form keys), never as a deterministic hash, so there are no id-format or matching concerns; existing stored ids stay valid. Rides on the build-less branch but the changes are independent.

Stacked on build/loader-approach-wip.

Auto-Deploy

  • Deploy
Options
  • Synthetic test
  • Generate fake data
  • More data (20Gi)
  • No facility servers (central-only)
  • No sync (facility tasks scaled to zero)
  • AMD64 architecture (default is arm64)
  • Skip mobile build
  • Always build mobile
  • Stay up for 8 hours
  • Stay up for 24 hours
  • Stay up (no TTL)
  • Build images only (don't deploy)
  • Pause this deploy

Tests

  • Run E2E tests
  • Run DAST scan

Review Hero

  • Run Review Hero
  • Auto-fix review suggestions Wait for Review Hero to finish, resolve any comments you disagree with or want to fix manually, then check this to auto-fix the rest.
  • Auto-fix CI failures Check this to auto-fix lint errors, test failures, and other CI issues.
  • Auto-merge upstream Check this to merge the base branch into this PR, with AI conflict resolution if needed.
  • Save suppressions Check this to capture 👎 reactions on Review Hero comments as suppression rules in .github/review-hero/suppressions.yml. Also runs automatically at the end of any auto-fix run.

Remember to...

  • ...write or update tests
  • ...add UI screenshots and testing notes to the Linear issue
  • ...add any manual upgrade steps to the Linear issue
  • ...update the config reference, settings reference, or any relevant runbook(s)
  • ...call out additions or changes to config files for the deployment team to take note of

@review-hero

review-hero Bot commented Jun 17, 2026

Copy link
Copy Markdown

🦸 Review Hero Summary
9 agents reviewed this PR | 0 critical | 0 suggestions | 0 nitpicks | Filtering: consensus 3 voters

No issues found. Looks good!

@passcod passcod force-pushed the build/loader-approach-wip branch from ff698f3 to e87c273 Compare June 17, 2026 19:58
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from fb6d91d to 6870031 Compare June 17, 2026 19:58
@passcod passcod force-pushed the build/loader-approach-wip branch from e87c273 to d09f203 Compare June 17, 2026 21:13
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from 6870031 to 0397729 Compare June 17, 2026 21:13
@passcod passcod force-pushed the build/loader-approach-wip branch from d09f203 to 41fe9bb Compare June 18, 2026 02:59
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from 0397729 to 7c462dd Compare June 18, 2026 02:59
@passcod passcod force-pushed the build/loader-approach-wip branch from 41fe9bb to 49cfd9e Compare June 18, 2026 03:35
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from 7c462dd to 940babd Compare June 18, 2026 03:35
@passcod passcod force-pushed the build/loader-approach-wip branch from 49cfd9e to d743013 Compare June 18, 2026 04:29
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from 940babd to b7b9f70 Compare June 18, 2026 04:29
@passcod passcod force-pushed the build/loader-approach-wip branch from d743013 to 3725671 Compare June 18, 2026 12:36
@passcod passcod force-pushed the chore/replace-deprecated-deps branch 2 times, most recently from 11f73ae to e93abb9 Compare June 19, 2026 00:47
@passcod passcod force-pushed the build/loader-approach-wip branch 2 times, most recently from b7734d6 to 8967f3b Compare June 19, 2026 04:00
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from e93abb9 to b63ea5f Compare June 19, 2026 04:00
@passcod passcod force-pushed the build/loader-approach-wip branch from 8967f3b to ed40f75 Compare June 19, 2026 04:20
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from b63ea5f to 4b2a49d Compare June 19, 2026 04:20
@passcod passcod force-pushed the build/loader-approach-wip branch from ed40f75 to b63e3b1 Compare June 19, 2026 06:01
@passcod passcod force-pushed the chore/replace-deprecated-deps branch 2 times, most recently from 57872b2 to a0a9338 Compare June 19, 2026 06:36
@passcod passcod force-pushed the build/loader-approach-wip branch from b63e3b1 to 9e4bcc2 Compare June 19, 2026 06:36
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from a0a9338 to 81ff903 Compare June 19, 2026 07:16
@passcod passcod force-pushed the build/loader-approach-wip branch from 9e4bcc2 to 47898f7 Compare June 19, 2026 07:16
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from 81ff903 to 507bf14 Compare June 19, 2026 10:49
@passcod passcod force-pushed the build/loader-approach-wip branch 2 times, most recently from 21bf2af to def43fd Compare June 19, 2026 11:10
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from 507bf14 to b87bafb Compare June 19, 2026 11:10
@passcod passcod force-pushed the build/loader-approach-wip branch from def43fd to ea1eb5b Compare June 19, 2026 11:23
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from 15c8c2f to 3014246 Compare June 19, 2026 11:25
@passcod passcod force-pushed the build/loader-approach-wip branch from ea1eb5b to 2a7f3d1 Compare June 19, 2026 11:25
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from 3014246 to 896b1ac Compare June 19, 2026 17:44
@passcod passcod force-pushed the build/loader-approach-wip branch from 811c2d3 to 593b819 Compare June 19, 2026 17:58
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from 896b1ac to 37825b6 Compare June 19, 2026 17:58
@passcod passcod force-pushed the build/loader-approach-wip branch from 593b819 to e0e8ee7 Compare June 20, 2026 03:47
@passcod passcod force-pushed the chore/replace-deprecated-deps branch 2 times, most recently from 822524c to e5bcf2d Compare June 20, 2026 04:07
@passcod passcod force-pushed the build/loader-approach-wip branch from e0e8ee7 to a5d13aa Compare June 20, 2026 04:07
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from e5bcf2d to fe43a7b Compare June 20, 2026 04:21
@passcod passcod force-pushed the build/loader-approach-wip branch from a5d13aa to d4596e1 Compare June 20, 2026 04:21
passcod and others added 2 commits June 20, 2026 16:36
Run servers/packages build-less under the tsx loader:
- lodash -> lodash-es, case -> es-toolkit
- scoped __cjs_ codemod for CJS-only deps (date-fns-tz, express, bcrypt, umzug, inflection)
- exports point at src (extension-less); type:module; build scripts dropped

Fixes surfaced by native ESM strictness (latent under CJS):
- transformAnswers: formatShort imported from wrong subpath (dateFormatters, not dateTime)
- hl7fhir/search: jsonFromBase64 never existed; use base64ToJson (was silently undefined)
- __dirname -> import.meta.dirname in 6 node-run files

Build-less tests (run jest from source, no build step):
- common.jest.config: transform .tsx? with TS parser, whitelist ESM deps
  (lodash-es, es-toolkit, @tamanu) for transform, map .js->.ts resolution
- server tests run from __tests__ source (not __disttests__); drop test-build
- codemod rewrites test imports ../dist/* -> ../app/* (incl jest.mock family)
- drop globalTeardown magic (runs outside the jest sandbox, where tsx's CJS
  resolver can't resolve extension-less exports subpaths); close the db in an
  in-sandbox afterAll instead. tests need no loader.

Verified: facility+central migrate (107 from .ts) and boot build-less; central
reaches 'Server is running on port 3000'; shared jest suite (71) green; central
integration tests (basics/translation/health) green from source, multi-file.
Adds check-internal-named-imports.mjs and codemod-test-dist-to-app.mjs.
Both are deprecated and unmaintained:
- react-beautiful-dnd -> @hello-pangea/dnd, a maintained drop-in fork with an
  identical API (one import site).
- shortid -> nanoid for unique id generation (device/process/run ids). nanoid 5
  is ESM-only, which is why this rides on the build-less branch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@passcod passcod force-pushed the chore/replace-deprecated-deps branch from fe43a7b to f9d1f0d Compare June 20, 2026 04:36
@passcod passcod force-pushed the build/loader-approach-wip branch 16 times, most recently from a782bf5 to 7c594fa Compare June 20, 2026 09:21
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