MCPcopy
hub / github.com/antfu-collective/taze

github.com/antfu-collective/taze @v19.14.1 sqlite

repository ↗ · DeepWiki ↗ · release v19.14.1 ↗
192 symbols 559 edges 58 files 0 documented · 0%
README

🥦 Taze

(/ta:zei/, fresh in Persian)

A modern cli tool that keeps your deps fresh

npx taze

or recursively for monorepos

npx taze -r

Recursive mode

Features

  • Built-in support for monorepos
  • No installation required — npx taze
  • Safe by default — updates in the version range you are allowed

Usage

By default, taze will only bump versions in the ranges you specified in package.json (which is safe and the default behavior of npm install)

Default mode

To ignore the ranges, explicitly set the maximum allowed version change.

For example taze major will check all changes and bump to the latest stable changes including majors (breaking changes), or taze minor that bump to latest minor changes within the same major version.

Check for major updates

Major mode

Check up to minor updates

Minor mode

Check up to patch updates

Patch mode

Monorepo

taze has the built-in first-class monorepo support. Simply adding -r will scan the subdirectories that contain package.json and update them together. It will handle local private packages automatically.

Recursive mode default

Configuration

See taze --help for more details

Filters

You can filter out packages you want to check for upgrades by --include or --exclude; they accept string and regex, separated by commas (,).

taze --include lodash,webpack
taze --include /react/ --exclude react-dom # regex is also supported

Locked Versions

Locked (fixed version without ^ or ~) packages are skipped by default, use taze --include-locked or taze -l to show them.

Peer Dependencies

Bumping version in peerDependencies is not enabled by default. Pass --peer option to include them in the update process.

taze --peer

Maturity Period

By default the most recent version of a dependency is used. You may choose to filter to versions that have been out longer by passing --maturity-period.

taze --maturity-period

The filter when using the maturity-period flag is 7 days. You may also want to pass a day value to have a longer or shorter number of days.

taze --maturity-period 14

You can exclude packages from the maturity filter. This is also inferred from package manager config when available, such as minimumReleaseAgeExclude in pnpm-workspace.yaml and npmPreapprovedPackages in .yarnrc.yml.

taze --maturity-period-exclude react,webpack

If you want stable releases only while still honoring the maturity period, use stable mode.

taze stable --maturity-period 14

[!NOTE] This kind of filtering is sometimes called cooldown or minimumReleaseAge by other tools.

Config file

With taze.config.js file, you can configure the same options the command has.

import { defineConfig } from 'taze'

export default defineConfig({
  // ignore packages from bumping
  exclude: [
    'webpack'
  ],
  // fetch latest package info from registry without cache
  force: true,
  // write to package.json
  write: true,
  // run `npm install` or `yarn install` right after bumping
  install: true,
  // ignore paths for looking for package.json in monorepo
  ignorePaths: [
    '**/node_modules/**',
    '**/test/**',
  ],
  // ignore package.json that in other workspaces (with their own .git,pnpm-workspace.yaml,etc.)
  ignoreOtherWorkspaces: true,
  // override with different bumping mode for each package
  packageMode: {
    'typescript': 'major',
    'unocss': 'ignore',
    // regex starts and ends with '/'
    '/vue/': 'latest'
  },
  // exclude packages from the maturity period filter
  maturityPeriodExclude: [
    'react',
    '@myorg/*',
  ],
  // disable checking for "overrides" package.json field
  depFields: {
    overrides: false
  }
})

Alternatives

taze is inspired by the following tools.

They work well but have different focuses and feature sets, try them out as well :)

Thanks

Great thanks to @sinoon who helped a lot with idea brainstorming and feedback discussion.

License

MIT License © 2020 Anthony Fu

Extension points exported contracts — how you extend this code

SliceRenderLine (Interface)
(no doc)
src/render.ts
Options (Interface)
(no doc)
src/log.ts
RawDep (Interface)
(no doc)
src/types.ts
PackumentVersion (Interface)
(no doc)
src/utils/packument.ts
TerminalKey (Interface)
(no doc)
src/commands/check/interactive.ts
FlattenPkgData (Interface)
(no doc)
src/io/dependencies.ts
CheckEventCallbacks (Interface)
(no doc)
src/api/check.ts
PackageData (Interface)
(no doc)
src/types.ts

Core symbols most depended-on inside this repo

resolveDependency
called by 59
src/io/resolves.ts
getMaxSatisfying
called by 41
src/utils/versions.ts
detectMaturityPeriod
called by 26
src/utils/detectMaturity.ts
log
called by 24
src/log.ts
parseYarnDuration
called by 19
src/utils/detectMaturity.ts
getVersionRangePrefix
called by 17
src/utils/versions.ts
getDiff
called by 17
src/io/resolves.ts
CheckPackages
called by 16
src/api/check.ts

Shape

Function 156
Interface 27
Method 7
Class 2

Languages

TypeScript100%

Modules by API surface

src/io/resolves.ts18 symbols
src/types.ts16 symbols
src/render.ts13 symbols
src/log.ts13 symbols
src/commands/check/interactive.ts11 symbols
src/utils/detectMaturity.ts9 symbols
src/io/dependencies.ts8 symbols
src/utils/versions.ts7 symbols
src/commands/check/index.ts7 symbols
test/resolves.test.ts6 symbols
src/utils/packument.ts6 symbols
src/io/packageYaml.ts6 symbols

Dependencies from manifests, versioned

@antfu/eslint-configcatalog:dev · 1×
@antfu/nicatalog:prod · 1×
@antfu/utilscatalog:inlined · 1×
@henrygd/queuecatalog:prod · 1×
@posva/promptscatalog:inlined · 1×
@taze/not-exists4.13.19 · 1×
@types/cli-progresscatalog:types · 1×
@types/debugcatalog:types · 1×
@types/lodash4.14.0 · 1×
@types/nodecatalog:types · 1×
@typescript/lib-dom
ansiscatalog:inlined · 1×

For agents

$ claude mcp add taze \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact