-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
simplify dependencies #159
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This package was only used once, and incorrectly. is-boolean-object checks whether the input is `true`, `false` or an object created with the `Boolean` constructor. I doubt that this last case was really intended and properly supported since the Typescript type is `boolean` (so, only true/false) and the only code that uses the boolean is this one: ```ts if (useWrapWord) { ``` however, `if (new Boolean(false))` yields `true`.
This library checks whether the input is a number or a Number object (i.e. created with `new Number(5)`). I never saw anyone using the latter syntax, and I'm not sure the 17+kB-and-10-files dependency is really useful. This is a breaking change since `new Number(5)` will not be allowed anymore for column width. Does anyone really do that? This change is in line with the typescript type annotations for the width, which only allow `number`s to be provided.
The package tests whether the input is a string or a string object (i.e. created with `new Object('hello')`). I'm not sure we should support the latter syntax, especially since the string is passed to string-width, which explicitely returns 0 if `typeof` doesn't return `string` : https://github.com/sindresorhus/string-width/blob/89eb79aafd2b7db982dc1f5498424232d55dee53/index.js#L6 This is a breaking change in the strict sense, because the behavior would change if such "string-object" was indeed passed as a value, but that would result in an empty cell, so that probably doesn't matter and avoids a dependency on a 16+kB and 10 files
Closed
Pull Request Test Coverage Report for Build 302
💛 - Coveralls |
🎉 This PR is included in version 6.3.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
nam-hle
pushed a commit
to nam-hle/table
that referenced
this pull request
Apr 23, 2021
* Removed usage of is-boolean-object This package was only used once, and incorrectly. is-boolean-object checks whether the input is `true`, `false` or an object created with the `Boolean` constructor. I doubt that this last case was really intended and properly supported since the Typescript type is `boolean` (so, only true/false) and the only code that uses the boolean is this one: ```ts if (useWrapWord) { ``` however, `if (new Boolean(false))` yields `true`. * Removed `is-number-object` dependency This library checks whether the input is a number or a Number object (i.e. created with `new Number(5)`). I never saw anyone using the latter syntax, and I'm not sure the 17+kB-and-10-files dependency is really useful. This is a breaking change since `new Number(5)` will not be allowed anymore for column width. Does anyone really do that? This change is in line with the typescript type annotations for the width, which only allow `number`s to be provided. * Removed the dependency on `is-string` The package tests whether the input is a string or a string object (i.e. created with `new Object('hello')`). I'm not sure we should support the latter syntax, especially since the string is passed to string-width, which explicitely returns 0 if `typeof` doesn't return `string` : https://github.com/sindresorhus/string-width/blob/89eb79aafd2b7db982dc1f5498424232d55dee53/index.js#L6 This is a breaking change in the strict sense, because the behavior would change if such "string-object" was indeed passed as a value, but that would result in an empty cell, so that probably doesn't matter and avoids a dependency on a 16+kB and 10 files * Removed unused dev dependencies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR helps reducing the number of packages downloaded and installed on a project,
when this repository is used directly or indirectly (through eslint for example).
Each commit contains a rationale about each change:
is-number-object
dependencyis-string