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

Make sure that Commander gets included as a GLF dependency #478

Merged
merged 3 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/packages/generate-license-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@commander-js/extra-typings": "^12.0.0",
"@npmcli/arborist": "^7.0.0",
"cli-spinners": "^2.6.0",
"commander": "^12.0.0",
"cosmiconfig": "^9.0.0",
"enquirer": "^2.3.6",
"json5": "^2.2.3",
Expand Down
13 changes: 13 additions & 0 deletions src/packages/generate-license-file/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,16 @@ export { getProjectLicenses } from "./lib/getProjectLicenses";
export type { GetProjectLicensesOptions } from "./lib/getProjectLicenses";
export type { LineEnding } from "./lib/lineEndings";
export type { ILicense } from "./lib/models/license";

// The following is included to ensure that Nx doesn't remove "commander"
// as a dependency from packages/generate-license-file/package.json.
//
// This is necessary because the @nx/dependency-checks eslint rule will
// remove commander if the generate-license-file package never imports from it directly.
//
// This approach was chosen over using the ignoredDependencies config option
// to insure that the same eslint rule continues to catch when the commander
// version falls out of sync with the @commander-js/extra-typings version.
import type { Command as _Command } from "commander";
// eslint-disable-next-line @typescript-eslint/no-unused-vars
type _UnusedCommand = _Command;