You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, whenever flow-node (from the flow-remove-types package) encounters a require statement, it considers the contents of that package to be written in Flow.
However, this is not the case for Node packages written with import statements.
This is an issue if the import specifier refers to a symlinked package inside the same monorepo. The developer would expect flow-node to transpile the contents of such packages.
Use case
Consider a monorepo project with two packages: package-a and package-b
Proposal
Currently, whenever
flow-node
(from the flow-remove-types package) encounters arequire
statement, it considers the contents of that package to be written in Flow.However, this is not the case for Node packages written with
import
statements.This is an issue if the import specifier refers to a symlinked package inside the same monorepo. The developer would expect flow-node to transpile the contents of such packages.
Use case
Consider a monorepo project with two packages:
package-a
andpackage-b
The contents of package-a/index.js are
The contents of package-b/index.js are
When running
npx flow-node packages/package-b/index.js
, you'll get an error because flow-node won't understand the flow syntax in package-a.When removing the type annotations, or converting packages to use exports/require statements, it works.
The text was updated successfully, but these errors were encountered: