Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Aug 30, 2021
1 parent af37750 commit 9cccd75
Show file tree
Hide file tree
Showing 24 changed files with 3,224 additions and 2,481 deletions.
2 changes: 1 addition & 1 deletion cli/cli.ts
Expand Up @@ -16,7 +16,7 @@ if (command.help || (process.argv.length <= 2 && process.stdin.isTTY)) {
} else {
try {
require('source-map-support').install();
} catch (err) {
} catch {
// do nothing
}

Expand Down
6 changes: 3 additions & 3 deletions cli/run/commandPlugins.ts
Expand Up @@ -59,7 +59,7 @@ function loadAndRegisterPlugin(inputOptions: InputOptions, pluginText: string):
try {
plugin = require(prefix + pluginText);
break;
} catch (ex) {
} catch {
// if this does not work, we try requiring the actual name below
}
}
Expand All @@ -68,8 +68,8 @@ function loadAndRegisterPlugin(inputOptions: InputOptions, pluginText: string):
try {
if (pluginText[0] == '.') pluginText = path.resolve(pluginText);
plugin = require(pluginText);
} catch (ex) {
throw new Error(`Cannot load plugin "${pluginText}": ${ex.message}.`);
} catch (err: any) {
throw new Error(`Cannot load plugin "${pluginText}": ${err.message}.`);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions cli/run/getConfigPath.ts
Expand Up @@ -14,10 +14,10 @@ export function getConfigPath(commandConfig: string | true): string {
const pkgName = commandConfig.slice(5);
try {
return relative.resolve(`rollup-config-${pkgName}`, cwd);
} catch (err) {
} catch {
try {
return relative.resolve(pkgName, cwd);
} catch (err) {
} catch (err: any) {
if (err.code === 'MODULE_NOT_FOUND') {
handleError({
code: 'MISSING_EXTERNAL_CONFIG',
Expand Down
4 changes: 2 additions & 2 deletions cli/run/index.ts
Expand Up @@ -74,11 +74,11 @@ export default async function runRollup(command: Record<string, any>): Promise<v
message: 'Warnings occurred and --failAfterWarnings flag present'
});
}
} catch (err) {
} catch (err: any) {
warnings.flush();
handleError(err);
}
} catch (err) {
} catch (err: any) {
handleError(err);
}
}
Expand Down
2 changes: 1 addition & 1 deletion cli/run/loadConfigFile.ts
Expand Up @@ -117,7 +117,7 @@ async function loadConfigFromBundledFile(fileName: string, bundledCode: string)
const config = getDefaultFromCjs(require(fileName));
require.extensions[extension] = defaultLoader;
return config;
} catch (err) {
} catch (err: any) {
if (err.code === 'ERR_REQUIRE_ESM') {
return error({
code: 'TRANSPILED_ESM_CONFIG',
Expand Down
4 changes: 2 additions & 2 deletions cli/run/watch-cli.ts
Expand Up @@ -66,7 +66,7 @@ export async function watch(command: Record<string, any>): Promise<void> {
}
start(configs);
}
} catch (err) {
} catch (err: any) {
configs = [];
reloadingConfig = false;
handleError(err, true);
Expand All @@ -86,7 +86,7 @@ export async function watch(command: Record<string, any>): Promise<void> {
function start(configs: MergedRollupOptions[]) {
try {
watcher = rollup.watch(configs as any);
} catch (err) {
} catch (err: any) {
return handleError(err);
}

Expand Down
15 changes: 13 additions & 2 deletions docs/999-big-list-of-options.md
Expand Up @@ -460,9 +460,20 @@ Whether to extend the global variable defined by the `name` option in `umd` or `

#### output.generatedCode

Type: `"es5" | "es2015" | { arrowFunctions?: boolean, objectShorthand?: boolean, reservedNamesAsProps?: boolean }`<br>CLI: `--generatedCode <preset>`<br>Default: `"es5"`
Type: `"es5" | "es2015" | { arrowFunctions?: boolean, objectShorthand?: boolean, preset?: "es5" | "es2015", reservedNamesAsProps?: boolean }`<br> CLI: `--generatedCode <preset>`<br> Default: `"es5"`

Which language features Rollup can safely use in generated code. This will not transpile any user code but only change the code Rollup uses in wrappers and helpers.
Which language features Rollup can safely use in generated code. This will not transpile any user code but only change the code Rollup uses in wrappers and helpers. You may choose one of several presets:

- `"es5"`: Do not use ES2015+ features like arrow functions.
- `"es2015"`: Use any JavaScript features up to ES2015.

**output.generatedCode.arrowFunctions**<br> Type: `boolean`<br> CLI: `--generatedCode.arrowFunctions`/`--no-generatedCode.arrowFunctions`<br> Default: `false`

Whether to use arrow functions for module wrappers and some auto-generated code snippets.

```javascript
// input
```

#### output.hoistTransitiveImports

Expand Down

0 comments on commit 9cccd75

Please sign in to comment.