Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #49

Draft
wants to merge 22 commits into
base: latest
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b12b22f
build(bundle): before packaging, run the bundle
RobertFischer Dec 11, 2020
f129cda
build(release): get rid of the NPM package asset and fix RN
RobertFischer Dec 11, 2020
0928300
build(build script): build the bundles, not just the dists
RobertFischer Dec 11, 2020
c3eb948
ci(release): fix up the message used to commit the assets produced af…
RobertFischer Dec 11, 2020
82ff886
ci(release): add in a polish step to keep code looking good
RobertFischer Dec 11, 2020
08c86c0
chore(docs and dist): commit what was produced during the release
RobertFischer Dec 11, 2020
e99a11c
docs(readme): correct the global object name from 'FunPromise' to 'Fu…
RobertFischer Dec 13, 2020
e30a32e
feat(constructor): allow any promisable to be passed in (not just a P…
RobertFischer Dec 13, 2020
70cb0e0
chore(release): 2.1.0-rc.1 [skip ci]
semantic-release-bot Dec 13, 2020
a3f4437
chore(docs and dist): commit what was produced during the release
RobertFischer Dec 13, 2020
cda2c23
chore(dist and docs): reset dist and docs and prevent archives from b…
RobertFischer Dec 14, 2020
86ccf64
chore(docs and dist): commit what was produced during the release
RobertFischer Dec 14, 2020
a2c7cb4
feat(flatfold): implement a concatenating version of fold
RobertFischer Dec 14, 2020
3cdc2e1
chore(deps): bump dependencies
RobertFischer Dec 14, 2020
e560a82
chore(release): 2.1.0-rc.2 [skip ci]
semantic-release-bot Dec 14, 2020
7675537
docs(readme): add in a section about fold/map/filter
RobertFischer Dec 14, 2020
43f4f11
build(npmignore): ignore the .xz files when bundling the package
RobertFischer Dec 14, 2020
da8c2e8
chore(push script): add in a script to simplify syncing and pushing f…
RobertFischer Dec 14, 2020
f91f91d
build(build script): print out dist and docs directory contents after…
RobertFischer Dec 14, 2020
bede32b
chore(docs and dist): commit what was produced during the release
RobertFischer Dec 14, 2020
61a1f41
docs(README): Update CDN URL to be correct
RobertFischer Dec 17, 2020
791f671
chore(docs and dist): commit what was produced during the release
RobertFischer Dec 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Polish Files
run: yarn polish
- name: Build Distribution Bundles
run: yarn build:bundle
run: yarn build
- name: Perform Semantic Release
id: release
uses: cycjimmy/[email protected]
Expand Down Expand Up @@ -70,8 +70,9 @@ jobs:
NONINTERACTIVE: true
- run: yarn install
- run: yarn bump-deps
- run: yarn polish
- run: yarn build
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message:
"chore(post-release): committing changes produced during the release"
"chore(docs and dist): commit what was produced during the release"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,6 @@ index.*.map

*.old

fun-promises-*.tgz
*.tgz
*.tar.gz
*.tar.xz
4 changes: 2 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ script
docs
conf.d
tsconfig/*
dist/docs.tgz
fun-promises-*.tgz
*.tgz
*.xz
35 changes: 20 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,53 @@
<!-- @format -->

fun-promises Changelog

## [1.2.0](https://github.com/RobertFischer/fun-promises/compare/v1.1.0...v1.2.0) (2020-12-03)


### Features

* **fold:** implements fold in case map and filter don't cut it ([86c010f](https://github.com/RobertFischer/fun-promises/commit/86c010ff5f934602a2a964cb71ebb73697ed7c2a)), closes [#12](https://github.com/RobertFischer/fun-promises/issues/12)
* **tap:** implement 'tap' for peeking at values ([0f4816a](https://github.com/RobertFischer/fun-promises/commit/0f4816ab42fd9f18bf91e179d2c03fed25822f11))

- **fold:** implements fold in case map and filter don't cut it
([86c010f](https://github.com/RobertFischer/fun-promises/commit/86c010ff5f934602a2a964cb71ebb73697ed7c2a)),
closes [#12](https://github.com/RobertFischer/fun-promises/issues/12)
- **tap:** implement 'tap' for peeking at values
([0f4816a](https://github.com/RobertFischer/fun-promises/commit/0f4816ab42fd9f18bf91e179d2c03fed25822f11))

### Reverts

* **release:** the cleanup caused a problem with the autocommitting ([6c03637](https://github.com/RobertFischer/fun-promises/commit/6c03637137923e0581a4a736bcb6bd4aa25c77d4))
- **release:** the cleanup caused a problem with the autocommitting
([6c03637](https://github.com/RobertFischer/fun-promises/commit/6c03637137923e0581a4a736bcb6bd4aa25c77d4))

## [1.2.0-rc.2](https://github.com/RobertFischer/fun-promises/compare/v1.2.0-rc.1...v1.2.0-rc.2) (2020-12-02)


### Features

* **fold:** implements fold in case map and filter don't cut it ([86c010f](https://github.com/RobertFischer/fun-promises/commit/86c010ff5f934602a2a964cb71ebb73697ed7c2a)), closes [#12](https://github.com/RobertFischer/fun-promises/issues/12)
- **fold:** implements fold in case map and filter don't cut it
([86c010f](https://github.com/RobertFischer/fun-promises/commit/86c010ff5f934602a2a964cb71ebb73697ed7c2a)),
closes [#12](https://github.com/RobertFischer/fun-promises/issues/12)

## [1.2.0-rc.1](https://github.com/RobertFischer/fun-promises/compare/v1.1.0...v1.2.0-rc.1) (2020-12-02)


### Features

* **tap:** implement 'tap' for peeking at values ([0f4816a](https://github.com/RobertFischer/fun-promises/commit/0f4816ab42fd9f18bf91e179d2c03fed25822f11))

- **tap:** implement 'tap' for peeking at values
([0f4816a](https://github.com/RobertFischer/fun-promises/commit/0f4816ab42fd9f18bf91e179d2c03fed25822f11))

### Reverts

* **release:** the cleanup caused a problem with the autocommitting ([6c03637](https://github.com/RobertFischer/fun-promises/commit/6c03637137923e0581a4a736bcb6bd4aa25c77d4))
- **release:** the cleanup caused a problem with the autocommitting
([6c03637](https://github.com/RobertFischer/fun-promises/commit/6c03637137923e0581a4a736bcb6bd4aa25c77d4))

## [1.1.0-rc.2](https://github.com/RobertFischer/fun-promises/compare/v1.1.0-rc.1...v1.1.0-rc.2) (2020-12-02)


### Features

* **tap:** implement 'tap' for peeking at values ([ce059bd](https://github.com/RobertFischer/fun-promises/commit/ce059bdb12c4706f8bf8189d5b09dadae740fa47))

- **tap:** implement 'tap' for peeking at values
([ce059bd](https://github.com/RobertFischer/fun-promises/commit/ce059bdb12c4706f8bf8189d5b09dadae740fa47))

### Reverts

* **release:** the cleanup caused a problem with the autocommitting ([c9ad636](https://github.com/RobertFischer/fun-promises/commit/c9ad636762e510ce0218f4c13b506cac05f4ab0f))
- **release:** the cleanup caused a problem with the autocommitting
([c9ad636](https://github.com/RobertFischer/fun-promises/commit/c9ad636762e510ce0218f4c13b506cac05f4ab0f))

<!-- @format -->

Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ npm install --save fun-promises

### CDN for Browsers

The following URL contains a script which will set the `FunPromise` global to be
an object containing the various exports of
The following URL contains a script which will set the `FunPromises` global to
be an object containing the various exports of
[`index.ts`](https://robertfischer.github.io/fun-promises/modules/_index_.html).

```
https://unpkg.com/browse/fun-promises@latest/dist/browser/index.js
https://unpkg.com/fun-promises@latest/dist/browser/index.js
```

## Usage
Expand Down Expand Up @@ -85,6 +85,12 @@ This is an inside-out promise: it gives you access to the `resolve` and `reject`
methods of the promise so that you can perform operations on them later, as well
as having accessor to query the state of `promise`.

### `fold`/`map`/`filter`

Optimized promise-based implementations for all your collection-processing
needs. Note that `map` and `fold` also come in "flat" varieties for
concatenating iterables: `flatMap` and `flatFold`.

### `try`

```typescript
Expand Down
Binary file added dist/amd.index.js.xz
Binary file not shown.
Binary file added dist/amd.tar.xz
Binary file not shown.
Binary file added dist/browser.index.js.xz
Binary file not shown.
Binary file added dist/browser.tar.xz
Binary file not shown.
Binary file added dist/cjs.index.js.xz
Binary file not shown.
Binary file added dist/cjs.tar.xz
Binary file not shown.
Binary file removed dist/docs.tar.xz
Binary file not shown.
2 changes: 0 additions & 2 deletions dist/es6/cjs/src/deferral.test.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/es6/cjs/src/deferral.test.d.ts.map

This file was deleted.

44 changes: 0 additions & 44 deletions dist/es6/cjs/src/deferral.test.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/es6/cjs/src/deferral.test.js.map

This file was deleted.

14 changes: 13 additions & 1 deletion dist/es6/cjs/src/fun-promise.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class FunPromise<T> implements Promise<T> {
/**
* Constructor, which takes the promise to wrap.
*/
constructor(wrapped: Promise<T>);
constructor(wrapped: Promisable<T>);
/**
* Takes a value (or a promise of a value) and returns a promise wrapping
* it.
Expand Down Expand Up @@ -298,6 +298,18 @@ export default class FunPromise<T> implements Promise<T> {
* Equivalent to `FunPromise.resolve(values).fold(initialValue, accumulator)`.
*/
static fold<T, T2 = T>(values: PromisableIterable<T>, initialValue: T2, accumulator: (memo: T2, it: T) => Promisable<T2>): FunPromise<T2>;
/**
* Given an initial array of values and an accumulator function, apply the accumlator function to each element of the promise's resolved value,
* passing in the current array of values and the resolved item. Returns an array with the concatenated results of the accumulation.
* If any of the promise's values are rejected, the entire operation will be rejected.
*
* The resolution order is not guaranteed. The accumulator function will be passed values as those values resolve.
*/
flatFold<T2 = Item<T>>(initialValue: PromisableIterable<T2>, accumulator: (memo: T2[], it: Item<T>) => PromisableIterable<T2>): FunPromise<T2[]>;
/**
* Equivalent to `FunPromise.resolve(values).flatFold(initialValue, accumulator)`.
*/
static flatFold<T, T2 = T>(values: PromisableIterable<T>, initialValue: PromisableIterable<T2>, accumulator: (memo: T2[], it: T) => PromisableIterable<T2>): FunPromise<T2[]>;
/**
* Handles rejections like 'catch', but wraps them in a [[`NestedError`]] with the given message.
*/
Expand Down
Loading