6.4.1 • Published 1 year ago

@lerna/filter-options v6.4.1

Weekly downloads
1,053,275
License
MIT
Repository
github
Last release
1 year ago

@lerna/filter-options

Options for lerna sub-commands that need filtering

Install lerna for access to the lerna CLI.

Options

--scope <glob>

Include only packages with names matching the given glob.

$ lerna exec --scope my-component -- ls -la
$ lerna run --scope toolbar-* test
$ lerna run --scope package-1 --scope *-2 lint

Note: For certain globs, it may be necessary to quote the option argument to avoid premature shell expansion.

--ignore <glob>

Exclude packages with names matching the given glob.

$ lerna exec --ignore package-{1,2,5}  -- ls -la
$ lerna run --ignore package-1  test
$ lerna run --ignore package-@(1|2) --ignore package-3 lint

More examples of filtering can be found here.

--no-private

Exclude private packages. They are included by default.

--since [ref]

Only include packages that have been changed since the specified ref. If no ref is passed, it defaults to the most-recent tag.

# List the contents of packages that have changed since the latest tag
$ lerna exec --since -- ls -la

# Run the tests for all packages that have changed since `main`
$ lerna run test --since main

# List all packages that have changed since `some-branch`
$ lerna ls --since some-branch

This can be particularly useful when used in CI, if you can obtain the target branch a PR will be going into, because you can use that as the ref to the --since option. This works well for PRs going into the default branch as well as feature branches.

--exclude-dependents

Exclude all transitive dependents when running a command with --since, overriding the default "changed" algorithm.

This flag has no effect without --since, and will throw an error in that case.

--include-dependents

Include all transitive dependents when running a command regardless of --scope, --ignore, or --since.

--include-dependencies

Include all transitive dependencies when running a command regardless of --scope, --ignore, or --since.

Used in combination with any command that accepts --scope (bootstrap, clean, ls, run, exec). Ensures that all dependencies (and dev dependencies) of any scoped packages (either through --scope or --ignore) are operated on as well.

Note: This will override the --scope and --ignore flags.

i.e. A package matched by the --ignore flag will still be bootstrapped if it is depended on by another package that is being bootstrapped.

This is useful for situations where you want to "set up" a single package that relies on other packages being set up.

$ lerna bootstrap --scope my-component --include-dependencies
# my-component and all of its dependencies will be bootstrapped
$ lerna bootstrap --scope "package-*" --ignore "package-util-*" --include-dependencies
# all packages matching "package-util-*" will be ignored unless they are
# depended upon by a package whose name matches "package-*"

--include-merged-tags

$ lerna exec --since --include-merged-tags -- ls -la

Include tags from merged branches when running a command with --since. This is only useful if you do a lot of publishing from feature branches, which is not generally recommended.

6.3.1-beta.8

1 year ago

6.3.1-beta.7

1 year ago

6.3.1-beta.6

1 year ago

6.3.1-beta.5

1 year ago

6.3.1-beta.4

1 year ago

6.1.0

1 year ago

6.3.1-beta.3

1 year ago

6.3.1-beta.2

1 year ago

6.3.0

1 year ago

6.3.1-beta.1

1 year ago

6.3.1-beta.0

1 year ago

6.0.3

1 year ago

6.2.0

1 year ago

6.4.1

1 year ago

6.4.0

1 year ago

6.0.0-alpha.0

2 years ago

6.0.0-alpha.1

2 years ago

6.0.0-alpha.2

2 years ago

5.6.2

2 years ago

5.6.1

2 years ago

5.6.0

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

6.0.2

1 year ago

5.5.4

2 years ago

5.5.3

2 years ago

5.5.1

2 years ago

5.5.0

2 years ago

5.5.2

2 years ago

5.1.5

2 years ago

5.1.4

2 years ago

5.1.3

2 years ago

5.3.0

2 years ago

5.1.2

2 years ago

5.4.3

2 years ago

5.4.2

2 years ago

5.4.1

2 years ago

5.4.0

2 years ago

5.2.0

2 years ago

5.1.8

2 years ago

5.1.7

2 years ago

5.1.6

2 years ago

5.1.1

2 years ago

5.1.0

2 years ago

5.0.0

2 years ago

5.0.0-alpha.2

2 years ago

5.0.0-alpha.1

2 years ago

5.0.0-alpha.0

2 years ago

5.1.0-alpha.0

2 years ago

4.0.0

3 years ago

3.20.0

4 years ago

3.18.4

4 years ago

3.18.0

5 years ago

3.16.5

5 years ago

3.16.0

5 years ago

3.14.2

5 years ago

3.14.0

5 years ago

3.13.3

5 years ago

3.13.0

5 years ago

3.12.1

5 years ago

3.12.0

5 years ago

3.11.0

5 years ago

3.10.6

5 years ago

3.10.1

5 years ago

3.10.0

5 years ago

3.9.0

5 years ago

3.8.1

5 years ago

3.6.0

5 years ago

3.5.0

5 years ago

3.3.2

6 years ago

3.3.0

6 years ago

3.1.2

6 years ago

3.0.5

6 years ago

3.0.0

6 years ago

3.0.0-rc.0

6 years ago

3.0.0-beta.18

6 years ago

3.0.0-beta.9

6 years ago

3.0.0-beta.2

6 years ago

3.0.0-beta.1

6 years ago

3.0.0-beta.0

6 years ago