Skip to content

Commit

Permalink
- printing rollup version
Browse files Browse the repository at this point in the history
  • Loading branch information
ezolenko committed Feb 25, 2019
1 parent 30e72fb commit 36aabef
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions dist/rollup-plugin-typescript2.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -26473,6 +26473,8 @@ const typescript = (options) => {
context = new ConsoleContext(pluginOptions.verbosity, "rpt2: ");
context.info(`typescript version: ${tsModule.version}`);
context.info(`tslib version: ${tslibVersion}`);
if (this.meta)
context.info(`rollup version: ${this.meta.rollupVersion}`);
if (!semver_30(tsModule.version, ">=2.4.0", { includePrerelease: true }))
throw new Error(`Installed typescript version '${tsModule.version}' is outside of supported range '>=2.4.0'`);
context.info(`rollup-plugin-typescript2 version: 0.19.4`);
Expand Down
2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.cjs.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/rollup-plugin-typescript2.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -26469,6 +26469,8 @@ const typescript = (options) => {
context = new ConsoleContext(pluginOptions.verbosity, "rpt2: ");
context.info(`typescript version: ${tsModule.version}`);
context.info(`tslib version: ${tslibVersion}`);
if (this.meta)
context.info(`rollup version: ${this.meta.rollupVersion}`);
if (!semver_30(tsModule.version, ">=2.4.0", { includePrerelease: true }))
throw new Error(`Installed typescript version '${tsModule.version}' is outside of supported range '>=2.4.0'`);
context.info(`rollup-plugin-typescript2 version: 0.19.4`);
Expand Down
2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.es.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { dirname, isAbsolute, join, relative } from "path";
import { normalize } from "./normalize";
import { satisfies } from "semver";

import { PluginImpl, PluginContext, InputOptions, OutputOptions, TransformSourceDescription } from "rollup";
import { PluginImpl, PluginContext, InputOptions, OutputOptions, TransformSourceDescription, MinimalPluginContext } from "rollup";

const typescript: PluginImpl<Partial<IOptions>> = (options) =>
{
Expand Down Expand Up @@ -72,13 +72,15 @@ const typescript: PluginImpl<Partial<IOptions>> = (options) =>

name: "rpt2",

options(config: InputOptions)
options(this: MinimalPluginContext, config: InputOptions)
{
rollupOptions = {... config};
context = new ConsoleContext(pluginOptions.verbosity, "rpt2: ");

context.info(`typescript version: ${tsModule.version}`);
context.info(`tslib version: ${tslibVersion}`);
if (this.meta)
context.info(`rollup version: ${this.meta.rollupVersion}`);

if (!satisfies(tsModule.version, "$TS_VERSION_RANGE", { includePrerelease : true } as any))
throw new Error(`Installed typescript version '${tsModule.version}' is outside of supported range '$TS_VERSION_RANGE'`);
Expand Down

0 comments on commit 36aabef

Please sign in to comment.