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