Skip to content

Commit

Permalink
docs: document libc in manifest.json schema (#4705)
Browse files Browse the repository at this point in the history
* docs: document libc in `manifest.json` schema

* docs: add more references to libc
  • Loading branch information
paul-soporan authored and merceyz committed Aug 4, 2022
1 parent 84ae3bc commit 6bb530d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions packages/gatsby/static/configuration/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@
},
"_exampleItems": ["x64", "ia32", "arm64"]
},
"libc": {
"description": "A value compared during install with the host standard C library. If the values don't match, the package won't see its postinstall scripts run (if listed in `dependencies`) or won't be installed at all (if listed in `optionalDependencies`).",
"type": "array",
"items": {
"type": "string"
},
"_exampleItems": ["glibc", "musl"]
},
"main": {
"description": "The path that will be used to resolve the qualified path to use when accessing the package by its name. This field can be modified at publish-time through the use of the `publishConfig.main` field.",
"type": "string",
Expand Down Expand Up @@ -130,7 +138,7 @@
"_exampleKeys": ["webpack"]
},
"optionalDependencies": {
"description": "Similar to the `dependencies` field, except that these entries will not be required to build properly should they have any build script. Note that such dependencies must always be resolvable (otherwise we couldn't store it in the lockfile, which could lead to non-reproducible installs), but those which list `cpu`/`os` fields will not be fetched unless they match the current system architecture.\n\n**This field is usually not what you're looking for**, unless you depend on the `fsevents` package. If you need a package to be required only when a specific feature is used then use an optional peer dependency. Your users will have to satisfy it should they use the feature, but it won't cause the build errors to be silently swallowed when the feature is needed.",
"description": "Similar to the `dependencies` field, except that these entries will not be required to build properly should they have any build script. Note that such dependencies must always be resolvable (otherwise we couldn't store it in the lockfile, which could lead to non-reproducible installs), but those which list `os` / `cpu` / `libc` fields will not be fetched unless they match the current system architecture.\n\n**This field is usually not what you're looking for**, unless you depend on the `fsevents` package. If you need a package to be required only when a specific feature is used then use an optional peer dependency. Your users will have to satisfy it should they use the feature, but it won't cause the build errors to be silently swallowed when the feature is needed.",
"type": "object",
"patternProperties": {
"^(?:@([^/]+?)/)?([^/]+?)$": {
Expand Down Expand Up @@ -189,7 +197,7 @@
"examples": [false]
},
"optional": {
"description": "If true, the build isn't required to succeed for the install to be considered a success, and the dependency may be skipped if its `os` and `cpu` fields don't match the current system architecture. It's what the `optionalDependencies` field compiles down to.\n\n**This settings will be applied even when found within a nested manifest**, but the highest requirement in the dependency tree will prevail.",
"description": "If true, the build isn't required to succeed for the install to be considered a success, and the dependency may be skipped if its `os` / `cpu` / `libc` fields don't match the current system architecture. It's what the `optionalDependencies` field compiles down to.\n\n**This settings will be applied even when found within a nested manifest**, but the highest requirement in the dependency tree will prevail.",
"type": "boolean",
"examples": [false]
},
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/static/configuration/yarnrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@
"_exampleItems": ["current", "x86", "ia32"]
},
"libc": {
"description": "The list of standard libraries to cover.",
"description": "The list of standard C libraries to cover.",
"type": "array",
"items": {
"type": "string"
Expand Down

0 comments on commit 6bb530d

Please sign in to comment.