diff --git a/Gruntfile.js b/Gruntfile.js index ac233ce0b2..bf5ddfcc45 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -16,7 +16,6 @@ module.exports = function (grunt) { fragments: 'src/platform/web/fragments', static: 'build', dest: 'build', - crypto_js: 'node_modules/crypto-js/src', tools_compiler: __dirname + '/node_modules/google-closure-compiler/compiler.jar', }; diff --git a/package-lock.json b/package-lock.json index 14b3a02edb..8f5486ebbd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,6 @@ }, "devDependencies": { "@ably/vcdiff-decoder": "1.0.4", - "@types/crypto-js": "^4.0.1", "@types/node": "^18.0.0", "@types/request": "^2.48.7", "@types/ws": "^8.2.0", @@ -26,7 +25,6 @@ "chai": "^4.2.0", "copy-webpack-plugin": "^11.0.0", "cors": "~2.7", - "crypto-js": "ably-forks/crypto-js#crypto-lite", "eslint": "^7.13.0", "eslint-plugin-jsdoc": "^40.0.0", "eslint-plugin-security": "^1.4.0", @@ -327,12 +325,6 @@ "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==", "dev": true }, - "node_modules/@types/crypto-js": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.1.1.tgz", - "integrity": "sha512-BG7fQKZ689HIoc5h+6D2Dgq1fABRa0RbBWKBd9SP/MVRVXROflpm5fhwyATX5duFmbStzyzyycPB8qUYKDH3NA==", - "dev": true - }, "node_modules/@types/eslint": { "version": "8.37.0", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.37.0.tgz", @@ -1819,13 +1811,6 @@ "node": ">= 8" } }, - "node_modules/crypto-js": { - "version": "4.0.0", - "resolved": "git+https://git@github.com/ably-forks/crypto-js.git#07e09b48fd8f850f71c10c9d9307ca4e6ac622a0", - "integrity": "sha512-3RE9Ztinx+QLpEDwcsPTVGMXIIqtS/r+YyD1E7BGXE+CRBcCwkyHWVyl1Aperg5QBOUkg2dtiC8p18a41IKltQ==", - "dev": true, - "license": "MIT" - }, "node_modules/dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -7679,12 +7664,6 @@ "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==", "dev": true }, - "@types/crypto-js": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.1.1.tgz", - "integrity": "sha512-BG7fQKZ689HIoc5h+6D2Dgq1fABRa0RbBWKBd9SP/MVRVXROflpm5fhwyATX5duFmbStzyzyycPB8qUYKDH3NA==", - "dev": true - }, "@types/eslint": { "version": "8.37.0", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.37.0.tgz", @@ -8831,12 +8810,6 @@ "which": "^2.0.1" } }, - "crypto-js": { - "version": "git+https://git@github.com/ably-forks/crypto-js.git#07e09b48fd8f850f71c10c9d9307ca4e6ac622a0", - "integrity": "sha512-3RE9Ztinx+QLpEDwcsPTVGMXIIqtS/r+YyD1E7BGXE+CRBcCwkyHWVyl1Aperg5QBOUkg2dtiC8p18a41IKltQ==", - "dev": true, - "from": "crypto-js@ably-forks/crypto-js#crypto-lite" - }, "dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", diff --git a/package.json b/package.json index e97913a2e7..2d1e54f439 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ }, "devDependencies": { "@ably/vcdiff-decoder": "1.0.4", - "@types/crypto-js": "^4.0.1", "@types/node": "^18.0.0", "@types/request": "^2.48.7", "@types/ws": "^8.2.0", @@ -42,7 +41,6 @@ "chai": "^4.2.0", "copy-webpack-plugin": "^11.0.0", "cors": "~2.7", - "crypto-js": "ably-forks/crypto-js#crypto-lite", "eslint": "^7.13.0", "eslint-plugin-jsdoc": "^40.0.0", "eslint-plugin-security": "^1.4.0", diff --git a/src/common/types/crypto-js.d.ts b/src/common/types/crypto-js.d.ts deleted file mode 100644 index db91283ac4..0000000000 --- a/src/common/types/crypto-js.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare module 'crypto-js/build' { - import CryptoJS from 'crypto-js'; - import algo = CryptoJS.algo; - export { algo }; -} - -declare module 'crypto-js/build/hmac-sha256' { - import CryptoJS from 'crypto-js'; - export default CryptoJS.HmacSHA256; -} diff --git a/test/support/browser_file_list.js b/test/support/browser_file_list.js index 0dbf2cd18b..ad830a97cc 100644 --- a/test/support/browser_file_list.js +++ b/test/support/browser_file_list.js @@ -11,9 +11,6 @@ window.__testFiles__.files = { 'browser/lib/util/base64.js': true, 'node_modules/async/lib/async.js': true, 'node_modules/@ably/vcdiff-decoder/dist/vcdiff-decoder.js': true, - 'node_modules/crypto-js/build/enc-base64.js': true, - 'node_modules/crypto-js/build/enc-utf8.js': true, - 'node_modules/crypto-js/build/core.js': true, 'test/common/globals/environment.js': true, 'test/common/globals/named_dependencies.js': true, 'test/common/modules/client_module.js': true, diff --git a/test/web_server b/test/web_server index 1549b96692..f42134d906 100755 --- a/test/web_server +++ b/test/web_server @@ -35,15 +35,6 @@ server.get('/', function(req, res) { } }); - -/** - * This is a rather hacky workaround since crypto-js base64 depends on node_modules/crypto-js/build/core but will request the file from the root level of the server. - * I'm leaving this here for now in lieu of a more elegant solution as the 'real' solution is to improve the way we use dependencies in these tests. - */ -server.get('/core.js', function (req, res) { - res.redirect('/node_modules/crypto-js/build/core.js'); -}); - server.use('/node_modules', express.static(__dirname + '/../node_modules')); server.use('/test', express.static(__dirname)); server.use('/browser', express.static(__dirname + '/../src/web')); diff --git a/webpack.config.js b/webpack.config.js index 085d573cbf..2c0c981ca7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -79,9 +79,6 @@ const browserConfig = { crypto: false, }, }, - externals: { - 'crypto-js': true, - }, optimization: { minimize: false, },