The Depramanger is a Visual Studio Code (VSCode) extension designed to help developers manage dependencies for various programming languages. It provides functionalities to analyze, sync, update, and install dependencies, ensuring that your project's dependencies are up-to-date and correctly declared.
-
Dependency Analysis: Scans your workspace to identify declared, installed, missing, and extra dependencies, also depedency trees.
-
Sync Declarations: Automatically adds missing dependencies to your project's dependency files.
-
Check for Updates: Notifies you of outdated dependencies and allows you to update them.
-
Install Specific Dependency, uninstall also: Allows you to install, uninstall dependencies for your project, making it easier to install and uninstall.
-
Extension Recommendations: Suggests and installs recommended VSCode extensions for your project's programming language.
-
Highlights outdated dependencies Highlights outdated dependencies in the editor in the configuration file of the given language.
-
Scans for vulnerabilities Scans for vulnerabilities in the dependencies of your project.
-
Installs dependencies from a specified file Installs dependencies defined in the file opened in VSCode.
- Python
- Node.js
- Go
- Rust
- PHP
- Open VSCode.
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or by pressing
Ctrl+Shift+X
. - Search for "Enhanced Dependency Checker".
- Click "Install" to install the extension.
The extension provides several commands that can be accessed through the Command Palette (Ctrl+Shift+P
) or (Cmd+Shift+P
).
- Command:
Depramanager: scanDependencies
- Description: Scans the workspace for dependencies and generates a report.
- Usage:
- Open the Command Palette (
Ctrl+Shift+P
). - Type
Scan Dependencies
and select it. - The extension will scan your workspace and display a report in a new webview panel.
- Open the Command Palette (
- Command:
Depramanger: syncDeclarations
- Description: Syncs missing declarations by adding them to the primary dependency file.
- Usage:
- Open the Command Palette (
Ctrl+Shift+P
). - Type
Sync Declarations
and select it. - The extension will sync the missing declarations and notify you upon completion.
- Open the Command Palette (
- Command:
Depramanger: checkUpdates
- Description: Checks for outdated dependencies and prompts you to update them.
- Usage:
- Open the Command Palette (
Ctrl+Shift+P
). - Type
Check for Updates and Update dependencies
and select it. - The extension will check for updates and prompt you to select dependencies to update.
- Open the Command Palette (
- Command:
Depramanager: scanVulnerabilities
- Description: Scans the dependencies of your project for vulnerabilities.
- Usage:
- Open the Command Palette (
Ctrl+Shift+P
). - Type
Scan Vulnerabilities
and select it. - The extension will scan the dependencies for vulnerabilities and display a report in a new webview panel.
- Open the Command Palette (
- Command:
Depramanager: dependencyChecker.scanDependenciesWithoutDepedencyTrees
- Description: Scans the workspace for dependencies and generates a report without the dependency trees.
- Usage:
- Open the Command Palette (
Ctrl+Shift+P
). - Type
Depramanger: Scan Dependencies Without Dependency Tree
and select it. - The extension will scan your workspace and display a report in a new webview panel.
- Open the Command Palette (
- Command:
Depramanager: dependencyChecker.uninstallDependency
- Description: Uninstalls a specific dependency for your project.
- Usage:
- Open the Command Palette (
Ctrl+Shift+P
). - Type
Depramanger: Uninstall Dependencies
and select it. - Follow the prompts to select the programming language and enter the dependency name.
- Open the Command Palette (
- Command:
Depramanager: checkCurrentFileImports
- Description: Checks the current file for imports and installs missing dependencies.
- Usage:
- Open the Command Palette (
Ctrl+Shift+P
). - Type
Depramanger: Check Current File Imports
and select it. - The extension will check the current file for imports and install missing dependencies.
- Open the Command Palette (
The extension uses predefined configurations for each supported language. These configurations include:
- Dependency Files: Files where dependencies are declared (e.g.,
requirements.txt
for Python,package.json
for Node.js). - Common Folders: Folders where dependencies are typically installed (e.g.,
node_modules
for Node.js). - Parser: Function to parse dependency files and extract declared dependencies.
- Installed Dependencies: Function to retrieve installed dependencies from the workspace.
- Required Extensions: Recommended VSCode extensions for the language.
- Install Command: Command to install a dependency.
- Primary Dependency File: The main file where dependencies are declared.
- Version Check: Functions to get the current and latest versions of a dependency.
- Update Dependency: Function to update a dependency in the primary dependency file.
To compile the extension, run the following command in the terminal:
vsce package
Then to install the extension, run the following command in the terminal:
code --install-extension depramanager-1.1.0.vsix
Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request on the extension's GitHub repository.
This extension is licensed under the Apache 2 License. See the LICENSE file for more information.