Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(changed): add Lerna
changed
as optional command
- Loading branch information
1 parent
909ba05
commit b08417c
Showing
36 changed files
with
635 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/) | ||
[![npm](https://img.shields.io/npm/dy/@lerna-lite/changed?color=forest)](https://www.npmjs.com/package/@lerna-lite/changed) | ||
[![npm](https://img.shields.io/npm/v/@lerna-lite/changed.svg?logo=npm&logoColor=fff)](https://www.npmjs.com/package/@lerna-lite/changed) | ||
|
||
# @lerna-lite/changed | ||
|
||
## (`lerna changed`) - Changed command [optional] 🕜 | ||
|
||
List local packages that have changed since the last tagged release | ||
|
||
--- | ||
|
||
## Installation | ||
|
||
```sh | ||
npm install @lerna-lite/changed -D -W | ||
|
||
# then use it (see usage below) | ||
lerna changed | ||
|
||
# OR use npx | ||
npx lerna changed | ||
``` | ||
|
||
## Usage | ||
|
||
The output of `lerna changed` is a list of packages that would be the subjects of the next `lerna version` or `lerna publish` execution. | ||
|
||
```sh | ||
$ lerna changed | ||
package-1 | ||
package-2 | ||
``` | ||
|
||
**Note:** `lerna.json` configuration for `lerna publish` _and_ `lerna version` also affects | ||
`lerna changed`, e.g. `command.publish.ignoreChanges`. | ||
|
||
## Options | ||
|
||
`lerna changed` supports all of the flags supported by [`lerna ls`](https://github.com/lerna/lerna/tree/main/commands/list#options): | ||
|
||
- [`--json`](https://github.com/lerna/lerna/tree/main/commands/list#--json) | ||
- [`--ndjson`](https://github.com/lerna/lerna/tree/main/commands/list#--ndjson) | ||
- [`-a`, `--all`](https://github.com/lerna/lerna/tree/main/commands/list#--all) | ||
- [`-l`, `--long`](https://github.com/lerna/lerna/tree/main/commands/list#--long) | ||
- [`-p`, `--parseable`](https://github.com/lerna/lerna/tree/main/commands/list#--parseable) | ||
- [`--toposort`](https://github.com/lerna/lerna/tree/main/commands/list#--toposort) | ||
- [`--graph`](https://github.com/lerna/lerna/tree/main/commands/list#--graph) | ||
|
||
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`. | ||
|
||
`lerna changed` supports the following options of [`lerna version`](https://github.com/lerna/lerna/tree/main/commands/version#options) (the others are irrelevant): | ||
|
||
- [`--conventional-graduate`](https://github.com/lerna/lerna/tree/main/commands/version#--conventional-graduate). | ||
- [`--force-publish`](https://github.com/lerna/lerna/tree/main/commands/version#--force-publish). | ||
- [`--ignore-changes`](https://github.com/lerna/lerna/tree/main/commands/version#--ignore-changes). | ||
- [`--include-merged-tags`](https://github.com/lerna/lerna/tree/main/commands/version#--include-merged-tags). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "@lerna-lite/changed", | ||
"description": "Lerna-Lite changed commmand - List local packages that have changed since the last tagged release", | ||
"version": "1.5.1", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"typings": "dist/index.d.ts", | ||
"files": [ | ||
"/dist" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"build": "tsc --project tsconfig.bundle.json --newLine LF", | ||
"pack-tarball": "npm pack" | ||
}, | ||
"license": "MIT", | ||
"author": "Ghislain B.", | ||
"homepage": "https://github.com/ghiscoding/lerna-lite", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ghiscoding/lerna-lite.git", | ||
"directory": "packages/changed" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/ghiscoding/lerna-lite/issues" | ||
}, | ||
"engines": { | ||
"node": ">=14.15.0", | ||
"npm": ">=8.0.0" | ||
}, | ||
"dependencies": { | ||
"@lerna-lite/core": "workspace:*", | ||
"@lerna-lite/list": "workspace:*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"version": "1.0.0" | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/changed/src/__tests__/__fixtures__/basic/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "independent" | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/changed/src/__tests__/__fixtures__/basic/packages/package-1/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "package-1", | ||
"version": "1.0.0" | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/changed/src/__tests__/__fixtures__/basic/packages/package-2/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "package-2", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"package-1": "^1.0.0" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/changed/src/__tests__/__fixtures__/basic/packages/package-3/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "package-3", | ||
"version": "1.0.0", | ||
"devDependencies": { | ||
"package-2": "^1.0.0" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/changed/src/__tests__/__fixtures__/basic/packages/package-4/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "package-4", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"package-1": "^0.0.0" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
packages/changed/src/__tests__/__fixtures__/basic/packages/package-5/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "package-5", | ||
"version": "1.0.0", | ||
"private": "true", | ||
"dependencies": { | ||
"package-1": "^1.0.0" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/changed/src/__tests__/__fixtures__/circular/lerna.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"version": "1.0.0" | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/changed/src/__tests__/__fixtures__/circular/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "independent" | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/changed/src/__tests__/__fixtures__/circular/packages/package-1/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "package-1", | ||
"version": "1.0.0" | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/changed/src/__tests__/__fixtures__/circular/packages/package-2/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "package-2", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"package-1": "^1.0.0" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/changed/src/__tests__/__fixtures__/circular/packages/package-3/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "package-3", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"package-4": "^1.0.0" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/changed/src/__tests__/__fixtures__/circular/packages/package-4/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "package-4", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"package-3": "^1.0.0" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
packages/changed/src/__tests__/__fixtures__/circular/packages/package-5/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "package-5", | ||
"version": "1.0.0", | ||
"private": "true", | ||
"dependencies": { | ||
"package-1": "^1.0.0" | ||
} | ||
} |
Oops, something went wrong.