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

chore(webapis): add tool for scanning for uses of Web APIs #2621

Merged
merged 3 commits into from
Sep 19, 2023

Conversation

tido64
Copy link
Member

@tido64 tido64 commented Aug 22, 2023

Description

Implemented a tool for scanning for uses of Web APIs.

Test plan

  1. Install Rust
  2. Build and run:
    cd incubator/@react-native-webapis/scan
    cargo build -r
    cd ../../..
    ./incubator/@react-native-webapis/scan/target/release/scan

@github-actions github-actions bot added the chore Improvements that don't directly affect features label Aug 26, 2023
Copy link
Contributor

@kelset kelset left a comment

Choose a reason for hiding this comment

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

thanks for working on this!

I love that by going down the Rust route, the tool is blazing fast ⚡️

I left a few comment; aside from those, can we add a README.md to the root of scan that explains:

  1. how to use it/build it
  2. what the merge.mjs file is
  3. what is the counting logic (if I read correctly, we count all instances across all files we find minus the ones in the ignored_dirs?)

incubator/@react-native-webapis/scan/src/ignored_dirs.rs Outdated Show resolved Hide resolved
incubator/@react-native-webapis/scan/merge.mjs Outdated Show resolved Hide resolved
incubator/@react-native-webapis/scan/merge.mjs Outdated Show resolved Hide resolved
incubator/@react-native-webapis/scan/merge.mjs Outdated Show resolved Hide resolved
incubator/@react-native-webapis/scan/merge.mjs Outdated Show resolved Hide resolved
Copy link
Contributor

@kelset kelset left a comment

Choose a reason for hiding this comment

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

thanks for addressing the feedback!

@tido64 tido64 enabled auto-merge (squash) September 19, 2023 15:57
@tido64 tido64 merged commit d06b61b into main Sep 19, 2023
12 checks passed
@tido64 tido64 deleted the tido/webapis/scan branch September 19, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Improvements that don't directly affect features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants