Skip to content
||RSS|TIL

Today I Learned

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

2026

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

    #pnpm

    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:

    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

    #git

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

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