Check and update components
These CLI commands compare your copies with the source bundled in @blotch/dolan, and merge its changes in. See Where updates come from.
list
Shows each installed component with its status and file count.
Alias: ls. Only folders named after a known component count, so your own folders are ignored.
A component is also a conflict when:
- you edited a file the bundled source no longer has, or
- dolan has no hash for a file that differs.
A file the bundled source no longer has counts as a change. It's still in your app until update deletes it. list names it under its component:
diff
Prints how your copy of a component differs from the bundled source.
- With a name, it prints every file that differs from the bundled source.
- Lines starting with
-are yours, and lines starting with+are upstream. - A file the bundled source no longer has shows every line with
-, sinceupdatedeletes it.
- Lines starting with
- Without a name, it lists the changed components and asks which to show. Without a terminal, it shows them all.
outdated
Lists the installed components that aren't up to date. It exits 1 if there are any, so a CI job can fail on it.
- It uses the statuses above.
- Components you edited count as well.
- So do components with a file the bundled source no longer has. It names the file as
listdoes.
update
Merges the bundled source into every installed component, file by file.
Conflicts
- No hash means conflict. A file with no recorded hash that differs from upstream is a conflict.
- Theme files are the exception.
initin 22.2.3 and earlier didn't record their hashes. - So a theme file that's still exactly as one of those releases shipped it counts as unchanged.
- Theme files are the exception.
- You're asked about a conflict once. After you choose, the lockfile records the new upstream hash. If you kept your version, the file shows as modified until upstream changes again.
- Without a terminal, conflicts wait for you.
updateapplies the auto-updates and exits with code 1.- It leaves each conflict's file and lockfile hash as they were, so the next
updatein a terminal asks about them. - Keeping your version instead would record the upstream hash, and you'd never be offered that change again.
--forcetakes upstream's version of every conflict.
- It leaves each conflict's file and lockfile hash as they were, so the next
What else it does
- Files the bundled source no longer has are deleted, along with their lockfile entries. For example, 22.2.3 stopped copying the
*-render.test.tsfiles.- If you keep one you edited, it's yours: dolan stops tracking it.
- Until then,
list,diffandoutdatedreport the component as changed.
- Ejected components are left alone.
update,list,diffandoutdatedonly look at the components indolan.lock.json. Seeeject. - New dependencies are added. If a component's new version needs another component,
updatecopies it in. - npm packages are installed the same way
adddoes.
Theme files
- They're merged the same way. That's
default.css,dark.css, andtailwind.cssortailwind-plugin.ts, withtailwind-plugin.test.tswhen you have the testing library. - Themes you made with
themearen't merged. - The theme follows a move between Tailwind versions. After a move to Tailwind 4,
updatecopiestailwind.css. It deletestailwind-plugin.tsand its test by the rules above:- Unchanged, they go with the other changes.
- Edited, it asks.
- A move back to Tailwind 3 swaps them the other way.
A plugin from an older init counts as unchanged while it's exactly as that release shipped it. That's an init from 22.2.3 or earlier. If you edited one of those, update can't tell it was dolan's and leaves it, and doctor warns about it.
Related
- CLI:
init,theme,doctor, and how dolan works without a terminal - Add and remove components:
add,info,removeandeject - UI Components: install dolan and add your first component
- Theming: the theme files
initcopies - Tailwind CSS: required by every component
