[READ-ONLY] Mirror of https://github.com/danielroe/siroc. Zero-config build tooling for Node
bundle node package rollup typescript
0

Configure Feed

Select the types of activity you want to include in your feed.

Merge remote-tracking branch 'origin/renoirb/2020071600' into main

Daniel Roe (Aug 5, 2020, 12:00 PM +0100) 043d68e8 f12d7c7a

+35 -1
+35 -1
src/core/package/types.ts
··· 115 115 * In some cases, you want to express the compatibility of your package with a host tool or library, while not necessarily doing a `require` of this host. This is usually referred to as a plugin. Notably, your module may be exposing a specific interface, expected and specified by the host documentation. 116 116 */ 117 117 peerDependencies?: Record<string, string> 118 - 118 + /** 119 + * TypeScript typings, typically ending by .d.ts 120 + */ 119 121 types?: string 122 + typings?: string 123 + /** 124 + * Non-Standard Node.js alternate entry-point to main. 125 + * An initial implementation for supporting CJS packages (from main), and use module for ESM modules. 126 + */ 120 127 module?: string 128 + /** 129 + * Make main entry-point be loaded as an ESM module, support "export" syntax instead of "require" 130 + * 131 + * Docs: 132 + * - https://nodejs.org/docs/latest-v14.x/api/esm.html#esm_package_json_type_field 133 + * 134 + * @default 'commonjs' 135 + * @since Node.js v14 136 + */ 137 + type?: 'module' | 'commonjs' 138 + /** 139 + * Alternate and extensible alternative to "main" entry point. 140 + * 141 + * When using `{type: "module"}`, any ESM module file MUST end with `.mjs` extension. 142 + * 143 + * Docs: 144 + * - https://nodejs.org/docs/latest-v14.x/api/esm.html#esm_exports_sugar 145 + * 146 + * @default 'commonjs' 147 + * @since Node.js v14 148 + */ 149 + exports?: 150 + | string 151 + | Record< 152 + 'import' | 'require' | '.' | 'node' | 'browser' | string, 153 + string | Record<'import' | 'require' | string, string> 154 + > 121 155 workspaces?: string[] 122 156 }