Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DaneTheory/b7a67a98c06fdd5560df777342fd25b5 to your computer and use it in GitHub Desktop.
Save DaneTheory/b7a67a98c06fdd5560df777342fd25b5 to your computer and use it in GitHub Desktop.
The Package (dot) JSON: A story of love, triumph, and general witchcraft/wizardry - InitFields: Dependencies Meta
[{
"npm:current": {
"ref": "",
"source": [
]
},
"npm:legacy": {
"ref": "",
"source": [
]
},
"yarn:current": {
"ref": "https://yarnpkg.com/configuration/manifest#dependenciesMeta",
"source": [
"This field lists some extra information related to the 'dependencies' listed in the 'dependencies' and 'devDependencies' fields. In the context of a workspaced project most of these settings will affect all 'workspaces' and as such must be specified at the root of the project (except if noted otherwise, the 'dependenciesMeta' field will be ignored if found within a 'workspace').",
"('built') If false, the package will never be built (deny-list). This behavior is reversed when the 'enableScripts' yarnrc setting is toggled off - when that happens, only packages with 'built' explicitly set to 'true' will be executed (allow-list), and those with 'built' explicitly set to 'false' will simply see their build script warnings downgraded into simple notices.",
"('optional') If true, the build isn't required to succeed for the install to be considered a success. It's what the 'optionalDependencies' field compiles down to. This settings will be applied even when found within a nested manifest, but the highest requirement in the dependency tree will prevail.",
"('unplugged') If true, the specified package will be automatically unplugged at install time. This should only be needed for packages that contain scripts in other languages than Javascript (for example 'nan' contains C++ headers).",
"_example_:{ \n \"dependenciesMeta\": { \n \"fsevents\": { \n\ \"built\": 'false', \n \"optional\": 'false', \n \"unplugged\": 'true' \n } \n }:_example_"
]
},
"yarn:legacy": {
"ref": "null",
"source": "null"
}
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment