-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: package.json docs #7962
base: latest
Are you sure you want to change the base?
fix: package.json docs #7962
Conversation
df73168
to
1554bab
Compare
|
||
### typings | ||
|
||
Alias of [types](#types). |
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 this is actually a typescript-deprecated field from TS < v3 or v2.
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.
Yeah i didn't know about it until today.
From the ts docs:
Note that the "typings" field is synonymous with types, and could be used as well.
We do honor it.
If you can find deprecation docs I'm down to add (deprecation)
. I still think it should be documented.
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.
https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html implies it's just an alias, so maybe it's not actually deprecated.
Co-authored-by: Jordan Harband <[email protected]>
I'm realizing that past deprecated fields like |
@reggi maybe a page that hides deprecated attributes by default, but they can be toggled visible? (and if someone arrives on a that would reduce the risk that someone implements support for, or uses, one of the deprecated attributes without pretending they never existed. |
I'm also realizing i'm lacking the terminology for the following:
|
i'd say only the third one is "deprecated", the other two are removed, or legacy, or something. |
This is an attempt to reconcile and fully document package.json properties.
typescript type here: https://github.com/npm/types/blob/main/types/index.d.ts
json schema: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/package.json
I personally had some confusion around
maintainers
.Adds node specific fields like
imports
andtype
.Also adds
(deprecations)
forbundledDependencies
/maintainers
andlicences
.Related to @kenshanta's work on documenting
type
#7897Moving forward i'd like to just callout the following:
Node.js
should point to the documentation.Node.js
docs when a link is better.