-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce readme files for package managers (#185)
* Introduce readme files for package managers * Fix typos
- Loading branch information
Showing
11 changed files
with
99 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Bower resolution logic | ||
|
||
The way resolution of bower lock files works is as follows: | ||
|
||
1. Run `bower install --save --save-dev --save-exact --allow-root` in order to install all dependencies | ||
2. Run `bower list` to get installed dependencies tree | ||
|
||
The result of `bower list` command is then being written into the lock file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Composer resolution logic | ||
|
||
The way resolution of composer lock files works is as follows: | ||
|
||
1. Run `composer update --no-interaction --no-scripts --ignore-platform-reqs --no-autoloader --no-install --no-plugins --no-audit` in order to install all dependencies | ||
|
||
Generated `composer.lock` file is then uploaded together with `composer.json` for scanning. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Go resolution logic | ||
|
||
The way resolution of go lock files works is as follows: | ||
|
||
1. Run `go mod graph` in order to create dependency graph | ||
2. Run `go list -mod=readonly -e -m all` to get the list of packages | ||
|
||
The results of the commands above are then combined to form the finished lock file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Gradle resolution logic | ||
|
||
The way resolution of gradle lock files works is as follows: | ||
|
||
1. Generate init script file for project and subprojects | ||
2. Run `gradle --init-script gradle-init-script.groovy debrickedAllDeps` in order to create dependencies graph | ||
3. In case permission to execute gradlew is not granted, fallback to PATHs gradle installation is used: `gradle --init-script gradle-init-script.groovy debrickedFindSubProjectPaths` | ||
|
||
The results of the executed command above is then being written into the lock file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Maven resolution logic | ||
|
||
The way resolution of maven lock files works is as follows: | ||
|
||
1. Parse `pom.xml` file | ||
2. Run `mvn dependency:tree -DoutputFile=maven.debricked.lock -DoutputType=tgf --fail-at-end` in order to install all dependencies | ||
|
||
The result of the second command above is then written to `maven.debricked.lock` file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# NPM resolution logic | ||
|
||
The way resolution of NPM lock files works is as follows: | ||
|
||
1. Run `npm install --ignore-scripts --audit=false --bin-links=false` in order to install all dependencies | ||
|
||
Generated `package-lock.json` file is then uploaded together with `package.json` for scanning. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Nuget resolution logic | ||
|
||
There are two supported files for resolution of nuget lock files: | ||
|
||
### packages.config | ||
|
||
We need to convert a `packages.config` file to a `.csproj` file. This is to enable the use of the dotnet restore command | ||
that enables Debricked to parse out transitive dependencies. This may add some additional framework dependencies that | ||
will not show up if we only scan the `packages.config` file. This is done in a few steps: | ||
|
||
1. Parse `packages.config` file | ||
2. Run `dotnet --version` to get dotnet version | ||
3. Collect unique target frameworks and packages from the file | ||
4. Create `.nuget.debricked.csproj.temp` file with the collected data | ||
|
||
With this done we can move on to the next section | ||
|
||
### .csproj | ||
|
||
1. Run `dotnet restore <file> --use-lock-file --lock-file-path <lock_file>` in order to restore the dependencies and tools of a project (lock file name can be different depend on which manifest file is being resolved) | ||
2. Cleanup temporary csproj file after lock file is created (for `packages.config` case) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Pip resolution logic | ||
|
||
The way resolution of pip lock files works is as follows: | ||
|
||
1. Create a Venv in which we do the installation and run all commands | ||
2. Run `pip install -r <requirements.txt_file>` in order to install all dependencies | ||
3. Run `cat` to get the contents of the requirements.txt file | ||
4. Run `pip list` to get a list of all installed packages | ||
5. Run `pip show <list_of_installed_packages>` to get more in-depth information from each package, including the relations between dependencies | ||
|
||
The results of the commands above are then combined to form the finished lock file with the following sections: | ||
|
||
1. The contents of the requirements.txt (from cat) | ||
2. The list of all installed dependencies (from pip list) | ||
3. More detailed information on each package with relations (from pip show) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Yarn resolution logic | ||
|
||
The way resolution of yarn lock files works is as follows: | ||
|
||
1. Run `install --non-interactive --ignore-scripts --ignore-engines --ignore-platform --no-bin-link --production=false` in order to install all dependencies | ||
|
||
Generated `yarn.lock` file is then uploaded together with `package.json` for scanning. |