You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contributors consists of an an array of [authors](#author).
227
+
221
228
Both email and url are optional either way.
222
229
223
-
npm also sets a top-level "maintainers" field with your npm user info.
230
+
### maintainers (deprecated)
231
+
232
+
The `maintainers` when set in package.json is not awknowledged or used by npm. `maintainers` is used internally by npm on package-like payloads.
224
233
225
234
### funding
226
235
@@ -341,10 +350,16 @@ These can not be included.
341
350
342
351
### exports
343
352
344
-
The "exports" provides a modern alternative to "main" allowing multiple entry points to be defined, conditional entry resolution support between environments, and preventing any other entry points besides those defined in "exports". This encapsulation allows module authors to clearly define the public interface for their package. For more details see the [node.js documentation on package entry points](https://nodejs.org/api/packages.html#package-entry-points)
353
+
See Node.js documentation on `exports`[here](https://nodejs.org/api/packages.html#exports).
354
+
355
+
### imports
356
+
357
+
See Node.js documentation on `imports`[here](https://nodejs.org/api/packages.html#imports).
345
358
346
359
### main
347
360
361
+
> See Node.js documentation on `main`[here](https://nodejs.org/api/packages.html#main).
362
+
348
363
The main field is a module ID that is the primary entry point to your
349
364
program. That is, if your package is named `foo`, and a user installs it,
350
365
and then does `require("foo")`, then your main module's exports object will
@@ -893,13 +908,16 @@ This file contains the dependencies `renderized` and `super-streams` which
893
908
can be installed in a new project by executing `npm install
894
909
awesome-web-framework-1.0.0.tgz`. Note that the package names do not
895
910
include any versions, as that information is specified in`dependencies`.
896
-
897
911
If this is spelled `"bundledDependencies"`, then that is also honored.
898
912
899
913
Alternatively, `"bundleDependencies"` can be defined as a boolean value. A
900
914
value of `true` will bundle all dependencies, a value of `false` will bundle
901
915
none.
902
916
917
+
### bundledDependencies (deprecated)
918
+
919
+
Is honored by npm as alias of [bundleDependcies](#bundleDependencies).
920
+
903
921
### optionalDependencies
904
922
905
923
If a dependency can be used, but you would like npm to proceed if it cannot
@@ -1191,6 +1209,24 @@ default.
1191
1209
See [`config`](/using-npm/config) to see the list of config options that
1192
1210
can be overridden.
1193
1211
1212
+
### type
1213
+
1214
+
> See Node.js documentation on `type` [here](https://nodejs.org/api/packages.html#type).
1215
+
1216
+
Property that governs if Node.js will interpret package as [CommonJS (cjs)](https://nodejs.org/docs/latest/api/modules.html#modules-commonjs-modules) or [ECMAScript Module (esm)](https://nodejs.org/docs/latest/api/esm.html).
1217
+
1218
+
When this field is undefined it is interpreted as the value `commonjs`.
1219
+
1220
+
### types
1221
+
1222
+
See TypeScript documentation on `types` [here](https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html).
1223
+
1224
+
Used by npmjs.org to display `ts` badege for a given package.
1225
+
1226
+
### typings
1227
+
1228
+
Alias of [types](#types).
1229
+
1194
1230
### workspaces
1195
1231
1196
1232
The optional `workspaces` field is an array of file patterns that describes
0 commit comments