-
Notifications
You must be signed in to change notification settings - Fork 53
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
Apparent breaking change(s) in non-breaking release #64
Comments
d3-dispatch 1.0.6 added error checking for the type names passed to d3.dispatch. This revealed a bug in d3-brush where the brush function itself was being erroneously passed to d3.brush; this bug was fixed in d3-brush 1.1.4. The second change you’re describing was included in d3-scale 2.2.0 (#113 #117). The behavior of a scale with a collapsed domain was previously not defined, so this change defined it as returning the midpoint of the range rather than the start. In general, semantic versioning only means that supported behaviors continue working as defined in patch (and minor) releases. In both of these cases, the previous behaviors were neither intended or documented; they just happened to fall out of the existing implementation. I make a best effort to define what behaviors are supported in documentation (and verify said behavior in tests), but I’m not perfect, and there is undoubtedly other unsupported edge case behavior that may change over time. The only way to ensure that unsupported behaviors don’t change is to pin exact versions. If you’d like to contribute documentation to the README to better define supported behaviors, that would be welcome! |
I've got the same using d3-brush version 1.1.5 `client.js?06a0:77 Error: illegal type: function brush(group) {
} |
I ran into a similar issue on a big project that still uses D3 V4.11.0 - .lock file got deleted and a reinstall generated this issue - Long story - I found that yarn didn't work and npm install did work - For me the issue was with how peer dependency installs and resolve work with Yarn. I added this to my package.json
And it fixed |
d3 doesn't have a clearly stated breaking change policy so I have to assume you're following semantic versioning and breaking changes in non-major releases are unexpected. I understand that some of the versions I'm mentioning are old -- I do not expect support for them but I also expect them not to have breaking changes without clearly documented major version releases.
I've run into two changes.
1
Running the following:
Using the following versions:
Raises:
This issue didn't exist with the same versions as of Dec 9th or 10th. This could have been the result of a browser change but it seems unlikely as I'm using an older version (Chrome 77.0.3865.120, macOS Version 10.14.6).
2
Running the following versions:
addresses the above issue without any major version changes.
It does result in a new change though. When drawing lines with the following and d3-shape.line:
The line is drawn through the center of the svg area (at height/2) when all data points are 0. When some data is > 0 any 0 data points are drawn at the bottom of the svg. This is inconsistent with the behavior while using the previous version configuration before the brushY issue appeared, where 0 would always be drawn at the bottom.
The text was updated successfully, but these errors were encountered: