-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Rename location
field to position
#6
Comments
Released in 3.0.0! |
Is there any option to add this patch to a v2 bugfix release? diff --git a/node_modules/vfile-message/types/index.d.ts b/node_modules/vfile-message/types/index.d.ts
index d217843..31c853a 100644
--- a/node_modules/vfile-message/types/index.d.ts
+++ b/node_modules/vfile-message/types/index.d.ts
@@ -6,7 +6,7 @@ declare namespace vfileMessage {
/**
* Create a virtual message.
*/
- interface VFileMessage extends Error {
+ interface VFileMessage extends Omit<Error, 'location'> {
/**
* Constructor of a message for `reason` at `position` from `origin`.
* When an error is passed in as `reason`, copies the `stack`. I currently use patch-package to fix the compile error here: renovatebot/renovate#9954 |
Error:
|
/cc @ChristianMurphy |
Hey @viceice! 👋
🤔 What TS version and tsconfig is renovate currently using? Line 46 in fbdb618
Lines 1 to 15 in fbdb618
and CI currently seems to be happy https://github.com/vfile/vfile-message/actions/runs/813710479 🤔
This could be an option, I'd like to figure out why this project's test suite isn't able to see the issue. Line 9 in fbdb618
aside: if you'd be interested in contributing https://github.com/renovatebot/renovate/blob/23799d627c6d2ed570ed92a2d90c4116b0f6d351/lib/types/remark-github.d.ts |
Sure, happy to fix it soon. I stumbled on that while trying to fix a security issue in I think we are on latest stable typescript, currently using v4.2.4. i don't like to enable Also we can't move to new esm only version now because some internal projects are not yet ready for it. We plan to transition to esm only hopefully until the end of the year. But maybe later or sooner. 🙃 Maybe a better solution is to provide our types to |
Ah, I missed:
I was looking at v3. Switching to v2, same question applies 😅 It is/was being tested with dtslint for typescript versions 3.0+ vfile-message/types/tsconfig.json Lines 1 to 10 in b95250d
And CI seemed happy: https://travis-ci.org/github/vfile/vfile-message/builds/668455498 I believe 4.0 was included in the test suite, as IIRC it was in the next channel at the time, but am not 💯 sure.
That may be a good option, in general vfile/unified maintains a single release line at a time, currently v3.
Very cool
When |
Maybe it's because we are targeting I'm happen to provide the types to the package with other stuff too. Will try tomorrow. But maybe it would also helpful to have a v2 fix which can bubble through via allowed in range updates. 🙃 I can prepare a pr too for this, hopefully passing your ci, if you will accept that work. Don't want to do unnecessary work. 😉 |
🤔 could be
Thanks!
Thanks for the offer! |
You also haven't a v2 branch to target a pr to.😉 I'll try to arrange some pr's tomorrow. 🤗 |
I've made a commit to fix it, |
We’ve had these types for 3 years and millions of people have used this. I’m not sure why this is an issue now? Why not turn on |
The issue occures is you have newer typescript 4.2 and es2018 types, so maybe others do not yet upgraded? or they enabled We don't like |
Set up a |
The
position
field is used throughout unified, only vfile-message useslocation
. It makes more sense to use the same name everywhere.The text was updated successfully, but these errors were encountered: