You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6ecdd83
Browse filesBrowse the repository at this point in the historyBrowse files
> Check which packages have changed since the last publish
3
+
> List local packages that have changed since the last tagged release
4
4
5
5
## Usage
6
6
7
+
The output of `lerna changed` is a list of packages that would be the subjects of the next `lerna version` or `lerna publish` execution.
8
+
7
9
```sh
8
10
$ lerna changed
11
+
package-1
12
+
package-2
9
13
```
10
14
11
-
Check which `packages` have changed since the last release (the last git tag).
12
-
13
-
Lerna determines the last git tag created and runs `git diff --name-only v6.8.1` to get all files changed since that tag. It then returns an array of packages that have an updated file.
14
-
15
-
**Note that configuration for the `publish` command _also_ affects the
16
-
`changed` command. For example `command.publish.ignoreChanges`**
15
+
**Note:**`lerna.json` configuration for `lerna publish`_and_`lerna version` also affects
16
+
`lerna changed`, e.g. `command.publish.ignoreChanges`.
17
17
18
18
## Options
19
19
20
-
### `--json`
20
+
`lerna changed` supports all of the flags supported by [`lerna ls`](https://github.com/lerna/lerna/tree/master/commands/list#options):
21
21
22
-
```sh
23
-
$ lerna changed --json
24
-
```
25
-
26
-
When run with this flag, `changed` will return an array of objects in the following format:
Unlike `lerna ls`, however, `lerna changed`**does not** support [filter options](https://www.npmjs.com/package/@lerna/filter-options), as filtering is not supported by `lerna version` or `lerna publish`.
37
28
29
+
`lerna changed` also supports all the flags supported by [`lerna version`](https://github.com/lerna/lerna/tree/master/commands/version#options), but the only relevant one is [`--ignore-changes`](https://github.com/lerna/lerna/tree/master/commands/version#--ignore-changes).
0 commit comments