Skip to content

Commit

Permalink
📝 Better string's deprecation note in documentation (#5240)
Browse files Browse the repository at this point in the history
**Description**

<!-- Please provide a short description and potentially linked issues
justifying the need for this PR -->

Our documentation was forcing users to open the associated deprecation
Pull Request in order to read for the recommended alternates to the
deprecated helpers.

This PR makes sure we just link to `string` when it is the recommended
replacement.

<!-- * Your PR is fixing a bug or regression? Check for existing issues
related to this bug and link them -->
<!-- * Your PR is adding a new feature? Make sure there is a related
issue or discussion attached to it -->

<!-- You can provide any additional context to help into understanding
what's this PR is attempting to solve: reproduction of a bug, code
snippets... -->

**Checklist** — _Don't delete this checklist and make sure you do the
following before opening the PR_

- [x] The name of my PR follows [gitmoji](https://gitmoji.dev/)
specification
- [x] My PR references one of several related issues (if any)
- [x] New features or breaking changes must come with an associated
Issue or Discussion
- [x] My PR does not add any new dependency without an associated Issue
or Discussion
- [x] My PR includes bumps details, please run `yarn bump` and flag the
impacts properly
- [x] My PR adds relevant tests and they would have failed without my PR
(when applicable)

<!-- More about contributing at
https://github.com/dubzzz/fast-check/blob/main/CONTRIBUTING.md -->

**Advanced**

<!-- How to fill the advanced section is detailed below! -->

- [x] Category: 📝 Add or update documentation
- [x] Impacts: Better documentation 

<!-- [Category] Please use one of the categories below, it will help us
into better understanding the urgency of the PR -->
<!-- * ✨ Introduce new features -->
<!-- * 📝 Add or update documentation -->
<!-- * ✅ Add or update tests -->
<!-- * 🐛 Fix a bug -->
<!-- * 🏷️ Add or update types -->
<!-- * ⚡️ Improve performance -->
<!-- * _Other(s):_ ... -->

<!-- [Impacts] Please provide a comma separated list of the potential
impacts that might be introduced by this change -->
<!-- * Generated values: Can your change impact any of the existing
generators in terms of generated values, if so which ones? when? -->
<!-- * Shrink values: Can your change impact any of the existing
generators in terms of shrink values, if so which ones? when? -->
<!-- * Performance: Can it require some typings changes on user side?
Please give more details -->
<!-- * Typings: Is there a potential performance impact? In which cases?
-->
  • Loading branch information
dubzzz authored Aug 25, 2024
1 parent 40fb333 commit bc5005b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions website/docs/core-blocks/arbitraries/combiners/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ String containing characters produced by the passed character generator.

**Signatures:**

- `fc.stringOf(charArb)`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.stringOf(charArb, {minLength?, maxLength?, size?})`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.stringOf(charArb)`_deprecated since v3.22.0, prefer [string](https://fast-check.dev/docs/core-blocks/arbitraries/primitives/string/#string-1) (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.stringOf(charArb, {minLength?, maxLength?, size?})`_deprecated since v3.22.0, prefer [string](https://fast-check.dev/docs/core-blocks/arbitraries/primitives/string/#string-1) (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_

**with:**

Expand Down
14 changes: 7 additions & 7 deletions website/docs/core-blocks/arbitraries/primitives/char.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ One lowercase hexadecimal character — ie.: _one character in `0123456789abcdef

**Signatures:**

- `fc.hexa()`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.hexa()`_deprecated since v3.22.0 (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_

**Usages:**

Expand All @@ -30,7 +30,7 @@ One base64 character — _ie.: one character in `A-Z`, `a-z`, `0-9`, `+` or `/`_

**Signatures:**

- `fc.base64()`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.base64()`_deprecated since v3.22.0 (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_

**Usages:**

Expand All @@ -48,7 +48,7 @@ One printable character — _ie.: one character between `0x20` (included) and `0

**Signatures:**

- `fc.char()`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.char()`_deprecated since v3.22.0, prefer [string](https://fast-check.dev/docs/core-blocks/arbitraries/primitives/string/#string-1) ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_

**Usages:**

Expand All @@ -66,7 +66,7 @@ One ascii character — _ie.: one character between `0x00` (included) and `0x7f`

**Signatures:**

- `fc.ascii()`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.ascii()`_deprecated since v3.22.0, prefer [string](https://fast-check.dev/docs/core-blocks/arbitraries/primitives/string/#string-1) (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_

**Usages:**

Expand All @@ -86,7 +86,7 @@ Generate any character of UCS-2 which is a subset of UTF-16 (restricted to BMP p

**Signatures:**

- `fc.unicode()`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.unicode()`_deprecated since v3.22.0, prefer [string](https://fast-check.dev/docs/core-blocks/arbitraries/primitives/string/#string-1) (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_

**Usages:**

Expand All @@ -106,7 +106,7 @@ Generate any 16 bits character. Be aware the values within `0xd800` and `0xdfff`

**Signatures:**

- `fc.char16bits()`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.char16bits()`_deprecated since v3.22.0 (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_

**Usages:**

Expand All @@ -126,7 +126,7 @@ Its length can be greater than one as it potentially contains multiple UTF-16 ch

**Signatures:**

- `fc.fullUnicode()`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.fullUnicode()`_deprecated since v3.22.0, prefer [string](https://fast-check.dev/docs/core-blocks/arbitraries/primitives/string/#string-1) (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_

**Usages:**

Expand Down
20 changes: 10 additions & 10 deletions website/docs/core-blocks/arbitraries/primitives/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Hexadecimal string containing characters produced by `fc.hexa()`.

**Signatures:**

- `fc.hexaString()`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.hexaString({minLength?, maxLength?, size?})`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.hexaString()`_deprecated since v3.22.0 (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.hexaString({minLength?, maxLength?, size?})`_deprecated since v3.22.0 (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_

**with:**

Expand Down Expand Up @@ -123,8 +123,8 @@ ASCII string containing characters produced by `fc.ascii()`.

**Signatures:**

- `fc.asciiString()`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.asciiString({minLength?, maxLength?, size?})`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.asciiString()`_deprecated since v3.22.0, prefer [string](https://fast-check.dev/docs/core-blocks/arbitraries/primitives/string/#string-1) (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.asciiString({minLength?, maxLength?, size?})`_deprecated since v3.22.0, prefer [string](https://fast-check.dev/docs/core-blocks/arbitraries/primitives/string/#string-1) (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_

**with:**

Expand Down Expand Up @@ -160,8 +160,8 @@ Unicode string containing characters produced by `fc.unicode()`.

**Signatures:**

- `fc.unicodeString()`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.unicodeString({minLength?, maxLength?, size?})`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.unicodeString()`_deprecated since v3.22.0, prefer [string](https://fast-check.dev/docs/core-blocks/arbitraries/primitives/string/#string-1) (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.unicodeString({minLength?, maxLength?, size?})`_deprecated since v3.22.0, prefer [string](https://fast-check.dev/docs/core-blocks/arbitraries/primitives/string/#string-1) (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_

**with:**

Expand Down Expand Up @@ -199,8 +199,8 @@ Be aware that the generated string might appear invalid regarding the unicode st

**Signatures:**

- `fc.string16bits()`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.string16bits({minLength?, maxLength?, size?})`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.string16bits()`_deprecated since v3.22.0 (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.string16bits({minLength?, maxLength?, size?})`_deprecated since v3.22.0 (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_

**with:**

Expand Down Expand Up @@ -236,8 +236,8 @@ Unicode string containing characters produced by `fc.fullUnicode()`.

**Signatures:**

- `fc.fullUnicodeString()`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.fullUnicodeString({minLength?, maxLength?, size?})`_deprecated since v3.22.0 ([#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.fullUnicodeString()`_deprecated since v3.22.0, prefer [string](https://fast-check.dev/docs/core-blocks/arbitraries/primitives/string/#string-1) (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_
- `fc.fullUnicodeString({minLength?, maxLength?, size?})`_deprecated since v3.22.0, prefer [string](https://fast-check.dev/docs/core-blocks/arbitraries/primitives/string/#string-1) (more details at [#5233](https://github.com/dubzzz/fast-check/pull/5233))_

**with:**

Expand Down

0 comments on commit bc5005b

Please sign in to comment.