@gld5000-cli/dependency-finder 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -151,7 +151,7 @@ After running, check `dependents-report.json` and review the `noDependents` sect
|
|
|
151
151
|
### Audit Before Deprecating a Component Library
|
|
152
152
|
|
|
153
153
|
```bash
|
|
154
|
-
npx @gld5000-cli/dependency-finder "./components
|
|
154
|
+
npx @gld5000-cli/dependency-finder "./node_modules/my_package/build/components/**/index.d.ts" "./components/**/*.tsx|./pages/**/*.tsx" ".test|.stories" "y" "my_package"
|
|
155
155
|
```
|
|
156
156
|
|
|
157
157
|
Review the `someDependents` section to see exactly where each component is used before deprecating or refactoring.
|
|
@@ -163,6 +163,40 @@ Review the `someDependents` section to see exactly where each component is used
|
|
|
163
163
|
npx @gld5000-cli/dependency-finder
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
+
### Run in CI pipeline for repo files
|
|
167
|
+
|
|
168
|
+
```yaml
|
|
169
|
+
dependency_report:
|
|
170
|
+
stage: test
|
|
171
|
+
image: node:latest
|
|
172
|
+
script:
|
|
173
|
+
# Run the command; file is created automatically by the package: npx @gld5000-cli/dependency-finder [Component directory] [Dependents paths] [File ignore patterns] [PascalCase only] [Import path includes]
|
|
174
|
+
- npx @gld5000-cli/dependency-finder "./components/**/*.tsx" "./components/**/*.tsx|./pages/**/*.tsx" ".test|.stories" "y"
|
|
175
|
+
artifacts:
|
|
176
|
+
paths:
|
|
177
|
+
- dependents-report.json
|
|
178
|
+
when: always # Optional: uploads the report even if the job fails
|
|
179
|
+
expire_in: 1 week # Optional: defines how long to keep the file
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Run in CI pipeline for project dependencies
|
|
183
|
+
|
|
184
|
+
```yaml
|
|
185
|
+
my_package_dependency_report:
|
|
186
|
+
stage: test
|
|
187
|
+
image: node:latest
|
|
188
|
+
script:
|
|
189
|
+
# Install node_modules
|
|
190
|
+
- npm install
|
|
191
|
+
# Run the command; file is created automatically by the package: npx @gld5000-cli/dependency-finder [Component directory] [Dependents paths] [File ignore patterns] [PascalCase only] [Import path includes]
|
|
192
|
+
- npx @gld5000-cli/dependency-finder "./node_modules/my_package/build/components/**/index.d.ts" "./components/**/*.tsx|./pages/**/*.tsx" ".test|.stories" "y" "my_package"
|
|
193
|
+
artifacts:
|
|
194
|
+
paths:
|
|
195
|
+
- dependents-report.json
|
|
196
|
+
when: always # Optional: uploads the report even if the job fails
|
|
197
|
+
expire_in: 1 week # Optional: defines how long to keep the file
|
|
198
|
+
```
|
|
199
|
+
|
|
166
200
|
Follow the prompts to customize paths for your project structure.
|
|
167
201
|
|
|
168
202
|
## Contributing
|