Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tsun

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsun - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6

26

bin/src/repl.js

@@ -122,3 +122,3 @@ "use strict";

function printHelp() {
console.log("\ntsun repl commands\n:type symbol print the type of an identifier\n:doc symbol print the documentation for an identifier\n:clear clear all the code\n:print print code input so far\n:help print this manual\n:paste enter paste mode".blue);
console.log("\ntsun repl commands\n:type symbol print the type of an identifier\n:doc symbol print the documentation for an identifier\n:clear clear all the code\n:print print code input so far\n:help print this manual\n:paste enter paste mode\n:load filename source typescript file in current context".blue);
if (argv.dere) {

@@ -200,2 +200,17 @@ console.log(':baka Who would like some pervert like you, baka~'.blue);

}
function loadFile(filename) {
try {
var filePath = path.resolve(filename);
var fileContents = fs.readFileSync(filePath, 'utf8');
if (verbose) {
console.log(("loading file: " + filePath).cyan);
console.log(colorize(fileContents));
console.log('evaluating...'.cyan);
}
startEvaluate(fileContents);
}
catch (e) {
console.log(e);
}
}
function getSource(name) {

@@ -280,2 +295,11 @@ var declarations = service_1.getDeclarations();

}
if (/^:load/.test(code) && !multilineBuffer) {
var filename = code.split(' ')[1];
if (!filename) {
console.log(':load: file name expected'.red);
return repl(prompt);
}
loadFile(filename);
return repl(prompt);
}
if (argv.dere && /^:baka/.test(code)) {

@@ -282,0 +306,0 @@ exports.defaultPrompt = 'ξ(゚⊿゚)ξ> ';

4

bin/src/service.js

@@ -122,4 +122,4 @@ "use strict";

function getInitialCommands() {
var codes = getDeclarationFiles().map(function (dir) { return "/// <reference path=\"" + dir + "\" />"; });
return codes.join('\n');
return getDeclarationFiles()
.map(function (dir) { return "/// <reference path=\"" + dir + "\" />\n"; }).join();
}

@@ -126,0 +126,0 @@ // private api hacks

{
"name": "tsun",
"preferGlobal": true,
"version": "0.3.5",
"version": "0.3.6",
"description": "TSUN: a repl for TypeScript Upgraded Node",

@@ -6,0 +6,0 @@ "bin": "./bin/tsun",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc