open-index/open-npm huggingface dataset:
npm package: @monup/changelog
Description: Changelog generation and extraction for the second Monup workflow step.
Latest version: 0.2.1

# @monup/changelog

Changelog generation and extraction for the second Monup workflow step.

## Workflow Role

`@monup/changelog` turns commit history into changelog blocks after versioning. It also stores version markers so later steps can extract release notes for GitHub releases.

## Main Exports

- `generateChangelog()`: write a new changelog block for a version.
- `runChangelog()`: update root or per-package changelogs across a workspace.
- `extractChangelogForVersion()`: read one version block back out of a changelog.
- `getLatestVersionFromChangelog()`: detect the latest documented version.
- `createVersionMarkers()`, `findVersionMarkers()`, and `findVersionBlocks()`: marker helpers for extraction and sync.

## Example

```ts
import { defaultChangelogOptions, generateChangelog } from '@monup/changelog';

await generateChangelog(
	'1.1.0',
	commits,
	'my-package',
	defaultChangelogOptions,
);
```

## Related Packages

- [`@monup/version`](../version/README.md): usually provides the version first.
- [`@monup/github`](../github/README.md): extracts release notes from changelog content.
npm package: @monup/cli
Description: CLI entry point for the Monup workflow.
Latest version: 0.3.0

# @monup/cli

CLI entry point for the Monup workflow.

## Workflow Role

`@monup/cli` is the operator-facing package that ties the workflow together:

```text
version -> changelog -> release -> github
```

The common flow is to run `version` and `changelog` locally, then let CI run `release` and `github`.

## Commands

- `version`: update package versions from commits.
- `changelog`: generate changelog entries from commits.
- `jsr-prepare`: prepare JSR package entries and settings for tokenless CI publishing.
- `release`: publish packages to npm or JSR.
- `github`: create GitHub releases.
- `all`: run the full workflow in order.

## Important Flags

- `--log-level <level>`: set the default log level.
- `--ci`: force CI mode.
- `--set <path=value>`: override config values from the command line.
- `jsr-prepare --github-owner/--github-name`: set the shared GitHub repo for JSR packages.
- `jsr-prepare --readme-source`: set a shared `readme` or `jsdoc` source.
- `jsr-prepare --runtime-*`: set shared runtime compatibility values using `supported|unsupported|unknown`.
- `jsr-prepare --infer-descriptions`: infer per-package descriptions from `package.json` or `README.md`.
- `version --major|--minor|--patch`: force a bump type.
- `release --dry-run`: validate publish steps without publishing.

## Example

```bash
monup version
monup changelog
monup release --dry-run --log-level debug
```

`jsr-prepare` is local-only and is meant to prepare packages before CI uses JSR's GitHub repository-linked OIDC publishing flow. In interactive terminals it now defaults to JSR's browser-based authorization flow, opens the verification URL for you, shows the fallback code in the terminal, and keeps the returned device token only for the current run. In non-interactive mode it falls back to `JSR_TOKEN`.

Non-interactive example:

```bash
JSR_TOKEN=your_token_here monup jsr-prepare
```

## Related Packages

- [`@monup/options`](../options/README.md): config loading and `defineConfig()`.
- [`@monup/release`](../release/README.md): package publishing.
- [`@monup/github`](../github/README.md): GitHub release creation.
npm package: @monup/git
Description: Git history, tag, and commit parsing utilities for Monup.
Latest version: 0.2.2

# @monup/git

Git history, tag, and commit parsing utilities for Monup.

## Workflow Role

`@monup/git` provides the commit ranges, tag history, tag formatting, and conventional commit parsing used by the version, changelog, and GitHub steps.

## Main Exports

- `getCommits()` and `getCommitsSinceLastTag()`: read commits for workflow decisions.
- `getCommitsForPackage()`: select commits relevant to one package.
- `getLastTag()`, `getLastPackageTag()`, `getGlobalTagHistory()`, and `getPackageTagHistory()`: work with tags.
- `createCommit()`, `createTag()`, `pushToRemote()`, and `getWorkingTreeStatus()`: perform git operations.
- `formatTag()`, `parseConventionalCommit()`, and `getGitHubRepo()`: shared helpers for higher-level packages.

