-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathyarnrc.json
804 lines (802 loc) Β· 40.1 KB
/
yarnrc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
{
"title": "JSON Schema for Yarnrc files",
"$schema": "https://json-schema.org/draft/2019-09/schema#",
"description": "Yarnrc files (named this way because they must be called `.yarnrc.yml`) are the one place where you'll be able to configure Yarn's internal settings. While Yarn will automatically find them in the parent directories, they should usually be kept at the root of your project (often your repository). **Starting from the v2, they must be written in valid Yaml and have the right extension** (simply calling your file `.yarnrc` won't do).\n\nEnvironment variables can be accessed from setting definitions by using the `${NAME}` syntax when defining the values. By default Yarn will require the variables to be present, but this can be turned off by using either `${NAME-fallback}` (which will return `fallback` if `NAME` isn't set) or `${NAME:-fallback}` (which will return `fallback` if `NAME` isn't set, or is an empty string).\n\nFinally, note that most settings can also be defined through environment variables (at least for the simpler ones; arrays and objects aren't supported yet). To do this, just prefix the names and write them in snake case: `YARN_CACHE_FOLDER` will set the cache folder (such values will overwrite any that might have been defined in the RC files - use them sparingly).",
"__info": [
"This file contains the JSON Schema for Yarnrc files and is:",
"1) Hosted on the Yarn Website at http://yarnpkg.com/configuration/yarnrc.json",
"2) Registered on the SchemaStore catalog so that editors can offer autocompletion and validation.",
"3) Used to generate the documentation page at http://yarnpkg.com/configuration/yarnrc",
"Note: Properties prefixed with a single underscore (e.g. _exampleItems, _exampleKeys)",
"are unique to our documentation generation interpreter. All others will be picked up",
"by most JSON schema interpreters.",
"Rules:",
"1) Don't set a default if it's null, dynamic, or an object.",
"2) Use `examples` for scalars, `_exampleItems` for arrays, and `_exampleKeys` for objects.",
"3) Always add a _package property to each configuration setting."
],
"type": "object",
"properties": {
"cacheFolder": {
"_package": "@yarnpkg/core",
"description": "The path where the downloaded packages are stored on your system. They'll be normalized, compressed, and saved under the form of zip archives with standardized names. The cache is deemed to be relatively safe to be shared by multiple projects, even when multiple Yarn instances run at the same time on different projects. For setting a global cache folder, you should use `enableGlobalCache` instead.",
"type": "string",
"format": "uri-reference",
"default": "./.yarn/cache"
},
"httpsCaFilePath": {
"_package": "@yarnpkg/core",
"description": "Path to file containing one or multiple Certificate Authority signing certificates",
"type": "string",
"format": "uri-reference",
"examples": ["./exampleCA.pem"]
},
"changesetBaseRefs": {
"_package": "@yarnpkg/plugin-git",
"description": "The base git refs that the current HEAD is compared against in the version plugin. This overrides the default behavior of comparing against master, origin/master, upstream/master, main, origin/main, and upstream/main. Supports git branches, tags, and commits.",
"type": "array",
"items": {
"type": "string"
},
"default": ["master", "origin/master", "upstream/master", "main", "origin/main", "upstream/main"]
},
"changesetIgnorePatterns": {
"_package": "@yarnpkg/plugin-git",
"description": "An Array of glob patterns. Files matching the following patterns (in terms of relative paths compared to the root of the project) will be ignored by the `yarn version check` command.",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"_exampleItems": ["**/*.test.{js,ts}"]
},
"checksumBehavior": {
"_package": "@yarnpkg/core",
"description": "If `throw` (the default), Yarn will throw an exception on `yarn install` if it detects that a package doesn't match the checksum stored within the lockfile. If `update`, the lockfile checksum will be updated to match the new value. If `ignore`, the checksum check will not happen.",
"enum": ["throw", "update", "ignore"],
"default": "throw"
},
"cloneConcurrency": {
"_package": "@yarnpkg/plugin-git",
"description": "Defines how many `git clone` operations are allowed to run at the same time. Yarn defaults to 2 concurrent clone operations.",
"type": "number",
"default": 2,
"examples": [8]
},
"compressionLevel": {
"_package": "@yarnpkg/core",
"description": "The compression level employed for zip archives, with 0 being 'no compression, faster' and 9 being 'heavy compression, slower'. The default is 'mixed', which is a variant of 9 where files may be stored uncompressed if the builtin libzip heuristic thinks it will lead to a more sensible result.",
"enum": ["mixed", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
"default": "mixed"
},
"constraintsPath": {
"_package": "@yarnpkg/plugin-constraints",
"description": "The path of the constraints file.",
"type": "string",
"format": "uri-reference",
"default": "./constraints.pro"
},
"defaultLanguageName": {
"_package": "@yarnpkg/core",
"description": "Default language mode that should be used when a package doesn't offer any insight.",
"type": "string",
"default": "node"
},
"defaultProtocol": {
"_package": "@yarnpkg/core",
"description": "Yarn is a modular package manager that can resolve packages from various sources. As such, semver ranges and tag names don't only work with the npm registry - just change the default protocol to something else and your semver ranges will be fetched from whatever source you select.",
"type": "string",
"default": "npm:"
},
"defaultSemverRangePrefix": {
"_package": "@yarnpkg/plugin-essentials",
"description": "The default prefix for semantic version dependency ranges, which is used for new dependencies that are installed to a manifest. Possible values are `\"^\"` (the default), `\"~\"` or `\"\"`.",
"enum": ["^", "~", ""],
"default": "^"
},
"deferredVersionFolder": {
"_package": "@yarnpkg/plugin-version",
"description": "The folder where the versioning files are stored.",
"type": "string",
"format": "uri-reference",
"default": "./.yarn/versions"
},
"enableColors": {
"_package": "@yarnpkg/core",
"description": "If true (by default detects terminal capabilities), Yarn will format its pretty-print its output by using colors to differentiate important parts of its messages.",
"type": "boolean",
"examples": [true]
},
"enableGlobalCache": {
"_package": "@yarnpkg/core",
"description": "If true, Yarn will disregard the `cacheFolder` settings and will store the cache files into a folder shared by all local projects sharing the same configuration.",
"type": "boolean",
"default": false
},
"enableHyperlinks": {
"_package": "@yarnpkg/core",
"description": "If true (by default detects terminal capabilities), the CLI is allowed to use hyperlinks in its output.",
"type": "boolean",
"examples": [true]
},
"enableImmutableCache": {
"_package": "@yarnpkg/core",
"description": "If true, Yarn will refuse the change the cache in any way (whether it would add files or remove them) when running `yarn install`.",
"type": "boolean",
"default": false
},
"enableImmutableInstalls": {
"_package": "@yarnpkg/plugin-essentials",
"description": "If true (the default on CI), Yarn will refuse to change the installation artifacts (apart from the cache) when running an install. This flag is quite intrusive, you typically should only set it on your CI by manually passing the `--immutable` flag to `yarn install`.",
"type": "boolean",
"default": false
},
"enableInlineBuilds": {
"_package": "@yarnpkg/core",
"description": "If true (the default on CI environments), Yarn will print the build output directly within the terminal instead of buffering it in a log file.",
"type": "boolean",
"examples": [false]
},
"enableInlineHunks": {
"_package": "@yarnpkg/plugin-patch",
"description": "If true, Yarn will print any patch sections (hunks) that could not be applied successfully to the terminal. Defaults to false.",
"type": "boolean",
"examples": [true]
},
"enableMessageNames": {
"_package": "@yarnpkg/core",
"description": "If true, Yarn will prefix most messages with codes suitable for search engines.",
"type": "boolean",
"default": true
},
"enableMirror": {
"_package": "@yarnpkg/core",
"description": "If true (the default), Yarn will use the global folder as indirection between the network and the actual cache. This makes installs much faster for projects that don't already benefit from Zero-Installs.",
"type": "boolean",
"default": true
},
"enableNetwork": {
"_package": "@yarnpkg/core",
"description": "If false, Yarn will never make any request to the network by itself, and will throw an exception rather than let it happen. It's a very useful setting for CI, which typically want to make sure they aren't loading their dependencies from the network by mistake.",
"type": "boolean",
"default": true
},
"enableProgressBars": {
"_package": "@yarnpkg/core",
"description": "If true (the default outside of CI environments), Yarn will show progress bars for long-running events.",
"type": "boolean",
"examples": [true]
},
"enableScripts": {
"_package": "@yarnpkg/core",
"description": "If false, Yarn will not execute the `postinstall` scripts from third-party packages when installing the project (workspaces will still see their postinstall scripts evaluated, as they're assumed to be safe if you're running an install within them). Note that you can now also disable scripts on a per-package basis thanks to `dependenciesMeta`.",
"type": "boolean",
"default": true
},
"enableStrictSsl": {
"_package": "@yarnpkg/core",
"description": "If false, SSL certificate errors will be ignored",
"type": "boolean",
"default": true
},
"enableTelemetry": {
"_package": "@yarnpkg/core",
"description": "If true (the default outside of CI environments), Yarn will periodically send anonymous data to our servers tracking some usage information such as the number of dependency in your project, how many install you ran, etc. Consult the [Telemetry](/advanced/telemetry) page for more details about it.",
"type": "boolean",
"examples": [true]
},
"enableTimers": {
"_package": "@yarnpkg/core",
"description": "If false, Yarn will not print the time spent running each sub-step when running various commands. This is typically needed for testing purposes, when you want each execution to have exactly the same output as the previous ones.",
"type": "boolean",
"default": true
},
"enableTransparentWorkspaces": {
"_package": "@yarnpkg/core",
"description": "If false, Yarn won't link workspaces just because their versions happen to match a semver range. Disabling this setting will require that all workspace accesses are made through the `workspace:` protocol. This is usually only needed in some very specific circumstances.",
"type": "boolean",
"default": true
},
"globalFolder": {
"_package": "@yarnpkg/core",
"description": "The path where all system-global files are stored.",
"type": "string",
"format": "uri-reference",
"examples": ["./.yarn/global"]
},
"httpProxy": {
"_package": "@yarnpkg/core",
"description": "Defines a proxy to use when making an HTTP request. Note that Yarn only supports HTTP proxies at the moment (help welcome!).",
"type": "string",
"format": "uri",
"examples": ["http://proxy:4040"]
},
"httpRetry": {
"_package": "@yarnpkg/core",
"description": "Retry times on http failure",
"type": "number",
"default": 3
},
"httpTimeout": {
"_package": "@yarnpkg/core",
"description": "Timeout of each http request in milliseconds",
"type": "number",
"default": 60000
},
"httpsCertFilePath": {
"_package": "@yarnpkg/core",
"description": "Path to file containing certificate chain in PEM format.",
"type": "string",
"format": "uri-reference",
"examples": ["./exampleCert.pem"]
},
"httpsKeyFilePath": {
"_package": "@yarnpkg/core",
"description": "Path to file containing private key in PEM format.",
"type": "string",
"format": "uri-reference",
"examples": ["./exampleKey.pem"]
},
"httpsProxy": {
"_package": "@yarnpkg/core",
"description": "Defines a proxy to use when making an HTTPS request. Note that Yarn only supports HTTP proxies at the moment (help welcome!).",
"type": "string",
"format": "uri",
"examples": ["http://proxy:4040"]
},
"ignoreCwd": {
"_package": "@yarnpkg/core",
"description": "If true, the `--cwd` flag will be ignored.",
"type": "boolean",
"default": false
},
"ignorePath": {
"_package": "@yarnpkg/core",
"description": "If true, the local executable will be ignored when using the global one.",
"type": "boolean",
"default": false
},
"immutablePatterns": {
"_package": "@yarnpkg/core",
"description": "An array of patterns for files and directories that aren't allowed to change when running installs with the \\`--immutable\\` flag set.",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"_exampleItems": ["**/.pnp.*"]
},
"initScope": {
"_package": "@yarnpkg/plugin-init",
"description": "Scope used when creating packages via the `init` command.",
"type": "string",
"pattern": "^([^/]+?)$",
"default": "yarnpkg"
},
"initFields": {
"_package": "@yarnpkg/plugin-init",
"description": "Additional fields to set when creating packages via the `init` command.",
"type": "object",
"patternProperties": {
"^(.+)$": {
"description": "All properties will be added verbatim to the generated package.json.",
"examples": ["https://yarnpkg.com"]
}
},
"_exampleKeys": ["homepage"]
},
"installStatePath": {
"_package": "@yarnpkg/core",
"description": "Path of the file where the install state will be persisted.",
"type": "string",
"format": "uri-reference",
"default": "./.yarn/install-state.gz"
},
"logFilters": {
"description": "Defines overrides for log levels for message names or message text. Through this setting you can hide specific messages or give them a more important visibility.",
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Selects all messages with the given code.",
"examples": ["YN0005"]
},
"text": {
"type": "string",
"description": "Selects exactly one message that must match the given text. In case a message matches both `code`-based and `text`-based filters, the `text`-based ones will take precedence over the `code`-based ones.",
"examples": ["lorem-ipsum@npm:1.2.3 lists build scripts, but its build has been explicitly disabled through configuration"]
},
"pattern": {
"type": "string",
"description": "Selects exactly one message that must match the given glob pattern. In case a message matches both `pattern`-based and `code`-based filters, the `pattern`-based ones will take precedence over the other ones. Patterns can be overriden on a case-by-case basis by using the `text` filter, which has precedence over `pattern`.",
"examples": ["lorem-ipsum@* lists build scripts, but its build has been explicitly disabled through configuration"]
},
"level": {
"description": "Applies the specified log level to all selected messages. Can be one of `info`, `warning`, `error`, or `discard` if you wish to hide those messages altogether.",
"examples": ["error"],
"oneOf": [
{"type": "null"},
{
"type": "string",
"enum": [
"discard",
"info",
"warning",
"error"
]
}
]
}
}
},
"_exampleItems": [
{
"code": "YN0005",
"level": "discard"
},
{
"text": "lorem-ipsum@npm:1.2.3 lists build scripts, but its build has been explicitly disabled through configuration",
"level": "error"
},
{
"pattern": "lorem-ipsum@* lists build scripts, but its build has been explicitly disabled through configuration",
"level": "error"
}
]
},
"lockfileFilename": {
"_package": "@yarnpkg/core",
"description": "Defines the name of the lockfiles that will be generated by Yarn.",
"type": "string",
"format": "uri-reference",
"default": "yarn.lock"
},
"networkConcurrency": {
"_package": "@yarnpkg/core",
"description": "Defines how many requests are allowed to run at the same time. Yarn defaults to 50 concurrent requests but it may be required to limit it even more when working behind proxies that can't handle large amounts of concurrent requests.",
"type": "number",
"default": 50,
"examples": [8]
},
"networkSettings": {
"_package": "@yarnpkg/core",
"description": "Additional network settings, per hostname",
"type": "object",
"patternProperties": {
"^(.+)$": {
"description": "The hostname to override settings for (glob patterns are supported)",
"type": "object",
"properties": {
"httpsCaFilePath": {
"$ref": "#/properties/httpsCaFilePath"
},
"enableNetwork": {
"$ref": "#/properties/enableNetwork"
},
"httpProxy": {
"$ref": "#/properties/httpProxy"
},
"httpsCertFilePath": {
"$ref": "#/properties/httpsCertFilePath"
},
"httpsKeyFilePath": {
"$ref": "#/properties/httpsKeyFilePath"
},
"httpsProxy": {
"$ref": "#/properties/httpsProxy"
}
},
"_exampleKeys": ["httpsCaFilePath", "enableNetwork", "httpProxy", "httpsCertFilePath", "httpsKeyFilePath", "httpsProxy"]
}
},
"_exampleKeys": ["*.example.com"]
},
"nmHoistingLimits": {
"_package": "@yarnpkg/plugin-nm",
"description": "Defines the highest point where packages can be hoisted. One of `workspaces` (don't hoist packages past the workspace that depends on them), `dependencies` (packages aren't hoisted past the direct dependencies for each workspace), or `none` (the default, packages are hoisted as much as possible). This setting can be overriden per-workspace through the [`installConfig.hoistingLimits` field](/configuration/manifest#installConfig.hoistingLimits).",
"type": "string",
"enum": ["workspaces", "dependencies", "none"],
"default": "none"
},
"nmFolderLinkMode": {
"_package": "@yarnpkg/plugin-nm",
"description": "If set to `classic` Yarn will use symlinks on Linux and MacOS and Windows `junctions` on Windows when linking workspaces into `node_modules` directories. This can result in inconsistent behavior on Windows because `junctions` are always absolute paths while `symlinks` may be relative. Set to `symlinks`, Yarn will utilize symlinks on all platforms which enables links with relative paths paths on Windows.",
"type": "string",
"enum": ["classic", "symlinks"],
"default": "classic"
},
"nmSelfReferences": {
"_package": "@yarnpkg/plugin-nm",
"description": "Defines whether workspaces are allowed to require themselves - results in creation of self-referencing symlinks. This setting can be overriden per-workspace through the [`installConfig.selfReferences` field](/configuration/manifest#installConfig.selfReferences).",
"type": "boolean",
"default": true
},
"nmMode": {
"_package": "@yarnpkg/plugin-nm",
"description": "If set to `hardlinks-local` Yarn will utilize hardlinks to reduce disk space consumption inside `node_modules` directories in a current project. With `hardlinks-global` Yarn will use global content addressable storage to reduce `node_modules` size across all the projects using this option.",
"type": "string",
"enum": ["classic", "hardlinks-local", "hardlinks-global"],
"default": "hardlinks-local"
},
"nodeLinker": {
"_package": "@yarnpkg/plugin-pnp",
"description": "Defines what linker should be used for installing Node packages (useful to enable the node-modules plugin), one of: `pnp`, `pnpm` and `node-modules`.",
"anyOf": [
{ "type": "string" },
{ "enum": ["pnp", "pnpm", "node-modules"] }
],
"type": "string",
"default": "pnp"
},
"npmAlwaysAuth": {
"_package": "@yarnpkg/plugin-npm",
"description": "If true, Yarn will always send the authentication credentials when making a request to the registries. This typically shouldn't be needed.",
"type": "boolean",
"default": false
},
"npmAuditRegistry": {
"_package": "@yarnpkg/plugin-npm",
"description": "Defines the registry that must be used when auditing dependencies. Doesn't need to be defined, in which case the value of `npmRegistryServer` will be used.",
"type": "string",
"format": "uri",
"examples": ["https://npm.pkg.github.com"]
},
"npmAuthIdent": {
"_package": "@yarnpkg/plugin-npm",
"description": "Defines the authentication credentials to use by default when accessing your registries (equivalent to `_auth` in the v1). This settings is strongly discouraged in favor of `npmAuthToken`.",
"type": "string",
"examples": ["username:password"]
},
"npmAuthToken": {
"_package": "@yarnpkg/plugin-npm",
"description": "Defines the authentication credentials to use by default when accessing your registries (equivalent to `_authToken` in the v1). If you're using [`npmScopes`](#npmScopes) to define multiple registries, the [`npmRegistries`](#npmRegistries) dictionary allows you to override these credentials on a per-registry basis.",
"type": "string",
"examples": ["ffffffff-ffff-ffff-ffff-ffffffffffff"]
},
"npmPublishAccess": {
"_package": "@yarnpkg/plugin-npm-cli",
"description": "Defines the default access to use when publishing packages to the npm registry. Valid values are `public` and `restricted`, but `restricted` usually requires to register for a paid plan (this is up to the registry you use).",
"enum": ["public", "restricted"],
"examples": ["public"]
},
"npmAuditExcludePackages": {
"_package": "@yarnpkg/plugin-npm-cli",
"description": "Array of glob patterns of packages to exclude from `yarn npm audit`. Doesn't need to be defined, in which case no packages will be excluded. Can also be augmented by the `--exclude` flag.",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"examples": ["known_insecure_package"]
},
"npmAuditIgnoreAdvisories": {
"_package": "@yarnpkg/plugin-npm-cli",
"description": "Array of glob patterns of advisory ID's to ignore from `yarn npm audit` results. Doesn't need to be defined, in which case no advisories will be ignored. Can also be augmented by the `--ignore` flag.",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"examples": ["1234567"]
},
"npmPublishRegistry": {
"_package": "@yarnpkg/plugin-npm",
"description": "Defines the registry that must be used when pushing packages. Doesn't need to be defined, in which case the value of `npmRegistryServer` will be used. Overridden by `publishConfig.registry`.",
"type": "string",
"format": "uri",
"examples": ["https://npm.pkg.github.com"]
},
"npmRegistries": {
"_package": "@yarnpkg/plugin-npm",
"description": "On top of the global configuration, registries can be configured on a per-scope basis (for example to instruct Yarn to use your private registry when accessing packages from a given scope). The following properties are supported:",
"type": "object",
"patternProperties": {
"^(?:^[a-zA-Z][a-zA-Z0-9+-.]*:)?[^\\s]*$": {
"description": "This key represent the registry that's covered by the settings defined in the nested object. The protocol is optional (using `https://npm.pkg.github.com` would work just as well).",
"type": "object",
"properties": {
"npmAlwaysAuth": {
"$ref": "#/properties/npmAlwaysAuth"
},
"npmAuthIdent": {
"$ref": "#/properties/npmAuthIdent"
},
"npmAuthToken": {
"$ref": "#/properties/npmAuthToken"
}
},
"_exampleKeys": ["npmAlwaysAuth", "npmAuthIdent", "npmAuthToken"]
}
},
"additionalProperties": false,
"_exampleKeys": ["//npm.pkg.github.com"]
},
"npmRegistryServer": {
"_package": "@yarnpkg/plugin-npm",
"description": "Defines the hostname of the remote server from where Yarn should fetch the metadata and archives when querying the npm registry. Should you want to define different registries for different scopes, see `npmScopes`. To define the authentication scheme for your servers, see `npmAuthToken`. The Hostname must use the `HTTPS` protocol, but this can be changed by adding it to the [`unsafeHttpWhitelist`](#unsafeHttpWhitelist).",
"type": "string",
"format": "uri",
"default": "https://registry.yarnpkg.com"
},
"npmScopes": {
"_package": "@yarnpkg/plugin-npm",
"description": "On top of the global configuration, registries can be configured on a per-scope basis (for example to instruct Yarn to use your private registry when accessing packages from a given scope). The following properties are supported:",
"type": "object",
"patternProperties": {
"^\\S+$": {
"description": "This key represent the scope that's covered by the settings defined in the nested object. Note that it mustn't start with the `@` character.",
"type": "object",
"properties": {
"npmPublishRegistry": {
"$ref": "#/properties/npmPublishRegistry",
"examples": ["https://registry.yarnpkg.com"]
},
"npmRegistryServer": {
"$ref": "#/properties/npmRegistryServer"
},
"npmAlwaysAuth": {
"$ref": "#/properties/npmAlwaysAuth"
},
"npmAuthIdent": {
"$ref": "#/properties/npmAuthIdent"
},
"npmAuthToken": {
"$ref": "#/properties/npmAuthToken"
}
},
"_exampleKeys": [
"npmPublishRegistry",
"npmRegistryServer",
"npmAlwaysAuth",
"npmAuthIdent",
"npmAuthToken"
]
}
},
"additionalProperties": false,
"_exampleKeys": ["my-company"]
},
"packageExtensions": {
"_package": "@yarnpkg/core",
"description": "Some packages may have been specified incorrectly with regard to their dependencies - for example with one dependency being missing, causing Yarn to refuse it the access. The `packageExtensions` fields offer a way to extend the existing package definitions with additional information. If you use it, consider sending a PR upstream and contributing your extension to the [`plugin-compat` database](https://github.com/yarnpkg/berry/blob/master/packages/extensions/sources/index.ts).\nNote: This field is made to add dependencies; if you need to rewrite existing ones, prefer the [`resolutions`](/configuration/manifest#resolutions) field.",
"type": "object",
"patternProperties": {
"^(?:@([^/]+?)/)?([^/]+?)(?:@(.+))$": {
"description": "Each key is a descriptor covering a semver range. The extensions will be applied to any package whose version matches the specified range. This is true regardless of where the package comes from, so no distinction on whether they come from git or a registry, for example. Only the version matters.",
"type": "object",
"properties": {
"dependencies": {
"type": "object",
"patternProperties": {
"^(?:@([^/]+?)/)?([^/]+?)$": {
"type": "string",
"pattern": "^(.+)$",
"examples": ["^4.15.0"]
}
},
"additionalProperties": false,
"_exampleKeys": ["lodash"]
},
"peerDependencies": {
"type": "object",
"patternProperties": {
"^(?:@([^/]+?)/)?([^/]+?)$": {
"type": "string",
"pattern": "^(.+)$",
"examples": ["*"]
}
},
"additionalProperties": false,
"_exampleKeys": ["webpack-cli"]
},
"peerDependenciesMeta": {
"type": "object",
"patternProperties": {
"^(?:@([^/]+?)/)?([^/]+?)$": {
"type": "object",
"properties": {
"optional": {
"type": "boolean",
"examples": [true]
}
},
"_exampleKeys": ["optional"]
}
},
"additionalProperties": false,
"_exampleKeys": ["webpack-cli"]
}
},
"_exampleKeys": ["dependencies", "peerDependencies", "peerDependenciesMeta"],
"_margin": false
}
},
"additionalProperties": false,
"_exampleKeys": ["webpack@*"]
},
"patchFolder": {
"_package": "@yarnpkg/plugin-patch",
"description": "Folder where patch files will be written to.",
"type": "string",
"format": "uri-reference",
"default": "./.yarn/patches"
},
"pnpEnableEsmLoader": {
"_package": "@yarnpkg/plugin-pnp",
"description": "If true, Yarn will generate an experimental ESM loader (`.pnp.loader.mjs`). Yarn tries to automatically detect whether ESM support is required.",
"type": "boolean",
"default": false
},
"pnpEnableInlining": {
"_package": "@yarnpkg/plugin-pnp",
"description": "If true (the default), Yarn will generate a single `.pnp.cjs` file that contains all the required data for your project to work properly. If toggled off, Yarn will also generate a `.pnp.data.json` file meant to be consumed by the `@yarnpkg/pnp` package.",
"type": "boolean",
"default": true
},
"pnpFallbackMode": {
"_package": "@yarnpkg/plugin-pnp",
"description": "Enumeration whose values (`none`, `dependencies-only`, `all`) define in which capacity should the PnP hook allow packages to rely on the builtin fallback mechanism. In `dependencies-only` mode (the default), your workspaces aren't allowed to use it.",
"enum": ["none", "dependencies-only", "all"],
"default": "dependencies-only"
},
"pnpIgnorePatterns": {
"_package": "@yarnpkg/plugin-pnp",
"description": "An Array of glob patterns. Files matching the following locations (in term of relative path compared to the generated `.pnp.cjs` file) will not be covered by PnP and will use the regular Node resolution. Typically only needed if you have subprojects that aren't yet part of your workspace tree.",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"_exampleItems": ["./subdir/*"]
},
"pnpMode": {
"_package": "@yarnpkg/plugin-pnp",
"description": "If `strict` (the default), Yarn won't allow modules to require packages they don't explicitly list in their own dependencies. If `loose`, Yarn will allow access to the packages that would have been hoisted to the top-level under 1.x installs. Note that, even in loose mode, such calls are unsafe (hoisting rules aren't predictable) and should be discouraged.",
"anyOf": [
{ "type": "string" },
{ "enum": ["strict", "loose"] }
],
"type": "string",
"default": "strict"
},
"pnpShebang": {
"_package": "@yarnpkg/plugin-pnp",
"description": "A header that will be prepended to the generated `.pnp.cjs` file. You're allowed to write multiple lines, but this is slightly frowned upon.",
"type": "string",
"pattern": "^(#!.*\n?)+",
"default": "#!/usr/bin/env node"
},
"pnpUnpluggedFolder": {
"_package": "@yarnpkg/plugin-pnp",
"description": "The path where unplugged packages will be stored on the disk.",
"type": "string",
"format": "uri-reference",
"default": "./.yarn/unplugged"
},
"preferAggregateCacheInfo": {
"_package": "@yarnpkg/core",
"description": "If true, Yarn will only print a one-line report of any cache changes.",
"type": "boolean",
"examples": [false]
},
"preferDeferredVersions": {
"_package": "@yarnpkg/plugin-version",
"description": "If true, Yarn will use the deferred versioning (`--deferred`) by default when running the `yarn version` family of commands. This can be overruled on a by-command basis by manually setting the `--immediate` flag.",
"type": "boolean",
"default": false
},
"preferInteractive": {
"_package": "@yarnpkg/core",
"description": "If true, Yarn will ask for your guidance when some actions would be improved by being disambiguated. Enabling this setting also unlocks some features (for example the `yarn add` command will suggest to reuse the same dependencies as other workspaces if pertinent).",
"type": "boolean",
"default": false
},
"preferReuse": {
"_package": "@yarnpkg/plugin-essentials",
"description": "If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",
"type": "boolean",
"default": false
},
"preferTruncatedLines": {
"_package": "@yarnpkg/core",
"description": "If true, Yarn will truncate lines that would go beyond the size of the terminal. If progress bars are disabled, lines will never be truncated. Forgettable lines (e.g. the fetch step logs) are always truncated.",
"type": "boolean",
"default": false
},
"progressBarStyle": {
"_package": "@yarnpkg/core",
"description": "Which style of progress bar should be used (only when progress bars are enabled). Valid values can be found [here](https://github.com/yarnpkg/berry/blob/ac2668904bdcd804e531291c749b9d17b8d3acd7/packages/yarnpkg-core/sources/StreamReport.ts#L40).",
"type": "string",
"enum": ["patrick", "simba", "jack", "hogsfather", "default"],
"examples": ["default"]
},
"rcFilename": {
"_package": "@yarnpkg/core",
"description": "This setting defines the name of the files that Yarn looks for when resolving the rc files. For obvious reasons this settings cannot be set within rc files, and must be defined in the environment using the `YARN_RC_FILENAME` variable.",
"type": "string",
"pattern": "^[^<>:;,?\"*|/]+$",
"default": ".yarnrc.yml"
},
"supportedArchitectures": {
"_package": "@yarnpkg/core",
"description": "Defines the systems for which Yarn should install packages.",
"type": "object",
"properties": {
"os": {
"description": "The list of operating systems to cover.",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"_exampleItems": ["current", "darwin", "linux", "win32"]
},
"cpu": {
"description": "The list of CPUs to cover.",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"_exampleItems": ["current", "x86", "ia32"]
},
"libc": {
"description": "The list of standard C libraries to cover.",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"_exampleItems": ["current", "glibc", "musl"]
}
},
"_exampleKeys": ["os", "cpu", "libc"]
},
"telemetryInterval": {
"_package": "@yarnpkg/core",
"description": "This setting defines the minimal amount of time between two telemetry uploads, in days. By default we only send one request per week, making it impossible for us to track your usage with a lower granularity.",
"type": "number",
"default": 7
},
"telemetryUserId": {
"_package": "@yarnpkg/core",
"description": "By default, we don't assign unique IDs in the telemetry we send, so we have no way to know which data originates from which project. This setting can be used to force a user ID to be sent to our telemetry server. Frankly, it's only useful in some very specific use cases. For example, we use it on the Yarn repository in order to exclude our own usage from the public dashboards (since we necessarily run Yarn more often here than anywhere else, the resulting data would be biased).",
"type": "string",
"examples": ["yarnpkg/berry"]
},
"tsEnableAutoTypes": {
"_package": "@yarnpkg/plugin-typescript",
"description": "If true, Yarn will automatically add `@types` dependencies when running `yarn add` with packages that don't provide their own typings (as reported by the Algolia npm database). This behaviour is enabled by default if you have a tsconfig file at the root of your project.",
"type": "boolean",
"examples": [true]
},
"unsafeHttpWhitelist": {
"_package": "@yarnpkg/core",
"description": "This setting lists the hostnames for which using the HTTP protocol is allowed. Any other hostname will be required to use HTTPS instead. The reason behind this decision and more details can be found [here](https://github.com/yarnpkg/berry/pull/416).\n\nGlob patterns are supported.",
"type": "array",
"items": {
"type": "string",
"pattern": "[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)"
},
"default": [],
"_exampleItems": ["*.example.org", "example.org"]
},
"virtualFolder": {
"_package": "@yarnpkg/core",
"description": "Due to a particularity in how Yarn installs packages which list peer dependencies, some packages will be mapped to multiple virtual directories that don't actually exist on the filesystem. This settings tells Yarn where to put them. Note that the folder name *must* be `__virtual__`.",
"type": "string",
"format": "uri-reference",
"pattern": "^.*__virtual__$",
"default": "./.yarn/__virtual__"
},
"yarnPath": {
"_package": "@yarnpkg/core",
"description": "The path of a Yarn binary, which will be executed instead of any other (including the global one) for any command run within the directory covered by the rc file. If the file extension ends with `.js` it will be required, and will be spawned in any other case.\n\nThe `yarnPath` setting is currently the preferred way to install Yarn within a project, as it ensures that your whole team will use the exact same Yarn version, without having to individually keep it up-to-date.",
"type": "string",
"format": "uri-reference",
"examples": ["./scripts/yarn-2.0.0-rc001.js"]
}
}
}