aurelia / dependency-injection

A lightweight, extensible dependency injection container for JavaScript.
MIT License
160 stars 66 forks source link

dependency-injection 1.5.0 incompatible to aurelia-validation 1.4.0 #183

Closed BlischkeFlorian closed 5 years ago

BlischkeFlorian commented 5 years ago

After a fresh npm install my au build is failing due to problems with the compatibililty of the .d.ts files of aurelia-validation 1.4.0 and aurelia-dependency-injection 1.5.0

.../node_modules/aurelia-validation/dist/aurelia-validation.d.ts(436,6): error TS2707: Generic type 'Lazy<TBase, TImpl, TArgs>' requires between 1 and 3 type arguments.
EisenbergEffect commented 5 years ago

@DrSammyD Do you think you would be able to help out with this?

EisenbergEffect commented 5 years ago

For now, I recommend reverting to 1.4.0. See the release notes on 1.5.0 which indicate there may be some incompatibilities for TS users. @DrSammyD Can we introduce default type parameter values to address this?

BlischkeFlorian commented 5 years ago

I think, this version indicates breaking changes. Because of that in semver like versioning it should be version 2.0.0. What do you think? @EisenbergEffect

EisenbergEffect commented 5 years ago

It's a tricky issue, but we can't pull it and change the version now.

We did have a discussion on this topic on the original PR that improved the typings. Last time we did a major version bump it caused far-reaching issues for several months afterwards (which we thought were probably worse than a potential d.ts break on a minor release). Also, this wasn't a change in any behavior, nor was it a change that affected any standard JavaScript developers. We thought the types were constructed to be backward compatible for TS users (obviously we missed some things). So, all those things combined, and we thought a minor bump would be ok.

@BlischkeFlorian I apologize for the inconvenience. We'll try to make some fixes/improvements, and get another release out soon. Hopefully @DrSammyD and @bigopon can assist.

We'll refrain from doing this sort of change going forward. For Aurelia 2 we've got a monorepo and a number of systems already in place that will help to prevent these types of surprises.

DrSammyD commented 5 years ago

We can add the default generics or take advantage of it to update other repos' less precise typings. e.g. https://github.com/aurelia/validation/pull/533

BlischkeFlorian commented 5 years ago

totally agree. You're deeper in the framework. Can we bring this live on npm? @DrSammyD

EisenbergEffect commented 5 years ago

Merged the validation PR. I'll aim to get that released today.

BlischkeFlorian commented 5 years ago

@EisenbergEffect any update on releasing plan for this?

EisenbergEffect commented 5 years ago

I'm going to have to get to it tomorrow (Friday).