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

external-editor

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

external-editor - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

2

main/errors/CreateFileError.js

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.12.0
// Generated by CoffeeScript 1.12.6

@@ -3,0 +3,0 @@ /*

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.12.0
// Generated by CoffeeScript 1.12.6

@@ -3,0 +3,0 @@ /*

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.12.0
// Generated by CoffeeScript 1.12.6

@@ -3,0 +3,0 @@ /*

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.12.0
// Generated by CoffeeScript 1.12.6

@@ -3,0 +3,0 @@ /*

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.12.0
// Generated by CoffeeScript 1.12.6

@@ -10,3 +10,3 @@ /*

(function() {
var CreateFileError, ExternalEditor, FS, LaunchEditorError, ReadFileError, RemoveFileError, Spawn, SpawnSync, Temp,
var CreateFileError, ExternalEditor, FS, IConvLite, JSCharDet, LaunchEditorError, ReadFileError, RemoveFileError, Spawn, SpawnSync, Temp,
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

@@ -22,2 +22,6 @@

JSCharDet = require('jschardet');
IConvLite = require('iconv-lite');
CreateFileError = require('./errors/CreateFileError');

@@ -31,2 +35,4 @@

JSCharDet.Constants.MINIMUM_THRESHOLD = 0;
ExternalEditor = (function() {

@@ -149,3 +155,5 @@ ExternalEditor.edit = function(text) {

this.temp_file = Temp.tmpNameSync({});
return FS.writeFileSync(this.temp_file, this.text);
return FS.writeFileSync(this.temp_file, this.text, {
encoding: 'utf8'
});
} catch (error) {

@@ -158,5 +166,7 @@ e = error;

ExternalEditor.prototype.readTemporaryFile = function() {
var e;
var buffer, e, encoding;
try {
return this.text = FS.readFileSync(this.temp_file).toString();
buffer = FS.readFileSync(this.temp_file);
encoding = JSCharDet.detect(buffer);
return this.text = IConvLite.decode(buffer, encoding.encoding);
} catch (error) {

@@ -163,0 +173,0 @@ e = error;

{
"name": "external-editor",
"version": "2.0.3",
"version": "2.0.4",
"description": "Edit a string with the users preferred text editor using $VISUAL or $ENVIRONMENT",

@@ -29,2 +29,4 @@ "main": "main/index.js",

"dependencies": {
"iconv-lite": "^0.4.17",
"jschardet": "^1.4.2",
"tmp": "^0.0.31"

@@ -31,0 +33,0 @@ },

@@ -10,3 +10,3 @@ # External Editor

Version: 2.0.3
Version: 2.0.1

@@ -13,0 +13,0 @@ As of version 2.0.0, node 0.10 is no longer support. Minimum node version is now 0.12.

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