-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from L-Qun/main
Create a rush-dep-graph-plugin Rush plugin to display the dependency graph.
- Loading branch information
Showing
24 changed files
with
679 additions
and
8 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
10 changes: 10 additions & 0 deletions
10
common/changes/rush-dep-graph-plugin/main_2024-12-16-07-22.json
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,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "rush-dep-graph-plugin", | ||
"comment": "Create a `rush-dep-graph-plugin` Rush plugin to display the dependency graph.", | ||
"type": "minor" | ||
} | ||
], | ||
"packageName": "rush-dep-graph-plugin" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,14 @@ | ||
// This is a workaround for https://github.com/eslint/eslint/issues/3458 | ||
require('@rushstack/eslint-config/patch/modern-module-resolution'); | ||
|
||
module.exports = { | ||
extends: [ | ||
'@rushstack/eslint-config/profile/node-trusted-tool', | ||
'@rushstack/eslint-config/mixins/friendly-locals' | ||
], | ||
parserOptions: { tsconfigRootDir: __dirname }, | ||
ignorePatterns: ['node_modules/', 'lib/', 'jest.config.js'], | ||
rules: { | ||
'@typescript-eslint/no-explicit-any': 'off' | ||
} | ||
}; |
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 @@ | ||
lib/ |
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,35 @@ | ||
# THIS IS A STANDARD TEMPLATE FOR .npmignore FILES IN THIS REPO. | ||
|
||
# Ignore all files by default, to avoid accidentally publishing unintended files. | ||
* | ||
|
||
# Use negative patterns to bring back the specific things we want to publish. | ||
!/bin/** | ||
!/lib/** | ||
!/lib-*/** | ||
!/dist/** | ||
|
||
!CHANGELOG.md | ||
!CHANGELOG.json | ||
!heft-plugin.json | ||
!rush-plugin-manifest.json | ||
!ThirdPartyNotice.txt | ||
|
||
# Ignore certain patterns that should not get published. | ||
/dist/*.stats.* | ||
/lib/**/test/ | ||
/lib-*/**/test/ | ||
*.test.js | ||
|
||
# NOTE: These don't need to be specified, because NPM includes them automatically. | ||
# | ||
# package.json | ||
# README.md | ||
# LICENSE | ||
|
||
# --------------------------------------------------------------------------- | ||
# DO NOT MODIFY ABOVE THIS LINE! Add any project-specific overrides below. | ||
# --------------------------------------------------------------------------- | ||
|
||
!/includes/** | ||
!command-line.json |
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 @@ | ||
MIT License | ||
|
||
Copyright (c) TikTok Pte. Ltd. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,25 @@ | ||
# rush-dep-graph-plugin | ||
|
||
A Rush plugin that displays the dependency graph. | ||
|
||
# Prerequisite | ||
|
||
Rush.js >= 5.83.2 | ||
|
||
|
||
# Quick Start | ||
|
||
1. Enabling this rush plugin | ||
|
||
Please follow the [official doc](https://rushjs.io/pages/maintainer/using_rush_plugins/) to enable this plugin in your repo. | ||
|
||
2. Running `dep-graph` command | ||
|
||
``` | ||
Usage: rush dep-graph [OPTIONS] | ||
Options: | ||
-t, --to <PROJECT_NAME> Select the packages that depend on specific project. | ||
-f, --from <PROJECT_NAME> Select the package that is dependent on specific package. | ||
--filter <PROJECT_NAME> Select the packages based on a custom filter criteria, such as specific keywords in the package name. | ||
``` |
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,39 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json", | ||
"commands": [ | ||
{ | ||
"name": "dep-graph", | ||
"commandKind": "global", | ||
"summary": "Display the dependency graph of the specified package.", | ||
"description": "Display the dependency graph of the specified package.", | ||
"shellCommand": "ts-node common/autoinstallers/dep-graph/src/index.ts", | ||
"autoinstallerName": "dep-graph", | ||
"safeForSimultaneousRushProcesses": true | ||
} | ||
], | ||
"parameters": [ | ||
{ | ||
"parameterKind": "string", | ||
"argumentName": "PROJECT_NAME", | ||
"description": "Select the packages that depend on specific project.", | ||
"longName": "--to", | ||
"shortName": "-t", | ||
"associatedCommands": ["dep-graph"] | ||
}, | ||
{ | ||
"parameterKind": "string", | ||
"argumentName": "PROJECT_NAME", | ||
"description": "Select the package that is dependent on specific package.", | ||
"longName": "--from", | ||
"shortName": "-f", | ||
"associatedCommands": ["dep-graph"] | ||
}, | ||
{ | ||
"parameterKind": "string", | ||
"argumentName": "PROJECT_NAME", | ||
"description": "Select the packages based on a custom filter criteria, such as specific keywords in the package name.", | ||
"longName": "--filter", | ||
"associatedCommands": ["dep-graph"] | ||
} | ||
] | ||
} |
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 @@ | ||
{ | ||
// The "rig.json" file directs tools to look for their config files in an external package. | ||
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package | ||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", | ||
|
||
"rigPackageName": "@rushstack/heft-node-rig" | ||
} |
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,5 @@ | ||
/* eslint-env es6 */ | ||
const config = { | ||
'*': "echo 'good job'" | ||
}; | ||
module.exports = config; |
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,48 @@ | ||
{ | ||
"name": "rush-dep-graph-plugin", | ||
"version": "0.0.1", | ||
"description": "A Rush plugin that displays the dependency graph.", | ||
"keywords": [ | ||
"rush", | ||
"plugin", | ||
"command", | ||
"dependency graph" | ||
], | ||
"homepage": "https://github.com/tiktok/rush-plugins#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/tiktok/rush-plugins", | ||
"directory": "rush-plugins/rush-dep-graph-plugin" | ||
}, | ||
"license": "MIT", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"build": "heft build --clean", | ||
"build:watch": "heft build --watch", | ||
"prepublishOnly": "npm run build", | ||
"test": "heft test" | ||
}, | ||
"dependencies": { | ||
"@rushstack/node-core-library": "3.62.0", | ||
"@rushstack/rush-sdk": "^5.139.0", | ||
"@rushstack/terminal": "~0.14.2", | ||
"archy": "^1.0.0", | ||
"chalk": "4.1.2", | ||
"commander": "~9.4.0", | ||
"execa": "~5.1.1", | ||
"fs-extra": "~10.1.0", | ||
"minimatch": "~5.1.1", | ||
"ora": "5.4.1" | ||
}, | ||
"devDependencies": { | ||
"@rushstack/eslint-config": "3.3.4", | ||
"@rushstack/heft": "0.61.0", | ||
"@rushstack/heft-node-rig": "2.2.25", | ||
"@types/archy": "^0.0.36", | ||
"@types/fs-extra": "~9.0.13", | ||
"@types/heft-jest": "1.0.1", | ||
"@types/minimatch": "~5.1.2", | ||
"@types/node": "18.17.15", | ||
"typescript": "~5.0.4" | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
rush-plugins/rush-dep-graph-plugin/rush-plugin-manifest.json
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,10 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugin-manifest.schema.json", | ||
"plugins": [ | ||
{ | ||
"pluginName": "dep-graph", | ||
"description": "Display the dependency graph of the specified package.", | ||
"commandLineJsonFilePath": "command-line.json" | ||
} | ||
] | ||
} |
Oops, something went wrong.