-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Fix Lodash isArray deprecation #205
Conversation
🎉 Generated by 🚫 dangerJS |
Codecov Report
@@ Coverage Diff @@
## master #205 +/- ##
===========================================
+ Coverage 0% 64.93% +64.93%
===========================================
Files 4 32 +28
Lines 104 733 +629
Branches 16 102 +86
===========================================
+ Hits 0 476 +476
- Misses 104 257 +153
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -114,7 +113,7 @@ export default async function gitDSLForGitHub(api: GitHubAPI): Promise<GitDSL> { | |||
// added or removed. This makes it really easy to act on specific | |||
// changes to JSON DSLs | |||
|
|||
if (isarray(diff.after) && isarray(diff.before)) { | |||
if (Array.isArray(diff.after) && Array.isArray(diff.before)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be safe using the native Array.isArray()
instead of that deprecated lodash package. 👍
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "danger", | |||
"version": "0.14.1", | |||
"version": "0.14.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you revert this change please? Unless we are good to ship this in a patch release - cc @orta
|
||
### 0.14.1 | ||
|
||
* Moved `@types/chalk` from dependencies to devDependencies - orta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, I think this was shipped in 0.14.1.
@@ -4,10 +4,11 @@ | |||
|
|||
### 0.14.2 | |||
|
|||
* Moved `@types/chalk` from dependencies to devDependencies - orta | |||
* Replaced deprecated `lodash.isarray` package with `Array.isArray` - damassi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking for confirmation from @orta on shipping 0.14.2 or holding off on it for anything else to keep this changelog message here. Otherwise we usually add changelog messages right below the // Add your own contribution below
line and then add the version number we are shipping to the changelog as we package up a release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see -- danger
said to update the changelog and so I followed the format as it was there. It might be good to provide a little more direction in terms of version numbers, changelog, etc.
Forgot to add, Danger commented on the PR requesting that |
Updated and rebased. It's odd -- I ran a |
Ah yeah, the version/changelog thing - again sorry about that, :D I got stuck on a particularly long PR, which I thought I could get finished by the weekend ( #194 ) but inevitably I couldn't. IMO it makes sense to be more verbose in the changelog about saying above the latest released version. 👍 |
Shipping |
@damassi with respect to the lockfile, you would have needed to run In deleting and re-creating it from scratch you've updated hundreds of dependencies in the stack, which is why it's a ~1000 LOC diff. I'm ok with this, after eyeing it over, but ideally next time we should be a bit more strict about smaller lock file changes. |
Alright, I've shipped that - and all other PRs as 0.14.2 I've also updated the notice on the CHANGELOG to be more specific in fde4c54 |
Ah sorry about that! I wasn't aware of |
When installing the latest danger, I noticed this in the console output:
Replaces
lodash.isarray
with native implementation.