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(plugin): add dependencies list to context #137

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jan 18, 2022

  1. chore(plugin): add dependencies list to context

    As explained on the issue #124
    This commit adds the projects dependencies list on the plugin context
    
    Before:
    ```typescript
    import { hasRubyDependency } from "./dependencies.ts";
    
    const isDependency = await hasRubyDependency(context, "rubocop");
    ```
    At every import and function call the application would go on the
    dependencies files(package.json, Pipfile, etc ...) and search for
    the requested dependencies. This made the application very slow
    in addition to harming the organization of the code with many unnecessary imports.
    
    After:
    ```typescript
    const isDependency = await context.dependencies.includes("rubocop");
    ```
    Now the dependency list is loaded before the introspection and
    only need to read the necessary dependencies files once.
    
    Resolves: #124
    joao10lima committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    f03d122 View commit details
    Browse the repository at this point in the history