From a3fbaaec35951f896a12e08cf33a0d6a66ca9bf8 Mon Sep 17 00:00:00 2001 From: gcanti Date: Sun, 28 Mar 2021 20:03:36 +0200 Subject: [PATCH] rename `object` module to `struct` --- CHANGELOG.md | 5 +++++ docs/modules/Option.ts.md | 2 +- docs/modules/OptionT.ts.md | 2 +- docs/modules/Ord.ts.md | 2 +- docs/modules/Ordering.ts.md | 2 +- docs/modules/Pointed.ts.md | 2 +- docs/modules/Profunctor.ts.md | 2 +- docs/modules/Random.ts.md | 2 +- docs/modules/Reader.ts.md | 2 +- docs/modules/ReaderEither.ts.md | 2 +- docs/modules/ReaderT.ts.md | 2 +- docs/modules/ReaderTask.ts.md | 2 +- docs/modules/ReaderTaskEither.ts.md | 2 +- docs/modules/ReadonlyArray.ts.md | 2 +- docs/modules/ReadonlyMap.ts.md | 2 +- docs/modules/ReadonlyNonEmptyArray.ts.md | 2 +- docs/modules/ReadonlyRecord.ts.md | 2 +- docs/modules/ReadonlySet.ts.md | 2 +- docs/modules/ReadonlyTuple.ts.md | 2 +- docs/modules/Record.ts.md | 2 +- docs/modules/Ring.ts.md | 2 +- docs/modules/Semigroup.ts.md | 2 +- docs/modules/Semigroupoid.ts.md | 2 +- docs/modules/Semiring.ts.md | 2 +- docs/modules/Separated.ts.md | 2 +- docs/modules/Set.ts.md | 2 +- docs/modules/Show.ts.md | 2 +- docs/modules/State.ts.md | 2 +- docs/modules/StateReaderTaskEither.ts.md | 2 +- docs/modules/StateT.ts.md | 2 +- docs/modules/Store.ts.md | 2 +- docs/modules/Strong.ts.md | 2 +- docs/modules/index.ts.md | 22 ++++++++++----------- docs/modules/pipeable.ts.md | 2 +- docs/modules/string.ts.md | 2 +- docs/modules/{object.ts.md => struct.ts.md} | 8 ++++---- package.json | 2 +- src/index.ts | 4 ++-- src/{object.ts => struct.ts} | 2 +- test/{object.ts => struct.ts} | 4 ++-- 40 files changed, 59 insertions(+), 54 deletions(-) rename docs/modules/{object.ts.md => struct.ts.md} (86%) rename src/{object.ts => struct.ts} (93%) rename test/{object.ts => struct.ts} (85%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5808f023e..c7b2db6da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,11 @@ **Note**: A feature tagged as Experimental is in a high state of flux, you're at risk of it changing without notice. +# 2.10.0-rc.7 + +- **Breaking Change** (with respect to `2.10.0-rc`) + - rename module `object` to `struct` + # 2.10.0-rc.6 - **Bug Fix** diff --git a/docs/modules/Option.ts.md b/docs/modules/Option.ts.md index 690d8a432..7115619c2 100644 --- a/docs/modules/Option.ts.md +++ b/docs/modules/Option.ts.md @@ -1,6 +1,6 @@ --- title: Option.ts -nav_order: 64 +nav_order: 63 parent: Modules --- diff --git a/docs/modules/OptionT.ts.md b/docs/modules/OptionT.ts.md index aaa6f805b..ca4f62533 100644 --- a/docs/modules/OptionT.ts.md +++ b/docs/modules/OptionT.ts.md @@ -1,6 +1,6 @@ --- title: OptionT.ts -nav_order: 65 +nav_order: 64 parent: Modules --- diff --git a/docs/modules/Ord.ts.md b/docs/modules/Ord.ts.md index a36edc446..1dda34782 100644 --- a/docs/modules/Ord.ts.md +++ b/docs/modules/Ord.ts.md @@ -1,6 +1,6 @@ --- title: Ord.ts -nav_order: 66 +nav_order: 65 parent: Modules --- diff --git a/docs/modules/Ordering.ts.md b/docs/modules/Ordering.ts.md index 76390b92a..66472aab8 100644 --- a/docs/modules/Ordering.ts.md +++ b/docs/modules/Ordering.ts.md @@ -1,6 +1,6 @@ --- title: Ordering.ts -nav_order: 67 +nav_order: 66 parent: Modules --- diff --git a/docs/modules/Pointed.ts.md b/docs/modules/Pointed.ts.md index 1023184ca..f5697a148 100644 --- a/docs/modules/Pointed.ts.md +++ b/docs/modules/Pointed.ts.md @@ -1,6 +1,6 @@ --- title: Pointed.ts -nav_order: 69 +nav_order: 68 parent: Modules --- diff --git a/docs/modules/Profunctor.ts.md b/docs/modules/Profunctor.ts.md index e904b742f..65e5bbb89 100644 --- a/docs/modules/Profunctor.ts.md +++ b/docs/modules/Profunctor.ts.md @@ -1,6 +1,6 @@ --- title: Profunctor.ts -nav_order: 70 +nav_order: 69 parent: Modules --- diff --git a/docs/modules/Random.ts.md b/docs/modules/Random.ts.md index 704057a69..6cf875b75 100644 --- a/docs/modules/Random.ts.md +++ b/docs/modules/Random.ts.md @@ -1,6 +1,6 @@ --- title: Random.ts -nav_order: 71 +nav_order: 70 parent: Modules --- diff --git a/docs/modules/Reader.ts.md b/docs/modules/Reader.ts.md index ff5e111d6..2647ca91c 100644 --- a/docs/modules/Reader.ts.md +++ b/docs/modules/Reader.ts.md @@ -1,6 +1,6 @@ --- title: Reader.ts -nav_order: 72 +nav_order: 71 parent: Modules --- diff --git a/docs/modules/ReaderEither.ts.md b/docs/modules/ReaderEither.ts.md index 5038cb628..4b3695901 100644 --- a/docs/modules/ReaderEither.ts.md +++ b/docs/modules/ReaderEither.ts.md @@ -1,6 +1,6 @@ --- title: ReaderEither.ts -nav_order: 73 +nav_order: 72 parent: Modules --- diff --git a/docs/modules/ReaderT.ts.md b/docs/modules/ReaderT.ts.md index fbda0b450..c387f5ea8 100644 --- a/docs/modules/ReaderT.ts.md +++ b/docs/modules/ReaderT.ts.md @@ -1,6 +1,6 @@ --- title: ReaderT.ts -nav_order: 74 +nav_order: 73 parent: Modules --- diff --git a/docs/modules/ReaderTask.ts.md b/docs/modules/ReaderTask.ts.md index e94a5235e..2ac8d5fb2 100644 --- a/docs/modules/ReaderTask.ts.md +++ b/docs/modules/ReaderTask.ts.md @@ -1,6 +1,6 @@ --- title: ReaderTask.ts -nav_order: 75 +nav_order: 74 parent: Modules --- diff --git a/docs/modules/ReaderTaskEither.ts.md b/docs/modules/ReaderTaskEither.ts.md index 16a0839eb..4b0605dab 100644 --- a/docs/modules/ReaderTaskEither.ts.md +++ b/docs/modules/ReaderTaskEither.ts.md @@ -1,6 +1,6 @@ --- title: ReaderTaskEither.ts -nav_order: 76 +nav_order: 75 parent: Modules --- diff --git a/docs/modules/ReadonlyArray.ts.md b/docs/modules/ReadonlyArray.ts.md index c078b0924..75f1bd903 100644 --- a/docs/modules/ReadonlyArray.ts.md +++ b/docs/modules/ReadonlyArray.ts.md @@ -1,6 +1,6 @@ --- title: ReadonlyArray.ts -nav_order: 77 +nav_order: 76 parent: Modules --- diff --git a/docs/modules/ReadonlyMap.ts.md b/docs/modules/ReadonlyMap.ts.md index d1d6aceea..0fd6a94c6 100644 --- a/docs/modules/ReadonlyMap.ts.md +++ b/docs/modules/ReadonlyMap.ts.md @@ -1,6 +1,6 @@ --- title: ReadonlyMap.ts -nav_order: 78 +nav_order: 77 parent: Modules --- diff --git a/docs/modules/ReadonlyNonEmptyArray.ts.md b/docs/modules/ReadonlyNonEmptyArray.ts.md index 23c5ac5d8..8443c9ad8 100644 --- a/docs/modules/ReadonlyNonEmptyArray.ts.md +++ b/docs/modules/ReadonlyNonEmptyArray.ts.md @@ -1,6 +1,6 @@ --- title: ReadonlyNonEmptyArray.ts -nav_order: 79 +nav_order: 78 parent: Modules --- diff --git a/docs/modules/ReadonlyRecord.ts.md b/docs/modules/ReadonlyRecord.ts.md index 5e4dec11b..c3b44c00c 100644 --- a/docs/modules/ReadonlyRecord.ts.md +++ b/docs/modules/ReadonlyRecord.ts.md @@ -1,6 +1,6 @@ --- title: ReadonlyRecord.ts -nav_order: 80 +nav_order: 79 parent: Modules --- diff --git a/docs/modules/ReadonlySet.ts.md b/docs/modules/ReadonlySet.ts.md index 988027bbb..0878364e7 100644 --- a/docs/modules/ReadonlySet.ts.md +++ b/docs/modules/ReadonlySet.ts.md @@ -1,6 +1,6 @@ --- title: ReadonlySet.ts -nav_order: 81 +nav_order: 80 parent: Modules --- diff --git a/docs/modules/ReadonlyTuple.ts.md b/docs/modules/ReadonlyTuple.ts.md index df1b0d7fb..30ae39420 100644 --- a/docs/modules/ReadonlyTuple.ts.md +++ b/docs/modules/ReadonlyTuple.ts.md @@ -1,6 +1,6 @@ --- title: ReadonlyTuple.ts -nav_order: 82 +nav_order: 81 parent: Modules --- diff --git a/docs/modules/Record.ts.md b/docs/modules/Record.ts.md index dba70f83f..fa4770168 100644 --- a/docs/modules/Record.ts.md +++ b/docs/modules/Record.ts.md @@ -1,6 +1,6 @@ --- title: Record.ts -nav_order: 83 +nav_order: 82 parent: Modules --- diff --git a/docs/modules/Ring.ts.md b/docs/modules/Ring.ts.md index 0ee71ef23..5d44a01c9 100644 --- a/docs/modules/Ring.ts.md +++ b/docs/modules/Ring.ts.md @@ -1,6 +1,6 @@ --- title: Ring.ts -nav_order: 84 +nav_order: 83 parent: Modules --- diff --git a/docs/modules/Semigroup.ts.md b/docs/modules/Semigroup.ts.md index 10f026520..80c1d755d 100644 --- a/docs/modules/Semigroup.ts.md +++ b/docs/modules/Semigroup.ts.md @@ -1,6 +1,6 @@ --- title: Semigroup.ts -nav_order: 85 +nav_order: 84 parent: Modules --- diff --git a/docs/modules/Semigroupoid.ts.md b/docs/modules/Semigroupoid.ts.md index bdb014485..f5da9f31e 100644 --- a/docs/modules/Semigroupoid.ts.md +++ b/docs/modules/Semigroupoid.ts.md @@ -1,6 +1,6 @@ --- title: Semigroupoid.ts -nav_order: 86 +nav_order: 85 parent: Modules --- diff --git a/docs/modules/Semiring.ts.md b/docs/modules/Semiring.ts.md index 391d92d1e..2dc848d74 100644 --- a/docs/modules/Semiring.ts.md +++ b/docs/modules/Semiring.ts.md @@ -1,6 +1,6 @@ --- title: Semiring.ts -nav_order: 87 +nav_order: 86 parent: Modules --- diff --git a/docs/modules/Separated.ts.md b/docs/modules/Separated.ts.md index a2d835700..a327b4a61 100644 --- a/docs/modules/Separated.ts.md +++ b/docs/modules/Separated.ts.md @@ -1,6 +1,6 @@ --- title: Separated.ts -nav_order: 88 +nav_order: 87 parent: Modules --- diff --git a/docs/modules/Set.ts.md b/docs/modules/Set.ts.md index 931d9d9c9..2861fd36d 100644 --- a/docs/modules/Set.ts.md +++ b/docs/modules/Set.ts.md @@ -1,6 +1,6 @@ --- title: Set.ts -nav_order: 89 +nav_order: 88 parent: Modules --- diff --git a/docs/modules/Show.ts.md b/docs/modules/Show.ts.md index 81e39ea11..a21ec9435 100644 --- a/docs/modules/Show.ts.md +++ b/docs/modules/Show.ts.md @@ -1,6 +1,6 @@ --- title: Show.ts -nav_order: 90 +nav_order: 89 parent: Modules --- diff --git a/docs/modules/State.ts.md b/docs/modules/State.ts.md index 3b7790f8b..a44624301 100644 --- a/docs/modules/State.ts.md +++ b/docs/modules/State.ts.md @@ -1,6 +1,6 @@ --- title: State.ts -nav_order: 91 +nav_order: 90 parent: Modules --- diff --git a/docs/modules/StateReaderTaskEither.ts.md b/docs/modules/StateReaderTaskEither.ts.md index 4eba70da7..ea079662c 100644 --- a/docs/modules/StateReaderTaskEither.ts.md +++ b/docs/modules/StateReaderTaskEither.ts.md @@ -1,6 +1,6 @@ --- title: StateReaderTaskEither.ts -nav_order: 92 +nav_order: 91 parent: Modules --- diff --git a/docs/modules/StateT.ts.md b/docs/modules/StateT.ts.md index 78ca24aac..83182aad9 100644 --- a/docs/modules/StateT.ts.md +++ b/docs/modules/StateT.ts.md @@ -1,6 +1,6 @@ --- title: StateT.ts -nav_order: 93 +nav_order: 92 parent: Modules --- diff --git a/docs/modules/Store.ts.md b/docs/modules/Store.ts.md index 4a899f00c..90df33d43 100644 --- a/docs/modules/Store.ts.md +++ b/docs/modules/Store.ts.md @@ -1,6 +1,6 @@ --- title: Store.ts -nav_order: 94 +nav_order: 93 parent: Modules --- diff --git a/docs/modules/Strong.ts.md b/docs/modules/Strong.ts.md index 7f356e75c..b4ea62010 100644 --- a/docs/modules/Strong.ts.md +++ b/docs/modules/Strong.ts.md @@ -1,6 +1,6 @@ --- title: Strong.ts -nav_order: 96 +nav_order: 95 parent: Modules --- diff --git a/docs/modules/index.ts.md b/docs/modules/index.ts.md index d8d0826ee..ac9dc8a58 100644 --- a/docs/modules/index.ts.md +++ b/docs/modules/index.ts.md @@ -73,7 +73,6 @@ Added in v2.0.0 - [monoid](#monoid) - [nonEmptyArray](#nonemptyarray) - [number](#number) - - [object](#object) - [option](#option) - [optionT](#optiont) - [ord](#ord) @@ -107,6 +106,7 @@ Added in v2.0.0 - [store](#store) - [string](#string) - [strong](#strong) + - [struct](#struct) - [task](#task) - [taskEither](#taskeither) - [taskOption](#taskoption) @@ -728,16 +728,6 @@ export declare const number: typeof number Added in v2.10.0 -## object - -**Signature** - -```ts -export declare const object: typeof object -``` - -Added in v2.10.0 - ## option **Signature** @@ -1068,6 +1058,16 @@ export declare const strong: typeof strong Added in v2.0.0 +## struct + +**Signature** + +```ts +export declare const struct: typeof struct +``` + +Added in v2.10.0 + ## task **Signature** diff --git a/docs/modules/pipeable.ts.md b/docs/modules/pipeable.ts.md index 0fde60f66..4d3646173 100644 --- a/docs/modules/pipeable.ts.md +++ b/docs/modules/pipeable.ts.md @@ -1,6 +1,6 @@ --- title: pipeable.ts -nav_order: 68 +nav_order: 67 parent: Modules --- diff --git a/docs/modules/string.ts.md b/docs/modules/string.ts.md index e61f31cfe..0447861e1 100644 --- a/docs/modules/string.ts.md +++ b/docs/modules/string.ts.md @@ -1,6 +1,6 @@ --- title: string.ts -nav_order: 95 +nav_order: 94 parent: Modules --- diff --git a/docs/modules/object.ts.md b/docs/modules/struct.ts.md similarity index 86% rename from docs/modules/object.ts.md rename to docs/modules/struct.ts.md index 20f5a9732..87660a046 100644 --- a/docs/modules/object.ts.md +++ b/docs/modules/struct.ts.md @@ -1,10 +1,10 @@ --- -title: object.ts -nav_order: 63 +title: struct.ts +nav_order: 96 parent: Modules --- -## object overview +## struct overview Added in v2.10.0 @@ -32,7 +32,7 @@ export declare const getAssignSemigroup: () => Semigro **Example** ```ts -import { getAssignSemigroup } from 'fp-ts/object' +import { getAssignSemigroup } from 'fp-ts/struct' interface Person { readonly name: string diff --git a/package.json b/package.json index d929abf2d..f663ba90a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fp-ts", - "version": "2.10.0-rc.6", + "version": "2.10.0-rc.7", "description": "Functional programming in TypeScript", "main": "lib/index.js", "module": "es6/index.js", diff --git a/src/index.ts b/src/index.ts index 61430b9f1..85846f2af 100644 --- a/src/index.ts +++ b/src/index.ts @@ -62,7 +62,6 @@ import * as monadThrow from './MonadThrow' import * as monoid from './Monoid' import * as nonEmptyArray from './NonEmptyArray' import * as number from './number' -import * as object from './object' import * as option from './Option' import * as optionT from './OptionT' import * as ord from './Ord' @@ -96,6 +95,7 @@ import * as stateT from './StateT' import * as store from './Store' import * as string from './string' import * as strong from './Strong' +import * as struct from './struct' import * as task from './Task' import * as taskEither from './TaskEither' import * as taskOption from './TaskOption' @@ -352,7 +352,7 @@ export { /** * @since 2.10.0 */ - object, + struct, /** * @since 2.0.0 */ diff --git a/src/object.ts b/src/struct.ts similarity index 93% rename from src/object.ts rename to src/struct.ts index 46b7d5298..8dde2104a 100644 --- a/src/object.ts +++ b/src/struct.ts @@ -11,7 +11,7 @@ import { getObjectSemigroup, Semigroup } from './Semigroup' * Return a semigroup which works like `Object.assign`. * * @example - * import { getAssignSemigroup } from 'fp-ts/object' + * import { getAssignSemigroup } from 'fp-ts/struct' * * interface Person { * readonly name: string diff --git a/test/object.ts b/test/struct.ts similarity index 85% rename from test/object.ts rename to test/struct.ts index cbd58d503..8295d5d3b 100644 --- a/test/object.ts +++ b/test/struct.ts @@ -1,7 +1,7 @@ -import * as _ from '../src/object' +import * as _ from '../src/struct' import * as U from './util' -describe('object', () => { +describe('struct', () => { it('getAssignSemigroup', () => { type T = { readonly foo?: number