Release new version

This commit is contained in:
Sanjana Rajan 2018-05-22 17:39:26 -07:00
parent 80aab5d94f
commit bf428b80d4
6 changed files with 27 additions and 22 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "openpgp", "name": "openpgp",
"version": "3.0.10", "version": "3.0.11",
"license": "LGPL-3.0+", "license": "LGPL-3.0+",
"homepage": "https://openpgpjs.org/", "homepage": "https://openpgpjs.org/",
"authors": [ "authors": [

37
dist/openpgp.js vendored
View File

@ -29609,7 +29609,7 @@ exports.default = {
* @memberof module:config * @memberof module:config
* @property {String} versionstring A version string to be included in armored messages * @property {String} versionstring A version string to be included in armored messages
*/ */
versionstring: "OpenPGP.js v3.0.10", versionstring: "OpenPGP.js v3.0.11",
/** /**
* @memberof module:config * @memberof module:config
* @property {String} commentstring A comment string to be included in armored messages * @property {String} commentstring A comment string to be included in armored messages
@ -45684,14 +45684,18 @@ Literal.prototype.setBytes = function (bytes, format) {
* @returns {Uint8Array} A sequence of bytes * @returns {Uint8Array} A sequence of bytes
*/ */
Literal.prototype.getBytes = function () { Literal.prototype.getBytes = function () {
var textMode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (this.data !== null) { if (this.data !== null) {
return this.data; return this.data;
} }
// normalize EOL to \r\n if (textMode) {
var text = _util2.default.canonicalizeEOL(this.text); // normalize EOL to \r\n and UTF-8 encode
// encode UTF8 this.data = _util2.default.str_to_Uint8Array(_util2.default.encode_utf8(_util2.default.canonicalizeEOL(this.text)));
this.data = _util2.default.str_to_Uint8Array(_util2.default.encode_utf8(text)); } else {
this.data = _util2.default.str_to_Uint8Array(this.text);
}
return this.data; return this.data;
}; };
@ -45742,7 +45746,7 @@ Literal.prototype.write = function () {
var format = new Uint8Array([_enums2.default.write(_enums2.default.literal, this.format)]); var format = new Uint8Array([_enums2.default.write(_enums2.default.literal, this.format)]);
var date = _util2.default.writeDate(this.date); var date = _util2.default.writeDate(this.date);
var data = this.getBytes(); var data = this.getBytes(format !== 'binary');
return _util2.default.concatUint8Array([format, filename_length, filename, date, data]); return _util2.default.concatUint8Array([format, filename_length, filename, date, data]);
}; };
@ -49954,10 +49958,6 @@ var _symbol = _dereq_('babel-runtime/core-js/symbol');
var _symbol2 = _interopRequireDefault(_symbol); var _symbol2 = _interopRequireDefault(_symbol);
var _promise = _dereq_('babel-runtime/core-js/promise');
var _promise2 = _interopRequireDefault(_promise);
var _from = _dereq_('babel-runtime/core-js/array/from'); var _from = _dereq_('babel-runtime/core-js/array/from');
var _from2 = _interopRequireDefault(_from); var _from2 = _interopRequireDefault(_from);
@ -49981,9 +49981,10 @@ if (typeof Array.prototype.find === 'undefined') {
if (typeof _from2.default === 'undefined') { if (typeof _from2.default === 'undefined') {
_dereq_('core-js/fn/array/from'); _dereq_('core-js/fn/array/from');
} }
if (typeof _promise2.default === 'undefined') {
_dereq_('core-js/fn/promise'); // No if-statement on Promise because of IE11. Otherwise Promise is undefined in the service worker.
} _dereq_('core-js/fn/promise');
if (typeof Uint8Array.from === 'undefined') { if (typeof Uint8Array.from === 'undefined') {
_dereq_('core-js/fn/typed/uint8-array'); _dereq_('core-js/fn/typed/uint8-array');
} }
@ -49997,7 +49998,7 @@ if (typeof _assign2.default === 'undefined') {
_dereq_('core-js/fn/object/assign'); _dereq_('core-js/fn/object/assign');
} }
},{"babel-runtime/core-js/array/from":20,"babel-runtime/core-js/object/assign":24,"babel-runtime/core-js/promise":32,"babel-runtime/core-js/symbol":33,"core-js/fn/array/fill":48,"core-js/fn/array/find":49,"core-js/fn/array/from":50,"core-js/fn/object/assign":51,"core-js/fn/promise":52,"core-js/fn/string/repeat":53,"core-js/fn/symbol":54,"core-js/fn/typed/uint8-array":55,"whatwg-fetch":321}],391:[function(_dereq_,module,exports){ },{"babel-runtime/core-js/array/from":20,"babel-runtime/core-js/object/assign":24,"babel-runtime/core-js/symbol":33,"core-js/fn/array/fill":48,"core-js/fn/array/find":49,"core-js/fn/array/from":50,"core-js/fn/object/assign":51,"core-js/fn/promise":52,"core-js/fn/string/repeat":53,"core-js/fn/symbol":54,"core-js/fn/typed/uint8-array":55,"whatwg-fetch":321}],391:[function(_dereq_,module,exports){
'use strict'; 'use strict';
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
@ -50940,8 +50941,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @module util * @module util
*/ */
var isIE11 = typeof navigator !== 'undefined' && !!navigator.userAgent.match(/Trident\/7\.0.*rv:([0-9.]+).*\).*Gecko$/); // re-import module to access util functions
exports.default = { exports.default = {
isString: function isString(data) { isString: function isString(data) {
return typeof data === 'string' || String.prototype.isPrototypeOf(data); return typeof data === 'string' || String.prototype.isPrototypeOf(data);
}, },
@ -50961,6 +50962,10 @@ exports.default = {
* @returns {Array<ArrayBuffer>} an array of binary data to be passed * @returns {Array<ArrayBuffer>} an array of binary data to be passed
*/ */
getTransferables: function getTransferables(obj) { getTransferables: function getTransferables(obj) {
// Internet Explorer does not support Transferable objects.
if (isIE11) {
return undefined;
}
if (_config2.default.zero_copy && Object.prototype.isPrototypeOf(obj)) { if (_config2.default.zero_copy && Object.prototype.isPrototypeOf(obj)) {
var transferables = []; var transferables = [];
_util2.default.collectBuffers(obj, transferables); _util2.default.collectBuffers(obj, transferables);
@ -51535,7 +51540,7 @@ exports.default = {
removeTrailingSpaces: function removeTrailingSpaces(text) { removeTrailingSpaces: function removeTrailingSpaces(text) {
return text.replace(/[ \t]+$/mg, ""); return text.replace(/[ \t]+$/mg, "");
} }
}; // re-import module to access util functions };
},{"./config":325,"./encoding/base64":358,"./util":398,"address-rfc2822":1,"babel-runtime/core-js/object/values":31,"babel-runtime/helpers/slicedToArray":40,"crypto":"crypto","zlib":"zlib"}],399:[function(_dereq_,module,exports){ },{"./config":325,"./encoding/base64":358,"./util":398,"address-rfc2822":1,"babel-runtime/core-js/object/values":31,"babel-runtime/helpers/slicedToArray":40,"crypto":"crypto","zlib":"zlib"}],399:[function(_dereq_,module,exports){
'use strict'; 'use strict';

4
dist/openpgp.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! OpenPGP.js v3.0.10 - 2018-05-14 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */ /*! OpenPGP.js v3.0.11 - 2018-05-22 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
!function e(n,t,r){function o(a,f){if(!t[a]){if(!n[a]){var c="function"==typeof require&&require;if(!f&&c)return c(a,!0);if(i)return i(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var u=t[a]={exports:{}};n[a][0].call(u.exports,function(e){var t=n[a][1][e];return o(t||e)},u,u.exports,e,n,t,r)}return t[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,n,t){self.window=self,importScripts("openpgp.min.js");var r=window.openpgp,o=[],i=6e4;function a(e){self.postMessage(e,r.util.getTransferables(e.data))}r.crypto.random.randomBuffer.init(i,function(){return o.length||self.postMessage({event:"request-seed",amount:i}),new Promise(function(e){o.push(e)})}),self.onmessage=function(e){var n,t=e.data||{};switch(t.event){case"configure":n=t.config,Object.keys(n).forEach(function(e){r.config[e]=n[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));r.crypto.random.randomBuffer.set(e)}(t.buf);var i=o;o=[];for(var f=0;f<i.length;f++)i[f]();break;default:!function(e,n,t){if("function"!=typeof r[n])return void a({id:e,event:"method-return",err:"Unknown Worker Event"});t=r.packet.clone.parseClonedPackets(t,n),r[n](t).then(function(n){a({id:e,event:"method-return",data:r.packet.clone.clonePackets(n)})}).catch(function(n){a({id:e,event:"method-return",err:n.message,stack:n.stack})})}(t.id,t.event,t.options||{})}}},{}]},{},[1]); !function e(n,t,r){function o(a,f){if(!t[a]){if(!n[a]){var c="function"==typeof require&&require;if(!f&&c)return c(a,!0);if(i)return i(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var u=t[a]={exports:{}};n[a][0].call(u.exports,function(e){var t=n[a][1][e];return o(t||e)},u,u.exports,e,n,t,r)}return t[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,n,t){self.window=self,importScripts("openpgp.min.js");var r=window.openpgp,o=[],i=6e4;function a(e){self.postMessage(e,r.util.getTransferables(e.data))}r.crypto.random.randomBuffer.init(i,function(){return o.length||self.postMessage({event:"request-seed",amount:i}),new Promise(function(e){o.push(e)})}),self.onmessage=function(e){var n,t=e.data||{};switch(t.event){case"configure":n=t.config,Object.keys(n).forEach(function(e){r.config[e]=n[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));r.crypto.random.randomBuffer.set(e)}(t.buf);var i=o;o=[];for(var f=0;f<i.length;f++)i[f]();break;default:!function(e,n,t){if("function"!=typeof r[n])return void a({id:e,event:"method-return",err:"Unknown Worker Event"});t=r.packet.clone.parseClonedPackets(t,n),r[n](t).then(function(n){a({id:e,event:"method-return",data:r.packet.clone.clonePackets(n)})}).catch(function(n){a({id:e,event:"method-return",err:n.message,stack:n.stack})})}(t.id,t.event,t.options||{})}}},{}]},{},[1]);

2
npm-shrinkwrap.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "openpgp", "name": "openpgp",
"version": "3.0.10", "version": "3.0.11",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,7 +1,7 @@
{ {
"name": "openpgp", "name": "openpgp",
"description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.", "description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.",
"version": "3.0.10", "version": "3.0.11",
"license": "LGPL-3.0+", "license": "LGPL-3.0+",
"homepage": "https://openpgpjs.org/", "homepage": "https://openpgpjs.org/",
"engines": { "engines": {