# Test local package changes

Use Yalc when developing Megamono packages across repositories.


This guide is for contributors and teams testing unpublished package changes. For normal use, install Megamono from your configured package registry; you do not need Yalc.

## Use a local publication

After publishing the packages you are developing to your local Yalc store, select that source when running a supported command:

```sh
megamono adopt --survey --format=json --local-packages=yalc
```

Yalc copies built packages into the consuming repository. It does not link directly to live TypeScript source, so rebuild and publish after changing a package.

## Check what is installed

```sh
megamono diagnostics packages --json
```

Use diagnostics when the consumer still behaves like an older build. A Yalc push updates the local package copy; run the consumer's package-manager install when needed to refresh `node_modules`. Include the package's required dependencies, not just the package you edited.

Keep using the consumer's established Node version, package manager, and package store. Avoid deleting its dependency tree just to work around a store mismatch.

## Prepare for CI and deployment

An ignored `.yalc` directory is not present in a fresh checkout. Before deploying, select a reproducible dependency source, update references and the lockfile, and test a clean installation.

Keep registry credentials outside source control. Run the release checks to identify package sources that are unsuitable for release:

```sh
megamono health --profile=release
```

For the usual workflow, return to [adopting a workspace](/docs/workflows/adoption) or [creating one](/docs/cli/create-megamono).
