diff --git a/.changeset/clever-phones-help.md b/.changeset/clever-phones-help.md deleted file mode 100644 index 131f21a8..00000000 --- a/.changeset/clever-phones-help.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@defer/client": minor ---- - -Deprecate `defer.await()` in favor of `awaitResult(deferFn)` - -```ts -import { importContacts } from '../defer/importContacts' - -const importContactWithResult = awaitResult(importContacts); -const result = await importContactWithResult("1", []); -``` diff --git a/.changeset/cyan-cameras-grin.md b/.changeset/cyan-cameras-grin.md deleted file mode 100644 index 98c2f14c..00000000 --- a/.changeset/cyan-cameras-grin.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@defer/client": major ---- - -Add concurrency limit option. - -```js -import { defer } from "@defer/client"; - -async function oneByOne() { - // do something... -} - -export default defer(oneByOne, { concurrency: 1 }); -``` diff --git a/.changeset/flat-crews-compete.md b/.changeset/flat-crews-compete.md deleted file mode 100644 index f3ca7160..00000000 --- a/.changeset/flat-crews-compete.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@defer/client": major ---- - -Remove deprecated `.delayed` API. diff --git a/.changeset/fuzzy-dolphins-stare.md b/.changeset/fuzzy-dolphins-stare.md deleted file mode 100644 index f07c0229..00000000 --- a/.changeset/fuzzy-dolphins-stare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@defer/client": major ---- - -`init` function renamed in `configure` diff --git a/.changeset/metal-bobcats-notice.md b/.changeset/metal-bobcats-notice.md deleted file mode 100644 index 1c349943..00000000 --- a/.changeset/metal-bobcats-notice.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@defer/client": major ---- - -Handle API HTTP error by throwing an error diff --git a/.changeset/ninety-trainers-talk.md b/.changeset/ninety-trainers-talk.md deleted file mode 100644 index 520cde0c..00000000 --- a/.changeset/ninety-trainers-talk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@defer/client": major ---- - -Keep same behavior in dev and prod diff --git a/.changeset/unlucky-rocks-develop.md b/.changeset/unlucky-rocks-develop.md deleted file mode 100644 index 88bcc114..00000000 --- a/.changeset/unlucky-rocks-develop.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -"@defer/client": major ---- - -BREAKING CHANGE: -- Renamed `defer.schedule()` to `defer.cron()` -- `defer.cron()` no longer takes a english string but a CRON tab string - -```ts -import { defer } from '@defer.run/client' - -const weeklyBrief = async () => { - // ... -} - -export default defer.cron( - weeklyBrief, - '5 0 * * *' -) -``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 447670a4..dd92d78d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,55 @@ # @defer/client +## 1.0.0 + +### Major Changes + +- [#29](https://github.com/defer-run/defer.client/pull/29) [`859bf46`](https://github.com/defer-run/defer.client/commit/859bf465cd9808a94fa45f0d9ab022039d30b4e7) Thanks [@gearnode](https://github.com/gearnode)! - Add concurrency limit option. + + ```js + import { defer } from "@defer/client"; + + async function oneByOne() { + // do something... + } + + export default defer(oneByOne, { concurrency: 1 }); + ``` + +* [#31](https://github.com/defer-run/defer.client/pull/31) [`d791d79`](https://github.com/defer-run/defer.client/commit/d791d79f1b1af77818f849072721ef6accba3a38) Thanks [@gearnode](https://github.com/gearnode)! - Remove deprecated `.delayed` API. + +- [#31](https://github.com/defer-run/defer.client/pull/31) [`ef80061`](https://github.com/defer-run/defer.client/commit/ef800611dec0549eba9a406e093cd1940c7bb0cb) Thanks [@gearnode](https://github.com/gearnode)! - `init` function renamed in `configure` + +* [#31](https://github.com/defer-run/defer.client/pull/31) [`ef80061`](https://github.com/defer-run/defer.client/commit/ef800611dec0549eba9a406e093cd1940c7bb0cb) Thanks [@gearnode](https://github.com/gearnode)! - Handle API HTTP error by throwing an error + +- [#31](https://github.com/defer-run/defer.client/pull/31) [`ef80061`](https://github.com/defer-run/defer.client/commit/ef800611dec0549eba9a406e093cd1940c7bb0cb) Thanks [@gearnode](https://github.com/gearnode)! - Keep same behavior in dev and prod + +* [#34](https://github.com/defer-run/defer.client/pull/34) [`fe251f2`](https://github.com/defer-run/defer.client/commit/fe251f245baf2eb93c70ff5f295f4354a65ecbf6) Thanks [@charlypoly](https://github.com/charlypoly)! - BREAKING CHANGE: + + - Renamed `defer.schedule()` to `defer.cron()` + - `defer.cron()` no longer takes a english string but a CRON tab string + + ```ts + import { defer } from "@defer.run/client"; + + const weeklyBrief = async () => { + // ... + }; + + export default defer.cron(weeklyBrief, "5 0 * * *"); + ``` + +### Minor Changes + +- [#34](https://github.com/defer-run/defer.client/pull/34) [`e399d75`](https://github.com/defer-run/defer.client/commit/e399d75570b0431fe80aff794ab851e3b10f0d52) Thanks [@charlypoly](https://github.com/charlypoly)! - Deprecate `defer.await()` in favor of `awaitResult(deferFn)` + + ```ts + import { importContacts } from "../defer/importContacts"; + + const importContactWithResult = awaitResult(importContacts); + const result = await importContactWithResult("1", []); + ``` + ## 0.5.0 ### Minor Changes diff --git a/package.json b/package.json index 271c2e74..7bebe6f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@defer/client", - "version": "0.5.0", + "version": "1.0.0", "description": "Zero infrastructure NodeJS background jobs", "main": "dist/cjs/index.js", "repository": "git@github.com:defer-run/defer.client.git",