## Example

```ts
import { createTag, getCommits, getLastTag } from '@monup/git';

const lastTag = await getLastTag(undefined, 'v%s');
const commits = await getCommits(lastTag);

await createTag('v1.1.0', 'Release 1.1.0');
```

## Related Packages

- [`@monup/version`](../version/README.md): uses tags and commits to determine bumps.
- [`@monup/changelog`](../changelog/README.md): uses git history to build changelog blocks.
npm package: @monup/github
Description: GitHub release creation for the final Monup workflow step.
Latest version: 0.2.0

# @monup/github

GitHub release creation for the final Monup workflow step.

## Workflow Role

`@monup/github` turns changelog content into GitHub releases after versioning and publishing are complete. In the default Monup flow, this is usually a CI step.

## Main Exports

- `createRelease()`: create one GitHub release for a tag.
- `createReleasesForPackages()`: create releases for all detected packages.
- `listReleases()`: read existing GitHub releases.
- `extractChangelogForRelease()`: build release notes from changelog content.
- `defaultGitHubOptions`: shared GitHub defaults.

## Requirements

- `repo` or `releaseRepo` must resolve to `owner/repo`.
- `GITHUB_TOKEN` must be available in the environment.
- Git and changelog context are needed to build the tag name and release notes.

## Example

```ts
import { createReleasesForPackages } from '@monup/github';

await createReleasesForPackages(packages, {
	github: {
		repo: 'owner/repo',
		changelogMethod: 'auto',
	},
	git: {
		tagStrategy: 'package',
		tagTemplate: 'v%s',
	},
	changelog: {
		strategy: 'per-package',
		location: 'CHANGELOG.md',
	},
});
```

## Related Packages

- [`@monup/changelog`](../changelog/README.md): provides the release note source.
- [`@monup/git`](../git/README.md): provides tag formatting and repo context.
- [`@monup/release`](../release/README.md): usually runs before GitHub release creation.
npm package: @monup/options
Description: Configuration contract and option resolution for Monup.
Latest version: 0.2.0

# @monup/options

Configuration contract and option resolution for Monup.

## Workflow Role

`@monup/options` sits underneath every workflow step. The CLI uses it to load `monup.config.ts`, merge overrides, and normalize options before running `version`, `changelog`, `release`, or `github`.

## Main Exports

- `defineConfig()`: type-safe helper for `monup.config.ts`.
- `resolveOptions()`: load config and merge overrides into resolved options.
- `defaultOptions`: shared defaults for Monup packages.
- `MonupOptions` and `ResolvedMonupOptions`: main option types.
- `LogLevel`, `LogLevelConfig`, and conventional config types.

## Example

```ts
import { defineConfig, resolveOptions } from '@monup/options';

export default defineConfig({
	git: { tagStrategy: 'package' },
	release: { dryRun: 'auto' },
});

const options = await resolveOptions({
	logLevel: { default: 'debug' },
});
```

## Related Packages

- [`@monup/cli`](../cli/README.md): passes CLI flags and config overrides here.
- [`@monup/version`](../version/README.md): consumes resolved version options.
- [`@monup/release`](../release/README.md): consumes resolved release options.
npm package: @monup/release
Description: Package publishing for the Monup release step.
Latest version: 0.3.0

# @monup/release

Package publishing for the Monup release step.

## Workflow Role

`@monup/release` is the publish stage of the workflow. In the default Monup flow, this is usually the CI step that runs after local `version` and `changelog` work has already been reviewed.

## Main Exports

- `publish()`: publish one package manifest.
- `publishPackages()`: publish all detected packages with shared context.
- `listPublishedVersions()`: inspect already published versions.
- `setupJsrPackages()`: create JSR package entries and apply shared or per-package settings.
- `resolveReleaseOptions()`: normalize release options.
- `defaultReleaseOptions`: shared release defaults.

