-
Notifications
You must be signed in to change notification settings - Fork 887
Conversation
@JoshuaKGoldberg Can you please take a look? |
Hi @bowenni, thanks for sending this in! Most package updates are fine, but changing how TSLint uses tsutils is a breaking change that should be discussed a bit more. A couple examples of it coming into play: microsoft/tslint-microsoft-contrib#470 microsoft/tslint-microsoft-contrib#373. How would this change affect Increasing the node version to 6 seems fine, as 4 is no longer supported and 6 is barely in LTS. |
Node 4 is no longer supported. Unblocks palantir#4274
Thanks @JoshuaKGoldberg . Understood. I'd love to hear about the deps management strategy from @palantirtech too. |
Friendly ping @johnwiseheart |
I suggest to update this PR for 3.2 support. |
The TypeScript version upgrade is an incremental process. Upgrading to 3.1 first will make 3.2 to land more easily. |
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.
@bowenni I looked a bit into the tsutils
upgrade - instead of upgrading tsutils
, how about just making copies of the failing methods from that repo's 2.27
version, and copying them to tslint
under utils
, marking them as deprecated
?
For example, instead of import { getPropertyText } from "tsutils"
,
// util/util.ts
/**
* @deprecated This will be removed once TSLint requires tsutils^3.3
*/
export function getPropertyName(propertyName: ts.PropertyName): string | undefined {
// whatever it looked like in 2.27.2
}
If you don't have the time to go through this, I can update this PR. Let me know!
Agreed that it would be nice to have the newer tsutils 😄, I'll file an issue track the upgrade.
Node 4 is no longer supported. Unblocks #4274
Lets not introduce a breaking change on tsutils in case someone was transitively depending on it for their custom rules. |
Done. PTAL. |
Some mysterious formatting changes are probably due to prettier, I think. |
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.
mysterious formatting changes
Agh, the Prettier thing keeps coming up... Not a problem there.
The yarn.lock
changes are pretty minimal so I can change those now. Thanks for this!
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.
Super, thanks @bowenni! Very exciting to no longer need to node.parent!
in all those places! 😄
Thanks for reviewing the PR! |
PR checklist
Overview of change:
Upgrade TSLint to support TS 3.1.6
and also upgrade tsutils to 3.3.1.Fixes #4102
Is there anything you'd like reviewers to focus on?
TS 2.1 tests are broken by this change:tsutils v3.0.0+ now requires node >= 6 (link). Therefore it's incompatible with node version specified in the build config of TS 2.1 tests (link). I have tried to pin TS 2.1 tests to use an old version of tsutils (v2.9.0 is the last version that is compatible with node 4) but due to some breaking changes in tsutils APIs (link) it's hard to make some TSLint rules work with both the old and the new APIs. Besides, I think supporting multiple versions of the same utility library is not a great idea. Is it possible to relax the node version requirement for TS 2.1 tests?
CHANGELOG.md entry: