-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
DefinitelyTyped repo overhaul - docs/automatisation/formatting #26847
Comments
Tagging @RyanCavanaugh, who is also interested in DefinitelyTyped hygiene. |
Also
This is a documentation problem; we already can do this, I just can't remember how without searching around. |
Agree!
I think this would be great.
What is your definition of "release"?
As Nathan said, it is possible, probably just needs better documentation. Be warned that it takes a very, very long time
I don't know what this means as a general functionality, but am on board in principle.
In general we already have a pretty heavyweight process. I don't want to enforce new rules that people have to follow and we have to enforce unless there's a very clear upside. We can already mine which PRs affect which packages and generate a changelog based on the PR titles (which are much easier to edit than commit messages).
Again I'm not sure what the upside is here, or what the naming convention would be for changes which affect multiple packages
Any non-trivia edit is a potential breaking change. We try to recommend that people pin their types dependencies and upgrade intentionally instead of floating for this reason. We don't vary the major version number anyway, so trying to draw an arbitrary line for what's breaking and what's not doesn't seem to give us much. |
I think changes which would introduce new type errors for people should be considered breaking. When type checks fail, I consider my own build broken. If the changes to the type definitions are not backwards compatible and I’m consuming the definitions using semver, my build may break without any action on my part. So, why not just always bump the major version for each release (where a release is a publish of the package to npmjs)? Types are very brittle and can easily break projects using them unintentionally or even for minor improvements, so it is likely quite difficult to determine what breaks definitions. Bumping major on every release for definition changes would let people install the typings with |
This is just a different way of not having a coherent versioning scheme, with the disadvantage that you lose all mapping from the library version to the typing version. What's the latest typing library for |
Ah. So why is that line in the README, then? Because of it, I assumed there shouldn't be such a correlation between version numbers in the first place. |
This issue is the first time I've seen anybody mention not running tests locally. It prompted me to search the front page, and I was surprised not to see it called there explicitly. I had thought I must be doing something wrong, since I didn't see a lot of people here filing issues about broken tests, but maybe the truth is that most people don't run them, so if something is brittle it doesn't get noticed as quickly as it otherwise might. |
I'd like to bump this thread for the sole reason that I have to remember to disable the prettier plugin almost every time I am working on anything in DefinitelyTyped 🤣 Adding a new lint step right now probably won't work well because CI is close to a breaking point (any given change to Adding a canonical config to the root would also be very helpful, even if it's an empty config (i.e. prettier defaults), because otherwise customizations done in the vscode settings take precedence. Personally I have semicolons off and single quotes everywhere, for example. |
I did it on the entire repository just to see what happens. Jessidhia/DefinitelyTyped@prettier...Jessidhia:prettier-lets-see-what-happens
|
This just happened to me as well -- I ended up running a commit with local prettier enabled and it introduced an unneeded diff. Would be great if there was some consistency here, including pre-commit hooks that apply |
As a maintainer, I would love to see a standardised prettier config, githooks enforce formatting, and perhaps prettier checking on CI. I have been running prettier on some of the types I maintain manually with the following configuration, which I sourced from looking at what some randomly picked DT types were doing:
|
Another stab at adding prettier and git pre-commit hook is available at #35672 |
@RyanCavanaugh - wondering if you have any thoughts on #35672? |
The command The output is : The command should be |
@rohit-gohri |
But there is no corresponding script. AFAIK only |
Ah I see, yeah that might have been based on |
It is there any plan to create a changelog/website/docs something? |
What about Changelog, please? |
Hi thread, we're moving DefinitelyTyped to use GitHub Discussions for conversations the To help with the transition, we're closing all issues which haven't had activity in the last 6 months, which includes this issue. If you think closing this issue is a mistake, please pop into the TypeScript Community Discord and mention the issue in the |
@orta this is a meta issue, please re-open. Aside: does this repo not have issue tags? Maybe a "meta" tag isn't needed after the transition because all open Issues should be meta? |
I'll re-open, but I'm not sure how actionable this issue is nowadays - a lot of the requests have been done and others ideally should have a focused issue like #54239 does. |
Agreed, this issue really should be at least 3-6 sub-issues but there's a lot of conversation already. I guess anybody watching who has a particular interest in one of the OP's bullet points should find or open an issue about it and link back here, and when they're all accounted for then close this one again? |
2 years on, I'm even less sure this issue should be open. We have a formatter with instructions for how to use it plus bot comments that say what to do, we have optional git hooks, we can run in CI, CI is now much faster after I sharded it, we have docs that talk about breaking changes. The only thing from the original thread that is "missing" is some sort of changelog system, some sort of generic codemod system, and "consistent" commit messages. I don't personally feel like a codemod system is in scope. Changelogs can't be published within the package (as they would grow indefinitely), so don't really have anywhere else to go (but are pretty easy to emulate just by viewing the git history of a specific package dir). We already suggest a specific PR title when modifying packages (though people often ignore it), and rewriting them is not super viable unless PRs only touch one package or something. |
This isn't an issue related to any of type definitions rather to improve this repo and make it more consistent and more user friendly for old/new contributors.
Repo updates
Docs updates
[package-name]: issue/pr description
Summary
If we agree at least at some of these points, I can start work on this immediately 💪
cc @sandersn @andy-ms @mhegazy @DanielRosenwasser
The text was updated successfully, but these errors were encountered: