Skip to content

Commit

Permalink
Publish packages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 16, 2024
1 parent ecd7322 commit a4c7062
Show file tree
Hide file tree
Showing 11 changed files with 118 additions and 59 deletions.
49 changes: 0 additions & 49 deletions .changeset/orange-rockets-listen.md

This file was deleted.

2 changes: 1 addition & 1 deletion integrations/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"miniflare": "^2.4.0"
},
"peerDependencies": {
"@quilted/quilt": "workspace:^0.7.11",
"@quilted/quilt": "workspace:^0.7.12",
"@quilted/rollup": "workspace:^0.2.44"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion integrations/deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@types/common-tags": "^1.8.0"
},
"peerDependencies": {
"@quilted/quilt": "workspace:^0.7.11",
"@quilted/quilt": "workspace:^0.7.12",
"@quilted/rollup": "workspace:^0.2.44"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion integrations/react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@quilted/useful-types": "workspace:^2.0.0"
},
"peerDependencies": {
"@quilted/quilt": "workspace:^0.7.11",
"@quilted/quilt": "workspace:^0.7.12",
"@tanstack/react-query": "^5.0.0",
"preact": "^10.21.0"
},
Expand Down
52 changes: 52 additions & 0 deletions packages/quilt/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,57 @@
# @quilted/quilt

## 0.7.12

### Patch Changes

- [#816](https://github.com/lemonmade/quilt/pull/816) [`ecd7322`](https://github.com/lemonmade/quilt/commit/ecd7322637e54b5f34dfa310249d819e944c9171) Thanks [@lemonmade](https://github.com/lemonmade)! - Changed `ThreadAbortSignal` utilities to be class-based instead of being a collection of utility functions. This change aligns the API more closely with `AbortController` in the browser, which is created with `new AbortController()`.

Previously, you used `createThreadAbortSignal()` to serialize an `AbortSignal` to pass over a thread, and `acceptThreadAbortSignal()` to turn it into a “live” `AbortSignal`. With the new API, you will do the same steps, but with `ThreadAbortSignal.serialize()` and `new ThreadAbortSignal`:

```ts
import {
createThreadAbortSignal,
acceptThreadAbortSignal,
} from '@quilted/threads';

const abortController = new AbortController();
const serializedAbortSignal = createThreadAbortSignal(abortController.signal);
const liveAbortSignal = acceptThreadAbortSignal(serializedAbortSignal);

await fetch('/', {signal: liveAbortSignal});

// Becomes:

import { ThreadAbortSignal } from '@quilted/threads';\

const abortController = new AbortController();
const serializedAbortSignal = ThreadAbortSignal.serialize(abortController.signal);
const liveAbortSignal = new ThreadAbortSignal(serializedAbortSignal);

await fetch('/', {signal: liveAbortSignal});
```

Additionally, the new `ThreadAbortSignal` class assumes you are not doing manual memory management by default. If your target environment does not support automatic memory management of transferred functions, you will need to manually pass the `retain` and `release` functions to the new APIs:

```ts
import {retain, release, ThreadAbortSignal} from '@quilted/threads';

const abortController = new AbortController();
const serializedAbortSignal = ThreadAbortSignal.serialize(
abortController.signal,
{retain, release},
);
const liveAbortSignal = new ThreadAbortSignal(serializedAbortSignal, {
retain,
release,
});

await fetch('/', {signal: liveAbortSignal});
```

- Updated dependencies [[`ecd7322`](https://github.com/lemonmade/quilt/commit/ecd7322637e54b5f34dfa310249d819e944c9171)]:
- @quilted/threads@3.0.0

## 0.7.11

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/quilt/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@quilted/quilt",
"type": "module",
"version": "0.7.11",
"version": "0.7.12",
"repository": {
"type": "git",
"url": "https://github.com/lemonmade/quilt.git",
Expand Down Expand Up @@ -262,7 +262,7 @@
"@quilted/react-dom": "workspace:^18.2.11",
"@quilted/request-router": "workspace:^0.3.0",
"@quilted/signals": "workspace:^0.2.0",
"@quilted/threads": "workspace:^2.3.0",
"@quilted/threads": "workspace:^3.0.0",
"preact-render-to-string": "^6.4.0",
"jest-matcher-utils": "^29.0.0"
},
Expand Down
49 changes: 49 additions & 0 deletions packages/threads/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
# @quilted/threads

## 3.0.0

### Major Changes

- [#816](https://github.com/lemonmade/quilt/pull/816) [`ecd7322`](https://github.com/lemonmade/quilt/commit/ecd7322637e54b5f34dfa310249d819e944c9171) Thanks [@lemonmade](https://github.com/lemonmade)! - Changed `ThreadAbortSignal` utilities to be class-based instead of being a collection of utility functions. This change aligns the API more closely with `AbortController` in the browser, which is created with `new AbortController()`.

Previously, you used `createThreadAbortSignal()` to serialize an `AbortSignal` to pass over a thread, and `acceptThreadAbortSignal()` to turn it into a “live” `AbortSignal`. With the new API, you will do the same steps, but with `ThreadAbortSignal.serialize()` and `new ThreadAbortSignal`:

```ts
import {
createThreadAbortSignal,
acceptThreadAbortSignal,
} from '@quilted/threads';

const abortController = new AbortController();
const serializedAbortSignal = createThreadAbortSignal(abortController.signal);
const liveAbortSignal = acceptThreadAbortSignal(serializedAbortSignal);

await fetch('/', {signal: liveAbortSignal});

// Becomes:

import { ThreadAbortSignal } from '@quilted/threads';\

const abortController = new AbortController();
const serializedAbortSignal = ThreadAbortSignal.serialize(abortController.signal);
const liveAbortSignal = new ThreadAbortSignal(serializedAbortSignal);

await fetch('/', {signal: liveAbortSignal});
```

Additionally, the new `ThreadAbortSignal` class assumes you are not doing manual memory management by default. If your target environment does not support automatic memory management of transferred functions, you will need to manually pass the `retain` and `release` functions to the new APIs:

```ts
import {retain, release, ThreadAbortSignal} from '@quilted/threads';

const abortController = new AbortController();
const serializedAbortSignal = ThreadAbortSignal.serialize(
abortController.signal,
{retain, release},
);
const liveAbortSignal = new ThreadAbortSignal(serializedAbortSignal, {
retain,
release,
});

await fetch('/', {signal: liveAbortSignal});
```

## 2.4.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/threads/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@quilted/threads",
"description": "Helpers for communicating between JavaScript environments using message passing.",
"type": "module",
"version": "2.4.0",
"version": "3.0.0",
"license": "MIT",
"engines": {
"node": ">=14.0.0"
Expand Down
7 changes: 7 additions & 0 deletions packages/workers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @quilted/workers

## 0.4.4

### Patch Changes

- Updated dependencies [[`ecd7322`](https://github.com/lemonmade/quilt/commit/ecd7322637e54b5f34dfa310249d819e944c9171)]:
- @quilted/threads@3.0.0

## 0.4.3

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/workers/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@quilted/workers",
"type": "module",
"version": "0.4.3",
"version": "0.4.4",
"repository": {
"type": "git",
"url": "https://github.com/lemonmade/quilt.git",
Expand All @@ -26,6 +26,6 @@
"build": "rollup --config configuration/rollup.config.js"
},
"dependencies": {
"@quilted/threads": "workspace:^2.0.0"
"@quilted/threads": "workspace:^3.0.0"
}
}
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a4c7062

Please sign in to comment.