Skip to content

Commit

Permalink
- fix for #82
Browse files Browse the repository at this point in the history
- printing tslib version
  • Loading branch information
ezolenko committed Jun 4, 2018
1 parent c84d3f7 commit b9a93eb
Show file tree
Hide file tree
Showing 12 changed files with 611 additions and 46 deletions.
2 changes: 1 addition & 1 deletion dist/context.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export declare enum VerbosityLevel {
Error = 0,
Warning = 1,
Info = 2,
Debug = 3,
Debug = 3
}
export declare class ConsoleContext implements IContext {
private verbosity;
Expand Down
2 changes: 1 addition & 1 deletion dist/get-options-overrides.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import * as tsTypes from "typescript";
import { IOptions } from "./ioptions";
export declare function getOptionsOverrides({useTsconfigDeclarationDir}: IOptions, tsConfigJson?: any): tsTypes.CompilerOptions;
export declare function getOptionsOverrides({ useTsconfigDeclarationDir }: IOptions, tsConfigJson?: any): tsTypes.CompilerOptions;
11 changes: 7 additions & 4 deletions dist/rollup-plugin-typescript2.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6046,11 +6046,10 @@ var lodash = createCommonjsModule(function (module, exports) {

try {
value[symToStringTag] = undefined;
var unmasked = true;
} catch (e) {}

var result = nativeObjectToString.call(value);
if (unmasked) {
{
if (isOwn) {
value[symToStringTag] = tag;
} else {
Expand Down Expand Up @@ -20012,10 +20011,13 @@ function parseTsConfig(context, pluginOptions) {
// The injected id for helpers.
var TSLIB = "tslib";
var tslibSource;
var tslibVersion;
try {
// tslint:disable-next-line:no-string-literal no-var-requires
var tslibPath = require.resolve("tslib/" + require("tslib/package.json")["module"]);
var tslibPackage = require("tslib/package.json");
var tslibPath = require.resolve("tslib/" + tslibPackage.module);
tslibSource = fs.readFileSync(tslibPath, "utf8");
tslibVersion = tslibPackage.version;
}
catch (e) {
console.warn("Error loading `tslib` helper library.");
Expand Down Expand Up @@ -20066,6 +20068,7 @@ function typescript(options) {
rollupOptions = __assign({}, config);
context = new ConsoleContext(pluginOptions.verbosity, "rpt2: ");
context.info("typescript version: " + tsModule.version);
context.info("tslib version: " + tslibVersion);
context.info("rollup-plugin-typescript2 version: 0.14.1");
context.debug(function () { return "plugin options:\n" + JSON.stringify(pluginOptions, function (key, value) { return key === "typescript" ? "version " + value.version : value; }, 4); });
context.debug(function () { return "rollup config:\n" + JSON.stringify(rollupOptions, undefined, 4); });
Expand Down Expand Up @@ -20198,7 +20201,7 @@ function typescript(options) {
},
ongenerate: function () {
context.debug(function () { return "generating target " + (generateRound + 1); });
if (watchMode && generateRound === 0) {
if (pluginOptions.check && watchMode && generateRound === 0) {
cache().walkTree(function (id) {
if (!filter(id))
return;
Expand Down
2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.cjs.js.map

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions dist/rollup-plugin-typescript2.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -6042,11 +6042,10 @@ var lodash = createCommonjsModule(function (module, exports) {

try {
value[symToStringTag] = undefined;
var unmasked = true;
} catch (e) {}

var result = nativeObjectToString.call(value);
if (unmasked) {
{
if (isOwn) {
value[symToStringTag] = tag;
} else {
Expand Down Expand Up @@ -20008,10 +20007,13 @@ function parseTsConfig(context, pluginOptions) {
// The injected id for helpers.
var TSLIB = "tslib";
var tslibSource;
var tslibVersion;
try {
// tslint:disable-next-line:no-string-literal no-var-requires
var tslibPath = require.resolve("tslib/" + require("tslib/package.json")["module"]);
var tslibPackage = require("tslib/package.json");
var tslibPath = require.resolve("tslib/" + tslibPackage.module);
tslibSource = readFileSync(tslibPath, "utf8");
tslibVersion = tslibPackage.version;
}
catch (e) {
console.warn("Error loading `tslib` helper library.");
Expand Down Expand Up @@ -20062,6 +20064,7 @@ function typescript(options) {
rollupOptions = __assign({}, config);
context = new ConsoleContext(pluginOptions.verbosity, "rpt2: ");
context.info("typescript version: " + tsModule.version);
context.info("tslib version: " + tslibVersion);
context.info("rollup-plugin-typescript2 version: 0.14.1");
context.debug(function () { return "plugin options:\n" + JSON.stringify(pluginOptions, function (key, value) { return key === "typescript" ? "version " + value.version : value; }, 4); });
context.debug(function () { return "rollup config:\n" + JSON.stringify(rollupOptions, undefined, 4); });
Expand Down Expand Up @@ -20194,7 +20197,7 @@ function typescript(options) {
},
ongenerate: function () {
context.debug(function () { return "generating target " + (generateRound + 1); });
if (watchMode && generateRound === 0) {
if (pluginOptions.check && watchMode && generateRound === 0) {
cache().walkTree(function (id) {
if (!filter(id))
return;
Expand Down
2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.es.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions dist/tscache.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ export declare class TsCache {
getCompiled(id: string, snapshot: tsTypes.IScriptSnapshot, transform: () => ICode | undefined): ICode | undefined;
getSyntacticDiagnostics(id: string, snapshot: tsTypes.IScriptSnapshot, check: () => tsTypes.Diagnostic[]): IDiagnostics[];
getSemanticDiagnostics(id: string, snapshot: tsTypes.IScriptSnapshot, check: () => tsTypes.Diagnostic[]): IDiagnostics[];
private checkAmbientTypes();
private getDiagnostics(type, cache, id, snapshot, check);
private init();
private markAsDirty(id);
private isDirty(id, checkImports);
private makeName(id, snapshot);
private checkAmbientTypes;
private getDiagnostics;
private init;
private markAsDirty;
private isDirty;
private makeName;
}
1 change: 1 addition & 0 deletions dist/tslib.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export declare const TSLIB = "tslib";
export declare let tslibSource: string;
export declare let tslibVersion: string;
Loading

0 comments on commit b9a93eb

Please sign in to comment.