This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.npmrc
137 lines (128 loc) · 4.92 KB
/
.npmrc
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
; @see https://en.wikipedia.org/wiki/INI_file
; @see https://pnpm.io/npmrc
; @see https://pnpm.io/workspaces
; @see https://yarnpkg.com/features/pnp
; @see https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry
; @see https://pnpm.io/blog/2020/10/17/node-modules-configuration-options-with-pnpm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; opinions
; ^ everything should be in ~/.nodeproto
; ^^ feel free to change to the name of your thing
; ^ there is an optimial degree of efficiency vs effectiveness
; ^^ sometimes you sacrifice speed for stability
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; the following settings impact virtualization
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; we dont use node-linker=pnp as it breaks flowtyped
; thus using the second most strict node_modules architecture
; ^ no hoisting, with node-linker=isolated
; hoisting settings ;;;;;;;;;;;;;;;;;;;;
; true === makes unlisted deps accessible to all packages inside node_modules
hoist = false
; ['*'] == hoist all packages
; hoists dependencies to a hidden modules directory inside the virtual store
; makes unlisted/phantom deps available to pkgs in node modules only
hoist-pattern = []
; hoist-pattern[]=*
; hoist-pattern[]=*eslint*
; hoist-pattern[]=*babel*
; hoist-pattern[]=*nodeproto*
; hoists dependencies to the root modules directory
; makes unlisted/phantom deps available to application code + modules
; useful when dealing with some flawed pluggable tools that don't resolve dependencies properly.
public-hoist-pattern = []
; force hoist all packages to the root of node_modules
; if some tooling only works when the hoisted dependencies are in the root of node_modules
shamefully-hoist = false
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; dependency settings ;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; where all packages are saved on disk
; .pnpm-store
store-dir = /var/.nodeproto/.pnpm-store
; where dependencies will be installed
; dont fkn use a path starting with ~ for modules-dir
modules-dir = node_modules
; what linker should be used for installing node packages
; hoisted = npm/yarn classic
; pnp = yarn berry; make sure to delete root/pnp.js if not using this
; isolated = symlinked
node-linker = isolated
; must be false when node-linker=pnp
; true = create symlinks in pnpm virtualstore
symlink = true
; true = write files to the modules-dir (i.e. node_modules)
enable-modules-dir = true
; all (in)direct dependencies are linked into this dir
virtual-store-dir = node_modules/.pnpm
; how packags are imported from the store
; auto|hardlink|copy|clone
package-import-method = auto
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; global dependency+ state settings ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; where global packages are installed
global-dir = /var/.nodeproto/pnpm-global
; where to store global package bin files
global-bin-dir = /var/.nodeproto/pnpm-global/bin
; used by the update checker
state-dir = /var/.nodeproto/pnpm
; location of pacakge metadata cache
cache-dir = /var/.nodeproto/pnpm
;48 hours in minutes; delete orphan packages
modules-cache-max-age = 2880
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; lockfile settings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lockfile = true
; if the lockfile satisfied package.json dependencies
; pnpm skips depenceny resolution for speedier installation
prefer-frozen-lockfile = true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; registry settings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; TODO: we should always use the github registry
; as you dont know wtf you're downloading from npm
always-auth = false
; https://registry.npmjs.org/
; registry = https://npm.pkg.github.com/
; you could change this to @babel and force babel to download from github
; this forces resolution of packages i've personally forked
; to be retrieved from github regardless of what the registry setting is above
@noahehall:registry=https://npm.pkg.github.com/
save-exact = true
fetch-retries = 0
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
fetch-timeout = 60000
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; pnpm workspace
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
link-workspace-packages = true
prefer-workspace-packages = true
shared-workspace-lockfile = true
save-workspace-protocol = true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; the following settings do (should) not impact virtualization
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; pnpm cli settings ;;;;;;;;;;;;;;;;;;;;
color = auto
loglevel = info
strict-peer-dependencies = false
use-beta-cli = false
; always install for every package, not just the current one
recursive-install = true
engine-strict = false
; 16
child-concurrency = 1
; let pnpm set this dynamically
; unsafe-perm = false
; use-running-store-server = false
tag = latest
; pnpm will pick up path from nvm install location
;gobal-dir
; pnpm will pick up version installed via nvm
;use-node-version
use-stderr = false
; testing these CLI options can be set via config
prefer-offline = true