Comparing version 0.2.2 to 0.2.3
/// <reference path='../typings/node.d.ts' /> | ||
/// <reference path='../typings/colors.d.ts' /> | ||
/// <reference path='../typings/diff.d.ts' /> | ||
"use strict"; | ||
@@ -7,2 +8,3 @@ var ts = require('typescript'); | ||
var fs = require('fs'); | ||
var diff = require('diff'); | ||
var DUMMY_FILE = 'TSUN.repl.generated.ts'; | ||
@@ -50,3 +52,2 @@ // codes has been accepted by service, as opposed to codes in buffer and user input | ||
var options = optionsRet.options; | ||
console.log(options); | ||
options['noEmitHelpers'] = true; | ||
@@ -228,8 +229,9 @@ options['module'] = ts.ModuleKind.CommonJS; | ||
exports.getDiagnostics = getDiagnostics; | ||
var storedLine = 0; | ||
var lastOutput = ''; | ||
function getCurrentCode() { | ||
var emit = service.getEmitOutput(DUMMY_FILE); | ||
var lines = emit.outputFiles[0].text.split('\r\n').filter(function (k) { return !!k; }); | ||
var ret = lines.slice(storedLine).join('\n'); | ||
storedLine = lines.length; | ||
var output = emit.outputFiles[0].text; | ||
var changes = diff.diffLines(lastOutput, output); | ||
var ret = changes.filter(function (c) { return c.added; }).map(function (c) { return c.value; }).join('\n'); | ||
lastOutput = output; | ||
return ret; | ||
@@ -249,3 +251,4 @@ } | ||
exports.acceptedCodes = getInitialCommands(); | ||
lastOutput = ''; | ||
} | ||
exports.clearHistory = clearHistory; |
{ | ||
"name": "tsun", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "TSUN: a repl for TypeScript Upgraded Node", | ||
@@ -8,3 +8,4 @@ "bin": "./bin/tsun", | ||
"colors": "^1.0.3", | ||
"node-color-readline": "git+https://github.com/HerringtonDarkholme/node-color-readline.git", | ||
"diff": "^2.2.3", | ||
"node-color-readline": "^1.0.1", | ||
"optimist": "^0.6.1", | ||
@@ -14,2 +15,5 @@ "temp": "^0.8.1", | ||
}, | ||
"files": [ | ||
"bin/" | ||
], | ||
"scripts": { | ||
@@ -16,0 +20,0 @@ "prepublish": "tsc -m commonjs --outdir ./bin tsun.ts" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
0
27179
6
7
688
2
0
3
+ Addeddiff@^2.2.3
+ Addedansi@0.3.1(transitive)
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addeddiff@2.2.3(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addednode-color-readline@1.0.1(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
Updatednode-color-readline@^1.0.1