Skip to content

fix: resolve moved visual node imports#261

Open
prashanthnimmagadda wants to merge 1 commit into
flydelabs:mainfrom
prashanthnimmagadda:bounty/broken-imports-after-moving-files
Open

fix: resolve moved visual node imports#261
prashanthnimmagadda wants to merge 1 commit into
flydelabs:mainfrom
prashanthnimmagadda:bounty/broken-imports-after-moving-files

Conversation

@prashanthnimmagadda
Copy link
Copy Markdown

Summary

Fixes local dependency resolution for imported visual .flyde files that live in a different folder from the parent flow.

When a visual node file is imported from another directory, any local file imports inside that visual node were resolved relative to the parent flow path. This caused nested dependencies to break after moving the imported flow file into its own folder.

This change rebases nested file-source paths for imported visual nodes so their local dependencies continue resolving from the visual node file’s own directory.

Fixes #112

/claim #112

Test plan

  • Added a regression fixture where a.flyde imports moved/b.flyde, and b.flyde imports Add.flyde.js from its own folder.
  • Verified the regression failed before the resolver fix.
  • Ran:
pnpm --filter @flyde/loader build
NODE_OPTIONS='--no-experimental-strip-types' TS_NODE_TRANSPILE_ONLY=1 pnpm --filter @flyde/loader test
NODE_OPTIONS='--no-experimental-strip-types' TS_NODE_TRANSPILE_ONLY=1 pnpm --filter @flyde/loader exec mocha src/resolver/server/*.spec.ts --require ts-node/register --no-timeout
pnpm build

All commands passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken imports after moving files

1 participant