fast-flow-transform-linux-x64-gnu
raw JSON → 0.0.3 verified Fri May 01 auth: no javascript
This is the native binary package for the x86_64-unknown-linux-gnu platform, part of the fast-flow-transform project. It provides a high-performance Flow type-stripping transform using the Hermes/FFT engine, with adapters for webpack, rspack, rsbuild, Parcel, Vite, Rollup, Rolldown, and esbuild. The current stable version is 0.0.3, released as an initial public version; the package is in early development with frequent releases. It differentiates from alternatives like flow-remove-types by leveraging native Rust bindings via napi-rs for faster stripping, and it integrates seamlessly with modern bundlers.
Common errors
error Error: Cannot find module 'fast-flow-transform-linux-x64-gnu' ↓
cause The binary package is not intended to be imported directly; it should be a transitive dependency of 'fast-flow-transform'.
fix
Install the main package instead: npm install fast-flow-transform
error Module not found: Error: Package path ./adapters/webpack not exported from package fast-flow-transform ↓
cause The adapter subpath exports may not be available in older versions (pre-0.0.3 or early releases).
fix
Ensure you have version 0.0.3 or later: npm install fast-flow-transform@latest
Warnings
breaking The package requires Node.js >=18. Older versions will fail to install or run. ↓
fix Upgrade Node.js to version 18 or later.
gotcha This is a platform-specific binary package; it will only install on x86_64 Linux with glibc (gnu). Other platforms must use their respective binary packages (e.g., linux-x64-musl, darwin-arm64) or the main fast-flow-transform package which will download the correct binary automatically. ↓
fix Do not add this package directly to dependencies; rely on 'fast-flow-transform' as a dependency and it will install the appropriate binary.
deprecated No breaking changes or deprecations yet in this early version. ↓
fix N/A
Install
npm install fast-flow-transform-linux-x64-gnu yarn add fast-flow-transform-linux-x64-gnu pnpm add fast-flow-transform-linux-x64-gnu Imports
- transformFlowCode
import { transformFlowCode } from 'fast-flow-transform' - FastFlowTransformPlugin wrong
import { FastFlowTransformPlugin } from 'fast-flow-transform'correctimport { FastFlowTransformPlugin } from 'fast-flow-transform/adapters/webpack' - viteFastFlowTransform wrong
import { viteFastFlowTransform } from 'fast-flow-transform'correctimport { viteFastFlowTransform } from 'fast-flow-transform/adapters/vite'
Quickstart
import { transformFlowCode } from 'fast-flow-transform';
const code = `// @flow
function foo(x: ?number): string {
if (x) {
return String(x);
}
return 'default';
}`;
const result = transformFlowCode(code, { sourceType: 'module' });
console.log(result.code);
// Output:
// function foo(x) {
// if (x) {
// return String(x);
// }
// return 'default';
// }