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

exceljs

Package Overview
Dependencies
Maintainers
1
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exceljs - npm Package Compare versions

Comparing version 3.3.0 to 3.3.1

4

dist/es5/csv/csv.js

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

var SpecialValues = {
"true": true,
"false": false,
true: true,
false: false,
'#N/A': {

@@ -33,0 +33,0 @@ error: '#N/A'

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

'use strict';
"use strict";

@@ -9,2 +9,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/* eslint-disable max-classes-per-file */
var colCache = require('../utils/col-cache');

@@ -699,3 +700,3 @@

this.model = Object.assign({
this.model = {
address: cell.address,

@@ -705,5 +706,7 @@ type: Cell.Types.Hyperlink,

hyperlink: value ? value.hyperlink : undefined
}, value && value.tooltip ? {
tooltip: value.tooltip
} : {});
};
if (value && value.tooltip) {
this.model.tooltip = value.tooltip;
}
}

@@ -727,16 +730,22 @@

get: function get() {
return Object.assign({
var v = {
text: this.model.text,
hyperlink: this.model.hyperlink
}, this.model.tooltip ? {
tooltip: this.model.tooltip
} : {});
};
if (this.model.tooltip) {
v.tooltip = this.model.tooltip;
}
return v;
},
set: function set(value) {
this.model = Object.assign({
this.model = {
text: value.text,
hyperlink: value.hyperlink
}, value && value.tooltip ? {
tooltip: value.tooltip
} : {});
};
if (value.tooltip) {
this.model.tooltip = value.tooltip;
}
}

@@ -743,0 +752,0 @@ }, {

@@ -9,2 +9,3 @@ "use strict";

/* eslint-disable max-classes-per-file */
var colCache = require('./../utils/col-cache');

@@ -11,0 +12,0 @@

@@ -44,2 +44,3 @@ 'use strict';

if (name && name.length > 31) {
// eslint-disable-next-line no-console
console.warn("Worksheet name ".concat(name, " exceeds 31 chars. This will be truncated"));

@@ -46,0 +47,0 @@ }

"use strict";
/* eslint-disable import/no-extraneous-dependencies,node/no-unpublished-require */
require('core-js/modules/es.promise');

@@ -4,0 +5,0 @@

@@ -9,2 +9,3 @@ "use strict";

/* eslint-disable max-classes-per-file */
var utils = require('../../utils/utils');

@@ -11,0 +12,0 @@

@@ -11,2 +11,8 @@ "use strict";

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
// =========================================================================

@@ -229,3 +235,3 @@ // Column Letter to Number conversion

var address = this.decodeAddress(reference);
return sheetName ? Object.assign({
return sheetName ? _objectSpread({
sheetName: sheetName

@@ -232,0 +238,0 @@ }, address) : address;

@@ -5,2 +5,8 @@ "use strict";

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }

@@ -308,5 +314,6 @@

// Create a down-stream flow-control
var options = Object.assign({
var options = _objectSpread({
parent: this
}, this.options);
var child = new FlowControl(options);

@@ -313,0 +320,0 @@ this.children.push(child);

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

'use strict';
"use strict";

@@ -13,2 +13,3 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }

/* eslint-disable max-classes-per-file */
var Stream = require('stream');

@@ -15,0 +16,0 @@

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

return new Promise(function (resolve) {
fs.exists(path, function (exists) {
resolve(exists);
fs.access(path, fs.constants.F_OK, function (err) {
resolve(!err);
});

@@ -144,0 +144,0 @@ });

@@ -25,2 +25,3 @@ "use strict";

/* eslint-disable max-classes-per-file */
var events = require('events');

@@ -27,0 +28,0 @@

@@ -133,8 +133,7 @@ "use strict";

options.hyperlinks.push(Object.assign({
options.hyperlinks.push({
address: model.address,
target: model.hyperlink
}, model.tooltip ? {
target: model.hyperlink,
tooltip: model.tooltip
} : {}));
});
break;

@@ -141,0 +140,0 @@

@@ -37,8 +37,7 @@ "use strict";

value: function render(xmlStream, model) {
xmlStream.leafNode('hyperlink', Object.assign({
xmlStream.leafNode('hyperlink', {
ref: model.address,
'r:id': model.rId
}, model.tooltip ? {
'r:id': model.rId,
tooltip: model.tooltip
} : {}));
});
}

@@ -49,8 +48,7 @@ }, {

if (node.name === 'hyperlink') {
this.model = Object.assign({
this.model = {
address: node.attributes.ref,
rId: node.attributes['r:id']
}, node.attributes.tooltip ? {
rId: node.attributes['r:id'],
tooltip: node.attributes.tooltip
} : {});
};
return true;

@@ -57,0 +55,0 @@ }

@@ -399,2 +399,3 @@ "use strict";

pageSetup: pageSetup,
headerFooter: this.map.headerFooter.model,
background: this.map.picture.model,

@@ -401,0 +402,0 @@ drawing: this.map.drawing.model,

"use strict";
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

@@ -21,2 +27,3 @@

/* eslint-disable max-classes-per-file */
var BaseXform = require('../base-xform');

@@ -183,3 +190,3 @@

// don't mess with incoming models
edgeModel = Object.assign({}, edgeModel, {
edgeModel = _objectSpread({}, edgeModel, {
color: model.color

@@ -186,0 +193,0 @@ });

@@ -21,2 +21,3 @@ "use strict";

/* eslint-disable max-classes-per-file */
var BaseXform = require('../base-xform');

@@ -23,0 +24,0 @@

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

var validation = {
"boolean": function boolean(value, dflt) {
boolean: function boolean(value, dflt) {
if (value === undefined) {

@@ -59,4 +59,4 @@ return dflt;

add('locked', validation["boolean"](model.locked, true) ? undefined : '0');
add('hidden', validation["boolean"](model.hidden, false) ? '1' : undefined);
add('locked', validation.boolean(model.locked, true) ? undefined : '0');
add('hidden', validation.boolean(model.hidden, false) ? '1' : undefined);
xmlStream.closeNode();

@@ -63,0 +63,0 @@

@@ -21,2 +21,3 @@ "use strict";

/* eslint-disable max-classes-per-file */
var Enums = require('../../../doc/enums');

@@ -23,0 +24,0 @@

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

single: {},
"double": {
double: {
val: 'double'

@@ -83,0 +83,0 @@ },

@@ -144,7 +144,11 @@ "use strict";

case this.tag:
this.model.autoFilterRef = this.map.autoFilter.model.autoFilterRef;
this.model.columns = this.map.tableColumns.model;
this.map.autoFilter.model.columns.forEach(function (column, index) {
_this2.model.columns[index].filterButton = column.filterButton;
});
if (this.map.autoFilter.model) {
this.model.autoFilterRef = this.map.autoFilter.model.autoFilterRef;
this.map.autoFilter.model.columns.forEach(function (column, index) {
_this2.model.columns[index].filterButton = column.filterButton;
});
}
this.model.style = this.map.tableStyleInfo.model;

@@ -151,0 +155,0 @@ return false;

@@ -1471,36 +1471,14 @@ "use strict";

var stream = fs.createWriteStream(filename);
return new Promise(
/*#__PURE__*/
function () {
var _ref4 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee25(resolve, reject) {
return regeneratorRuntime.wrap(function _callee25$(_context25) {
while (1) {
switch (_context25.prev = _context25.next) {
case 0:
stream.on('finish', function () {
resolve();
});
stream.on('error', function (error) {
reject(error);
});
_context25.next = 4;
return _this5.write(stream, options);
return new Promise(function (resolve, reject) {
stream.on('finish', function () {
resolve();
});
stream.on('error', function (error) {
reject(error);
});
case 4:
stream.end();
case 5:
case "end":
return _context25.stop();
}
}
}, _callee25);
}));
return function (_x52, _x53) {
return _ref4.apply(this, arguments);
};
}());
_this5.write(stream, options).then(function () {
stream.end();
});
});
}

@@ -1512,24 +1490,24 @@ }, {

/*#__PURE__*/
regeneratorRuntime.mark(function _callee26(options) {
regeneratorRuntime.mark(function _callee25(options) {
var stream;
return regeneratorRuntime.wrap(function _callee26$(_context26) {
return regeneratorRuntime.wrap(function _callee25$(_context25) {
while (1) {
switch (_context26.prev = _context26.next) {
switch (_context25.prev = _context25.next) {
case 0:
stream = new StreamBuf();
_context26.next = 3;
_context25.next = 3;
return this.write(stream, options);
case 3:
return _context26.abrupt("return", stream.read());
return _context25.abrupt("return", stream.read());
case 4:
case "end":
return _context26.stop();
return _context25.stop();
}
}
}, _callee26, this);
}, _callee25, this);
}));
function writeBuffer(_x54) {
function writeBuffer(_x52) {
return _writeBuffer.apply(this, arguments);

@@ -1536,0 +1514,0 @@ }

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

'use strict';
/* eslint-disable max-classes-per-file */
const colCache = require('../utils/col-cache');

@@ -583,31 +582,32 @@ const _ = require('../utils/under-dash');

constructor(cell, value) {
this.model = Object.assign(
{
address: cell.address,
type: Cell.Types.Hyperlink,
text: value ? value.text : undefined,
hyperlink: value ? value.hyperlink : undefined,
},
value && value.tooltip ? {tooltip: value.tooltip} : {}
);
this.model = {
address: cell.address,
type: Cell.Types.Hyperlink,
text: value ? value.text : undefined,
hyperlink: value ? value.hyperlink : undefined,
};
if (value && value.tooltip) {
this.model.tooltip = value.tooltip;
}
}
get value() {
return Object.assign(
{
text: this.model.text,
hyperlink: this.model.hyperlink,
},
this.model.tooltip ? {tooltip: this.model.tooltip} : {}
);
const v = {
text: this.model.text,
hyperlink: this.model.hyperlink,
};
if (this.model.tooltip) {
v.tooltip = this.model.tooltip;
}
return v;
}
set value(value) {
this.model = Object.assign(
{
text: value.text,
hyperlink: value.hyperlink,
},
value && value.tooltip ? {tooltip: value.tooltip} : {}
);
this.model = {
text: value.text,
hyperlink: value.hyperlink,
};
if (value.tooltip) {
this.model.tooltip = value.tooltip;
}
}

@@ -614,0 +614,0 @@

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

/* eslint-disable max-classes-per-file */
const colCache = require('./../utils/col-cache');

@@ -2,0 +3,0 @@

@@ -50,2 +50,3 @@ 'use strict';

if (name && (name.length > 31)) {
// eslint-disable-next-line no-console
console.warn(`Worksheet name ${name} exceeds 31 chars. This will be truncated`);

@@ -52,0 +53,0 @@ }

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

/* eslint-disable import/no-extraneous-dependencies,node/no-unpublished-require */
require('core-js/modules/es.promise');

@@ -2,0 +3,0 @@ require('core-js/modules/es.object.assign');

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

/* eslint-disable max-classes-per-file */
const utils = require('../../utils/utils');

@@ -2,0 +3,0 @@ const RelType = require('../../xlsx/rel-type');

@@ -191,3 +191,3 @@ // =========================================================================

const address = this.decodeAddress(reference);
return sheetName ? Object.assign({sheetName}, address) : address;
return sheetName ? {sheetName, ...address} : address;
},

@@ -194,0 +194,0 @@

@@ -203,3 +203,6 @@ const {EventEmitter} = require('events');

// Create a down-stream flow-control
const options = Object.assign({parent: this}, this.options);
const options = {
parent: this,
...this.options,
};
const child = new FlowControl(options);

@@ -206,0 +209,0 @@ this.children.push(child);

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

'use strict';
/* eslint-disable max-classes-per-file */
const Stream = require('stream');

@@ -4,0 +3,0 @@

@@ -129,4 +129,4 @@ const fs = require('fs');

return new Promise(resolve => {
fs.exists(path, exists => {
resolve(exists);
fs.access(path, fs.constants.F_OK, err => {
resolve(!err);
});

@@ -133,0 +133,0 @@ });

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

/* eslint-disable max-classes-per-file */
const events = require('events');

@@ -2,0 +3,0 @@ const JSZip = require('jszip');

@@ -83,11 +83,7 @@ const utils = require('../../../utils/utils');

}
options.hyperlinks.push(
Object.assign(
{
address: model.address,
target: model.hyperlink,
},
model.tooltip ? {tooltip: model.tooltip} : {}
)
);
options.hyperlinks.push({
address: model.address,
target: model.hyperlink,
tooltip: model.tooltip,
});
break;

@@ -94,0 +90,0 @@

@@ -9,12 +9,7 @@ const BaseXform = require('../base-xform');

render(xmlStream, model) {
xmlStream.leafNode(
'hyperlink',
Object.assign(
{
ref: model.address,
'r:id': model.rId,
},
model.tooltip ? {tooltip: model.tooltip} : {}
)
);
xmlStream.leafNode('hyperlink', {
ref: model.address,
'r:id': model.rId,
tooltip: model.tooltip,
});
}

@@ -24,9 +19,7 @@

if (node.name === 'hyperlink') {
this.model = Object.assign(
{
address: node.attributes.ref,
rId: node.attributes['r:id'],
},
node.attributes.tooltip ? {tooltip: node.attributes.tooltip} : {}
);
this.model = {
address: node.attributes.ref,
rId: node.attributes['r:id'],
tooltip: node.attributes.tooltip,
};
return true;

@@ -33,0 +26,0 @@ }

@@ -316,2 +316,3 @@ const _ = require('../../../utils/under-dash');

pageSetup,
headerFooter: this.map.headerFooter.model,
background: this.map.picture.model,

@@ -318,0 +319,0 @@ drawing: this.map.drawing.model,

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

/* eslint-disable max-classes-per-file */
const BaseXform = require('../base-xform');

@@ -136,3 +137,6 @@

// don't mess with incoming models
edgeModel = Object.assign({}, edgeModel, {color: model.color});
edgeModel = {
...edgeModel,
color: model.color,
};
}

@@ -139,0 +143,0 @@ edgeXform.render(xmlStream, edgeModel, color);

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

/* eslint-disable max-classes-per-file */
const BaseXform = require('../base-xform');

@@ -2,0 +3,0 @@

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

/* eslint-disable max-classes-per-file */
const Enums = require('../../../doc/enums');

@@ -2,0 +3,0 @@ const XmlStream = require('../../../utils/xml-stream');

@@ -97,7 +97,9 @@ const XmlStream = require('../../../utils/xml-stream');

case this.tag:
this.model.autoFilterRef = this.map.autoFilter.model.autoFilterRef;
this.model.columns = this.map.tableColumns.model;
this.map.autoFilter.model.columns.forEach((column, index) => {
this.model.columns[index].filterButton = column.filterButton;
});
if (this.map.autoFilter.model) {
this.model.autoFilterRef = this.map.autoFilter.model.autoFilterRef;
this.map.autoFilter.model.columns.forEach((column, index) => {
this.model.columns[index].filterButton = column.filterButton;
});
}
this.model.style = this.map.tableStyleInfo.model;

@@ -104,0 +106,0 @@ return false;

@@ -637,3 +637,3 @@ const fs = require('fs');

return new Promise(async (resolve, reject) => {
return new Promise((resolve, reject) => {
stream.on('finish', () => {

@@ -646,4 +646,6 @@ resolve();

await this.write(stream, options);
stream.end();
this.write(stream, options)
.then(() => {
stream.end();
});
});

@@ -650,0 +652,0 @@ }

{
"name": "exceljs",
"version": "3.3.0",
"version": "3.3.1",
"description": "Excel Workbook Manager - Read and Write xlsx and csv Files.",

@@ -16,3 +16,3 @@ "private": false,

"engines": {
"node": ">=6.0.0"
"node": ">=8.3.0"
},

@@ -104,3 +104,2 @@ "main": "./lib/exceljs.nodejs.js",

"@types/node": "^10.12.0",
"babel-eslint": "^10.0.3",
"babelify": "^10.0.0",

@@ -114,8 +113,7 @@ "browserify": "^16.5.0",

"eslint": "^6.5.1",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-prettier": "^6.4.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-node": "^10.0.0",
"express": "^4.16.4",

@@ -129,3 +127,2 @@ "grunt": "^1.0.3",

"grunt-contrib-watch": "^1.1.0",
"grunt-lib-phantomjs": "^1.1.0",
"husky": "^2.2.0",

@@ -132,0 +129,0 @@ "lint-staged": "^8.1.5",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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