Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jul 13, 2024
1 parent 703f6e9 commit e623db1
Show file tree
Hide file tree
Showing 17 changed files with 321 additions and 18 deletions.
269 changes: 268 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<section class="release" id="unreleased">

## Unreleased (2024-07-07)
## Unreleased (2024-07-13)

<section class="packages">

Expand Down Expand Up @@ -82,6 +82,39 @@

<!-- /.package -->

<section class="package" id="string-base-capitalize-unreleased">

#### [@stdlib/string/base/capitalize](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/capitalize)

<details>

<section class="features">

##### Features

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7) - improve type safety

</section>

<!-- /.features -->

<section class="breaking-changes">

##### BREAKING CHANGES

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): improve type safety
- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): The return types are now more specific. This may break existing code that relies on less strict typing, but should not affect most users. To preserve the prior behavior, you can cast the return value to `string` via a type assertion.

</section>

<!-- /.breaking-changes -->

</details>

</section>

<!-- /.package -->

<section class="package" id="string-base-for-each-code-point-right-unreleased">

#### [@stdlib/string/base/for-each-code-point-right](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/for-each-code-point-right)
Expand Down Expand Up @@ -216,6 +249,39 @@ This release closes the following issue:

<!-- /.package -->

<section class="package" id="string-base-lowercase-unreleased">

#### [@stdlib/string/base/lowercase](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/lowercase)

<details>

<section class="features">

##### Features

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7) - improve type safety

</section>

<!-- /.features -->

<section class="breaking-changes">

##### BREAKING CHANGES

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): improve type safety
- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): The return types are now more specific. This may break existing code that relies on less strict typing, but should not affect most users. To preserve the prior behavior, you can cast the return value to `string` via a type assertion.

</section>

<!-- /.breaking-changes -->

</details>

</section>

<!-- /.package -->

<section class="package" id="string-base-replace-after-unreleased">

#### [@stdlib/string/base/replace-after](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/replace-after)
Expand Down Expand Up @@ -434,6 +500,105 @@ This release closes the following issue:

<!-- /.package -->

<section class="package" id="string-base-uncapitalize-unreleased">

#### [@stdlib/string/base/uncapitalize](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/uncapitalize)

<details>

<section class="features">

##### Features

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7) - improve type safety

</section>

<!-- /.features -->

<section class="breaking-changes">

##### BREAKING CHANGES

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): improve type safety
- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): The return types are now more specific. This may break existing code that relies on less strict typing, but should not affect most users. To preserve the prior behavior, you can cast the return value to `string` via a type assertion.

</section>

<!-- /.breaking-changes -->

</details>

</section>

<!-- /.package -->

<section class="package" id="string-base-uppercase-unreleased">

#### [@stdlib/string/base/uppercase](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/uppercase)

<details>

<section class="features">

##### Features

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7) - improve type safety

</section>

<!-- /.features -->

<section class="breaking-changes">

##### BREAKING CHANGES

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): improve type safety
- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): The return types are now more specific. This may break existing code that relies on less strict typing, but should not affect most users. To preserve the prior behavior, you can cast the return value to `string` via a type assertion.

</section>

<!-- /.breaking-changes -->

</details>

</section>

<!-- /.package -->

<section class="package" id="string-capitalize-unreleased">

#### [@stdlib/string/capitalize](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/capitalize)

<details>

<section class="features">

##### Features

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7) - improve type safety

</section>

<!-- /.features -->

<section class="breaking-changes">

##### BREAKING CHANGES

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): improve type safety
- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): The return types are now more specific. This may break existing code that relies on less strict typing, but should not affect most users. To preserve the prior behavior, you can cast the return value to `string` via a type assertion.

</section>

<!-- /.breaking-changes -->

</details>

</section>

<!-- /.package -->

<section class="package" id="string-last-unreleased">

#### [@stdlib/string/last](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/last)
Expand All @@ -456,6 +621,39 @@ This release closes the following issue:

<!-- /.package -->

<section class="package" id="string-lowercase-unreleased">

#### [@stdlib/string/lowercase](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/lowercase)

<details>

<section class="features">

##### Features

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7) - improve type safety

</section>

<!-- /.features -->

<section class="breaking-changes">

##### BREAKING CHANGES

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): improve type safety
- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): The return types are now more specific. This may break existing code that relies on less strict typing, but should not affect most users. To preserve the prior behavior, you can cast the return value to `string` via a type assertion.

</section>

<!-- /.breaking-changes -->

</details>

</section>

<!-- /.package -->

<section class="package" id="string-replace-before-unreleased">

#### [@stdlib/string/replace-before](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/replace-before)
Expand Down Expand Up @@ -500,6 +698,72 @@ This release closes the following issue:

<!-- /.package -->

<section class="package" id="string-uncapitalize-unreleased">

#### [@stdlib/string/uncapitalize](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/uncapitalize)

<details>

<section class="features">

##### Features

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7) - improve type safety

</section>

<!-- /.features -->

<section class="breaking-changes">

