diff --git a/package.json b/package.json index 1b356a7..a847d3d 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,8 @@ "pinia": ">=2.0.14" }, "dependencies": { + "@ungap/structured-clone": "^1.0.1", "broadcast-channel": "^4.20.2", - "realistic-structured-clone": "^3.0.0", "vue-demi": "^0.13.11" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 719d1d5..a0588af 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,18 +5,18 @@ importers: .: specifiers: '@antfu/eslint-config': ^0.34.1 + '@ungap/structured-clone': ^1.0.1 broadcast-channel: ^4.20.2 bumpp: ^8.2.1 eslint: ^8.28.0 pinia: ^2.0.29 - realistic-structured-clone: ^3.0.0 tsup: ^6.5.0 typescript: ^4.9.3 vue: ^3.2.45 vue-demi: ^0.13.11 dependencies: + '@ungap/structured-clone': 1.0.1 broadcast-channel: 4.20.2 - realistic-structured-clone: 3.0.0 vue-demi: 0.13.11_vue@3.2.45 devDependencies: '@antfu/eslint-config': 0.34.1_7uibuqfxkfaozanbtbziikiqje @@ -1378,6 +1378,10 @@ packages: eslint-visitor-keys: 3.3.0 dev: true + /@ungap/structured-clone/1.0.1: + resolution: {integrity: sha512-zKVyTt6rELvPXYwcVPTJcPFtY0AckN5A7xWuc7owBqR0FdtuDYhE9MZZUi6IY1kZUQFSXV1B3UOOIyLkVHYd2w==} + dev: false + /@unhead/dom/1.0.15: resolution: {integrity: sha512-W3P9eGazfQPMZTG4ryb5oOA02Z4o16Jxo8DAihF/7Xmg/FVYY5Up9p9et7Nbb6AKNgt1PEz3Sp0xBaw+F6Uyjw==} dependencies: @@ -1843,11 +1847,6 @@ packages: /balanced-match/1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - /base64-arraybuffer-es6/0.7.0: - resolution: {integrity: sha512-ESyU/U1CFZDJUdr+neHRhNozeCv72Y7Vm0m1DCbjX3KBjT6eYocvAJlSk6+8+HkVwXlT1FNxhGW6q3UKAlCvvw==} - engines: {node: '>=6.0.0'} - dev: false - /base64-js/1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} dev: true @@ -2509,12 +2508,6 @@ packages: resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} dev: true - /domexception/1.0.1: - resolution: {integrity: sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==} - dependencies: - webidl-conversions: 4.0.2 - dev: false - /domhandler/4.3.1: resolution: {integrity: sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==} engines: {node: '>= 4'} @@ -4659,6 +4652,7 @@ packages: /lodash/4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true /log-symbols/5.1.0: resolution: {integrity: sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==} @@ -5903,6 +5897,7 @@ packages: /punycode/2.1.1: resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} engines: {node: '>=6'} + dev: true /queue-microtask/1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -5986,14 +5981,6 @@ packages: dependencies: picomatch: 2.3.1 - /realistic-structured-clone/3.0.0: - resolution: {integrity: sha512-rOjh4nuWkAqf9PWu6JVpOWD4ndI+JHfgiZeMmujYcPi+fvILUu7g6l26TC1K5aBIp34nV+jE1cDO75EKOfHC5Q==} - dependencies: - domexception: 1.0.1 - typeson: 6.1.0 - typeson-registry: 1.0.0-alpha.39 - dev: false - /redis-errors/1.2.0: resolution: {integrity: sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==} engines: {node: '>=4'} @@ -6626,13 +6613,6 @@ packages: punycode: 2.1.1 dev: true - /tr46/2.1.0: - resolution: {integrity: sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==} - engines: {node: '>=8'} - dependencies: - punycode: 2.1.1 - dev: false - /tree-kill/1.2.2: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true @@ -6765,20 +6745,6 @@ packages: hasBin: true dev: true - /typeson-registry/1.0.0-alpha.39: - resolution: {integrity: sha512-NeGDEquhw+yfwNhguLPcZ9Oj0fzbADiX4R0WxvoY8nGhy98IbzQy1sezjoEFWOywOboj/DWehI+/aUlRVrJnnw==} - engines: {node: '>=10.0.0'} - dependencies: - base64-arraybuffer-es6: 0.7.0 - typeson: 6.1.0 - whatwg-url: 8.7.0 - dev: false - - /typeson/6.1.0: - resolution: {integrity: sha512-6FTtyGr8ldU0pfbvW/eOZrEtEkczHRUtduBnA90Jh9kMPCiFNnXIon3vF41N0S4tV1HHQt4Hk1j4srpESziCaA==} - engines: {node: '>=0.1.14'} - dev: false - /ufo/0.8.6: resolution: {integrity: sha512-fk6CmUgwKCfX79EzcDQQpSCMxrHstvbLswFChHS0Vump+kFkw7nJBfTZoC1j0bOGoY9I7R3n2DGek5ajbcYnOw==} dev: true @@ -7256,11 +7222,7 @@ packages: /webidl-conversions/4.0.2: resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} - - /webidl-conversions/6.1.0: - resolution: {integrity: sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==} - engines: {node: '>=10.4'} - dev: false + dev: true /webpack-sources/3.2.3: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} @@ -7284,15 +7246,6 @@ packages: webidl-conversions: 4.0.2 dev: true - /whatwg-url/8.7.0: - resolution: {integrity: sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==} - engines: {node: '>=10'} - dependencies: - lodash: 4.17.21 - tr46: 2.1.0 - webidl-conversions: 6.1.0 - dev: false - /which-boxed-primitive/1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: diff --git a/src/index.ts b/src/index.ts index 5232b8f..de76b0a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ import { watch } from 'vue-demi'; import type { MethodType } from 'broadcast-channel'; import { BroadcastChannel as BroadcastChannelImpl } from 'broadcast-channel'; import type { PiniaPluginContext, Store } from 'pinia'; -import structuredClone from 'realistic-structured-clone'; +import structuredClone from '@ungap/structured-clone'; /** * Share state across browser tabs. diff --git a/types.d.ts b/types.d.ts index 492be70..813923a 100644 --- a/types.d.ts +++ b/types.d.ts @@ -1,4 +1,4 @@ -declare module 'realistic-structured-clone' { +declare module '@ungap/structured-clone' { const structuredClone: (obj: T) => T export default structuredClone