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

Convert more things to TS #91

Merged
merged 2 commits into from
Jun 11, 2019
Merged

Conversation

emmatown
Copy link
Member

Mostly things from #83

@emmatown emmatown requested a review from Noviny June 11, 2019 03:45
@changeset-bot
Copy link

changeset-bot bot commented Jun 11, 2019

🦋 Changeset is good to go

Latest commit: 4923a32

We got this.

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

@codecov-io
Copy link

Codecov Report

Merging #91 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #91      +/-   ##
==========================================
+ Coverage    83.2%   83.23%   +0.02%     
==========================================
  Files          31       31              
  Lines         810      811       +1     
  Branches      145      144       -1     
==========================================
+ Hits          674      675       +1     
  Misses        125      125              
  Partials       11       11
Impacted Files Coverage Δ
packages/get-workspaces/src/index.ts 96.29% <ø> (ø) ⬆️
packages/cli/src/utils/constants.ts 100% <ø> (ø) ⬆️
...i/src/utils/bolt-replacements/getDependencyInfo.ts 100% <ø> (ø)
...utils/bolt-replacements/versionRangeToRangeType.ts 100% <ø> (ø)
.../src/utils/bolt-replacements/getDependentsGraph.ts 100% <100%> (ø)
.../src/utils/bolt-replacements/getDependencyGraph.ts 90.62% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc2f006...4923a32. Read the comment docs.

Copy link
Collaborator

@Noviny Noviny left a comment

Choose a reason for hiding this comment

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

Ell Gee Tee Emm

export default function versionRangeToRangeType(versionRange) {
export default function versionRangeToRangeType(
versionRange: string
): "^" | "~" | "" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unrelated question: we talk about rangeType here, BUT we only support 3 of the [many] types. This hasn't burned us so far, but probably will at some point? Is it worth us trying to proactively fix this?

Copy link
Member Author

Choose a reason for hiding this comment

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

We might want to improve it but we physically can't handle every case and other types generally aren't used that often so it's probably not something we should spend much time on.

From https://yarnpkg.com/lang/en/docs/cli/upgrade/#toc-yarn-upgrade-package-latest-l-caret-tilde-exact-pattern

The package.json file will be updated to reflect the latest version range. By default, the existing range specifier in package.json will be reused if it is one of: ^, ~, <=, >, or an exact version. Otherwise, it will be changed to a caret (^).

I think if we had the same behavior as yarn, that would probably work well.

@Noviny Noviny merged commit d4bbab4 into master Jun 11, 2019
@Noviny Noviny deleted the mitchellhamilton/more-things-to-ts branch June 11, 2019 05:52
dword-design pushed a commit to dword-design/changesets that referenced this pull request Feb 8, 2020
* More things to TS

* Add changesets
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

3 participants