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

feat: remove fixed versions @lion and upgrade TSC #1603

Merged
merged 5 commits into from Feb 23, 2022
Merged

Conversation

jorenbroekema
Copy link
Collaborator

@jorenbroekema jorenbroekema commented Feb 2, 2022

What I did

  1. Upgrade some deps that were bothering me
  2. Unfix lion dependencies and use caret
  3. Lint-versions script allows carets and tildes now, but still requires always having the latest version number for internal dependencies
  4. Upgrade to latest TSC, fixed 120 or so type issues. Some of those had to be @ts-ignore'd due to how bad TS is with JS mixins, the maintainer himself mentioned this is a classic example of where you should @ts-ignore, so that also means is that we should tell our users that skipLibCheck in their TS configs is unavoidable. Hopefully TS becomes better at this stuff....

WIP, I'm going to run some tests with changesets to see what happens if:

  • @lion/core does a patch bump --> I expect no bumps anywhere else, because in the other places we now use ^ which means end users will get latest @lion/core with a fresh install of a dependent (let's say @lion/button), the patch bump is non-breaking and the dependents will be semver compatible
  • @lion/core does a breaking change minor bump --> I expect bumps everywhere else because this is a breaking bump and thus semver incompatible bump for dependents (e.g. @lion/button). Changesets should patch the button so that our users will get the latest core with the latest button (but not the @lion/button before the bump!). If the @lion/core change was actually breaking for @lion/button, of course since @lion/button is part of this repo we would manually bump @lion/button as we fix the breakage, if that fix leads to a breaking change in @lion/button, that will be a minor. Changesets only does a patch bump to ensure latest @lion/core can end up at the end user if they only consume e.g. @lion/button, which would otherwise never happen because the old @lion/button has @lion/core stuck at 1 minor before.

We should be seeing way less bloat in our changelogs with this, since we'll only need dependents to bump for semver incompatible bumps which are minors <1.0.0 and majors >1.0.0.

Broader discussion here: https://lit-and-friends.slack.com/archives/CJGFWJN9J/p1643202849020900 and also discussed at length with @tlouisse

@changeset-bot
Copy link

changeset-bot bot commented Feb 2, 2022

🦋 Changeset detected

Latest commit: b4f6395

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 38 packages
Name Type
@lion/accordion Minor
@lion/ajax Minor
@lion/button Minor
@lion/calendar Minor
@lion/checkbox-group Minor
@lion/collapsible Minor
@lion/combobox Minor
@lion/core Minor
@lion/dialog Minor
@lion/fieldset Minor
@lion/form Minor
@lion/form-core Minor
@lion/form-integrations Minor
@lion/helpers Minor
@lion/icon Minor
@lion/input Minor
@lion/input-amount Minor
@lion/input-date Minor
@lion/input-datepicker Minor
@lion/input-email Minor
@lion/input-iban Minor
@lion/input-range Minor
@lion/input-stepper Minor
@lion/listbox Minor
@lion/localize Minor
@lion/overlays Minor
@lion/pagination Minor
@lion/progress-indicator Minor
@lion/radio-group Minor
@lion/select Minor
@lion/select-rich Minor
@lion/steps Minor
@lion/switch Minor
@lion/tabs Minor
@lion/textarea Minor
@lion/tooltip Minor
@lion/validate-messages Minor
providence-analytics Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jorenbroekema
Copy link
Collaborator Author

I checked how changeset will deal with the non-fixed versions and my hypotheses were correct.

While reviewing, feel free to double check by running:

yarn changeset # do a patch for lion core, only core is bumped, do a minor for lion core, all other packages are bumped with patch
yarn changeset version # see the diff

@jorenbroekema
Copy link
Collaborator Author

@tlouisse this PR is basically ready but we still need to add a changeset.

In my opinion, unfixing the dependencies and upgrading to latest TSC, it's probably safe to say that this is bound to be a breaking change for someone at some point, do you agree doing a minor bump for all involved packages (that's basically everything in packages folder)? I don't think the TSC upgrade in providence is going to be breaking, no type issues there, so maybe a patch for that one?

@jorenbroekema jorenbroekema changed the title feat: remove fixed versions @lion feat: remove fixed versions @lion and upgrade TSC Feb 10, 2022
Copy link
Member

@gerjanvangeest gerjanvangeest left a comment

Choose a reason for hiding this comment

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

Looks good to me, but i believe @tlouisse also wanted to review

@jorenbroekema
Copy link
Collaborator Author

Added some rationale docs about versioning which we can link in our Slack channel when we release this
localhost_8000_docs_rationales_versioning_

@jorenbroekema
Copy link
Collaborator Author

Added some docs about TypeScript in our Rationale section as well which we can also link in the future when people ask questions about type issues etc.
localhost_8000_docs_rationales_TypeScript_

@tlouisse tlouisse merged commit ceea0aa into master Feb 23, 2022
@tlouisse tlouisse deleted the experiment-@lion branch February 23, 2022 13:55
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.

None yet

5 participants