##### BREAKING CHANGES

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): improve type safety
- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): The return types are now more specific. This may break existing code that relies on less strict typing, but should not affect most users. To preserve the prior behavior, you can cast the return value to `string` via a type assertion.

</section>

<!-- /.breaking-changes -->

</details>

</section>

<!-- /.package -->

<section class="package" id="string-uppercase-unreleased">

#### [@stdlib/string/uppercase](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/uppercase)

<details>

<section class="features">

##### Features

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7) - improve type safety

</section>

<!-- /.features -->

<section class="breaking-changes">

##### BREAKING CHANGES

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): improve type safety
- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): The return types are now more specific. This may break existing code that relies on less strict typing, but should not affect most users. To preserve the prior behavior, you can cast the return value to `string` via a type assertion.

</section>

<!-- /.breaking-changes -->

</details>

</section>

<!-- /.package -->

</section>

<!-- /.packages -->
Expand All @@ -508,6 +772,8 @@ This release closes the following issue:

### BREAKING CHANGES

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): improve type safety
- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7): The return types are now more specific. This may break existing code that relies on less strict typing, but should not affect most users. To preserve the prior behavior, you can cast the return value to `string` via a type assertion.
- [`ec1c506`](https://github.com/stdlib-js/stdlib/commit/ec1c5066955fdcc71013805a5c55fc739d29a849): resolve negative index arguments relative to last index
- [`ec1c506`](https://github.com/stdlib-js/stdlib/commit/ec1c5066955fdcc71013805a5c55fc739d29a849): resolve negative index arguments relative to last index

Expand Down Expand Up @@ -596,6 +862,7 @@ A total of 9 people contributed to this release. Thank you to the following cont

<details>

- [`67858b3`](https://github.com/stdlib-js/stdlib/commit/67858b341e920fed871e34ba0d6b6809804916f7) - **feat:** improve type safety _(by Philipp Burckhardt)_
- [`659f752`](https://github.com/stdlib-js/stdlib/commit/659f752db18317bf5fc237fdbcad0d74b61e1ed9) - **style:** add missing spaces _(by Philipp Burckhardt)_
- [`a78f7d1`](https://github.com/stdlib-js/stdlib/commit/a78f7d1b859b6b1d7b0bc0ee4daf76789e3e0910) - **style:** add missing spaces _(by Philipp Burckhardt)_
- [`c3ebfa8`](https://github.com/stdlib-js/stdlib/commit/c3ebfa80e311db338b171ebf8eb5f46bc66e9bf6) - **docs:** update namespace table of contents and address spelling errors _(by Philipp Burckhardt)_
Expand Down
4 changes: 3 additions & 1 deletion base/capitalize/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

// TypeScript Version: 4.1

type Capitalize<S extends string> = S extends `${infer F}${infer R}` ? `${Uppercase<F>}${R}` : S;

/**
* Capitalizes the first character in a string.
*
Expand All @@ -40,7 +42,7 @@
* var out = capitalize( 'Hidden Treasures' );
* // returns 'Hidden Treasures'
*/
declare function capitalize( str: string ): string;
declare function capitalize<S extends string>( str: S ): Capitalize<S>;


// EXPORTS //
Expand Down
6 changes: 5 additions & 1 deletion base/capitalize/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ import capitalize = require( './index' );

// The function returns a string...
{
capitalize( 'abc' ); // $ExpectType string
capitalize( 'abc' ); // $ExpectType "Abc"
capitalize( 'beep boop' ); // $ExpectType "Beep boop"
capitalize( 'a' ); // $ExpectType "A"
capitalize( 'A' ); // $ExpectType "A"
capitalize( 'abc' as string ); // $ExpectType string
}

// The compiler throws an error if the function is provided a value other than a string...
Expand Down
2 changes: 1 addition & 1 deletion base/lowercase/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* var str = lowercase( 'bEEp' );
* // returns 'beep'
*/
declare function lowercase( str: string ): string;
declare function lowercase<S extends string>( str: S ): Lowercase<S>;


// EXPORTS //
Expand Down
4 changes: 3 additions & 1 deletion base/lowercase/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import lowercase = require( './index' );

// The function returns a string...
{
lowercase( 'abc' ); // $ExpectType string
lowercase( 'ABC' ); // $ExpectType "abc"
lowercase( 'Beep BOOP' ); // $ExpectType "beep boop"
lowercase( 'abc' as string ); // $ExpectType string
}

// The compiler throws an error if the function is provided a value other than a string...
Expand Down
4 changes: 3 additions & 1 deletion base/uncapitalize/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

// TypeScript Version: 4.1

type Uncapitalize<S extends string> = S extends `${infer F}${infer R}` ? `${Lowercase<F>}${R}` : S;

/**
* Uncapitalizes the first character of a string.
*
Expand All @@ -40,7 +42,7 @@
* var out = uncapitalize( 'Hidden Treasures' );
* // returns 'hidden Treasures'
*/
declare function uncapitalize( str: string ): string;
declare function uncapitalize<S extends string>( str: S ): Uncapitalize<S>;


// EXPORTS //
Expand Down
Loading

0 comments on commit e623db1

Please sign in to comment.