Releases: QuiiBz/sherif
v1.0.2
What's Changed
Full Changelog: v1...v1.0.2
v1
v1.0.1
What's Changed
- fix: sort
multiple-dependency-versions
for pre-release versions by @QuiiBz in #96 - fix: make sure bun is detected even when yarn.lock file is present by @baptisteArno in #99
New Contributors
- @baptisteArno made their first contribution in #99
Full Changelog: v1.0.0...v1.0.1
v1.0.0
New unordered-dependencies
rule
Dependencies should be ordered alphabetically to prevent complex diffs when installing a new dependency via a package manager. This rule is auto-fixable with --fix
:
Automatically run your package manager's install
command when autofixing
When running Sherif with --fix
, your lockfile might need to be refreshed (e.g. when a dependency version is updated, or moved from normal dependencies
to devDependencies
). Sherif will now automatically run your package manager's install
command for you.
Your package manager is auto-detected based on its lockfile - if none is found, Sherif will ask you to choose one. The following package managers are supported:
- NPM
- PNPM
- Yarn
- Bun
This feature is disabled in CI environments, and can be disabled with the --no-install
flag.
Support nested packages in the workspace using **
Sherif now supports expanding packages defined in the workspace using **
. For example, packages/**/*
is now a supported syntax:
{
"name": "example-workspace",
"workspaces": [
"packages/*", // already supported
"packages/**/*" // new!
]
}
What's Changed
- fix: nested ignored packages by @QuiiBz in #91
- feat: expand nested packages by @QuiiBz in #92
- feat: new
unordered-dependencies
rule by @QuiiBz in #94 - feat: automatic package manager
install
when autofixing by @Willem-Jaap in #71
Full Changelog: v0.11.0...v1.0.0
v0.11.0
Ignore a specific dependency and version
Let's say your monorepo has two versions of react: 18.3.1
and 19.0.0
. One of your application is expected to use the new react 19.0.0
, but you still want to make sure you keep the same react 18.*
version on all your other applications
Previously, you had to ignore completely the react
dependency from the multiple-dependency-versions
rule, which means you would completely loose track of potentially different react 18.*
versions:
sherif -i react
But now, you can ignore a specific set of dependency and version, so the multiple-dependency-versions
rule will keep detecting any other react version and alert you:
sherif -i react@19.0.0
Report dependency versions mismatch with the root package.json
Previously, Sherif didn't check the multiple-dependency-versions
in the root package.json
. It now does, meaning you can deduplicate more dependency versions if they are present in both a package in a workspace, and the root package.json
.
What's Changed
- feat:
multiple-dependency-versions
also checks root package by @QuiiBz in #82 - feat: allow ignoring specific dependency and version for
multiple-dependency-versions
by @QuiiBz in #84 - docs: fix typo in README by @Willem-Jaap in #85
- feat: upload binaries on release by @QuiiBz in #72
New Contributors
- @Willem-Jaap made their first contribution in #85
Full Changelog: v0.10.0...v0.11.0
v0.10.0
What's Changed
- feat: preserve newline with
--fix
by @QuiiBz in #75 - feat: improve multiple-dependency-versions fix style by @QuiiBz in #76
- fix: grammatical error in
packages-without-package-json
by @tyleralbee in #77
New Contributors
- @tyleralbee made their first contribution in #77
Full Changelog: v0.9.0...v0.10.0
v0.9.0
v0.8.4
v0.8.1
v0.8.0
Preserve the JSON indentation on autofix
If you're using a formatter (e.g. Prettier) for your package.json
files, you might have noticed that Sherif ignores the indentation and always uses two spaces. This is no longer the case and Sherif will automatically detect and use the correct indentation (2 spaces, 4 spaces, tabs) when autofixing issues!
Yarn nohoist workspaces
We now support the Yarn nohoist workspaces configuration, where the root package.json
's workspaces
field looks like:
"workspaces": {
"packages": ["packages/*"],
"nohoist": []
}
Misc
- The
multiple-dependency-versions
will now also report duplicated versions inpeerDependencies
- Reduce the binary size by half
What's Changed
- perf: reduce binary size by @QuiiBz in #48
- feat(multiple-dependency-versions): report
peerDependencies
by @QuiiBz in #50 - chore: update ignoring with star example by @QuiiBz in #52
- fix: clippy warnings by @QuiiBz in #55
- feat: preserve JSON indentation by @QuiiBz in #56
- feat: support Yarn nohoist workspaces by @QuiiBz in #57
Full Changelog: v0.7.0...v0.8.0