Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support wildcard exports when parsing dependency tree [sc-22632] #1003

Merged

Conversation

sorccu
Copy link
Collaborator

@sorccu sorccu commented Dec 13, 2024

This PR makes the project parser compatible with wildcard exports such as export * from './file'. Previously, only named exports such as export { Thing } from './file' were supported. The end result was that the file being referred to in the export would not be added to the dependency tree.

I hereby confirm that I followed the code guidelines found at engineering guidelines

Affected Components

  • CLI
  • Create CLI
  • Test
  • Docs
  • Examples
  • Other

Notes for the Reviewer

Resolves #[issue-number]

New Dependency Submission

The new flag, `--debug-bundle`, outputs the project bundle payload as-is
after the project has been parsed. The bundle is output to a file, by default
`./debug-bundle.json`. A different file can be chosen with the new
`--debug-bundle-output-file` flag, which is also hidden.
Previously only named exports were supported.
Additionally, to make sure that not all files in the tree are getting
included automatically (which would have invalidated the wildcard export
tests), an unreachable file that should not appear in the list of
dependencies was added to the relevant examples.
@sorccu sorccu force-pushed the simokinnunen/sc-22632/handle-wildcard-exports-in-the-cli-parser branch from 7939686 to 96c41c0 Compare December 13, 2024 09:28
@sorccu sorccu changed the title feat: support wildcard exports when parsing code for dependencies [sc-22632] feat: support wildcard exports when parsing dependency tree [sc-22632] Dec 13, 2024
@sorccu sorccu requested review from umutuzgur and clample December 13, 2024 09:33
Copy link
Member

@umutuzgur umutuzgur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sorccu sorccu merged commit e99187c into main Dec 13, 2024
3 checks passed
@sorccu sorccu deleted the simokinnunen/sc-22632/handle-wildcard-exports-in-the-cli-parser branch December 13, 2024 10:40
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