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
3.0.1 is a breaking change #163
Comments
I'll let @defunctzombie weigh in on this, but IMHO (and the opinion of everyone in my office I just surveyed) files are not part of the programming interface. Static structure != dynamic behavior. "API" refers to the latter, not the former. |
certainly. but forgetting about the file structure, this worked in 3.0.0:
and now it does not. |
Might be because main got deleted from package file. We need to put that
back. The standard require form should continue to work and it was not
intent to break that.
…On Wed, Nov 30, 2016 at 3:15 PM navels ***@***.***> wrote:
certainly. but forgetting about the file structure, this worked in 3.0.0:
const uuid = require('uuid');
and now it does not.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#163 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFLOH6veO_LFEF99xHHbYMW9ZNJaBW2ks5rDgOHgaJpZM4LAgtC>
.
|
Uh... that still works. Doesn't it?
|
Also, node documents that {module}/index.js is part of the baseline module loading logic. See Step #2 under LOAD_AS_DIRECTORY, per https://nodejs.org/api/modules.html#modules_all_together So... what exactly are we doing wrong here? I get that providing a |
See yarnpkg/yarn#2072. I'm not sure why your repro succeeds and our builds are failing. My workaround is to shrinkwrap our yarn installation so that we pull in uuid 3.0.0. . . . time passes . . . What's more, I can no longer reproduce our build failure using 3.0.1. Maybe we just blame it on cache. |
@broofa Agreed with your assessment. In my experience index.js is picked up as the canonical entry point for the module when no other main is specified. It is possible that someone had On a related note, I personally don't have much sympathy for packages broken because they used ~ or ^ in their version specifiers for dependencies which I consider worse than an anti-pattern for node modules but that aside, we should still be good module citizens and make this simple fix on our end to ease the pain of those that have not yet learned the right lessons ;) |
Hmm interesting, I wonder if something else caused yarnpkg/yarn#2072 then. Do you have any ideas?
Having said that, this is one of the major reasons for using Yarn rather than npm - It enforces the usage of a lockfile, which locks in the version numbers of all packages including transitive dependencies. With npm you can use |
Compatible with API/ABI doesn't actually mean bug compatible. Often engineering is done not just to the interfaces but to the actual observed behavior provided by those interfaces and when that changes even in the slightest (which can happen with dynamic languages with even just a change from |
The failure in this case was in the request package used by yarn. Its package.json declares
and it fails with
at this line in auth.js:
I'm now back to being able to reproduce the error, but not by running node interactively. Will keep digging... |
Indeed, appears to have been a caching problem :) |
I am going to close this. Yes, 3.0.1 is by some definition a breaking change but not for anyone who used our documented |
See yarnpkg/yarn#2072
Version 3.0.1 should probably really be 3.1 as it changes the public API by renaming a file. This is not a patch release as per semver.
The text was updated successfully, but these errors were encountered: