Skip to content

fix(module-interface-import): block export-from, dynamic import, .js fallback, and directory index - #63

Merged
cuzfrog merged 1 commit into
mainfrom
fix_import_export_from
Aug 11, 2026
Merged

fix(module-interface-import): block export-from, dynamic import, .js fallback, and directory index#63
cuzfrog merged 1 commit into
mainfrom
fix_import_export_from

Conversation

@cuzfrog

@cuzfrog cuzfrog commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • extractJsImportPaths now also matches export ... from re-exports and dynamic import() calls.
  • resolveRelativeImport now falls back through JS/TS extensions when an explicit extension (e.g. .js) does not exist, and resolves extensionless directory imports to index.ts/index.js/mod.rs.
  • Added tests for export { } from, export * from, dynamic import(), .js extension fallback, and directory index resolution.
  • Bump version to 1.1.3.

Test plan

  • npm run check passes
  • npm run test passes
  • Subagent logic review completed

Generated with Devin

…fallback, and directory index resolution

The Devin pre-tool-use hook was not blocking imports from specific
files in several edge cases:
- export { x } / export * from '../module/file'
- await import('../module/file')
- import { x } from '../module/file.js' resolving to a .ts file
- import { x } from '../module' resolving to module/index.ts

Update the regex in extractJsImportPaths to also match export-from and
import() patterns, and refactor resolveRelativeImport to fall back
through JS/TS extensions and directory index files.

Bump version to 1.1.3.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@cuzfrog
cuzfrog merged commit deb8670 into main Aug 11, 2026
1 check passed
@cuzfrog
cuzfrog deleted the fix_import_export_from branch August 11, 2026 23:52
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