or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

index.md
tile.json

index.mddocs/

0

# @lerna/output

1

2

@lerna/output is an internal Lerna utility that provides console output functionality with npmlog integration. It ensures clean console output during Lerna operations by temporarily clearing progress indicators, logging content, and then restoring progress display.

3

4

## Package Information

5

6

- **Package Name**: @lerna/output

7

- **Package Type**: npm

8

- **Language**: JavaScript (CommonJS)

9

- **Installation**: `npm install @lerna/output`

10

- **Node.js Support**: ^14.15.0 || >=16.0.0

11

12

## Core Imports

13

14

```javascript

15

const { output } = require("@lerna/output");

16

```

17

18

Alternative import pattern:

19

20

```javascript

21

const output = require("@lerna/output").output;

22

```

23

24

## Basic Usage

25

26

```javascript

27

const { output } = require("@lerna/output");

28

29

// Simple console output with progress clearing

30

output("Hello, world!");

31

32

// Multiple arguments (like console.log)

33

output("Processing", 42, "files", { status: "complete" });

34

35

// Use in Lerna operations where progress bars are active

36

output("✅ Build completed successfully");

37

output("📦 Publishing packages...");

38

```

39

40

## Capabilities

41

42

### Console Output with Progress Management

43

44

Provides clean console output that doesn't interfere with npmlog progress indicators.

45

46

```javascript { .api }

47

/**

48

* Outputs arguments to console with npmlog progress management

49

* @param {...any} args - Arguments to log (same as console.log)

50

* @returns {undefined}

51

*/

52

function output(...args): undefined;

53

```

54

55

The `output` function:

56

- Calls `log.clearProgress()` to temporarily hide progress indicators

57

- Logs all provided arguments using `console.log(...args)`

58

- Calls `log.showProgress()` to restore progress display

59

- Accepts any number of arguments of any type (same interface as console.log)

60

61

## Dependencies

62

63

- **npmlog@^6.0.2** - Required for progress clearing and showing functionality

64

65

## Implementation Notes

66

67

- This is an internal Lerna tool, primarily designed for use within the Lerna ecosystem

68

- The function is a wrapper around console.log with npmlog integration

69

- Progress management ensures clean output during long-running Lerna operations

70

- Uses CommonJS module exports (`module.exports.output = output`)

71

- No TypeScript definitions provided

72

- No browser/ESM support (Node.js only)