Importing functions between notebooks - breaking changes?

To give an example, here’s an example of an unpinned import that (currently) fetches the latest version of a notebook:

import {slider} from "@jashkenas/inputs"

Here’s an equivalent pinned import that locks the current version of Jeremy’s inputs notebook:

import {slider} from "@jashkenas/inputs@750"

Currently you have to do a little digging in the developer console to discover what the latest published version is. In the future, we’d like automatic pinning where Observable magically rewrites imports of the unpinned form into the pinned form, thereby protecting you from breaking changes. And if you ever want to upgrade to the latest version of an imported notebook, you can simply delete the version number and re-run the import cell.

2 Likes