1NPM-INSTALL-CI-TEST(1) NPM-INSTALL-CI-TEST(1)
2
3
4
6 npm-install-ci-test - Install a project with a clean slate and run
7 tests
8
9 Synopsis
10 npm install-ci-test
11
12 aliases: cit, clean-install-test, sit
13
14 Description
15 This command runs npm ci followed immediately by npm test.
16
17 Configuration
18 install-strategy
19 • Default: "hoisted"
20
21 • Type: "hoisted", "nested", "shallow", or "linked"
22
23
24 Sets the strategy for installing packages in node_modules. hoisted (de‐
25 fault): Install non-duplicated in top-level, and duplicated as neces‐
26 sary within directory structure. nested: (formerly --legacy-bundling)
27 install in place, no hoisting. shallow (formerly --global-style) only
28 install direct deps at top-level. linked: (experimental) install in
29 node_modules/.store, link in place, unhoisted.
30
31 legacy-bundling
32 • Default: false
33
34 • Type: Boolean
35
36 • DEPRECATED: This option has been deprecated in favor of --install-
37 strategy=nested
38
39
40 Instead of hoisting package installs in node_modules, install packages
41 in the same manner that they are depended on. This may cause very deep
42 directory structures and duplicate package installs as there is no de-
43 duplicating. Sets --install-strategy=nested.
44
45 global-style
46 • Default: false
47
48 • Type: Boolean
49
50 • DEPRECATED: This option has been deprecated in favor of --install-
51 strategy=shallow
52
53
54 Only install direct dependencies in the top level node_modules, but
55 hoist on deeper dependencies. Sets --install-strategy=shallow.
56
57 omit
58 • Default: 'dev' if the NODE_ENV environment variable is set to 'pro‐
59 duction', otherwise empty.
60
61 • Type: "dev", "optional", or "peer" (can be set multiple times)
62
63
64 Dependency types to omit from the installation tree on disk.
65
66 Note that these dependencies are still resolved and added to the pack‐
67 age-lock.json or npm-shrinkwrap.json file. They are just not physically
68 installed on disk.
69
70 If a package type appears in both the --include and --omit lists, then
71 it will be included.
72
73 If the resulting omit list includes 'dev', then the NODE_ENV environ‐
74 ment variable will be set to 'production' for all lifecycle scripts.
75
76 include
77 • Default:
78
79 • Type: "prod", "dev", "optional", or "peer" (can be set multiple
80 times)
81
82
83 Option that allows for defining which types of dependencies to install.
84
85 This is the inverse of --omit=<type>.
86
87 Dependency types specified in --include will not be omitted, regardless
88 of the order in which omit/include are specified on the command-line.
89
90 strict-peer-deps
91 • Default: false
92
93 • Type: Boolean
94
95
96 If set to true, and --legacy-peer-deps is not set, then any conflicting
97 peerDependencies will be treated as an install failure, even if npm
98 could reasonably guess the appropriate resolution based on non-peer de‐
99 pendency relationships.
100
101 By default, conflicting peerDependencies deep in the dependency graph
102 will be resolved using the nearest non-peer dependency specification,
103 even if doing so will result in some packages receiving a peer depen‐
104 dency outside the range set in their package's peerDependencies object.
105
106 When such an override is performed, a warning is printed, explaining
107 the conflict and the packages involved. If --strict-peer-deps is set,
108 then this warning is treated as a failure.
109
110 foreground-scripts
111 • Default: false
112
113 • Type: Boolean
114
115
116 Run all build scripts (ie, preinstall, install, and postinstall)
117 scripts for installed packages in the foreground process, sharing stan‐
118 dard input, output, and error with the main npm process.
119
120 Note that this will generally make installs run slower, and be much
121 noisier, but can be useful for debugging.
122
123 ignore-scripts
124 • Default: false
125
126 • Type: Boolean
127
128
129 If true, npm does not run scripts specified in package.json files.
130
131 Note that commands explicitly intended to run a particular script, such
132 as npm start, npm stop, npm restart, npm test, and npm run-script will
133 still run their intended script if ignore-scripts is set, but they will
134 not run any pre- or post-scripts.
135
136 audit
137 • Default: true
138
139 • Type: Boolean
140
141
142 When "true" submit audit reports alongside the current npm command to
143 the default registry and all registries configured for scopes. See the
144 documentation for npm help audit for details on what is submitted.
145
146 bin-links
147 • Default: true
148
149 • Type: Boolean
150
151
152 Tells npm to create symlinks (or .cmd shims on Windows) for package ex‐
153 ecutables.
154
155 Set to false to have it not do this. This can be used to work around
156 the fact that some file systems don't support symlinks, even on osten‐
157 sibly Unix systems.
158
159 fund
160 • Default: true
161
162 • Type: Boolean
163
164
165 When "true" displays the message at the end of each npm install ac‐
166 knowledging the number of dependencies looking for funding. See npm
167 help fund for details.
168
169 dry-run
170 • Default: false
171
172 • Type: Boolean
173
174
175 Indicates that you don't want npm to make any changes and that it
176 should only report what it would have done. This can be passed into any
177 of the commands that modify your local installation, eg, install, up‐
178 date, dedupe, uninstall, as well as pack and publish.
179
180 Note: This is NOT honored by other network related commands, eg dist-
181 tags, owner, etc.
182
183 workspace
184 • Default:
185
186 • Type: String (can be set multiple times)
187
188
189 Enable running a command in the context of the configured workspaces of
190 the current project while filtering by running only the workspaces de‐
191 fined by this configuration option.
192
193 Valid values for the workspace config are either:
194
195 • Workspace names
196
197 • Path to a workspace directory
198
199 • Path to a parent workspace directory (will result in selecting all
200 workspaces within that folder)
201
202
203 When set for the npm init command, this may be set to the folder of a
204 workspace which does not yet exist, to create the folder and set it up
205 as a brand new workspace within the project.
206
207 This value is not exported to the environment for child processes.
208
209 workspaces
210 • Default: null
211
212 • Type: null or Boolean
213
214
215 Set to true to run the command in the context of all configured
216 workspaces.
217
218 Explicitly setting this to false will cause commands like install to
219 ignore workspaces altogether. When not set explicitly:
220
221 • Commands that operate on the node_modules tree (install, update,
222 etc.) will link workspaces into the node_modules folder. - Commands
223 that do other things (test, exec, publish, etc.) will operate on
224 the root project, unless one or more workspaces are specified in
225 the workspace config.
226
227
228 This value is not exported to the environment for child processes.
229
230 include-workspace-root
231 • Default: false
232
233 • Type: Boolean
234
235
236 Include the workspace root when workspaces are enabled for a command.
237
238 When false, specifying individual workspaces via the workspace config,
239 or all workspaces via the workspaces flag, will cause npm to operate
240 only on the specified workspaces, and not on the root project.
241
242 This value is not exported to the environment for child processes.
243
244 install-links
245 • Default: false
246
247 • Type: Boolean
248
249
250 When set file: protocol dependencies will be packed and installed as
251 regular dependencies instead of creating a symlink. This option has no
252 effect on workspaces.
253
254 See Also
255 • npm help install-test
256
257 • npm help ci
258
259 • npm help test
260
261
262
263 November 2023 NPM-INSTALL-CI-TEST(1)