Skip to content

Remove flow-bin and Flow type-check leftovers#725

Merged
j0ntz merged 1 commit into
masterfrom
jon/remove-flow-bin
Jun 15, 2026
Merged

Remove flow-bin and Flow type-check leftovers#725
j0ntz merged 1 commit into
masterfrom
jon/remove-flow-bin

Conversation

@j0ntz

@j0ntz j0ntz commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🚨🚨 ON MERGE: delete the arm64 flow-bin carve-out from ~/.cursor/skills/verify-repo.sh 🚨🚨 . This PR removes flow-bin, making that sanctioned flow+EBADARCH skip (added 2026-06-12) dead code. The carve-out can be left in place safely (it becomes inert), but it should be deleted on merge since nothing will ever trigger it again.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

Asana task

Removes all Flow tooling from the pre-TypeScript era. flow-bin shipped an x86_64-only binary, so on arm64 hosts without Rosetta any path that invoked flow failed with EBADARCH. This broke yarn prepare inside verify-repo on an agent run on 2026-06-12. TypeScript is the type system of record here, and nothing in the Edge codebase consumes the generated Flow types: edge-react-gui imports edge-core-js/types, which resolves through the package's types export condition to the .ts sources, never the types.js.flow artifact.

Changes:

  • Removed flow-bin from devDependencies and the root .flowconfig.
  • Removed the build.types script and its scripts/make-types.ts Flow generator.
  • Removed rollup-plugin-flow-entry and its two flowEntry calls in rollup.config.js.
  • Removed eslint-plugin-flowtype and the standard-kit/prettier/flow extend from .eslintrc.json.
  • Removed the flow-typed/ directory and the types.js.flow entry from the published files list, plus its .gitignore/.eslintignore entries.
  • Updated the README to point at the TypeScript types.
  • Regenerated yarn.lock (no transitive remnants).

Breaking change for external consumers: this package no longer publishes types.js.flow. Downstream projects that import edge-core-js via Flow lose their type definitions. This is intentional. Edge itself is TypeScript and is unaffected.

Verification (arm64 host):

  • Clean yarn install plus a clean prepare (rimraf + all build.*) completes with no flow step and no EBADARCH.
  • tsc and eslint pass; the build emits types.js and types.mjs and no longer emits types.js.flow.
  • No src/ or runtime-emitted JS changes, so the value artifacts edge-react-gui consumes are byte-identical to master; only the dropped types.js.flow differs.

Note

Medium Risk
Breaking publish contract for Flow consumers (types.js.flow removed); runtime behavior unchanged but any external Flow importer needs to migrate to TypeScript types.

Overview
Removes the entire Flow toolchain from edge-core-js: flow-bin, .flowconfig, flow-typed/, eslint-plugin-flowtype, scripts/make-types.ts, the build.types npm script, and rollup-plugin-flow-entry (including its flowEntry hooks in rollup.config.js). Ignore/publish lists no longer reference types.js.flow.

Prepare/build is simplerprepare no longer runs a Flow type-generation or check step, which avoids flow-bin failing with EBADARCH on arm64 hosts. The README now points readers at src/types/types.ts instead of Flow types.

Breaking for external consumers: the package no longer ships types.js.flow. Downstream projects that typed against this package via Flow lose those definitions; Edge’s own apps use the package types export to .ts sources and are unaffected. No src/ or runtime bundle changes are in this diff.

Reviewed by Cursor Bugbot for commit fdc3ac1. Bugbot is set up for automated code reviews on this repo. Configure here.

@j0ntz

j0ntz commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence — edge-react-gui Buy $500 BTC quote with this core linked via updot

agent proof 1215651333308228 01 buy quote

agent proof 1215651333308228 01 buy quote

Captured by the agent's in-app test run (build-and-test).

Comment thread package.json Outdated
flow-bin shipped an x86_64-only binary that failed with EBADARCH on
arm64 hosts during prepare. TypeScript is the type system of record,
so the flow type-check was dead weight. Removed the flow-bin
devDependency, the root .flowconfig, and the trailing flow step from
build.types. The make-types.ts generator and shipped types.js.flow
artifact are kept for downstream Flow consumers.
@j0ntz j0ntz force-pushed the jon/remove-flow-bin branch from 69ec166 to fdc3ac1 Compare June 15, 2026 17:32
@j0ntz j0ntz merged commit 60d2b7e into master Jun 15, 2026
6 checks passed
@j0ntz j0ntz deleted the jon/remove-flow-bin branch June 15, 2026 17:48
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.

2 participants