# Today I Learned — Daine Mawer

> Short notes on things I learned this week — a problem, and the fix.

2 notes, newest first. Each is complete here; the link under its title is its own page.

## pnpm --filter takes the package name, not the directory

Published 2026-10-09. https://www.dainemawer.com/til/pnpm-filter-uses-package-name.md

In a pnpm workspace, `pnpm --filter` matches the `name` field in a package's `package.json`, not the folder it lives in.

In this repo the blog lives in `apps/blog`, but its package is called `blog`:

```bash
pnpm --filter blog dev
```

`pnpm --filter apps/blog dev` matches nothing and quietly does nothing, which is easy to mistake for a hung dev server.

## git switch - jumps back to the previous branch

Published 2026-10-08. https://www.dainemawer.com/til/git-switch-dash.md

`git switch -` returns to whichever branch you were on before, the same way `cd -` does for directories.

```bash
git switch feat/til
git switch main
git switch -   # back on feat/til
```


---

Canonical HTML: https://www.dainemawer.com/til
Markdown index: https://www.dainemawer.com/index.md · Agent guide: https://www.dainemawer.com/agents.md · [llms.txt](https://www.dainemawer.com/llms.txt)
Attribution: Daine Mawer — https://www.dainemawer.com/about