forked from yarnpkg/berry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yarnrc.json
871 lines (869 loc) Β· 45.5 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
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
{
"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",
"title": "Path where the downloaded packages are stored on your system.",
"description": "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"
},
"cacheMigrationMode": {
"_package": "@yarnpkg/core",
"type": "string",
"title": "Behavior that Yarn should follow when it detects that a cache entry is outdated.",
"description": "Whether or not a cache entry is outdated depends on whether it has been built and checksumed by an earlier release of Yarn, or under a different compression settings. Possible behaviors are:\n\n- If `required-only`, it'll keep using the file as-is, unless the version that generated it was decidedly too old.\n- If `match-spec`, it'll also rebuild the file if the compression level has changed.\n- If `always` (the default), it'll always regenerate the cache files so they use the current cache version.",
"enum": ["required-only", "match-spec", "always"],
"default": "always"
},
"httpsCaFilePath": {
"_package": "@yarnpkg/core",
"title": "Path to a file containing one or multiple Certificate Authority signing certificates.",
"type": "string",
"format": "uri-reference",
"examples": ["./exampleCA.pem"]
},
"changesetBaseRefs": {
"_package": "@yarnpkg/plugin-git",
"title": "List of git refs against which Yarn will compare your branch when it needs to detect changes.",
"description": "Supports git branches, tags, and commits. The default configuration will compare against master, origin/master, upstream/master, main, origin/main, and upstream/main.",
"type": "array",
"items": {
"type": "string"
},
"default": ["master", "origin/master", "upstream/master", "main", "origin/main", "upstream/main"]
},
"changesetIgnorePatterns": {
"_package": "@yarnpkg/plugin-git",
"title": "Array of file glob patterns that will be excluded from change detection.",
"description": "Files matching the following patterns (in terms of relative paths compared to the root of the project) will be ignored by every command checking whether files changed compared to the base ref (this include both `yarn version check` and `yarn workspaces foreach --since`).",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"_exampleItems": ["**/*.test.{js,ts}"]
},
"checksumBehavior": {
"_package": "@yarnpkg/core",
"type": "string",
"title": "Behavior that Yarn should follow when it detects that a cache entry has a different checksum than expected.",
"description": "Possible behaviors are:\n\n- If `throw` (the default), Yarn will throw an exception.\n- If `update`, the lockfile will be updated to match the cached checksum.\n- If `reset`, the cache entry will be purged and fetched anew.\n- If `ignore`, nothing will happen, Yarn will skip the check.",
"enum": ["throw", "update", "ignore", "reset"],
"default": "throw"
},
"cloneConcurrency": {
"_package": "@yarnpkg/plugin-git",
"title": "Amount of `git clone` operations that Yarn will run at the same time.",
"description": "We by default limit it to 2 concurrent clone operations.",
"type": "number",
"default": 2
},
"compressionLevel": {
"_package": "@yarnpkg/core",
"type": ["number", "string"],
"title": "Compression level employed for zip archives",
"description": "Possible values go from `0` (\"no compression, faster\") to `9` (\"heavy compression, slower\"). The value `mixed` is a variant of `9` where files are stored uncompressed if the gzip overhead would exceed the size gain.\n\nThe default is `0`, which tends to be significantly faster to install. Projects using zero-installs are advised to keep it this way, as experiments showed that Git stores uncompressed package archives more efficiently than gzip-compressed ones.",
"enum": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "mixed"],
"default": "mixed"
},
"constraintsPath": {
"_package": "@yarnpkg/plugin-constraints",
"title": "Path of the constraints file.",
"description": "This only matters for Prolog constraints, which are being deprecated. JavaScript constraints will always be read from the `yarn.config.cjs` file.",
"type": "string",
"format": "uri-reference",
"default": "./constraints.pro"
},
"defaultLanguageName": {
"_package": "@yarnpkg/core",
"title": "Default language mode that should be used when a package doesn't offer any insight.",
"description": "This is an internal configuration setting that shouldn't be touched unless you really know what you're doing.",
"type": "string",
"default": "node"
},
"defaultProtocol": {
"_package": "@yarnpkg/core",
"title": "Default protocol that should be used when a dependency range is a pure semver range.",
"description": "This is an internal configuration setting that shouldn't be touched unless you really know what you're doing.",
"type": "string",
"default": "npm:"
},
"defaultSemverRangePrefix": {
"_package": "@yarnpkg/plugin-essentials",
"type": "string",
"title": "Default prefix used in semver ranges created by `yarn add` and similar commands.",
"description": "Possible values are `\"^\"` (the default), `\"~\"` or `\"\"`.",
"enum": ["^", "~", ""],
"default": "^"
},
"deferredVersionFolder": {
"_package": "@yarnpkg/plugin-version",
"title": "Folder where the versioning files are stored.",
"type": "string",
"format": "uri-reference",
"default": "./.yarn/versions"
},
"enableColors": {
"_package": "@yarnpkg/core",
"title": "Define whether colors are allowed on the standard output.",
"description": "The default is to check the terminal capabilities, but you can manually override it to either `true` or `false`.",
"type": "boolean",
"examples": [true]
},
"enableConstraintsChecks": {
"_package": "@yarnpkg/plugin-constraints",
"title": "Define whether constraints should run on every install.",
"description": "If true, Yarn will run your constraints right after finishing its installs. This may help decrease the feedback loop delay by catching errors long before your CI would even report them.",
"type": "boolean",
"examples": [true]
},
"enableGlobalCache": {
"_package": "@yarnpkg/core",
"title": "Define whether the cache should be shared between all local projects.",
"description": "If true (the default), Yarn will store the cache files into a folder located within `globalFolder` instead of respecting `cacheFolder`.",
"type": "boolean",
"default": true
},
"enableHardenedMode": {
"_package": "@yarnpkg/core",
"title": "Define whether Yarn should attempt to check for malicious changes.",
"description": "If true, Yarn will query the remote registries to validate that the lockfile content matches the remote information. These checks make installs slower, so you should only run them on branches managed by users outside your circle of trust.\n\nYarn will automatically enable the hardened mode on GitHub pull requests from public repository. Should you want to disable it, explicitly set it to `false` in your yarnrc file.",
"type": "boolean",
"default": true
},
"enableHyperlinks": {
"_package": "@yarnpkg/core",
"title": "Define whether hyperlinks are allowed on the standard output.",
"description": "The default is to check the terminal capabilities, but you can manually override it to either `true` or `false`.",
"type": "boolean",
"examples": [true]
},
"enableImmutableCache": {
"_package": "@yarnpkg/core",
"title": "Define whether to allow adding/removing files from the cache or not.",
"description": "If true, Yarn will refuse to change the cache in any way, whether it would add files or remove them, and will abort installs instead of letting that happen.",
"type": "boolean",
"default": false
},
"enableImmutableInstalls": {
"_package": "@yarnpkg/plugin-essentials",
"title": "Define whether to allow adding/removing entries from the lockfile or not.",
"description": "If true (the default on CI), Yarn will refuse to change the lockfile in any way, whether it would add new entries or remove them. Other files can be added to the checklist via the `immutablePatterns` setting.",
"type": "boolean",
"default": false
},
"enableInlineBuilds": {
"_package": "@yarnpkg/core",
"title": "Define whether to print the build output directly within the terminal or not.",
"description": "If true (the default on CI environments), Yarn will print the build output directly within the terminal instead of buffering it in an external log file. Note that by default Yarn will attempt to use collapsible terminal sequences on supporting CI providers to make the output more legible.",
"type": "boolean",
"examples": [false]
},
"enableInlineHunks": {
"_package": "@yarnpkg/plugin-patch",
"title": "Define whether to print patch hunks directly within the terminal or not.",
"description": "If true, Yarn will print any patch sections (hunks) that could not be applied successfully to the terminal.",
"type": "boolean",
"examples": [false]
},
"enableMessageNames": {
"_package": "@yarnpkg/core",
"title": "Define whether to prepend a message name before each printed line or not.",
"description": "If true, Yarn will prefix most messages with codes suitable for search engines, with hyperlink support if your terminal allows it.",
"type": "boolean",
"default": true
},
"enableMirror": {
"_package": "@yarnpkg/core",
"title": "Define whether to mirror local cache entries into the global cache or not.",
"description": "If true (the default), Yarn will use the global folder as indirection between the network and the actual cache. This is only useful if `enableGlobalCache` is explicitly set to `false`, as otherwise the cache entries are persisted to the global cache no matter what.",
"type": "boolean",
"default": true
},
"enableNetwork": {
"_package": "@yarnpkg/core",
"title": "Define whether remote network requests are allowed or not.",
"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
},
"enableOfflineMode": {
"_package": "@yarnpkg/core",
"title": "Define whether Yarn should exclusively read package metadata from its cache",
"description": "If true, Yarn will replace any network requests by reads from its local caches - even if they contain old information. This can be useful when performing local work on environments without network access (trains, planes, ...), as you can at least leverage the packages you installed on the same machine in the past.\n\nSince this setting will lead to stale data being used, it's recommended to set it for the current session as an environment variable (by running `export YARN_ENABLE_OFFLINE_MODE=1` in your terminal) rather than by adding it to your `.yarnrc.yml` file.",
"type": "boolean",
"default": false
},
"enableProgressBars": {
"_package": "@yarnpkg/core",
"title": "Define whether animated progress bars should be shown or not.",
"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",
"titke": "Define whether to run postinstall scripts or not.",
"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).\n\nNote that you also have the ability to disable scripts on a per-package basis using `dependenciesMeta`, or to re-enable a specific script by combining `enableScripts` and `dependenciesMeta`.",
"type": "boolean",
"default": true
},
"enableStrictSsl": {
"_package": "@yarnpkg/core",
"title": "Define whether SSL errors should fail requests or not.",
"description": "If false, SSL certificate errors will be ignored",
"type": "boolean",
"default": true
},
"enableTelemetry": {
"_package": "@yarnpkg/core",
"title": "Define whether anonymous telemetry data should be sent or not.",
"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 dependencies in your project, how many installs you ran, etc.\n\nConsult the [Telemetry](/advanced/telemetry) page for more details about this process.",
"type": "boolean",
"examples": [true]
},
"enableTimers": {
"_package": "@yarnpkg/core",
"title": "Define whether to print the time spent running each sub-step or not.",
"description": "If false, Yarn will not print the time spent running each sub-step when running various commands. This is only 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",
"title": "Define whether pure semver ranges should allow workspace resolution or not.",
"description": "If false, Yarn won't link workspaces just because their versions happen to match a semver range. Disabling this setting will require all workspaces to reference one another using the explicit `workspace:` protocol.\n\nThis setting is usually only needed when your project needs to use the published version in order to build the new one (that's for example what happens with Babel, which depends on the latest stable release to build the future ones).",
"type": "boolean",
"default": true
},
"globalFolder": {
"_package": "@yarnpkg/core",
"title": "Path where all files global to the system will be stored.",
"description": "Various files we be stored there: global cache, metadata cache, ...",
"type": "string",
"format": "uri-reference",
"examples": ["${HOME}/.yarn/berry"]
},
"httpProxy": {
"_package": "@yarnpkg/core",
"title": "Proxy to use when making an HTTP request.",
"description": "Only HTTP proxies are supported at the moment.",
"type": "string",
"format": "uri",
"examples": ["http://proxy:4040"]
},
"httpRetry": {
"_package": "@yarnpkg/core",
"title": "Amount of time to wait in seconds before retrying a failed HTTP request.",
"type": "number",
"default": 3
},
"httpTimeout": {
"_package": "@yarnpkg/core",
"title": "Amount of time to wait in milliseconds before cancelling pending HTTP requests.",
"type": "number",
"default": 60000
},
"httpsCertFilePath": {
"_package": "@yarnpkg/core",
"title": "Path to a file containing a certificate chain in PEM format.",
"type": "string",
"format": "uri-reference",
"examples": ["./exampleCert.pem"]
},
"httpsKeyFilePath": {
"_package": "@yarnpkg/core",
"title": "Path to a file containing a private key in PEM format.",
"type": "string",
"format": "uri-reference",
"examples": ["./exampleKey.pem"]
},
"httpsProxy": {
"_package": "@yarnpkg/core",
"title": "Define a proxy to use when making an HTTPS request.",
"description": "Only HTTP proxies are supported at the moment.",
"type": "string",
"format": "uri",
"examples": ["http://proxy:4040"]
},
"ignorePath": {
"_package": "@yarnpkg/core",
"title": "Define whether `yarnPath` should be respected or not.",
"description": "If true, whatever Yarn version is being executed will keep running rather than looking at the value of `yarnPath` to decide.",
"type": "boolean",
"default": false
},
"immutablePatterns": {
"_package": "@yarnpkg/core",
"title": "Array of file patterns whose content won't be allowed to change if `enableImmutableInstalls` is set.",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"_exampleItems": ["**/.pnp.*"]
},
"initScope": {
"_package": "@yarnpkg/plugin-init",
"title": "Scope used when creating packages via the `init` command.",
"type": "string",
"pattern": "^([^/]+?)$",
"default": "yarnpkg"
},
"initFields": {
"_package": "@yarnpkg/plugin-init",
"title": "Additional fields to set when creating packages via the `init` command.",
"type": "object",
"patternProperties": {
"^(.+)$": {
"type": ["string", "number", "boolean"],
"description": "All properties will be added verbatim to the generated package.json.",
"examples": ["https://yarnpkg.com"]
}
},
"_exampleKeys": ["homepage"]
},
"injectEnvironmentFiles": {
"_package": "@yarnpkg/core",
"title": "Array of .env files which will get injected into any subprocess spawned by Yarn.",
"description": "By default Yarn will automatically inject the variables stored in the `.env.yarn` file, but you can use this setting to change this behavior.\n\nNote that adding a question mark at the end of the path will silence the error Yarn would throw should the file be missing, which may come in handy when declaring local configuration files.",
"type": "array",
"items": {
"type": "string",
"format": "uri-reference"
},
"default": [],
"_exampleItems": [".my-env", ".my-local-env?"]
},
"installStatePath": {
"_package": "@yarnpkg/core",
"title": "Path where the install state will be persisted.",
"description": "The install state file contains a bunch of cached information about your project. It's only used for optimization purposes, and will be recreated if missing (you don't need to add it to Git).",
"type": "string",
"format": "uri-reference",
"default": "./.yarn/install-state.gz"
},
"logFilters": {
"title": "Alter the log levels for emitted messages.",
"description": "This can be used to hide specific messages, or instead make them more prominent. Rules defined there accept filtering messages by either name or raw content.",
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"title": "Match all messages with the given code.",
"examples": ["YN0005"]
},
"text": {
"type": "string",
"title": "Match messages whose content is strictly equal to the given text.",
"description": "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",
"title": "Match messages whose content match the given glob pattern.",
"description": "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 overridden 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": {
"type": "string",
"title": "New log level to apply to the matching messages. Use `discard` if you wish to hide those messages altogether.",
"enum": ["info", "warning", "error", "discard"]
}
}
},
"_exampleItems": [
{
"code": "YN0006",
"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"
}
]
},
"networkConcurrency": {
"_package": "@yarnpkg/core",
"title": "Amount of HTTP requests that are allowed to run at the same time.",
"description": "We default 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 traffic.",
"type": "number",
"default": 50
},
"networkSettings": {
"_package": "@yarnpkg/core",
"title": "Additional network settings, per hostname",
"type": "object",
"patternProperties": {
"^(.+)$": {
"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": ["*.example.com"]
},
"nmHoistingLimits": {
"_package": "@yarnpkg/plugin-nm",
"title": "Highest point where packages can be hoisted.",
"description": "Replacement of the former `nohoist` setting. Possible values are:\n\n- If `none` (the default), packages are hoisted as per the usual rules.\n- If `workspaces`, packages won't be hoisted past the workspace that depends on them.\n- If `dependencies`, transitive dependencies also won't be hoisted past your direct dependencies.\n\nThis setting can be overridden on a per-workspace basis using the `installConfig.hoistingLimits` field.",
"type": "string",
"enum": ["workspaces", "dependencies", "none"],
"default": "none"
},
"nmSelfReferences": {
"_package": "@yarnpkg/plugin-nm",
"title": "Define whether workspaces are allowed to require themselves.",
"description": "If false, Yarn won't create self-referencing symlinks when using `nodeLinker: node-modules`. This setting can be overridden on a per-workspace basis using the `installConfig.selfReferences` field.",
"type": "boolean",
"default": true
},
"nmMode": {
"_package": "@yarnpkg/plugin-nm",
"title": "Define how to copy files to their target destination.",
"description": "Possible values are:\n\n- If `classic`, regular copy or clone operations are performed.\n- If `hardlinks-global`, hardlinks to a global content-addressable store will be used.\n- If `hardlinks-local`, hardlinks will only be created between similar packages from the same project.\n\nFor compatibility with the ecosystem, the default is `classic`.",
"type": "string",
"enum": ["classic", "hardlinks-local", "hardlinks-global"],
"default": "classic"
},
"nodeLinker": {
"_package": "@yarnpkg/plugin-pnp",
"title": "Define how Node packages should be installed.",
"description": "Yarn supports three ways to install your project's dependencies, based on the `nodeLinker` setting. Possible values are:\n\n- If `pnp`, a single Node.js loader file will be generated.\n- If `pnpm`, a `node-modules` will be created using symlinks and hardlinks to a global content-addressable store.\n- If `node-modules`, a regular `node_modules` folder just like in Yarn Classic or npm will be created.",
"anyOf": [
{ "type": "string" },
{ "enum": ["pnp", "pnpm", "node-modules"] }
],
"type": "string",
"default": "pnp"
},
"winLinkType": {
"_package": "@yarnpkg/core",
"title": "Define whether to use junctions or symlinks when creating links on Windows.",
"description": "Possible values are:\n\n- If `junctions`, Yarn will use Windows junctions when linking workspaces into `node_modules` directories, which are always absolute paths.\n- If `symlinks`, Yarn will use symlinks, which will use relative paths, and is consistent with Yarn's behavior on non-Windows platforms.\n\nSymlinks are preferred, but they require the Windows user running Yarn to have the `create symbolic links` privilege. As a result, we default to using junctions instead.",
"type": "string",
"enum": ["junctions", "symlinks"]
},
"npmAlwaysAuth": {
"_package": "@yarnpkg/plugin-npm",
"title": "Define whether to always send authentication credentials when querying the npm registry.",
"description": "If true, authentication credentials will always be sent when sending requests to the registries. This shouldn't be needed unless you configured the registry to reference a private npm mirror.",
"type": "boolean",
"default": false
},
"npmAuditRegistry": {
"_package": "@yarnpkg/plugin-npm",
"title": "Define the registry to use when auditing dependencies.",
"description": "If not explicitly set, the value of `npmRegistryServer` will be used.",
"type": "string",
"format": "uri",
"examples": ["https://registry.npmjs.org"]
},
"npmAuthIdent": {
"_package": "@yarnpkg/plugin-npm",
"title": "Define the authentication credentials to use by default when accessing your registries.",
"description": "Replacement of the former `_auth` setting. Because it requires storing unencrypted values in your configuration, `npmAuthToken` should be preferred when possible.",
"type": "string",
"examples": ["username:password"]
},
"npmAuthToken": {
"_package": "@yarnpkg/plugin-npm",
"title": "Define the authentication token to use by default when accessing your registries.",
"description": "Replacement of the former `_authToken` settings. If you're using `npmScopes` to define multiple registries, the `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",
"type": "string",
"title": "Define the default access to use when publishing packages to the npm registry.",
"description": "Valid values are `public` and `restricted`, but `restricted` usually requires to register for a paid plan (this is up to the registry you use). Can be overridden on a per-package basis using the `publishConfig.access` field.",
"enum": ["public", "restricted"]
},
"npmAuditExcludePackages": {
"_package": "@yarnpkg/plugin-npm-cli",
"title": "Array of advisory ID glob patterns of packages to exclude from `yarn npm audit`.",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"examples": ["known_insecure_package"]
},
"npmAuditIgnoreAdvisories": {
"_package": "@yarnpkg/plugin-npm-cli",
"title": "Array of advisory ID glob patterns to ignore from `yarn npm audit` results.",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"examples": ["1234567"]
},
"npmPublishRegistry": {
"_package": "@yarnpkg/plugin-npm",
"title": "Define the registry to use when pushing packages.",
"description": "If not explicitly set, 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",
"title": "Per-registry configurations.",
"type": "object",
"patternProperties": {
"^(?:^[a-zA-Z][a-zA-Z0-9+-.]*:)?[^\\s]*$": {
"type": "object",
"properties": {
"npmAlwaysAuth": {
"$ref": "#/properties/npmAlwaysAuth"
},
"npmAuthIdent": {
"$ref": "#/properties/npmAuthIdent"
},
"npmAuthToken": {
"$ref": "#/properties/npmAuthToken"
}
}
}
},
"additionalProperties": false,
"_exampleKeys": ["//npm.pkg.github.com"]
},
"npmRegistryServer": {
"_package": "@yarnpkg/plugin-npm",
"title": "Define the registry to use when fetching packages.",
"description": "Should you want to define different registries for different scopes, see `npmScopes`. To define the authentication scheme for your servers, see `npmAuthToken`. The url must use HTTPS by default, but this can be changed by adding it to the `unsafeHttpWhitelist`.",
"type": "string",
"format": "uri",
"default": "https://registry.yarnpkg.com"
},
"npmScopes": {
"_package": "@yarnpkg/plugin-npm",
"title": "Per-scope registry configurations.",
"type": "object",
"patternProperties": {
"^\\S+$": {
"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"
}
}
}
},
"additionalProperties": false,
"_exampleKeys": ["my-company"]
},
"packageExtensions": {
"_package": "@yarnpkg/core",
"title": "Extend the package definitions of your dependencies; useful to fix third-party issues.",
"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/yarnpkg-extensions/sources/index.ts).\n\nNote: This field is made to add dependencies; if you need to rewrite existing ones, prefer the `resolutions` field instead.",
"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]
}
}
}
},
"additionalProperties": false,
"_exampleKeys": ["webpack-cli"]
}
},
"_margin": false
}
},
"additionalProperties": false,
"_exampleKeys": ["webpack@*"]
},
"patchFolder": {
"_package": "@yarnpkg/plugin-patch",
"title": "Folder where patch files will be written to.",
"type": "string",
"format": "uri-reference",
"default": "./.yarn/patches"
},
"pnpEnableEsmLoader": {
"_package": "@yarnpkg/plugin-pnp",
"title": "Define whether to generate a Node.js ESM loader or not.",
"description": "If true, Yarn will generate an experimental ESM loader (`.pnp.loader.mjs`) on top of the CJS one.",
"type": "boolean",
"default": false
},
"pnpEnableInlining": {
"_package": "@yarnpkg/plugin-pnp",
"title": "Define whether to store the PnP data in the generated file or not.",
"description": "If false, Yarn will generate an additional `.pnp.data.json` file.",
"type": "boolean",
"default": true
},
"pnpFallbackMode": {
"_package": "@yarnpkg/plugin-pnp",
"type": "string",
"title": "Define whether to allow packages to rely on the builtin PnP fallback mechanism.",
"description": "Possible values are:\n\n- If `all`, all packages can access dependencies made available in the fallback.\n- If `dependencies-only` (the default), dependencies will have access to them but not your workspaces.\n- If `none`, no packages will have access to them.",
"enum": ["none", "dependencies-only", "all"],
"default": "dependencies-only"
},
"pnpIgnorePatterns": {
"_package": "@yarnpkg/plugin-pnp",
"title": "Array of file glob patterns that should be forced to use the default CommonJS resolution.",
"description": "Files matching those locations will not be covered by PnP and will use the regular Node.js resolution algorithm. 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",
"title": "Define whether to attempt to simulate traditional `node_modules` hoisting.",
"description": "Possible values are:\n\n- If `strict` (the default), modules won't be allowed to require packages they don't explicitly list in their own dependencies.\n- If `loose`, packages will be allowed to access any other package that would have been hoisted to the top-level under 1.x installs.\n\nNote that, even in loose mode, hoisted require calls are unsafe and should be discouraged.",
"enum": ["strict", "loose"],
"type": "string",
"default": "strict"
},
"pnpShebang": {
"_package": "@yarnpkg/plugin-pnp",
"title": "String prepended to the generated PnP loader.",
"type": "string",
"pattern": "^(#!.*\n?)+",
"default": "#!/usr/bin/env node"
},
"pnpUnpluggedFolder": {
"_package": "@yarnpkg/plugin-pnp",
"title": "Path where unplugged packages are stored.",
"description": "While Yarn attempts to reference and load packages directly from their zip archives, it may not always be possible. In those cases, Yarn will extract the files to the unplugged folder.",
"type": "string",
"format": "uri-reference",
"default": "./.yarn/unplugged"
},
"preferDeferredVersions": {
"_package": "@yarnpkg/plugin-version",
"title": "Define whether to use deferred versioning by default or not.",
"description": "If true, deferred versioning by default when running the `yarn version` family of commands.",
"type": "boolean",
"default": false
},
"preferInteractive": {
"_package": "@yarnpkg/core",
"title": "Define whether to use interactive prompts by default or not.",
"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",
"title": "Define whether to reuse most common dependency ranges or not when adding dependencies to a package.",
"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",
"title": "Define whether to truncate lines that would go beyond the size of the terminal or not.",
"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.",
"type": "boolean",
"default": false
},
"progressBarStyle": {
"_package": "@yarnpkg/core",
"title": "Style of progress bar to use.",
"type": "string",
"enum": ["patrick", "simba", "jack", "hogsfather", "default"],
"examples": ["default"]
},
"supportedArchitectures": {
"_package": "@yarnpkg/core",
"title": "Systems for which Yarn should install packages.",
"type": "object",
"properties": {
"os": {
"title": "List of operating systems to cover.",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"_exampleItems": ["current", "darwin", "linux", "win32"]
},
"cpu": {
"title": "List of CPU architectures to cover.",
"description": "See https://nodejs.org/docs/latest/api/process.html#processarch for the architectures supported by Node.js",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"_exampleItems": ["current", "x64", "ia32", "arm64"]
},
"libc": {
"title": "The list of standard C libraries to cover.",
"type": "array",
"items": {
"type": "string"
},
"default": [],
"_exampleItems": ["current", "glibc", "musl"]
}
}
},
"taskPoolConcurrency": {
"_package": "@yarnpkg/core",
"title": "Maximal amount of concurrent heavy task processing.",
"description": "We default to the platform parallelism, but for some CI, `os.cpus` may not report accurate values and may overwhelm their containers.",
"type": "number",
"default": "os.availableParallelism()"
},
"workerPoolMode": {
"_package": "@yarnpkg/core",
"title": "Execution strategy for heavy tasks.",
"description": "By default will use workers when performing heavy tasks, such as converting tgz files to zip. This setting can be used to disable workers and use a regular in-thread async processing.",
"type": "string",
"enum": ["async", "workers"],
"default": "workers"
},
"telemetryInterval": {
"_package": "@yarnpkg/core",
"title": "Define the minimal amount of time between two telemetry events, in days.",
"description": "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",
"title": "User-defined unique ID to send along with telemetry events.",
"description": "The default settings never assign unique IDs to anyone, 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.\n\nFrankly, 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 run Yarn far more often here than anywhere else, the resulting data would be biased).",
"type": "string",
"examples": ["yarnpkg/berry"]
},
"tsEnableAutoTypes": {
"_package": "@yarnpkg/plugin-typescript",
"title": "Define whether to automatically install @types dependencies.",
"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 behavior is enabled by default if you have a tsconfig.json file at the root of your project, or in your current workspace.",
"type": "boolean",
"examples": [true]
},
"unsafeHttpWhitelist": {
"_package": "@yarnpkg/core",
"title": "Array of hostname glob patterns for which using the HTTP protocol is allowed.",
"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",
"title": "Path where virtual packages will be stored.",
"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",
"title": "Path of a Yarn binary to use instead of the global one.",
"description": "This binary 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 used to be the preferred way to install Yarn within a project, but we now recommend to use [Corepack](https://nodejs.org/api/corepack.html) in most cases.",
"type": "string",
"format": "uri-reference",
"examples": ["./scripts/yarn-2.0.0-rc001.js"]
}
}
}