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

[package-extractor]Add dependencies configurations field in package extractor #4255

3 changes: 2 additions & 1 deletion build-tests/package-extractor-test-01/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"package-extractor-test-02": "workspace:*"
},
"devDependencies": {
"package-extractor-test-03": "workspace:*"
"package-extractor-test-03": "workspace:*",
"@types/node": "14.18.36"
}
}
3 changes: 3 additions & 0 deletions build-tests/package-extractor-test-03/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
"private": true,
"scripts": {
"_phase:build": ""
},
"devDependencies": {
"@types/node": "ts3.9"
EscapeB marked this conversation as resolved.
Show resolved Hide resolved
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/package-extractor",
"comment": "Add option field dependenciesConfigurations in PackageExtractor to filter files for third party dependencies",
"type": "minor"
}
],
"packageName": "@rushstack/package-extractor"
}
17 changes: 13 additions & 4 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/config/rush/repo-state.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
{
"pnpmShrinkwrapHash": "4cfef707a58cfebf1748defd16d0ba994df96319",
"pnpmShrinkwrapHash": "41eef9e275fcc75a240a7bfedb2704deafec84c5",
"preferredVersionsHash": "1926a5b12ac8f4ab41e76503a0d1d0dccc9c0e06"
}
9 changes: 9 additions & 0 deletions common/reviews/api/package-extractor.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
import { IPackageJson } from '@rushstack/node-core-library';
import { ITerminal } from '@rushstack/node-core-library';

// @public
export interface IExtractorDependencyConfiguration {
dependencyName: string;
dependencyVersion: string;
patternsToExclude?: string[];
patternsToInclude?: string[];
}

// @public
export interface IExtractorMetadataJson {
links: ILinkInfo[];
Expand All @@ -18,6 +26,7 @@ export interface IExtractorMetadataJson {
export interface IExtractorOptions {
createArchiveFilePath?: string;
createArchiveOnly?: boolean;
dependencyConfigurations?: IExtractorDependencyConfiguration[];
folderToCopy?: string;
includeDevDependencies?: boolean;
includeNpmIgnoreFiles?: boolean;
Expand Down
6 changes: 4 additions & 2 deletions libraries/package-extractor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"ignore": "~5.1.6",
"jszip": "~3.8.0",
"minimatch": "~3.0.3",
"npm-packlist": "~2.1.2"
"npm-packlist": "~2.1.2",
"semver": "~7.5.4"
},
"devDependencies": {
"@rushstack/eslint-config": "workspace:*",
Expand All @@ -37,6 +38,7 @@
"@types/node": "14.18.36",
"@types/npm-packlist": "~1.1.1",
"eslint": "~8.7.0",
"webpack": "~5.82.1"
"webpack": "~5.82.1",
"@types/semver": "7.5.0"
}
}
Loading