That's a fantastic question.
It's not ready yet, but we're hoping to roll out import pinning for notebooks soon.
Each notebook is versioned — every time you make a change and re-run the cell, a version is saved to the server. And every time you publish, that's a publication of a specific version of the notebook.
Our plan is to pin the version of any code you import from outside the notebook, including require(npm-module), import {value} from "other-notebook", and even the version of the Observable standard library that was current when you wrote the notebook.
Hopefully, that should provide a good foundation for robust notebooks that don't break as libraries change over time. Of course, you'll be able to re-pin a new version if you want to upgrade something.