Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d3 7.9.0 #2020

Merged
merged 5 commits into from
Mar 12, 2024
Merged

d3 7.9.0 #2020

merged 5 commits into from
Mar 12, 2024

Conversation

mbostock
Copy link
Member

No description provided.

@mbostock mbostock requested a review from Fil March 12, 2024 22:34
@Fil
Copy link
Contributor

Fil commented Mar 12, 2024

Should we not bump this dependency to 7.9.0? To guarantee d3.schemeObservable10?

"dependencies": {
"d3": "^7.8.0",

@Fil
Copy link
Contributor

Fil commented Mar 12, 2024

The 5 tests that change are expected (and welcome… better geo circles).

@Fil
Copy link
Contributor

Fil commented Mar 12, 2024

I'm still unsure if this works!?

in a notebook if I try to import 031cecf:

Plot = import("https://esm.sh/gh/observablehq/plot@031cecfb4de3863403dd7ec67db4c48219de415b")

it errors like so:

Plot = SyntaxError: The requested module '/v135/d3@7.9.0/es2022/d3.mjs' does not provide an export named 'schemeObservable10'

That's because esm.sh is content with using export*from"/v135/d3-scale-chromatic@3.0.0/es2022/d3-scale-chromatic.mjs for d3@7.9.0. Should d3 now ask for ^3.1.0?

@mbostock
Copy link
Member Author

Oh, yeah, that’s probably a bug.

@mbostock
Copy link
Member Author

Well, hold on, that’s always true of D3’s package.json. So I think that’s just an esm.sh issue.

@Fil
Copy link
Contributor

Fil commented Mar 12, 2024

This is a bit over my head… 🤷🏼
I still don't see how one can make sure when upgrading Plot that d3-scale-chromatic@3.1 is here (I mean, for non-yarn users, who are upgrading d3… probably not a best practice).
Manually: yarn upgrade d3 isn't enough if the requirement for d3-scale-chromatic is already satisfied by a 3.0.0; I needed yarn upgrade d3 d3-scale-chromatic to ensure the new symbol was there.

Copy link
Contributor

@Fil Fil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've also tested with Framework: /_npm/d3@7.9.0/+esm.js references the correct version of scale-chromatic.

@mbostock
Copy link
Member Author

Relevant history is d3/d3#3256.

@mbostock mbostock merged commit 5e65ac6 into main Mar 12, 2024
1 check passed
@mbostock mbostock deleted the mbostock/d3-7.9.0 branch March 12, 2024 23:47
@Fil
Copy link
Contributor

Fil commented Mar 12, 2024

interesting! I think the answer to my question is https://classic.yarnpkg.com/en/docs/selective-version-resolutions/#toc-how-to-use-it

  "resolutions": {
    "d3-scale-chromatic": "^3.1.0"
  },

(still only for yarn users, though)

@juba
Copy link
Contributor

juba commented Mar 15, 2024

I think I encountered the same problem. I updated Plot and d3 to 0.6.14 and 7.9.0 for my pyobsplot package, but d3-scale-chromatic stayed at 3.0.0, provoking the same error:

SyntaxError: The requested module 'd3' does not provide an export named 'schemeObservable10'

I fixed it by (temporarily) adding a direct dependency to "d3-scale-chromatic": "^3.1.0" in my package.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants