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

U/edgarivanv/fix false positives and not resolving nonindex files #49

Merged

Conversation

flickyiyo
Copy link
Contributor

Changed validations done to check if item was being unused.

  • If an import in the form of import 'foo' is being executed.
  • Added AsRef implementation for NapiLikeError since newer versions of rust enforce that for Result::Error.
  • Added new version of swc that simplifies the dependency graph to only use swc_core and swc_ecmascript.
  • Fixed a problem with resolve_ts_import that marked import paths such as ./Foo.base as ResourceImport instead to the referred file ./Foo.base.ts which is a LocalProjectImport.
  • Added unused.js to test the tool on client web, also, added the list of entry points in client web.

Copy link
Owner

@Adjective-Object Adjective-Object left a comment

Choose a reason for hiding this comment

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

see comments

* References to symbols from the node api require
* linking to a real instance of node, which means that
* `cargo test` can't link anything
*/
Copy link
Owner

Choose a reason for hiding this comment

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

Why'd this module-level comment get deleted?

}
ResolvedItem::Exported(exported_item) => {
used_items.insert(exported_item.clone());
.for_each(|(_path, imported_things)| {
Copy link
Owner

Choose a reason for hiding this comment

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

imported_things imprecise name

@flickyiyo flickyiyo merged commit 84411f8 into main Aug 28, 2023
@flickyiyo flickyiyo deleted the u/edgarivanv/fix-false-positives-and-not-resolving-nonindex-files branch August 28, 2023 20:58
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