UNPKG

@toruslabs/broadcast-channel

Version:

A BroadcastChannel that works in New Browsers, Old Browsers, WebWorkers

124 lines (123 loc) 5.82 kB
{ "name": "@toruslabs/broadcast-channel", "version": "13.3.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/lib.esm/index.js", "unpkg": "dist/lib.esm/index.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:esbuild": "esbuild dist/lib.cjs/index.js --bundle --outfile=test_tmp/esbuild.bundle.js --format=iife --global-name=BroadcastChannel --minify && echo \"Build-Size esbuild (minified+gzip):\" && gzip-size --raw test_tmp/esbuild.bundle.js", "size:rollup": "rollup --config ./config/rollup.config.js && echo \"Build-Size Rollup (minified+gzip):\" && gzip-size --raw ./test_tmp/rollup.bundle.js", "lint": "torus-scripts lint", "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": "esbuild test_tmp/scripts/index.js --bundle --outfile=docs/index.js --format=iife", "build:browser": "esbuild test_tmp/scripts/e2e.js --bundle --outfile=docs/e2e.js --format=iife", "build:worker": "esbuild test_tmp/scripts/worker.js --bundle --outfile=docs/worker.js --format=iife", "build:iframe": "esbuild test_tmp/scripts/iframe.js --bundle --outfile=docs/iframe.js --format=iife", "build:lib-browser": "esbuild dist/lib.cjs/index.js --bundle --outfile=dist/lib/browser.js --format=iife --global-name=BroadcastChannel", "build:lib-browser:min": "esbuild dist/lib.cjs/index.js --bundle --outfile=dist/lib/browser.min.js --format=iife --global-name=BroadcastChannel --minify", "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", "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.28.6", "@toruslabs/constants": "^16.1.0", "@toruslabs/eccrypto": "^7.0.0", "@toruslabs/metadata-helpers": "^8.2.0", "loglevel": "^1.9.2", "oblivious-set": "2.0.0", "socket.io-client": "^4.8.3" }, "devDependencies": { "@babel/cli": "7.28.6", "@babel/core": "7.29.0", "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/plugin-transform-member-expression-literals": "7.27.1", "@babel/plugin-transform-property-literals": "7.27.1", "@babel/plugin-transform-runtime": "7.29.0", "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.29.0", "@babel/types": "7.29.0", "@rollup/plugin-terser": "0.4.4", "@toruslabs/config": "^4.0.0", "@toruslabs/eslint-config-typescript": "^5.0.0", "@toruslabs/torus-scripts": "^8.0.0", "@types/clone": "^2.1.4", "@types/core-js": "2.5.8", "@types/detect-node": "^2.0.2", "@vitest/browser": "^4.0.18", "@vitest/browser-playwright": "^4.0.18", "@vitest/coverage-istanbul": "^4.0.18", "babel-loader": "^10.0.0", "clone": "2.1.2", "concurrently": "9.2.1", "cross-env": "10.1.0", "detect-node": "^2.1.0", "esbuild": "^0.27.3", "eslint": "9.39.2", "globals": "^17.3.0", "gzip-size-cli": "5.1.0", "http-server": "14.1.1", "playwright": "^1.58.2", "rimraf": "^6.1.3", "rollup": "4.59.0", "testcafe": "3.7.4", "typescript": "^5.9.3", "unload": "^2.4.1", "vitest": "^4.0.18" }, "overrides": { "shelljs": "0.8.5" }, "engines": { "node": ">=22.x", "npm": ">=10.x" } }