One logical package can publish more than once when it has multiple manifest files, because Monup creates one publish target per `packageFile`.

## Notes

- Publish targets are inferred from the package manifest being handled.
- Registry and package-manager handling are resolved internally.
- `dryRun` behavior depends on the resolved release options and CI context.
- `setupJsrPackages()` is intended for local JSR package preparation and accepts an explicit token, while the CLI now defaults to interactive browser authorization and only falls back to `JSR_TOKEN` in non-interactive mode.

## Example

```ts
import { publishPackages, setupJsrPackages } from '@monup/release';

await publishPackages(packages, releaseOptions, {
	dryRun: true,
	isCI: false,
});

await setupJsrPackages(packages, {
	githubRepository: {
		owner: 'monup',
		name: 'monup',
	},
	readmeSource: 'readme',
	runtimeCompat: {
		node: true,
		deno: true,
	},
	packageOverrides: {
		'@monup/cli': {
			description: 'CLI entry point for Monup.',
		},
	},
});
```

## Related Packages

- [`@monup/workspace`](../workspace/README.md): provides detected packages and manifest paths.
- [`@monup/options`](../options/README.md): provides resolved release options.
- [`@monup/github`](../github/README.md): usually runs after publishing.
npm package: @monup/utils
Description: Shared utility functions.
Latest version: 0.3.0

# @monup/utils

Shared utility functions.

## Purpose

Provides common utilities used across monup packages: CI environment detection and deep object merging.

## Use Case

Use when you need CI detection or configuration merging utilities in monup packages.

## Example

```typescript
import { detectCI, mergeWithDefaults } from '@monup/utils';

const isCI = detectCI();

const merged = mergeWithDefaults(
	{ version: '1.0.0', name: 'test' },
	{ version: '2.0.0' },
);
```
npm package: @monup/version
Description: Version calculation and manifest updates for the first Monup workflow step.
Latest version: 0.2.1

# @monup/version

Version calculation and manifest updates for the first Monup workflow step.

## Workflow Role

`@monup/version` determines the next version from commits and writes that version back to package manifests before changelog generation and publishing.

## Main Exports

- `calculateVersion()`: derive bump type and next version from commits.
- `getPreviousVersion()`: resolve the previous version from package files, tags, registries, changelogs, or releases.
- `runVersionBump()`: apply version bumps across detected packages.
- `getCurrentVersionFromFile()` and `updateVersionInFile()`: read and write versions in one manifest.
- `updateVersionInAdditionalFiles()`: replace version strings in extra files.
- `registerUpdater()`: add support for more manifest types.

## Example

```ts
import { calculateVersion, updateVersionInFile } from '@monup/version';

const { nextVersion } = calculateVersion('1.0.0', commits);

if (typeof nextVersion === 'string') {
	await updateVersionInFile('./package.json', nextVersion);
}
```

## Related Packages

- [`@monup/git`](../git/README.md): provides commit history and tags.
- [`@monup/changelog`](../changelog/README.md): usually runs after versioning.
npm package: @monup/workspace
Description: Workspace detection and package metadata for Monup.
Latest version: 0.2.1

# @monup/workspace

Workspace detection and package metadata for Monup.

## Workflow Role

`@monup/workspace` discovers the packages Monup should operate on before versioning, changelog generation, publishing, or release creation.

## Main Exports

- `detectPackages()`: detect packages in pnpm, npm, Deno, or single-package repos.
- `getPackageInfo()`: look up one detected package.
- `updatePackageVersions()`: write version updates across detected packages.
- `registerDetector()`: add custom workspace detectors.
- `PackageInfo`: shared package metadata used across Monup packages.

Each logical package has a canonical `packageFile`, and may also expose `packageFiles` when multiple manifests map to the same package path.

## Example

```ts
import { detectPackages, getPackageInfo } from '@monup/workspace';

const packages = await detectPackages();
const pkg = await getPackageInfo('@my/package');
```

## Related Packages

- [`@monup/version`](../version/README.md): updates manifest versions for detected packages.
- [`@monup/release`](../release/README.md): publishes one target per manifest when needed.