From f36e8862c8e5f28976ac2766e5f3c18adf463fe0 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Fri, 22 Jan 2016 15:50:58 +0700 Subject: [PATCH 1/8] Remove unecessary whitespace in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1c54e231..7a8c0282 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "openpgp", "description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.", "version": "1.4.1", - "license" : "LGPL-3.0+", + "license": "LGPL-3.0+", "homepage": "http://openpgpjs.org/", "engines": { "node": ">=0.8" From a6e4e7c415ac3d4f2b4b2888418955dce57cb50b Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Fri, 22 Jan 2016 15:55:54 +0700 Subject: [PATCH 2/8] Point to dist/openpgp.js bundle in package.json main attribute for node.js use --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7a8c0282..319c96e3 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "gpg", "openpgp" ], - "main": "src/index.js", + "main": "dist/openpgp.js", "directories": { "lib": "src" }, From 024dddbd9113ea390365ae045410b4067580f059 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Fri, 22 Jan 2016 23:31:55 +0700 Subject: [PATCH 3/8] Remove caching of node_modules in travis build --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2d9b42bd..8342eb00 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,5 @@ sudo: false language: node_js -cache: - directories: - - node_modules matrix: fast_finish: true include: From 6d12e3142d297ecdae9554ed3912351a46a275c4 Mon Sep 17 00:00:00 2001 From: evilaliv3 Date: Fri, 22 Jan 2016 18:17:39 +0100 Subject: [PATCH 4/8] Update dev dependencies to latest versions --- package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 319c96e3..42cedbd9 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "test": "grunt test" }, "devDependencies": { - "browserify": "~12.0", + "browserify": "~13.0", "chai": "~3.4.1", "coveralls": "^2.11.2", "grunt": "~0.4.5", @@ -40,23 +40,23 @@ "grunt-contrib-clean": "~0.7.0", "grunt-contrib-connect": "~0.11.2", "grunt-contrib-copy": "~0.8.0", - "grunt-contrib-jshint": "*", + "grunt-contrib-jshint": "~0.12.0", "grunt-contrib-uglify": "~0.11.0", "grunt-jsbeautifier": "~0.2.10", - "grunt-jsdoc": "*", + "grunt-jsdoc": "~1.1.0", "grunt-mocha-istanbul": "^3.0.1", "grunt-mocha-test": "~0.12.7", "grunt-saucelabs": "8.6.2", "grunt-text-replace": "~0.4.0", - "istanbul": "^0.4.1", + "istanbul": "~0.4.1", "mocha": "~2.3.4", "node-fetch": "^1.3.3", - "whatwg-fetch": "^0.10.1" + "whatwg-fetch": "~0.11.0" }, "dependencies": { - "es6-promise": "^3.0.2", + "es6-promise": "~3.0.2", "node-localstorage": "~1.1.2", - "zlibjs": "^0.2.0" + "zlibjs": "~0.2.0" }, "repository": { "type": "git", From e907777760fd5923470013e78191da0d63b72cad Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Fri, 22 Jan 2016 14:20:06 +0700 Subject: [PATCH 5/8] Remove unused npm_pack grunt task --- Gruntfile.js | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 7a0de57a..1677af4a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -228,32 +228,13 @@ module.exports = function(grunt) { } grunt.registerTask('default', 'Build OpenPGP.js', function() { - grunt.task.run(['clean', 'copy:zlib', 'browserify', 'replace', 'uglify', 'npm_pack']); + grunt.task.run(['clean', 'copy:zlib', 'browserify', 'replace', 'uglify']); //TODO jshint is not run because of too many discovered issues, once these are addressed it should autorun grunt.log.ok('Before Submitting a Pull Request please also run `grunt jshint`.'); }); grunt.registerTask('documentation', ['jsdoc']); - // Alias the `npm_pack` task to run `npm pack` - grunt.registerTask('npm_pack', 'npm pack', function () { - var done = this.async(); - var npm = require('child_process').exec('npm pack ../', { cwd: 'dist'}, function (err, stdout) { - var package = stdout; - if (err === null) { - var install = require('child_process').exec('npm install dist/' + package, function (err) { - done(err); - }); - install.stdout.pipe(process.stdout); - install.stderr.pipe(process.stderr); - } else { - done(err); - } - }); - npm.stdout.pipe(process.stdout); - npm.stderr.pipe(process.stderr); - }); - grunt.event.on('coverage', function(lcov, done){ require('coveralls').handleInput(lcov, function(err){ if (err) { From af4a9ba6adc3dacfd6523e040e6f547b9a83fb96 Mon Sep 17 00:00:00 2001 From: evilaliv3 Date: Fri, 22 Jan 2016 22:46:14 +0100 Subject: [PATCH 6/8] Revert few of the changes done in https://github.com/openpgpjs/openpgpjs/commit/a4598f3bd4a7725c645841c736ee17e6d04073e6 --- test/crypto/cipher/aes.js | 2 +- test/crypto/cipher/blowfish.js | 2 +- test/crypto/cipher/cast5.js | 2 +- test/crypto/cipher/des.js | 2 +- test/crypto/cipher/twofish.js | 2 +- test/crypto/crypto.js | 2 +- test/crypto/hash/md5.js | 2 +- test/crypto/hash/ripemd.js | 2 +- test/crypto/hash/sha.js | 2 +- test/general/armor.js | 2 +- test/general/basic.js | 2 +- test/general/hkp.js | 2 +- test/general/key.js | 2 +- test/general/keyring.js | 2 +- test/general/packet.js | 2 +- test/general/signature.js | 2 +- test/worker/api.js | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/test/crypto/cipher/aes.js b/test/crypto/cipher/aes.js index 6cc1f3ca..833e3f90 100644 --- a/test/crypto/cipher/aes.js +++ b/test/crypto/cipher/aes.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, chai = require('chai'), diff --git a/test/crypto/cipher/blowfish.js b/test/crypto/cipher/blowfish.js index 81100dd7..2600a06b 100644 --- a/test/crypto/cipher/blowfish.js +++ b/test/crypto/cipher/blowfish.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, BFencrypt = openpgp.crypto.cipher.blowfish, diff --git a/test/crypto/cipher/cast5.js b/test/crypto/cipher/cast5.js index 40ab972e..6a222fde 100644 --- a/test/crypto/cipher/cast5.js +++ b/test/crypto/cipher/cast5.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, chai = require('chai'), diff --git a/test/crypto/cipher/des.js b/test/crypto/cipher/des.js index 1be7e80f..64149e23 100644 --- a/test/crypto/cipher/des.js +++ b/test/crypto/cipher/des.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, chai = require('chai'), diff --git a/test/crypto/cipher/twofish.js b/test/crypto/cipher/twofish.js index e2ee828c..0ad46dde 100644 --- a/test/crypto/cipher/twofish.js +++ b/test/crypto/cipher/twofish.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, chai = require('chai'), diff --git a/test/crypto/crypto.js b/test/crypto/crypto.js index f7dec980..60afa1c8 100644 --- a/test/crypto/crypto.js +++ b/test/crypto/crypto.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var chai = require('chai'), expect = chai.expect; diff --git a/test/crypto/hash/md5.js b/test/crypto/hash/md5.js index b3d0a777..fb431b0a 100644 --- a/test/crypto/hash/md5.js +++ b/test/crypto/hash/md5.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, MD5 = openpgp.crypto.hash.md5, diff --git a/test/crypto/hash/ripemd.js b/test/crypto/hash/ripemd.js index 75c353c9..df153e04 100644 --- a/test/crypto/hash/ripemd.js +++ b/test/crypto/hash/ripemd.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, RMDstring = openpgp.crypto.hash.ripemd, diff --git a/test/crypto/hash/sha.js b/test/crypto/hash/sha.js index ce8da58a..cd4166d0 100644 --- a/test/crypto/hash/sha.js +++ b/test/crypto/hash/sha.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, hash = openpgp.crypto.hash, diff --git a/test/general/armor.js b/test/general/armor.js index 69ce787f..22535b17 100644 --- a/test/general/armor.js +++ b/test/general/armor.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var chai = require('chai'), expect = chai.expect; diff --git a/test/general/basic.js b/test/general/basic.js index ef9857ca..2ecd584d 100644 --- a/test/general/basic.js +++ b/test/general/basic.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var chai = require('chai'), expect = chai.expect; diff --git a/test/general/hkp.js b/test/general/hkp.js index cbe71bcd..3f0757c0 100644 --- a/test/general/hkp.js +++ b/test/general/hkp.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window !== 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window !== 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var fetch = typeof window !== 'undefined' ? window.fetch : require('node-fetch'); var chai = require('chai'), diff --git a/test/general/key.js b/test/general/key.js index e3be1c32..044ed38d 100644 --- a/test/general/key.js +++ b/test/general/key.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var chai = require('chai'), expect = chai.expect; diff --git a/test/general/keyring.js b/test/general/keyring.js index cc770d4b..e8c4d311 100644 --- a/test/general/keyring.js +++ b/test/general/keyring.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var keyring = new openpgp.Keyring(), chai = require('chai'), diff --git a/test/general/packet.js b/test/general/packet.js index 250c7dfe..e32ba5ab 100644 --- a/test/general/packet.js +++ b/test/general/packet.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var chai = require('chai'), expect = chai.expect; diff --git a/test/general/signature.js b/test/general/signature.js index 466a1036..33dbb9ea 100644 --- a/test/general/signature.js +++ b/test/general/signature.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var chai = require('chai'), expect = chai.expect; diff --git a/test/worker/api.js b/test/worker/api.js index d23d8a60..9be31c7d 100644 --- a/test/worker/api.js +++ b/test/worker/api.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var chai = require('chai'), expect = chai.expect; From 86f042c480bc12e8a0cd7d764c326eff50897956 Mon Sep 17 00:00:00 2001 From: evilaliv3 Date: Fri, 22 Jan 2016 22:54:48 +0100 Subject: [PATCH 7/8] Refactor Grunt.js following the unittests packaging changes --- Gruntfile.js | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 1677af4a..2b745116 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -16,9 +16,9 @@ module.exports = function(grunt) { }, options: { browserifyOptions: { - standalone: 'openpgp', - external: [ 'crypto', 'node-localstorage' ] - } + standalone: 'openpgp' + }, + external: [ 'crypto', 'node-localstorage' ] } }, openpgp_debug: { @@ -28,9 +28,9 @@ module.exports = function(grunt) { options: { browserifyOptions: { debug: true, - standalone: 'openpgp', - external: [ 'crypto', 'node-localstorage' ] - } + standalone: 'openpgp' + }, + external: [ 'crypto', 'node-localstorage' ] } }, worker: { @@ -48,9 +48,7 @@ module.exports = function(grunt) { 'test/lib/unittests-bundle.js': [ './test/unittests.js' ] }, options: { - browserifyOptions: { - external: [ 'openpgp', 'crypto', 'node-localstorage'] - } + external: [ 'openpgp'] } } }, @@ -119,14 +117,14 @@ module.exports = function(grunt) { coverage: { src: 'test', options: { - root: 'node_modules/openpgp', + root: '.', timeout: 240000, } }, coveralls: { src: ['test'], options: { - root: 'node_modules/openpgp', + root: '.', timeout: 240000, coverage: true, reportFormats: ['cobertura','lcovonly'] @@ -143,7 +141,7 @@ module.exports = function(grunt) { } }, copy: { - npm: { + browsertest: { expand: true, flatten: true, cwd: 'node_modules/', @@ -245,8 +243,8 @@ module.exports = function(grunt) { }); // Test/Dev tasks - grunt.registerTask('test', ['copy:npm', 'mochaTest']); - grunt.registerTask('coverage', ['default', 'copy:npm', 'mocha_istanbul:coverage']); - grunt.registerTask('coveralls', ['default', 'copy:npm', 'mocha_istanbul:coveralls']); - grunt.registerTask('saucelabs', ['default', 'copy:npm', 'connect', 'saucelabs-mocha']); + grunt.registerTask('test', ['copy:zlib', 'mochaTest']); + grunt.registerTask('coverage', ['copy:zlib', 'mocha_istanbul:coverage']); + grunt.registerTask('coveralls', ['copy:zlib', 'mocha_istanbul:coveralls']); + grunt.registerTask('saucelabs', ['default', 'copy:browsertest', 'connect', 'saucelabs-mocha']); }; From f729efa8735442e07614469cd7c7cb198a22c0fc Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Fri, 22 Jan 2016 16:13:21 +0700 Subject: [PATCH 8/8] Use dist/openpgp instead of src/index because of future ES6 transpilation under node --- Gruntfile.js | 2 +- test/crypto/cipher/aes.js | 2 +- test/crypto/cipher/blowfish.js | 2 +- test/crypto/cipher/cast5.js | 2 +- test/crypto/cipher/des.js | 2 +- test/crypto/cipher/twofish.js | 2 +- test/crypto/crypto.js | 2 +- test/crypto/hash/md5.js | 2 +- test/crypto/hash/ripemd.js | 2 +- test/crypto/hash/sha.js | 2 +- test/general/armor.js | 2 +- test/general/basic.js | 2 +- test/general/hkp.js | 2 +- test/general/key.js | 2 +- test/general/keyring.js | 2 +- test/general/packet.js | 2 +- test/general/signature.js | 2 +- test/worker/api.js | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 2b745116..5b64cd37 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -48,7 +48,7 @@ module.exports = function(grunt) { 'test/lib/unittests-bundle.js': [ './test/unittests.js' ] }, options: { - external: [ 'openpgp'] + external: ['crypto', 'node-localstorage', 'openpgp', '../../../dist/openpgp', '../../dist/openpgp'] } } }, diff --git a/test/crypto/cipher/aes.js b/test/crypto/cipher/aes.js index 833e3f90..335160f7 100644 --- a/test/crypto/cipher/aes.js +++ b/test/crypto/cipher/aes.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp'); var util = openpgp.util, chai = require('chai'), diff --git a/test/crypto/cipher/blowfish.js b/test/crypto/cipher/blowfish.js index 2600a06b..232d7366 100644 --- a/test/crypto/cipher/blowfish.js +++ b/test/crypto/cipher/blowfish.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp'); var util = openpgp.util, BFencrypt = openpgp.crypto.cipher.blowfish, diff --git a/test/crypto/cipher/cast5.js b/test/crypto/cipher/cast5.js index 6a222fde..5bbf02da 100644 --- a/test/crypto/cipher/cast5.js +++ b/test/crypto/cipher/cast5.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp'); var util = openpgp.util, chai = require('chai'), diff --git a/test/crypto/cipher/des.js b/test/crypto/cipher/des.js index 64149e23..27239b93 100644 --- a/test/crypto/cipher/des.js +++ b/test/crypto/cipher/des.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp'); var util = openpgp.util, chai = require('chai'), diff --git a/test/crypto/cipher/twofish.js b/test/crypto/cipher/twofish.js index 0ad46dde..169e43ec 100644 --- a/test/crypto/cipher/twofish.js +++ b/test/crypto/cipher/twofish.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp'); var util = openpgp.util, chai = require('chai'), diff --git a/test/crypto/crypto.js b/test/crypto/crypto.js index 60afa1c8..f76ee68c 100644 --- a/test/crypto/crypto.js +++ b/test/crypto/crypto.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp'); var chai = require('chai'), expect = chai.expect; diff --git a/test/crypto/hash/md5.js b/test/crypto/hash/md5.js index fb431b0a..43fbec79 100644 --- a/test/crypto/hash/md5.js +++ b/test/crypto/hash/md5.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp'); var util = openpgp.util, MD5 = openpgp.crypto.hash.md5, diff --git a/test/crypto/hash/ripemd.js b/test/crypto/hash/ripemd.js index df153e04..4d998be9 100644 --- a/test/crypto/hash/ripemd.js +++ b/test/crypto/hash/ripemd.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp'); var util = openpgp.util, RMDstring = openpgp.crypto.hash.ripemd, diff --git a/test/crypto/hash/sha.js b/test/crypto/hash/sha.js index cd4166d0..a304c895 100644 --- a/test/crypto/hash/sha.js +++ b/test/crypto/hash/sha.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../dist/openpgp'); var util = openpgp.util, hash = openpgp.crypto.hash, diff --git a/test/general/armor.js b/test/general/armor.js index 22535b17..f5ceb2e3 100644 --- a/test/general/armor.js +++ b/test/general/armor.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp'); var chai = require('chai'), expect = chai.expect; diff --git a/test/general/basic.js b/test/general/basic.js index 2ecd584d..616399ff 100644 --- a/test/general/basic.js +++ b/test/general/basic.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp'); var chai = require('chai'), expect = chai.expect; diff --git a/test/general/hkp.js b/test/general/hkp.js index 3f0757c0..568e4a89 100644 --- a/test/general/hkp.js +++ b/test/general/hkp.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window !== 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); +var openpgp = typeof window !== 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp'); var fetch = typeof window !== 'undefined' ? window.fetch : require('node-fetch'); var chai = require('chai'), diff --git a/test/general/key.js b/test/general/key.js index 044ed38d..50e52c3f 100644 --- a/test/general/key.js +++ b/test/general/key.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp'); var chai = require('chai'), expect = chai.expect; diff --git a/test/general/keyring.js b/test/general/keyring.js index e8c4d311..39962f73 100644 --- a/test/general/keyring.js +++ b/test/general/keyring.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp'); var keyring = new openpgp.Keyring(), chai = require('chai'), diff --git a/test/general/packet.js b/test/general/packet.js index e32ba5ab..82904fe5 100644 --- a/test/general/packet.js +++ b/test/general/packet.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp'); var chai = require('chai'), expect = chai.expect; diff --git a/test/general/signature.js b/test/general/signature.js index 33dbb9ea..e6d3a7cb 100644 --- a/test/general/signature.js +++ b/test/general/signature.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp'); var chai = require('chai'), expect = chai.expect; diff --git a/test/worker/api.js b/test/worker/api.js index 9be31c7d..3fac8a94 100644 --- a/test/worker/api.js +++ b/test/worker/api.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp'); var chai = require('chai'), expect = chai.expect;