Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@types/rollup

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/rollup - npm Package Compare versions

Comparing version
0.41.1
to
0.51.0
+34
-22
rollup/index.d.ts

@@ -1,4 +0,4 @@

// Type definitions for rollup 0.41
// Type definitions for rollup 0.51
// Project: https://github.com/rollup/rollup
// Definitions by: Philipp A. <https://github.com/flying-sheep>
// Definitions by: Philipp A. <https://github.com/flying-sheep>, Christian Svensson <https://github.com/csvn>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -26,3 +26,3 @@

/** The format of the generated bundle. */
format?: Format
format: Format
/** What export mode to use. Defaults to auto, which guesses your intentions based on what the `entry` module exports. */

@@ -33,6 +33,11 @@ exports?: 'auto' | 'default' | 'named' | 'none'

/** The name to use for the module for UMD/IIFE bundles (required for bundles with exports). */
moduleName?: string
name?: string
/** Mapping of IDs → global variable names. Used for UMD/IIFE bundles. */
globals?: { [id: string]: string }
/**
* Function that takes an ID and returns a path, or Object of id: path pairs.
* Where supplied, these paths will be used in the generated bundle instead of the module ID, allowing you to (for example) load dependencies from a CDN.
*/
paths?: ((id: string) => string) | { [id: string]: string }
/**
* The indent string to use, for formats that require code to be indented (AMD, IIFE, UMD).

@@ -60,3 +65,3 @@ * Can also be false (no indent), or true (the default – auto-indent)

*/
useStrict?: boolean
strict?: boolean
}

@@ -66,17 +71,17 @@

/** Whether to generate a sourcemap. If true, the return value from `bundle.generate(...)` will include a map property */
sourceMap?: boolean
sourcemap?: boolean
/**
* The location of the generated bundle. If this is an absolute path, all the sources paths in the sourcemap will be relative to it.
* The map.file property is the basename of sourceMapFile, as the location of the sourcemap is assumed to be adjacent to the bundle.
* The map.file property is the basename of sourcemapFile, as the location of the sourcemap is assumed to be adjacent to the bundle.
*/
sourceMapFile?: string
sourcemapFile?: string
}
export interface WriteOptions extends BundleOptions {
/** The file to write to. If `options.sourceMap === true`, two files will be created – `dest` and `dest + '.map`. */
dest: string
/** If `true`, a separate sourcemap file will be created. If `'inline'`, the sourcemap will be appended to the resulting dest file as a data URI. */
sourceMap?: boolean | 'inline'
/** This option is unnecessary, as it defaults to the value of dest. */
sourceMapFile?: string
/** The file to write to. If `options.sourcemap === true`, two files will be created – `file` and `file + '.map`. */
file: string
/** If `true`, a separate sourcemap file will be created. If `'inline'`, the sourcemap will be appended to the resulting file as a data URI. */
sourcemap?: boolean | 'inline'
/** This option is unnecessary, as it defaults to the value of file. */
sourcemapFile?: string
}

@@ -86,3 +91,3 @@

/** Generate bundled code as an object */
generate(options: GenerateOptions): { code: string, map: SourceMap }
generate(options: GenerateOptions): Promise<{ code: string, map: SourceMap | null }>
/** writes the file (and accompanying sourcemap file, if appropriate) to the file system. */

@@ -94,3 +99,3 @@ write(options: WriteOptions): Promise<void>

/** The bundle's entry point (e.g. your `main.js` or `app.js` or `index.js`) */
entry: string | string[]
input: string
/** A previous bundle. Use it to speed up subsequent bundles :) */

@@ -103,7 +108,2 @@ cache?: Bundle

external?: ((id: string) => boolean) | string[]
/**
* Function that takes an ID and returns a path, or Object of id: path pairs.
* Where supplied, these paths will be used in the generated bundle instead of the module ID, allowing you to (for example) load dependencies from a CDN.
*/
paths?: ((id: string) => string) | { [id: string]: string }
/** Function that will intercept warning messages. If not supplied, warnings will be deduplicated and printed to the console. */

@@ -128,2 +128,6 @@ onwarn?(warning: Warning): void

export interface ConfigFileOptions extends Options {
output: WriteOptions | WriteOptions[]
}
// https://github.com/rollup/rollup/wiki/Plugins#creating-plugins

@@ -144,3 +148,3 @@ export interface Plugin {

/** A module transformer function */
transform?(source: string, id: string): string | { code: string, map: SourceMap }
transform?(this: TransformContext, source: string, id: string): string | { code: string, map: SourceMap }
/** A bundle transformer function */

@@ -162,3 +166,11 @@ transformBundle?(source: string, options: { format: Format }): string | { code: string, map: SourceMap }

// See https://github.com/rollup/rollup/wiki/Plugins#warnings-and-errors
export interface TransformContext {
/** Emit warnings to Rollup which will be logged during bundling */
warn(message: string | { message: string }, pos?: number | { line: number, column: number }): void
/** Emit an error, which will abort the bundling process */
error(message: string | { message: string }, pos?: number | { line: number, column: number }): void
}
/** Returns a Promise that resolves with a bundle */
export function rollup(options: Options): Promise<Bundle>
{
"name": "@types/rollup",
"version": "0.41.1",
"version": "0.51.0",
"description": "TypeScript definitions for rollup",

@@ -9,3 +9,9 @@ "license": "MIT",

"name": "Philipp A.",
"url": "https://github.com/flying-sheep"
"url": "https://github.com/flying-sheep",
"githubUsername": "flying-sheep"
},
{
"name": "Christian Svensson",
"url": "https://github.com/csvn",
"githubUsername": "csvn"
}

@@ -23,5 +29,4 @@ ],

},
"peerDependencies": {},
"typesPublisherContentHash": "ce58f15593665fef961d31bccb976c8e6d31c853d87d9213840473cf35e733c7",
"typesPublisherContentHash": "37c8349ca998c5fc318d04fafcd020da81f4d22141e8d2aae6a7d7e2380ee4af",
"typeScriptVersion": "2.0"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Mon, 26 Jun 2017 14:01:14 GMT
* Last updated: Thu, 16 Nov 2017 17:33:34 GMT
* Dependencies: source-map, acorn

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by Philipp A. <https://github.com/flying-sheep>.
These definitions were written by Philipp A. <https://github.com/flying-sheep>, Christian Svensson <https://github.com/csvn>.