Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@quilted/threads

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quilted/threads - npm Package Compare versions

Comparing version 0.0.0-preview-20231031044205 to 0.0.0-preview-20231113053310

build/esm/targets/broadcast-channel.mjs

2

build/typescript/index.d.ts
export { retain, release, StackFrame, isMemoryManageable } from './memory.ts';
export type { MemoryManageable, MemoryRetainer } from './memory.ts';
export { RELEASE_METHOD, RETAIN_METHOD, RETAINED_BY, ENCODE_METHOD, } from './constants.ts';
export { createThread, createThreadFromBrowserWebSocket, createThreadFromIframe, createThreadFromInsideIframe, createThreadFromMessagePort, createThreadFromWebWorker, type ThreadOptions, } from './targets.ts';
export { createThread, createThreadFromBroadcastChannel, createThreadFromBrowserWebSocket, createThreadFromIframe, createThreadFromInsideIframe, createThreadFromMessagePort, createThreadFromWebWorker, type ThreadOptions, } from './targets.ts';
export { createBasicEncoder } from './encoding.ts';

@@ -6,0 +6,0 @@ export { createThreadAbortSignal, acceptThreadAbortSignal, type ThreadAbortSignal, } from './abort-signal.ts';

export { createThread, type ThreadOptions } from './targets/target.ts';
export { createThreadFromBroadcastChannel } from './targets/broadcast-channel.ts';
export { createThreadFromIframe } from './targets/iframe/iframe.ts';

@@ -3,0 +4,0 @@ export { createThreadFromInsideIframe } from './targets/iframe/nested.ts';

import { type ThreadOptions } from './target.ts';
/**
* Creates a thread from a `WebSocket` instance in the browser.
* Creates a thread from a `MessagePort` instance in the browser.
*

@@ -5,0 +5,0 @@ * @see https://developer.mozilla.org/en-US/docs/Web/API/MessagePort

# @quilted/threads
## 0.0.0-preview-20231031044205
## 0.0.0-preview-20231113053310
### Major Changes
### Minor Changes
- Removed CommonJS support
- Add utility to turn `BroadcastChannel` objects into threads
The `require` export condition is no longer provided by any package. Quilt only supports ESModules, so if you need to use the CommonJS version, you will need to pre-process Quilt’s output code on your own.
## 2.1.0
### Patch Changes
### Minor Changes
- Updated dependencies []:
- @quilted/events@0.0.0-preview-20231031044205
- [`e3789679`](https://github.com/lemonmade/quilt/commit/e3789679d5de2f4e5e48902c902032febee1efac) Thanks [@lemonmade](https://github.com/lemonmade)! - Add utility to turn `BroadcastChannel` objects into threads

@@ -16,0 +15,0 @@ ## 2.0.0

@@ -5,3 +5,3 @@ {

"type": "module",
"version": "0.0.0-preview-20231031044205",
"version": "0.0.0-preview-20231113053310",
"license": "MIT",

@@ -44,3 +44,3 @@ "engines": {

"dependencies": {
"@quilted/events": "0.0.0-preview-20231031044205"
"@quilted/events": "^2.0.0"
},

@@ -47,0 +47,0 @@ "peerDependencies": {

@@ -49,2 +49,14 @@ # `@quilted/threads`

const thread = createThreadFromBrowserWebSocket(socket);
// Create a thread from a MessagePort.
import {createThreadFromMessagePort} from '@quilted/threads';
const {port1, port2} = new MessageChannel();
const thread1 = createThreadFromMessagePort(port1);
// Create a thread from a BroadcastChannel.
import {createThreadFromBroadcastChannel} from '@quilted/threads';
const channel = new BroadcastChannel('my-channel');
const thread = createThreadFromBroadcastChannel(channel);
```

@@ -51,0 +63,0 @@

@@ -11,2 +11,3 @@ export {retain, release, StackFrame, isMemoryManageable} from './memory.ts';

createThread,
createThreadFromBroadcastChannel,
createThreadFromBrowserWebSocket,

@@ -13,0 +14,0 @@ createThreadFromIframe,

export {createThread, type ThreadOptions} from './targets/target.ts';
export {createThreadFromBroadcastChannel} from './targets/broadcast-channel.ts';
export {createThreadFromIframe} from './targets/iframe/iframe.ts';

@@ -3,0 +4,0 @@ export {createThreadFromInsideIframe} from './targets/iframe/nested.ts';

import {createThread, type ThreadOptions} from './target.ts';
/**
* Creates a thread from a `WebSocket` instance in the browser.
* Creates a thread from a `MessagePort` instance in the browser.
*

@@ -6,0 +6,0 @@ * @see https://developer.mozilla.org/en-US/docs/Web/API/MessagePort

{
"extends": "@quilted/typescript/project.json",
"extends": "@quilted/craft/typescript/project.json",
"compilerOptions": {

@@ -4,0 +4,0 @@ "rootDir": "source",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc