-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[RFC] What constitutes a breaking change? #249
Comments
Part of this discussion should include this ember-cli-typescript/blueprints/ember-cli-typescript/index.js Lines 127 to 132 in 90d18f0
We're currently installing other libraries into apps with |
Has anyone seen examples of how the In the absence of a perfect option, I'd lean on established conventions from elsewhere, if we can find any. |
See also previous discussion around our notion of semver etc. in #190. We mostly didn't cover types there, just TS itself and Ember and our own stability aims, but it's worth noting that the discussion does indeed exist. |
@chriskrycho as you indicate, this issue didn't cover versioning ambient types much. I do like the sentiments you all express there, many of which can be applied to types My interest is to prevent/mitigate one thing: A developer cannot make a seemingly innocuous change in dependencies (i.e., a In theory everything that's supported in Ember 2.0.0 should remain supported in Ember 2.999.999. If you're stuck on Ember 2.0.0, having types that describe newer minor versions ahead of you should not be a big problem. If we decide to match the major version of Ember, any If we decide to match the Ember major release digit, we still have patch/minor to play with. Minor releases typically indicate new features -- as I see it, this not really a thing in the world of ambient types. We are just striving to perfectly describe a piece of code -- there no features, only fixes. I'd like us to consider the following 2 // Tracking the ember@2 releases
.
1 // Breaking change since @types/ember@2.0.x
.
2 // Non-breaking change since @types/ember@2.1.0 This will let us do the following things
|
Agreed that this is the key criterion we need to meet. It's similarly a big deal for addons that test with unlocked dependencies in CI (which is the default), since they'll always get the latest in-range version of their I like the scheme you're proposing @mike-north — being able to track the source package's major version (be it In this world, what's the ideal behavior of the |
Going back to the principle expressed by @chriskrycho in #190
I see an update of We shouldn't be encouraging developers to re-run the install blueprint in any addon as a "non-breaking upgrade" mechanism With that in mind, here's how we may want to answer your question
It should
This should result in the following experience
|
If there are no objections, I'm going to document the above plan and apply it to the pending |
I'm 👍 on the plan. The generator behavior we're after might be a little finicky (I'm not aware of a single-pass way to both resolve the latest version of a package and set a |
@dfreeman part of closing this out will involve writing a vanilla node module to expose utilities to help make decisions about explicitly upgrading a dependency (or not). I want us to write a crazy number of unit tests around a pure function to ensure the blueprint does what we want it to. |
100% in favor of the “write a crazy number of tests” plan and 👍🏼 on all of this more generally. Thanks for taking this on! |
The behavior we've agreed to above is now packaged into a npm module, which does all the analysis and comparison and will feed us a POJO with info to act on https://github.com/mike-north/typever {
lib: { name: 'commander', target: '^2.17.1', version: '2.17.1' },
types: {
recommendedTarget: '~2.12.2',
name: '@types/commander',
target: '^2.12.2',
version: '2.12.2'
},
result: {
compatibility: 'warn',
reason:
'Type library target of "^2.12.2" will allow your app to take in breaking changes.\nThis is the SemVer equivalent of { "@types/commander": "*" }',
suggestion:
'Update package.json with dependency { "@types/commander": "~2.12.2" }'
}
} |
It feels like we have consensus here. I'll close this in a couple of days and open PR(s) to put the plan into action |
@mike-north what's the status on this one? I don't recall seeing the typever stuff land here at all, and if so that's obviously fine; we've all been super busy 😂 – I just noted it as I was going back through issues for basic triage. |
We've been manually enforcing the TypeVer strategy. Haven't had a chance to do the work to consume the library in this package yet, but that's the easy part tbh |
Resolved over the course of 2022–2023 via the combination of:
Thanks again to everyone who helped make that happen. 🎉 |
Because of #246 / DefinitelyTyped/DefinitelyTyped#28282 we've hit a point where we have to think about how SemVer, library version and the Ember/TS version support policy interact.
TL;DR - a feature was added to TS 3.1 nightly builds which caused
@types/ember
to break. TypeScript regards their change as non-breaking, and thus appropriate for a minor release.However -- to get things working in
@types/ember
, we've had to use TypeScript 2.8 features. In a sense, we've definitely broken things for someone who's using TypeScript 2.4. There are a variety of packages that depend on@types/ember
that will need to be bumped up before we can merge in the fixI believe some options to discuss are
(1) Bump everything up, and encourage everyone to start using TypeScript 2.8 (this is what the PR currently does)
(2) Take the current types, put them in a
/v2
folder, and alter all the dependencies such that they point to/v2
. After nothing depends on the v2 types, merge in the fix as the first commit of av3
release seriesThe text was updated successfully, but these errors were encountered: