@toruslabs/broadcast-channel
Version:
A BroadcastChannel that works in New Browsers, Old Browsers, WebWorkers
138 lines (137 loc) • 6.17 kB
JSON
{
"name": "@toruslabs/broadcast-channel",
"version": "12.0.0",
"description": "A BroadcastChannel that works in New Browsers, Old Browsers, WebWorkers",
"homepage": "https://github.com/torusresearch/broadcast-channel#readme",
"keywords": [
"broadcast-channel",
"broadcastchannel",
"broadcast",
"polyfill",
"localstorage",
"indexeddb",
"postMessage",
"crosstab"
],
"files": [
"dist"
],
"repository": {
"type": "git",
"url": "git+https://github.com/torusresearch/broadcast-channel.git"
},
"author": "pubkey",
"license": "MIT",
"bugs": {
"url": "https://github.com/torusresearch/broadcast-channel/issues"
},
"main": "dist/lib.cjs/index.js",
"module": "dist/lib.esm/index.js",
"sideEffects": false,
"types": "dist/lib.cjs/types/index.d.ts",
"jsdelivr": "dist/broadcastChannel.umd.min.js",
"unpkg": "dist/broadcastChannel.umd.min.js",
"scripts": {
"test": "echo \"RUN ALL:\" && npm run test:browser && npm run test:e2e",
"test:e2e": "concurrently \"npm run docs:serve\" \"sleep 20 && testcafe -b && testcafe chrome -e test/e2e.test.ts --hostname localhost\" --kill-others --success first",
"test:node": "vitest run --config test/configs/node.config.mts --coverage",
"test:node:loop": "npm run test:node && npm run test:node:loop",
"test:browser": "vitest run --config test/configs/browsers.config.mts --coverage",
"test:typings": "npm run build && vitest run --config test/configs/typing.config.mts",
"test:performance": "vitest run --config test/configs/performance.config.mts",
"test:simple": "vitest run --config test/configs/simple.config.mts",
"test:electron": "(cd ./test-electron && npm run test)",
"size:prewebpack": "cross-env NODE_ENV=build webpack --config ./config/webpack.config.js",
"size:webpack": "npm run size:prewebpack && echo \"Build-Size Webpack (minified+gzip):\" && gzip-size --raw ./test_tmp/webpack.bundle.js",
"size:browserify": "rimraf test_tmp/browserify.js && browserify --no-builtins dist/lib/browser.js > test_tmp/browserify.js && uglifyjs --compress --mangle --output test_tmp/browserify.min.js -- test_tmp/browserify.js && echo \"Build-Size browserify (minified+gzip):\" && gzip-size --raw test_tmp/browserify.min.js",
"size:rollup": "rollup --config ./config/rollup.config.js && echo \"Build-Size Rollup (minified+gzip):\" && gzip-size --raw ./test_tmp/rollup.bundle.js",
"lint": "eslint src test --fix --cache",
"clear": "rimraf -rf ./dist && rimraf -rf ./gen",
"build:es6node": "rimraf -rf dist/esnode && cross-env NODE_ENV=es6 babel src --out-dir dist/esnode",
"build:es6browser": "rimraf -rf dist/esbrowser && cross-env NODE_ENV=es6 babel src --out-dir dist/esbrowser",
"build:es5node": "cross-env NODE_ENV=es5 babel src --out-dir dist/es5node",
"build:es5browser": "cross-env NODE_ENV=es5 babel src --out-dir dist/lib",
"build:test": "cross-env NODE_ENV=es5 babel test --out-dir test_tmp",
"build:index": "browserify test_tmp/scripts/index.js > docs/index.js",
"build:browser": "browserify test_tmp/scripts/e2e.js > docs/e2e.js",
"build:worker": "browserify test_tmp/scripts/worker.js > docs/worker.js",
"build:iframe": "browserify test_tmp/scripts/iframe.js > docs/iframe.js",
"build:lib-browser": "browserify dist/lib.cjs/index.js > dist/lib/browser.js",
"build:lib-browser:min": "uglifyjs --compress --mangle --output dist/lib/browser.min.js -- dist/lib/browser.js",
"build": "npm run clear && npm run build:publish && concurrently \"npm run build:es6node\" \"npm run build:es6browser\" \"npm run build:es5browser\" \"npm run build:test\" && concurrently \"npm run build:index\" \"npm run build:browser\" \"npm run build:worker\" \"npm run build:iframe\" && npm run build:lib-browser && npm run build:lib-browser:min",
"build:min": "uglifyjs --compress --mangle --output dist/lib/browserify.min.js -- dist/lib/browser.js",
"docs:only": "http-server ./docs --silent",
"docs:serve": "npm run build && echo \"Open http://localhost:8080/\" && npm run docs:only",
"build:publish": "torus-scripts build"
},
"pre-commit": [
"lint"
],
"dependencies": {
"@babel/runtime": "^7.26.9",
"@toruslabs/constants": "^14.2.0",
"@toruslabs/eccrypto": "^6.0.2",
"@toruslabs/metadata-helpers": "^7.0.1",
"base64url": "^3.0.1",
"loglevel": "^1.9.2",
"oblivious-set": "1.4.0",
"socket.io-client": "^4.8.1",
"unload": "^2.4.1"
},
"devDependencies": {
"@babel/cli": "7.26.4",
"@babel/core": "7.26.9",
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
"@babel/plugin-transform-member-expression-literals": "7.25.9",
"@babel/plugin-transform-property-literals": "7.25.9",
"@babel/plugin-transform-runtime": "7.26.9",
"@babel/polyfill": "7.12.1",
"@babel/preset-env": "7.26.9",
"@babel/types": "7.26.9",
"@rollup/plugin-node-resolve": "16.0.0",
"@rollup/plugin-terser": "0.4.4",
"@toruslabs/config": "^3.1.0",
"@toruslabs/eslint-config-typescript": "^4.1.0",
"@toruslabs/torus-scripts": "^7.1.2",
"@types/core-js": "2.5.8",
"@vitest/browser": "^3.0.7",
"@vitest/coverage-istanbul": "^3.0.7",
"assert": "2.1.0",
"async-test-util": "2.5.0",
"babel-loader": "^10.0.0",
"browserify": "17.0.1",
"child-process-promise": "^2.1.3",
"clone": "2.1.2",
"concurrently": "9.1.2",
"convert-hrtime": "5.0.0",
"copyfiles": "2.4.1",
"cross-env": "7.0.3",
"detect-node": "^2.1.0",
"eslint": "9.21.0",
"globals": "^16.0.0",
"gzip-size-cli": "5.1.0",
"http-server": "14.1.1",
"playwright": "^1.50.1",
"pre-commit": "^1.0.10",
"random-int": "3.0.0",
"random-token": "0.0.8",
"rimraf": "^6.0.1",
"rollup": "4.34.9",
"sinon": "^19.0.2",
"testcafe": "3.7.2",
"ts-node": "10.9.2",
"typescript": "^5.8.2",
"uglify-js": "3.19.3",
"vitest": "^3.0.7",
"watchify": "4.0.0",
"webpack": "5.98.0",
"webpack-cli": "6.0.1"
},
"overrides": {
"shelljs": "0.8.5"
},
"engines": {
"node": ">=20.x",
"npm": ">=9.x"
}
}