@depup/lerna 9.0.5-depup.0
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 +88 -0
- package/dist/cli.js +50 -0
- package/dist/commands/changed/command.js +5806 -0
- package/dist/commands/changed/index.js +5195 -0
- package/dist/commands/clean/command.js +6271 -0
- package/dist/commands/clean/index.js +6157 -0
- package/dist/commands/diff/command.js +5313 -0
- package/dist/commands/diff/index.js +4742 -0
- package/dist/commands/diff/lib/get-last-commit.js +4240 -0
- package/dist/commands/diff/lib/has-commit.js +4233 -0
- package/dist/commands/exec/command.js +6010 -0
- package/dist/commands/exec/index.js +5337 -0
- package/dist/commands/import/command.js +5500 -0
- package/dist/commands/import/index.js +4931 -0
- package/dist/commands/info/command.js +5229 -0
- package/dist/commands/info/index.js +4685 -0
- package/dist/commands/init/command.js +5440 -0
- package/dist/commands/init/index.js +4872 -0
- package/dist/commands/list/command.js +5974 -0
- package/dist/commands/list/index.js +5309 -0
- package/dist/commands/publish/command.js +9271 -0
- package/dist/commands/publish/index.js +8771 -0
- package/dist/commands/publish/lib/create-temp-licenses.js +64 -0
- package/dist/commands/publish/lib/fetch-config.js +4763 -0
- package/dist/commands/publish/lib/get-current-sha.js +4764 -0
- package/dist/commands/publish/lib/get-current-tags.js +4776 -0
- package/dist/commands/publish/lib/get-npm-username.js +4886 -0
- package/dist/commands/publish/lib/get-packages-without-license.js +53 -0
- package/dist/commands/publish/lib/get-profile-data.js +4802 -0
- package/dist/commands/publish/lib/get-two-factor-auth-required.js +4855 -0
- package/dist/commands/publish/lib/get-whoami.js +4798 -0
- package/dist/commands/publish/lib/git-checkout.js +4761 -0
- package/dist/commands/publish/lib/remove-temp-licenses.js +54 -0
- package/dist/commands/publish/lib/verify-npm-package-access.js +4848 -0
- package/dist/commands/run/command.js +6229 -0
- package/dist/commands/run/index.js +5534 -0
- package/dist/commands/version/command.js +7415 -0
- package/dist/commands/version/index.js +7100 -0
- package/dist/commands/version/lib/create-release.js +4892 -0
- package/dist/commands/version/lib/get-current-branch.js +4764 -0
- package/dist/commands/version/lib/git-add.js +4817 -0
- package/dist/commands/version/lib/git-commit.js +4788 -0
- package/dist/commands/version/lib/git-push.js +4769 -0
- package/dist/commands/version/lib/git-tag.js +4771 -0
- package/dist/commands/version/lib/is-anything-committed.js +4765 -0
- package/dist/commands/version/lib/is-behind-upstream.js +4780 -0
- package/dist/commands/version/lib/is-breaking-change.js +61 -0
- package/dist/commands/version/lib/prompt-version.js +4833 -0
- package/dist/commands/version/lib/remote-branch-exists.js +4768 -0
- package/dist/commands/version/lib/update-lockfile-version.js +4791 -0
- package/dist/index.js +13093 -0
- package/dist/libs/child-process/src/forked-strong-log-transformer.d.ts +19 -0
- package/dist/libs/child-process/src/index.d.ts +46 -0
- package/dist/libs/child-process/src/set-exit-code.d.ts +1 -0
- package/dist/libs/commands/changed/src/command.d.ts +6 -0
- package/dist/libs/commands/changed/src/index.d.ts +15 -0
- package/dist/libs/commands/clean/src/command.d.ts +6 -0
- package/dist/libs/commands/diff/src/command.d.ts +6 -0
- package/dist/libs/commands/diff/src/index.d.ts +12 -0
- package/dist/libs/commands/diff/src/lib/get-last-commit.d.ts +7 -0
- package/dist/libs/commands/diff/src/lib/has-commit.d.ts +7 -0
- package/dist/libs/commands/exec/src/command.d.ts +6 -0
- package/dist/libs/commands/exec/src/index.d.ts +35 -0
- package/dist/libs/commands/import/src/command.d.ts +6 -0
- package/dist/libs/commands/import/src/index.d.ts +36 -0
- package/dist/libs/commands/info/src/command.d.ts +6 -0
- package/dist/libs/commands/info/src/index.d.ts +6 -0
- package/dist/libs/commands/init/src/command.d.ts +6 -0
- package/dist/libs/commands/init/src/index.d.ts +37 -0
- package/dist/libs/commands/list/src/command.d.ts +6 -0
- package/dist/libs/commands/list/src/index.d.ts +8 -0
- package/dist/libs/commands/publish/src/command.d.ts +6 -0
- package/dist/libs/commands/run/src/command.d.ts +7 -0
- package/dist/libs/commands/run/src/index.d.ts +39 -0
- package/dist/libs/commands/version/src/command.d.ts +6 -0
- package/dist/libs/core/src/index.d.ts +46 -0
- package/dist/libs/core/src/lib/add-dependencies.d.ts +2 -0
- package/dist/libs/core/src/lib/add-dependents.d.ts +2 -0
- package/dist/libs/core/src/lib/check-working-tree.d.ts +12 -0
- package/dist/libs/core/src/lib/cli.d.ts +14 -0
- package/dist/libs/core/src/lib/collect-uncommitted.d.ts +12 -0
- package/dist/libs/core/src/lib/collect-updates/collect-project-updates.d.ts +29 -0
- package/dist/libs/core/src/lib/collect-updates/has-tags.d.ts +6 -0
- package/dist/libs/core/src/lib/collect-updates/index.d.ts +1 -0
- package/dist/libs/core/src/lib/collect-updates/make-diff-predicate.d.ts +3 -0
- package/dist/libs/core/src/lib/command/clean-stack.d.ts +1 -0
- package/dist/libs/core/src/lib/command/create-project-graph-with-packages.d.ts +5 -0
- package/dist/libs/core/src/lib/command/default-options.d.ts +2 -0
- package/dist/libs/core/src/lib/command/detect-projects.d.ts +6 -0
- package/dist/libs/core/src/lib/command/index.d.ts +80 -0
- package/dist/libs/core/src/lib/command/is-git-initialized.d.ts +1 -0
- package/dist/libs/core/src/lib/command/log-package-error.d.ts +1 -0
- package/dist/libs/core/src/lib/command/warn-if-hanging.d.ts +1 -0
- package/dist/libs/core/src/lib/conventional-commits/apply-build-metadata.d.ts +4 -0
- package/dist/libs/core/src/lib/conventional-commits/constants.d.ts +17 -0
- package/dist/libs/core/src/lib/conventional-commits/get-changelog-config.d.ts +2 -0
- package/dist/libs/core/src/lib/conventional-commits/index.d.ts +3 -0
- package/dist/libs/core/src/lib/conventional-commits/make-bump-only-filter.d.ts +2 -0
- package/dist/libs/core/src/lib/conventional-commits/read-existing-changelog.d.ts +6 -0
- package/dist/libs/core/src/lib/conventional-commits/recommend-version.d.ts +6 -0
- package/dist/libs/core/src/lib/conventional-commits/update-changelog.d.ts +8 -0
- package/dist/libs/core/src/lib/corepack/exec-package-manager.d.ts +4 -0
- package/dist/libs/core/src/lib/corepack/index.d.ts +1 -0
- package/dist/libs/core/src/lib/corepack/is-corepack-enabled.d.ts +1 -0
- package/dist/libs/core/src/lib/cycles/get-cycles.d.ts +6 -0
- package/dist/libs/core/src/lib/cycles/index.d.ts +3 -0
- package/dist/libs/core/src/lib/cycles/merge-overlapping-cycles.d.ts +6 -0
- package/dist/libs/core/src/lib/cycles/report-cycles.d.ts +1 -0
- package/dist/libs/core/src/lib/describe-ref.d.ts +17 -0
- package/dist/libs/core/src/lib/filter-options.d.ts +15 -0
- package/dist/libs/core/src/lib/filter-projects.d.ts +4 -0
- package/dist/libs/core/src/lib/get-npm-exec-opts.d.ts +11 -0
- package/dist/libs/core/src/lib/get-package-manifest-path.d.ts +2 -0
- package/dist/libs/core/src/lib/get-packages-for-option.d.ts +4 -0
- package/dist/libs/core/src/lib/get-packed.d.ts +1 -0
- package/dist/libs/core/src/lib/git-checkout.d.ts +7 -0
- package/dist/libs/core/src/lib/has-npm-version.d.ts +1 -0
- package/dist/libs/core/src/lib/listable-format-projects.d.ts +24 -0
- package/dist/libs/core/src/lib/listable-options.d.ts +54 -0
- package/dist/libs/core/src/lib/log-packed.d.ts +14 -0
- package/dist/libs/core/src/lib/npm-conf/conf.d.ts +22 -0
- package/dist/libs/core/src/lib/npm-conf/env-replace.d.ts +1 -0
- package/dist/libs/core/src/lib/npm-conf/find-prefix.d.ts +1 -0
- package/dist/libs/core/src/lib/npm-conf/nerf-dart.d.ts +1 -0
- package/dist/libs/core/src/lib/npm-conf/parse-field.d.ts +1 -0
- package/dist/libs/core/src/lib/npm-install.d.ts +2 -0
- package/dist/libs/core/src/lib/npm-publish.d.ts +20 -0
- package/dist/libs/core/src/lib/npm-run-script.d.ts +2 -0
- package/dist/libs/core/src/lib/npmlog/are-we-there-yet/tracker-base.d.ts +6 -0
- package/dist/libs/core/src/lib/npmlog/are-we-there-yet/tracker-group.d.ts +21 -0
- package/dist/libs/core/src/lib/npmlog/are-we-there-yet/tracker-stream.d.ts +14 -0
- package/dist/libs/core/src/lib/npmlog/are-we-there-yet/tracker.d.ts +10 -0
- package/dist/libs/core/src/lib/npmlog/gauge/index.d.ts +43 -0
- package/dist/libs/core/src/lib/npmlog/index.d.ts +76 -0
- package/dist/libs/core/src/lib/oidc.d.ts +25 -0
- package/dist/libs/core/src/lib/otplease.d.ts +15 -0
- package/dist/libs/core/src/lib/output.d.ts +1 -0
- package/dist/libs/core/src/lib/pack-directory.d.ts +30 -0
- package/dist/libs/core/src/lib/package.d.ts +128 -0
- package/dist/libs/core/src/lib/prerelease-id-from-version.d.ts +1 -0
- package/dist/libs/core/src/lib/profiler.d.ts +20 -0
- package/dist/libs/core/src/lib/project/apply-extends.d.ts +4 -0
- package/dist/libs/core/src/lib/project/index.d.ts +82 -0
- package/dist/libs/core/src/lib/project/make-file-finder.d.ts +2 -0
- package/dist/libs/core/src/lib/project/shallow-extend.d.ts +1 -0
- package/dist/libs/core/src/lib/project-graph-with-packages.d.ts +23 -0
- package/dist/libs/core/src/lib/prompt.d.ts +19 -0
- package/dist/libs/core/src/lib/pulse-till-done.d.ts +2 -0
- package/dist/libs/core/src/lib/rimraf-dir.d.ts +1 -0
- package/dist/libs/core/src/lib/run-lifecycle.d.ts +21 -0
- package/dist/libs/core/src/lib/run-projects-topologically.d.ts +10 -0
- package/dist/libs/core/src/lib/scm-clients/github/create-github-client.d.ts +4 -0
- package/dist/libs/core/src/lib/scm-clients/gitlab/create-gitlab-client.d.ts +11 -0
- package/dist/libs/core/src/lib/scm-clients/gitlab/gitlab-client.d.ts +13 -0
- package/dist/libs/core/src/lib/scm-clients/index.d.ts +2 -0
- package/dist/libs/core/src/lib/temp-write.d.ts +5 -0
- package/dist/libs/core/src/lib/timer.d.ts +1 -0
- package/dist/libs/core/src/lib/toposort-projects.d.ts +2 -0
- package/dist/libs/core/src/lib/validation-error.d.ts +4 -0
- package/dist/libs/core/src/lib/write-log-file.d.ts +1 -0
- package/dist/libs/legacy-core/src/index.d.ts +10 -0
- package/dist/libs/legacy-core/src/lib/collect-updates/collect-dependents.d.ts +5 -0
- package/dist/libs/legacy-core/src/lib/collect-updates/collect-packages.d.ts +10 -0
- package/dist/libs/legacy-core/src/lib/collect-updates/has-tags.d.ts +5 -0
- package/dist/libs/legacy-core/src/lib/collect-updates/index.d.ts +19 -0
- package/dist/libs/legacy-core/src/lib/collect-updates/make-diff-predicate.d.ts +7 -0
- package/dist/libs/legacy-core/src/lib/command/clean-stack.d.ts +1 -0
- package/dist/libs/legacy-core/src/lib/command/default-options.d.ts +2 -0
- package/dist/libs/legacy-core/src/lib/command/index.d.ts +40 -0
- package/dist/libs/legacy-core/src/lib/command/log-package-error.d.ts +1 -0
- package/dist/libs/legacy-core/src/lib/command/warn-if-hanging.d.ts +1 -0
- package/dist/libs/legacy-core/src/lib/create-symlink.d.ts +4 -0
- package/dist/libs/legacy-core/src/lib/filter-packages.d.ts +13 -0
- package/dist/libs/legacy-core/src/lib/get-filtered-packages.d.ts +7 -0
- package/dist/libs/legacy-core/src/lib/listable-format.d.ts +8 -0
- package/dist/libs/legacy-core/src/lib/package-graph/cyclic-package-graph-node.d.ts +37 -0
- package/dist/libs/legacy-core/src/lib/package-graph/index.d.ts +74 -0
- package/dist/libs/legacy-core/src/lib/package-graph/package-graph-node.d.ts +32 -0
- package/dist/libs/legacy-core/src/lib/package-graph/report-cycles.d.ts +1 -0
- package/dist/libs/legacy-core/src/lib/query-graph.d.ts +27 -0
- package/dist/libs/legacy-core/src/lib/resolve-symlink.d.ts +1 -0
- package/dist/libs/legacy-core/src/lib/run-topologically.d.ts +16 -0
- package/dist/libs/legacy-core/src/lib/symlink-binary/index.d.ts +5 -0
- package/dist/libs/legacy-core/src/lib/symlink-dependencies.d.ts +9 -0
- package/dist/libs/legacy-core/src/lib/write-log-file.d.ts +1 -0
- package/dist/migrations/add-schema-config/add-schema-config.js +34 -0
- package/dist/migrations/remove-invalid-init-config/remove-invalid-init-config.js +34 -0
- package/dist/migrations/remove-invalid-lerna-config/remove-invalid-lerna-config.js +34 -0
- package/dist/migrations/remove-invalid-use-workspaces/remove-invalid-use-workspaces.js +34 -0
- package/dist/migrations/remove-unnecessary-use-nx/remove-unnecessary-use-nx.js +34 -0
- package/dist/migrations/update-options-from-legacy-deprecate-config/update-options-from-legacy-deprecate-config.js +96 -0
- package/dist/packages/lerna/src/commands/add-caching/command.d.ts +6 -0
- package/dist/packages/lerna/src/commands/add-caching/index.d.ts +1 -0
- package/dist/packages/lerna/src/commands/changed/command.d.ts +1 -0
- package/dist/packages/lerna/src/commands/changed/index.d.ts +1 -0
- package/dist/packages/lerna/src/commands/clean/command.d.ts +0 -0
- package/dist/packages/lerna/src/commands/clean/index.d.ts +1 -0
- package/dist/packages/lerna/src/commands/diff/command.d.ts +1 -0
- package/dist/packages/lerna/src/commands/diff/index.d.ts +1 -0
- package/dist/packages/lerna/src/commands/diff/lib/get-last-commit.d.ts +1 -0
- package/dist/packages/lerna/src/commands/diff/lib/has-commit.d.ts +1 -0
- package/dist/packages/lerna/src/commands/exec/command.d.ts +1 -0
- package/dist/packages/lerna/src/commands/exec/index.d.ts +1 -0
- package/dist/packages/lerna/src/commands/import/command.d.ts +1 -0
- package/dist/packages/lerna/src/commands/import/index.d.ts +1 -0
- package/dist/packages/lerna/src/commands/info/command.d.ts +1 -0
- package/dist/packages/lerna/src/commands/info/index.d.ts +1 -0
- package/dist/packages/lerna/src/commands/init/command.d.ts +1 -0
- package/dist/packages/lerna/src/commands/init/index.d.ts +1 -0
- package/dist/packages/lerna/src/commands/list/command.d.ts +1 -0
- package/dist/packages/lerna/src/commands/list/index.d.ts +1 -0
- package/dist/packages/lerna/src/commands/publish/command.d.ts +0 -0
- package/dist/packages/lerna/src/commands/publish/index.d.ts +1 -0
- package/dist/packages/lerna/src/commands/publish/lib/create-temp-licenses.d.ts +0 -0
- package/dist/packages/lerna/src/commands/publish/lib/fetch-config.d.ts +0 -0
- package/dist/packages/lerna/src/commands/publish/lib/get-current-sha.d.ts +0 -0
- package/dist/packages/lerna/src/commands/publish/lib/get-current-tags.d.ts +0 -0
- package/dist/packages/lerna/src/commands/publish/lib/get-npm-username.d.ts +0 -0
- package/dist/packages/lerna/src/commands/publish/lib/get-packages-without-license.d.ts +0 -0
- package/dist/packages/lerna/src/commands/publish/lib/get-profile-data.d.ts +0 -0
- package/dist/packages/lerna/src/commands/publish/lib/get-two-factor-auth-required.d.ts +0 -0
- package/dist/packages/lerna/src/commands/publish/lib/get-whoami.d.ts +0 -0
- package/dist/packages/lerna/src/commands/publish/lib/git-checkout.d.ts +0 -0
- package/dist/packages/lerna/src/commands/publish/lib/remove-temp-licenses.d.ts +0 -0
- package/dist/packages/lerna/src/commands/publish/lib/verify-npm-package-access.d.ts +0 -0
- package/dist/packages/lerna/src/commands/repair/command.d.ts +6 -0
- package/dist/packages/lerna/src/commands/repair/index.d.ts +1 -0
- package/dist/packages/lerna/src/commands/run/command.d.ts +1 -0
- package/dist/packages/lerna/src/commands/run/index.d.ts +1 -0
- package/dist/packages/lerna/src/commands/version/command.d.ts +0 -0
- package/dist/packages/lerna/src/commands/version/index.d.ts +1 -0
- package/dist/packages/lerna/src/commands/version/lib/create-release.d.ts +0 -0
- package/dist/packages/lerna/src/commands/version/lib/get-current-branch.d.ts +0 -0
- package/dist/packages/lerna/src/commands/version/lib/git-add.d.ts +0 -0
- package/dist/packages/lerna/src/commands/version/lib/git-commit.d.ts +0 -0
- package/dist/packages/lerna/src/commands/version/lib/git-push.d.ts +0 -0
- package/dist/packages/lerna/src/commands/version/lib/git-tag.d.ts +0 -0
- package/dist/packages/lerna/src/commands/version/lib/is-anything-committed.d.ts +0 -0
- package/dist/packages/lerna/src/commands/version/lib/is-behind-upstream.d.ts +0 -0
- package/dist/packages/lerna/src/commands/version/lib/is-breaking-change.d.ts +0 -0
- package/dist/packages/lerna/src/commands/version/lib/prompt-version.d.ts +0 -0
- package/dist/packages/lerna/src/commands/version/lib/remote-branch-exists.d.ts +0 -0
- package/dist/packages/lerna/src/commands/version/lib/update-lockfile-version.d.ts +0 -0
- package/dist/packages/lerna/src/commands/watch/command.d.ts +6 -0
- package/dist/packages/lerna/src/commands/watch/index.d.ts +1 -0
- package/dist/packages/lerna/src/index.d.ts +1 -0
- package/dist/packages/lerna/src/migrations/add-schema-config/add-schema-config.d.ts +2 -0
- package/dist/packages/lerna/src/migrations/remove-invalid-init-config/remove-invalid-init-config.d.ts +2 -0
- package/dist/packages/lerna/src/migrations/remove-invalid-lerna-config/remove-invalid-lerna-config.d.ts +2 -0
- package/dist/packages/lerna/src/migrations/remove-invalid-use-workspaces/remove-invalid-use-workspaces.d.ts +2 -0
- package/dist/packages/lerna/src/migrations/remove-unnecessary-use-nx/remove-unnecessary-use-nx.d.ts +2 -0
- package/dist/packages/lerna/src/migrations/update-options-from-legacy-deprecate-config/update-options-from-legacy-deprecate-config.d.ts +9 -0
- package/dist/packages/lerna/src/utils/detect-projects.d.ts +4 -0
- package/dist/packages/lerna/src/utils/index.d.ts +1 -0
- package/dist/utils/index.js +4362 -0
- package/migrations.json +40 -0
- package/package.json +376 -0
- package/schemas/lerna-schema.json +1855 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type VersioningStrategy = "independent" | "fixed";
|
|
2
|
+
export type ChangelogType = "fixed" | "independent" | "root";
|
|
3
|
+
export type ChangelogPresetConfig = string | {
|
|
4
|
+
name: string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
export type BaseChangelogOptions = {
|
|
8
|
+
changelogPreset?: ChangelogPresetConfig;
|
|
9
|
+
changelogEntryAdditionalMarkdown?: string;
|
|
10
|
+
rootPath: string;
|
|
11
|
+
tagPrefix?: string;
|
|
12
|
+
conventionalBumpPrerelease?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const EOL = "\n";
|
|
15
|
+
export declare const BLANK_LINE: string;
|
|
16
|
+
export declare const COMMIT_GUIDELINE = "See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.";
|
|
17
|
+
export declare const CHANGELOG_HEADER: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Package } from "../package";
|
|
2
|
+
import { BaseChangelogOptions, VersioningStrategy } from "./constants";
|
|
3
|
+
export declare function recommendVersion(pkg: Package, type: VersioningStrategy, { changelogPreset, rootPath, tagPrefix, prereleaseId, conventionalBumpPrerelease, buildMetadata, }: BaseChangelogOptions & {
|
|
4
|
+
prereleaseId?: string;
|
|
5
|
+
buildMetadata?: string;
|
|
6
|
+
}, premajorVersionBump: "default" | "force-patch"): Promise<string>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Package } from "../package";
|
|
2
|
+
import { BaseChangelogOptions, ChangelogType } from "./constants";
|
|
3
|
+
export declare function updateChangelog(pkg: Package, type: ChangelogType, { changelogPreset, changelogEntryAdditionalMarkdown, rootPath, tagPrefix, version, }: BaseChangelogOptions & {
|
|
4
|
+
version?: string;
|
|
5
|
+
}): Promise<{
|
|
6
|
+
logPath: string;
|
|
7
|
+
newEntry: string;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ExecOptions } from "child_process";
|
|
2
|
+
import { ExecaReturnValue } from "execa";
|
|
3
|
+
export declare function execPackageManager(npmClient: string, args: string[], opts: ExecOptions): Promise<ExecaReturnValue<string>>;
|
|
4
|
+
export declare function execPackageManagerSync(npmClient: string, args: string[], opts: ExecOptions): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { execPackageManager, execPackageManagerSync } from "./exec-package-manager";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isCorepackEnabled(): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get all cycles within the given dependencies.
|
|
3
|
+
* @param dependencies project dependencies grouped by source
|
|
4
|
+
* @returns a list of cycles, where each cycle is a list of project names
|
|
5
|
+
*/
|
|
6
|
+
export declare function getCycles(dependencies: Record<string, Set<string>>): string[][];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merges all cycles that share nodes into a single cycle, then returns all merged cycles. This allows all cycle nodes to be traversed without repeating any nodes.
|
|
3
|
+
* @param cycles a list of cycles, with each cycle being a list of project names
|
|
4
|
+
* @returns a list of cycles that do not share any nodes with any other cycles
|
|
5
|
+
*/
|
|
6
|
+
export declare function mergeOverlappingCycles(cycles: string[][]): string[][];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function reportCycles(cycles: string[][], rejectCycles?: boolean): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface DescribeRefOptions {
|
|
2
|
+
cwd?: string | URL;
|
|
3
|
+
match?: string;
|
|
4
|
+
separator?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface DescribeRefFallbackResult {
|
|
7
|
+
isDirty: boolean;
|
|
8
|
+
refCount: string;
|
|
9
|
+
sha: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DescribeRefDetailedResult extends DescribeRefFallbackResult {
|
|
12
|
+
lastTagName: string;
|
|
13
|
+
lastVersion: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function describeRef(options?: DescribeRefOptions, includeMergedTags?: boolean): Promise<DescribeRefFallbackResult | DescribeRefDetailedResult>;
|
|
16
|
+
export declare function describeRefSync(options?: DescribeRefOptions, includeMergedTags?: boolean): DescribeRefFallbackResult | DescribeRefDetailedResult;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Argv } from "yargs";
|
|
2
|
+
import log from "./npmlog";
|
|
3
|
+
export declare function filterOptions<T extends FilterOptions>(yargs: Argv<object>): Argv<T>;
|
|
4
|
+
export interface FilterOptions {
|
|
5
|
+
scope?: string;
|
|
6
|
+
ignore?: string;
|
|
7
|
+
private?: boolean;
|
|
8
|
+
since?: string;
|
|
9
|
+
continueIfNoMatch?: boolean;
|
|
10
|
+
excludeDependents?: boolean;
|
|
11
|
+
includeDependents?: boolean;
|
|
12
|
+
includeDependencies?: boolean;
|
|
13
|
+
includeMergedTags?: boolean;
|
|
14
|
+
log: typeof log;
|
|
15
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ExecOptions } from "child_process";
|
|
2
|
+
import { FilterOptions } from "./filter-options";
|
|
3
|
+
import { ProjectGraphProjectNodeWithPackage, ProjectGraphWithPackages } from "./project-graph-with-packages";
|
|
4
|
+
export declare function filterProjects(projectGraph: ProjectGraphWithPackages, execOpts?: Partial<ExecOptions>, opts?: Partial<FilterOptions>): ProjectGraphProjectNodeWithPackage[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getPacked(pkg: any, tarFilePath: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hasNpmVersion(range: string): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ListableOptions } from "./listable-options";
|
|
2
|
+
import { ProjectGraphProjectNodeWithPackage, ProjectGraphWithPackages } from "./project-graph-with-packages";
|
|
3
|
+
/**
|
|
4
|
+
* Format a list of projects according to specified options.
|
|
5
|
+
* @param projectsList List of projects to format
|
|
6
|
+
*/
|
|
7
|
+
export declare function listableFormatProjects(projectsList: ProjectGraphProjectNodeWithPackage[], projectGraph: ProjectGraphWithPackages, options: ListableOptions): {
|
|
8
|
+
text: string;
|
|
9
|
+
count: number;
|
|
10
|
+
};
|
|
11
|
+
declare function parseViewOptions(options: ListableOptions): {
|
|
12
|
+
showAll: boolean | undefined;
|
|
13
|
+
showLong: boolean | undefined;
|
|
14
|
+
showJSON: boolean | undefined;
|
|
15
|
+
showNDJSON: boolean | undefined;
|
|
16
|
+
showParseable: boolean | undefined;
|
|
17
|
+
isTopological: boolean | undefined;
|
|
18
|
+
showGraph: boolean | undefined;
|
|
19
|
+
};
|
|
20
|
+
declare function filterResultList(projectList: ProjectGraphProjectNodeWithPackage[], projectGraph: ProjectGraphWithPackages, viewOptions: ReturnType<typeof parseViewOptions>): ProjectGraphProjectNodeWithPackage[];
|
|
21
|
+
export declare function formatJSON(resultList: ReturnType<typeof filterResultList>, additionalProperties?: (project: ProjectGraphProjectNodeWithPackage) => {
|
|
22
|
+
[propt: string]: unknown;
|
|
23
|
+
}): string;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Argv } from "yargs";
|
|
2
|
+
import { CommandConfigOptions } from "./project";
|
|
3
|
+
export interface ListableOptions extends CommandConfigOptions {
|
|
4
|
+
json?: boolean;
|
|
5
|
+
ndjson?: boolean;
|
|
6
|
+
all?: boolean;
|
|
7
|
+
long?: boolean;
|
|
8
|
+
parseable?: boolean;
|
|
9
|
+
toposort?: boolean;
|
|
10
|
+
graph?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Add list-related options to a Yargs instance.
|
|
14
|
+
*/
|
|
15
|
+
export declare function listableOptions(yargs: Argv, group?: string): Argv<import("yargs").Omit<{}, "json" | "ndjson" | "toposort" | "graph" | "a" | "l" | "p"> & import("yargs").InferredOptionTypes<{
|
|
16
|
+
json: {
|
|
17
|
+
group: string;
|
|
18
|
+
describe: string;
|
|
19
|
+
type: "boolean";
|
|
20
|
+
};
|
|
21
|
+
ndjson: {
|
|
22
|
+
group: string;
|
|
23
|
+
describe: string;
|
|
24
|
+
type: "boolean";
|
|
25
|
+
};
|
|
26
|
+
a: {
|
|
27
|
+
group: string;
|
|
28
|
+
describe: string;
|
|
29
|
+
type: "boolean";
|
|
30
|
+
alias: string;
|
|
31
|
+
};
|
|
32
|
+
l: {
|
|
33
|
+
group: string;
|
|
34
|
+
describe: string;
|
|
35
|
+
type: "boolean";
|
|
36
|
+
alias: string;
|
|
37
|
+
};
|
|
38
|
+
p: {
|
|
39
|
+
group: string;
|
|
40
|
+
describe: string;
|
|
41
|
+
type: "boolean";
|
|
42
|
+
alias: string;
|
|
43
|
+
};
|
|
44
|
+
toposort: {
|
|
45
|
+
group: string;
|
|
46
|
+
describe: string;
|
|
47
|
+
type: "boolean";
|
|
48
|
+
};
|
|
49
|
+
graph: {
|
|
50
|
+
group: string;
|
|
51
|
+
describe: string;
|
|
52
|
+
type: "boolean";
|
|
53
|
+
};
|
|
54
|
+
}>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Tarball {
|
|
2
|
+
name: string;
|
|
3
|
+
version: any;
|
|
4
|
+
filename: string;
|
|
5
|
+
files: any[];
|
|
6
|
+
bundled: any[];
|
|
7
|
+
size: any;
|
|
8
|
+
unpackedSize: any;
|
|
9
|
+
shasum: any;
|
|
10
|
+
integrity: any;
|
|
11
|
+
entryCount: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function logPacked(tarball: Tarball): void;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const ConfigChain: any;
|
|
2
|
+
export declare class Conf extends ConfigChain {
|
|
3
|
+
root: any;
|
|
4
|
+
constructor(base: any);
|
|
5
|
+
add(data: any, marker: string): any;
|
|
6
|
+
addFile(file: any, name?: any): this;
|
|
7
|
+
addEnv(env?: NodeJS.ProcessEnv): any;
|
|
8
|
+
loadPrefix(): any;
|
|
9
|
+
loadCAFile(file: any): void;
|
|
10
|
+
loadUser(): void;
|
|
11
|
+
getCredentialsByURI(uri: string): {
|
|
12
|
+
scope: string;
|
|
13
|
+
token: undefined;
|
|
14
|
+
password: undefined;
|
|
15
|
+
username: undefined;
|
|
16
|
+
email: undefined;
|
|
17
|
+
auth: undefined;
|
|
18
|
+
alwaysAuth: undefined;
|
|
19
|
+
};
|
|
20
|
+
setCredentialsByURI(uri: any, c: any): void;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function envReplace(str: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function findPrefix(start: string): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function toNerfDart(uri: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function parseField(input: any, key: string | number): any;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FetchOptions } from "npm-registry-fetch";
|
|
2
|
+
import type { Conf } from "./npm-conf/conf";
|
|
3
|
+
import { OneTimePasswordCache } from "./otplease";
|
|
4
|
+
import type { Package } from "./package";
|
|
5
|
+
interface NpmPublishOptions {
|
|
6
|
+
dryRun?: boolean;
|
|
7
|
+
["dry-run"]?: boolean;
|
|
8
|
+
["strict-ssl"]?: boolean;
|
|
9
|
+
tag?: string;
|
|
10
|
+
registry?: string;
|
|
11
|
+
}
|
|
12
|
+
interface LibNpmPublishOptions extends FetchOptions {
|
|
13
|
+
access?: "public" | "restricted";
|
|
14
|
+
defaultTag?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Publish a package to the configured registry.
|
|
18
|
+
*/
|
|
19
|
+
export declare function npmPublish(pkg: Package, tarFilePath: string, options: LibNpmPublishOptions & NpmPublishOptions, conf: Conf, otpCache?: OneTimePasswordCache): Promise<void | Response>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Tracker } from "./tracker";
|
|
2
|
+
import { TrackerBase } from "./tracker-base";
|
|
3
|
+
export declare class TrackerGroup extends TrackerBase {
|
|
4
|
+
parentGroup: null;
|
|
5
|
+
trackers: Array<Tracker>;
|
|
6
|
+
completion: any;
|
|
7
|
+
weight: any;
|
|
8
|
+
totalWeight: number;
|
|
9
|
+
finished: boolean;
|
|
10
|
+
bubbleChange: (name: any, completed: any, tracker: {
|
|
11
|
+
id: string | number;
|
|
12
|
+
}) => void;
|
|
13
|
+
nameInTree(): string;
|
|
14
|
+
addUnit(unit: any, weight?: number): any;
|
|
15
|
+
completed(): number;
|
|
16
|
+
newGroup(name: string, weight?: number): any;
|
|
17
|
+
newItem(name: string, todo: number, weight?: number): any;
|
|
18
|
+
newStream(name: string, todo: number, weight?: number): any;
|
|
19
|
+
finish(): void;
|
|
20
|
+
debug(depth?: number): string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import stream from "node:stream";
|
|
2
|
+
import { Tracker } from "./tracker";
|
|
3
|
+
export declare class TrackerStream extends stream.Transform {
|
|
4
|
+
tracker: Tracker;
|
|
5
|
+
name: string;
|
|
6
|
+
id: number;
|
|
7
|
+
constructor(name: string, size?: number, options?: stream.TransformOptions);
|
|
8
|
+
trackerChange(name: string, completion: any): void;
|
|
9
|
+
_transform(data: string | any[], encoding: any, cb: () => void): void;
|
|
10
|
+
_flush(cb: () => void): void;
|
|
11
|
+
completed(): number;
|
|
12
|
+
addWork(work: number): void;
|
|
13
|
+
finish(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TrackerBase } from "./tracker-base";
|
|
2
|
+
export declare class Tracker extends TrackerBase {
|
|
3
|
+
workDone: number;
|
|
4
|
+
workTodo: number;
|
|
5
|
+
constructor(name?: string, todo?: number);
|
|
6
|
+
completed(): number;
|
|
7
|
+
addWork(work: number): void;
|
|
8
|
+
completeWork(work: number): void;
|
|
9
|
+
finish(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapted from deprecated package https://github.com/npm/gauge/blob/f8092518a47ac6a96027ae3ad97d0251ffe7643b/lib/index.js
|
|
3
|
+
*/
|
|
4
|
+
export declare class Gauge {
|
|
5
|
+
private _status;
|
|
6
|
+
private _paused;
|
|
7
|
+
private _disabled;
|
|
8
|
+
private _showing;
|
|
9
|
+
private _onScreen;
|
|
10
|
+
private _needsRedraw;
|
|
11
|
+
private _hideCursor;
|
|
12
|
+
private _fixedFramerate;
|
|
13
|
+
private _lastUpdateAt;
|
|
14
|
+
private _updateInterval;
|
|
15
|
+
private _themes;
|
|
16
|
+
private _theme;
|
|
17
|
+
private _gauge;
|
|
18
|
+
private _tty;
|
|
19
|
+
private _writeTo;
|
|
20
|
+
private _$$doRedraw;
|
|
21
|
+
private _$$handleSizeChange;
|
|
22
|
+
private _cleanupOnExit;
|
|
23
|
+
private _removeOnExit;
|
|
24
|
+
private redrawTracker;
|
|
25
|
+
constructor(arg1?: any, arg2?: any);
|
|
26
|
+
isEnabled(): boolean;
|
|
27
|
+
setTemplate(template: any): void;
|
|
28
|
+
private _computeTheme;
|
|
29
|
+
setThemeset(themes: any): void;
|
|
30
|
+
setTheme(theme: any): void;
|
|
31
|
+
private _requestRedraw;
|
|
32
|
+
getWidth(): number;
|
|
33
|
+
setWriteTo(writeTo: any, tty: any): void;
|
|
34
|
+
enable(): void;
|
|
35
|
+
disable(): void;
|
|
36
|
+
private _enableEvents;
|
|
37
|
+
private _disableEvents;
|
|
38
|
+
hide(cb?: () => void): any;
|
|
39
|
+
show(section?: string | object, completed?: number): void;
|
|
40
|
+
pulse(subsection?: string): void;
|
|
41
|
+
private _handleSizeChange;
|
|
42
|
+
private _doRedraw;
|
|
43
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapted from https://github.com/npm/npmlog/blob/756bd05d01e7e4841fba25204d6b85dfcffeba3c/lib/log.js
|
|
3
|
+
*/
|
|
4
|
+
import { EventEmitter } from "node:events";
|
|
5
|
+
import { WriteStream } from "node:tty";
|
|
6
|
+
export declare class Logger extends EventEmitter {
|
|
7
|
+
private _stream;
|
|
8
|
+
private _paused;
|
|
9
|
+
private _buffer;
|
|
10
|
+
private unicodeEnabled;
|
|
11
|
+
private colorEnabled;
|
|
12
|
+
private id;
|
|
13
|
+
record: any[];
|
|
14
|
+
maxRecordSize: number;
|
|
15
|
+
gauge: any;
|
|
16
|
+
tracker: any;
|
|
17
|
+
progressEnabled: boolean;
|
|
18
|
+
level: string;
|
|
19
|
+
prefixStyle: any;
|
|
20
|
+
headingStyle: any;
|
|
21
|
+
style: any;
|
|
22
|
+
levels: any;
|
|
23
|
+
disp: any;
|
|
24
|
+
heading: string | undefined;
|
|
25
|
+
silly: (prefix: string, ...messageArgs: any[]) => void;
|
|
26
|
+
verbose: (prefix: string, ...messageArgs: any[]) => void;
|
|
27
|
+
info: (prefix: string, ...messageArgs: any[]) => void;
|
|
28
|
+
timing: (prefix: string, ...messageArgs: any[]) => void;
|
|
29
|
+
http: (prefix: string, ...messageArgs: any[]) => void;
|
|
30
|
+
notice: (prefix: string, ...messageArgs: any[]) => void;
|
|
31
|
+
warn: (prefix: string, ...messageArgs: any[]) => void;
|
|
32
|
+
error: (prefix: string, ...messageArgs: any[]) => void;
|
|
33
|
+
silent: (prefix: string, ...messageArgs: any[]) => void;
|
|
34
|
+
[dynamicallyAddedLogLevelMethod: string]: any;
|
|
35
|
+
constructor();
|
|
36
|
+
get stream(): WriteStream | null;
|
|
37
|
+
set stream(newStream: WriteStream | null);
|
|
38
|
+
useColor(): boolean;
|
|
39
|
+
enableColor(): void;
|
|
40
|
+
disableColor(): void;
|
|
41
|
+
enableUnicode(): void;
|
|
42
|
+
disableUnicode(): void;
|
|
43
|
+
setGaugeThemeset(themes: any): void;
|
|
44
|
+
setGaugeTemplate(template: any): void;
|
|
45
|
+
enableProgress(): void;
|
|
46
|
+
disableProgress(): void;
|
|
47
|
+
clearProgress(cb?: () => void): void;
|
|
48
|
+
showProgress(name?: string, completed?: number): void;
|
|
49
|
+
pause(): void;
|
|
50
|
+
resume(): void;
|
|
51
|
+
log(lvl: string, prefix: string, ...messageArgs: any[]): void;
|
|
52
|
+
emitLog(m: {
|
|
53
|
+
prefix: string;
|
|
54
|
+
level: string | number;
|
|
55
|
+
message?: string;
|
|
56
|
+
}): void;
|
|
57
|
+
_format(msg: string, style?: {
|
|
58
|
+
fg?: string;
|
|
59
|
+
bg?: string;
|
|
60
|
+
bold?: boolean;
|
|
61
|
+
underline?: boolean;
|
|
62
|
+
inverse?: boolean;
|
|
63
|
+
beep?: boolean;
|
|
64
|
+
}): string | void;
|
|
65
|
+
write(msg: string, style?: {
|
|
66
|
+
fg?: string;
|
|
67
|
+
bg?: string;
|
|
68
|
+
bold?: boolean;
|
|
69
|
+
underline?: boolean;
|
|
70
|
+
inverse?: boolean;
|
|
71
|
+
beep?: boolean;
|
|
72
|
+
}): void;
|
|
73
|
+
addLevel(lvl: string | number, n: any, style?: any, disp?: string | number | null): void;
|
|
74
|
+
}
|
|
75
|
+
declare const log: Logger;
|
|
76
|
+
export default log;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapted from https://github.com/npm/cli/blob/latest/lib/utils/oidc.js
|
|
3
|
+
*/
|
|
4
|
+
import type { Conf } from "./npm-conf/conf";
|
|
5
|
+
interface OidcOptions {
|
|
6
|
+
packageName: string;
|
|
7
|
+
registry: string;
|
|
8
|
+
opts: any;
|
|
9
|
+
config: Conf;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Handles OpenID Connect (OIDC) token retrieval and exchange for CI environments.
|
|
13
|
+
*
|
|
14
|
+
* This function is designed to work in Continuous Integration (CI) environments such as GitHub Actions
|
|
15
|
+
* and GitLab. It retrieves an OIDC token from the CI environment, exchanges it for an npm token, and
|
|
16
|
+
* sets the token in the provided configuration for authentication with the npm registry.
|
|
17
|
+
*
|
|
18
|
+
* This function is intended to never throw, as it mutates the state of the `opts` and `config` objects on success.
|
|
19
|
+
* OIDC is always an optional feature, and the function should not throw if OIDC is not configured by the registry.
|
|
20
|
+
*
|
|
21
|
+
* @see https://github.com/watson/ci-info for CI environment detection.
|
|
22
|
+
* @see https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect for GitHub Actions OIDC.
|
|
23
|
+
*/
|
|
24
|
+
export declare function oidc({ packageName, registry, opts, config }: OidcOptions): Promise<undefined>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface OneTimePasswordCache {
|
|
2
|
+
otp: string | null;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Attempt to execute Promise callback, prompting for OTP if necessary.
|
|
6
|
+
* @template {Record<string, unknown>} T
|
|
7
|
+
* @param {(opts: T) => Promise<unknown>} fn
|
|
8
|
+
* @param {T} _opts The options to be passed to `fn`
|
|
9
|
+
* @param {OneTimePasswordCache} otpCache
|
|
10
|
+
*/
|
|
11
|
+
export declare function otplease<T extends Record<string, unknown>>(fn: (opts: T) => Promise<unknown>, _opts: T, otpCache?: OneTimePasswordCache | null): Promise<unknown>;
|
|
12
|
+
/**
|
|
13
|
+
* Prompt user for one-time password.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getOneTimePassword(message?: string): Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function output(...args: any[]): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IntegrityMap } from "ssri";
|
|
2
|
+
import log from "./npmlog";
|
|
3
|
+
import { Package } from "./package";
|
|
4
|
+
interface PackConfig {
|
|
5
|
+
log?: typeof log;
|
|
6
|
+
lernaCommand?: string;
|
|
7
|
+
ignorePrepublish?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface Packed {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
version: string;
|
|
13
|
+
size: number;
|
|
14
|
+
unpackedSize: number;
|
|
15
|
+
shasum: string;
|
|
16
|
+
integrity: IntegrityMap;
|
|
17
|
+
filename: string;
|
|
18
|
+
files: string[];
|
|
19
|
+
entryCount: number;
|
|
20
|
+
bundled: unknown[];
|
|
21
|
+
tarFilePath: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Pack a directory suitable for publishing, writing tarball to a tempfile.
|
|
25
|
+
* @param _pkg Package instance or path to manifest
|
|
26
|
+
* @param dir to pack
|
|
27
|
+
* @param options
|
|
28
|
+
*/
|
|
29
|
+
export declare function packDirectory(_pkg: Package | string, dir: string, options: PackConfig): Promise<Packed>;
|
|
30
|
+
export {};
|