From d95f7da5f8efa3cd4c6e2c7b94011ed3fec96230 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 22 Feb 2024 21:37:39 +0000 Subject: [PATCH] Auto-generated commit --- .github/workflows/npm_downloads.yml | 4 +- .github/workflows/publish.yml | 14 +-- .github/workflows/test_bundles.yml | 4 +- README.md | 4 +- docs/types/index.d.ts | 160 +--------------------------- package.json | 32 +++--- 6 files changed, 28 insertions(+), 190 deletions(-) diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml index 72c1c21..b99fc36 100644 --- a/.github/workflows/npm_downloads.yml +++ b/.github/workflows/npm_downloads.yml @@ -86,8 +86,8 @@ jobs: # Upload the download data: - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 + # Pin action to full length commit SHA + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: # Define a name for the uploaded artifact (ensuring a unique name for each job): name: npm_downloads diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 477ca6d..010fb9d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -124,16 +124,10 @@ jobs: mv ./package.json.tmp ./package.json fi done - jq -r '.devDependencies | keys[]' ./package.json | while read -r dep; do - if [[ "$dep" != "@stdlib"* ]]; then - continue - fi - dep=$(echo "$dep" | xargs) - if ! find lib -name "*.js" -exec grep -q "$dep" {} + && ! grep -q -s "$dep" manifest.json && ! grep -q -s "$dep" include.gypi; then - jq --indent 2 "del(.devDependencies[\"$dep\"])" ./package.json > ./package.json.tmp - mv ./package.json.tmp ./package.json - fi - done + + # Set `devDependencies` to an empty object: + jq --indent 2 '.devDependencies = {}' ./package.json > ./package.json.tmp + mv ./package.json.tmp ./package.json # Remove CLI section: find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+?<\!\-\- \/.cli \-\->//" diff --git a/.github/workflows/test_bundles.yml b/.github/workflows/test_bundles.yml index 0c4e061..5c9dc95 100644 --- a/.github/workflows/test_bundles.yml +++ b/.github/workflows/test_bundles.yml @@ -168,8 +168,8 @@ jobs: # Install Deno: - name: 'Install Deno' - # Pin action to full length commit SHA corresponding to v1.1.2 - uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31 + # Pin action to full length commit SHA + uses: denoland/setup-deno@041b854f97b325bd60e53e9dc2de9cb9f9ac0cba # v1.1.4 with: deno-version: vx.x.x diff --git a/README.md b/README.md index 26cecf8..590abdc 100644 --- a/README.md +++ b/README.md @@ -210,8 +210,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. [npm-image]: http://img.shields.io/npm/v/@stdlib/array-zeros.svg [npm-url]: https://npmjs.org/package/@stdlib/array-zeros -[test-image]: https://github.com/stdlib-js/array-zeros/actions/workflows/test.yml/badge.svg?branch=v0.2.0 -[test-url]: https://github.com/stdlib-js/array-zeros/actions/workflows/test.yml?query=branch:v0.2.0 +[test-image]: https://github.com/stdlib-js/array-zeros/actions/workflows/test.yml/badge.svg?branch=main +[test-url]: https://github.com/stdlib-js/array-zeros/actions/workflows/test.yml?query=branch:main [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/array-zeros/main.svg [coverage-url]: https://codecov.io/github/stdlib-js/array-zeros?branch=main diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index 53f2ae9..848339a 100644 --- a/docs/types/index.d.ts +++ b/docs/types/index.d.ts @@ -20,163 +20,7 @@ /// -import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array'; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = zeros( 2, 'float64' ); -* // returns [ 0.0, 0.0 ] -*/ -declare function zeros( length: number, dtype: 'float64' ): Float64Array; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = zeros( 2, 'float32' ); -* // returns [ 0.0, 0.0 ] -*/ -declare function zeros( length: number, dtype: 'float32' ): Float32Array; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = zeros( 2, 'complex128' ); -* // returns -*/ -declare function zeros( length: number, dtype: 'complex128' ): Complex128Array; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = zeros( 2, 'complex64' ); -* // returns -*/ -declare function zeros( length: number, dtype: 'complex64' ): Complex64Array; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = zeros( 2, 'int32' ); -* // returns [ 0, 0 ] -*/ -declare function zeros( length: number, dtype: 'int32' ): Int32Array; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = zeros( 2, 'int16' ); -* // returns [ 0, 0 ] -*/ -declare function zeros( length: number, dtype: 'int16' ): Int16Array; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = zeros( 2, 'int8' ); -* // returns [ 0, 0 ] -*/ -declare function zeros( length: number, dtype: 'int8' ): Int8Array; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = zeros( 2, 'uint32' ); -* // returns [ 0, 0 ] -*/ -declare function zeros( length: number, dtype: 'uint32' ): Uint32Array; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = zeros( 2, 'uint16' ); -* // returns [ 0, 0 ] -*/ -declare function zeros( length: number, dtype: 'uint16' ): Uint16Array; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = zeros( 2, 'uint8' ); -* // returns [ 0, 0 ] -*/ -declare function zeros( length: number, dtype: 'uint8' ): Uint8Array; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = zeros( 2, 'uint8c' ); -* // returns [ 0, 0 ] -*/ -declare function zeros( length: number, dtype: 'uint8c' ): Uint8ClampedArray; - -/** -* Creates a zero-filled array having a specified length. -* -* @param length - array length -* @param dtype - data type -* @returns zero-filled array -* -* @example -* var arr = zeros( 2, 'generic' ); -* // returns [ 0, 0 ] -*/ -declare function zeros( length: number, dtype: 'generic' ): Array; +import { NumericAndGenericDataTypeMap } from '@stdlib/types/array'; /** * Creates a zero-filled array having a specified length. @@ -208,7 +52,7 @@ declare function zeros( length: number, dtype: 'generic' ): Array; * var arr = zeros( 2, 'float32' ); * // returns [ 0.0, 0.0 ] */ -declare function zeros( length: number, dtype?: DataType ): Float64Array; +declare function zeros = 'float64'>( length: number, dtype?: T ): NumericAndGenericDataTypeMap[T]; // EXPORTS // diff --git a/package.json b/package.json index 0ae71bd..0ce5997 100644 --- a/package.json +++ b/package.json @@ -41,28 +41,28 @@ "@stdlib/array-ctors": "^0.2.0", "@stdlib/array-defaults": "^0.2.0", "@stdlib/assert-is-nonnegative-integer": "^0.2.0", - "@stdlib/string-format": "^0.2.0", - "@stdlib/types": "^0.3.1" + "@stdlib/string-format": "^0.2.1", + "@stdlib/types": "^0.3.2" }, "devDependencies": { - "@stdlib/array-complex128": "^0.1.0", - "@stdlib/array-complex64": "^0.1.0", + "@stdlib/array-complex128": "^0.2.0", + "@stdlib/array-complex64": "^0.2.0", "@stdlib/array-dtypes": "^0.2.0", - "@stdlib/array-float32": "^0.2.0", - "@stdlib/array-float64": "^0.2.0", - "@stdlib/array-int16": "^0.2.0", - "@stdlib/array-int32": "^0.2.0", - "@stdlib/array-int8": "^0.2.0", - "@stdlib/array-uint16": "^0.2.0", - "@stdlib/array-uint32": "^0.2.0", - "@stdlib/array-uint8": "^0.2.0", - "@stdlib/array-uint8c": "^0.2.0", - "@stdlib/assert-instance-of": "^0.2.0", - "@stdlib/assert-is-array": "^0.2.0", + "@stdlib/array-float32": "^0.2.1", + "@stdlib/array-float64": "^0.2.1", + "@stdlib/array-int16": "^0.2.1", + "@stdlib/array-int32": "^0.2.1", + "@stdlib/array-int8": "^0.2.1", + "@stdlib/array-uint16": "^0.2.1", + "@stdlib/array-uint32": "^0.2.1", + "@stdlib/array-uint8": "^0.2.1", + "@stdlib/array-uint8c": "^0.2.1", + "@stdlib/assert-instance-of": "^0.2.1", + "@stdlib/assert-is-array": "^0.2.1", "@stdlib/assert-is-typed-array": "^0.2.0", "@stdlib/assert-is-typed-array-like": "^0.2.0", "@stdlib/math-base-special-pow": "^0.2.0", - "@stdlib/strided-base-reinterpret-complex128": "^0.2.0", + "@stdlib/strided-base-reinterpret-complex128": "^0.2.1", "@stdlib/strided-base-reinterpret-complex64": "^0.2.0", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1",