Peirce Quincunxial notebook broken?

There is an error with the d3 import at @mbostock’s notebook here,

“SyntaxError (DOM Exception 12): The string did not match the expected pattern.”

Specifically it doesn’t like the question mark at the end of d3 = require("d3-fetch@1", "d3-geo@1", "d3-geo-projection@2?"). I’m not sure if that was previously allowed and an Observable update broke it, or if the notebook got accidentally updated? I’m pretty sure this notebook used to work though.

@jrus — It’s currently working for me. What browser are you having the trouble in?

I suspect you meant to link to this fork by @ingenieroariel of that notebook. In any case, as you point out, removing the question mark makes it work.

Did Mike just fix it really quickly? Or am I going nuts? It was broken for me in Firefox, Chrome, and Safari. I’m pretty sure there was a (now-removed) question mark.

Actually, it looks like you’re right! Using the API described here, compare the entries in nodes with id=3 of version 357 (the current version of the notebook) and version 356. Earlier versions seem not to be public.

Interestingly, for both versions, the field publish_time returned by the API gives the same time on Dec 17, 2017 so it can’t tell us when the update was made. However, it’s now reasonable to reinterpret the question mark in the fork I linked in my previous post. It’s not that you were accidentally looking at the wrong notebook, but rather that that notebook contains the question mark since it was a fork of version 356! That fork was created Mar 7, 2018, so this suggests that the change to the original notebook occurred after then.

It’s possible that the require statement used to secretly allow a question mark and that this was later removed. If you dig through the commits to notebook-stdlib and d3-require you might find the answer…

You’re not crazy. :stuck_out_tongue_winking_eye: I removed the offending question mark after reading your post. (Sorry for not replying—I’ve been traveling.) I suspect I broke something in a recent release of d3-require.