Skip to content

Commit d95f7da

Browse files
committed
Auto-generated commit
1 parent 6d4d98c commit d95f7da

File tree

6 files changed

+28
-190
lines changed

6 files changed

+28
-190
lines changed

.github/workflows/npm_downloads.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ jobs:
8686
8787
# Upload the download data:
8888
- name: 'Upload data'
89-
# Pin action to full length commit SHA corresponding to v3.1.3
90-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
89+
# Pin action to full length commit SHA
90+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
9191
with:
9292
# Define a name for the uploaded artifact (ensuring a unique name for each job):
9393
name: npm_downloads

.github/workflows/publish.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,10 @@ jobs:
124124
mv ./package.json.tmp ./package.json
125125
fi
126126
done
127-
jq -r '.devDependencies | keys[]' ./package.json | while read -r dep; do
128-
if [[ "$dep" != "@stdlib"* ]]; then
129-
continue
130-
fi
131-
dep=$(echo "$dep" | xargs)
132-
if ! find lib -name "*.js" -exec grep -q "$dep" {} + && ! grep -q -s "$dep" manifest.json && ! grep -q -s "$dep" include.gypi; then
133-
jq --indent 2 "del(.devDependencies[\"$dep\"])" ./package.json > ./package.json.tmp
134-
mv ./package.json.tmp ./package.json
135-
fi
136-
done
127+
128+
# Set `devDependencies` to an empty object:
129+
jq --indent 2 '.devDependencies = {}' ./package.json > ./package.json.tmp
130+
mv ./package.json.tmp ./package.json
137131
138132
# Remove CLI section:
139133
find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?<section class=\"cli\">[\s\S]+?<\!\-\- \/.cli \-\->//"

.github/workflows/test_bundles.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ jobs:
168168

169169
# Install Deno:
170170
- name: 'Install Deno'
171-
# Pin action to full length commit SHA corresponding to v1.1.2
172-
uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31
171+
# Pin action to full length commit SHA
172+
uses: denoland/setup-deno@041b854f97b325bd60e53e9dc2de9cb9f9ac0cba # v1.1.4
173173
with:
174174
deno-version: vx.x.x
175175

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
210210
[npm-image]: http://img.shields.io/npm/v/@stdlib/array-zeros.svg
211211
[npm-url]: https://npmjs.org/package/@stdlib/array-zeros
212212

213-
[test-image]: https://github.com/stdlib-js/array-zeros/actions/workflows/test.yml/badge.svg?branch=v0.2.0
214-
[test-url]: https://github.com/stdlib-js/array-zeros/actions/workflows/test.yml?query=branch:v0.2.0
213+
[test-image]: https://github.com/stdlib-js/array-zeros/actions/workflows/test.yml/badge.svg?branch=main
214+
[test-url]: https://github.com/stdlib-js/array-zeros/actions/workflows/test.yml?query=branch:main
215215

216216
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/array-zeros/main.svg
217217
[coverage-url]: https://codecov.io/github/stdlib-js/array-zeros?branch=main

docs/types/index.d.ts

Lines changed: 2 additions & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -20,163 +20,7 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array';
24-
25-
/**
26-
* Creates a zero-filled array having a specified length.
27-
*
28-
* @param length - array length
29-
* @param dtype - data type
30-
* @returns zero-filled array
31-
*
32-
* @example
33-
* var arr = zeros( 2, 'float64' );
34-
* // returns <Float64Array>[ 0.0, 0.0 ]
35-
*/
36-
declare function zeros( length: number, dtype: 'float64' ): Float64Array;
37-
38-
/**
39-
* Creates a zero-filled array having a specified length.
40-
*
41-
* @param length - array length
42-
* @param dtype - data type
43-
* @returns zero-filled array
44-
*
45-
* @example
46-
* var arr = zeros( 2, 'float32' );
47-
* // returns <Float32Array>[ 0.0, 0.0 ]
48-
*/
49-
declare function zeros( length: number, dtype: 'float32' ): Float32Array;
50-
51-
/**
52-
* Creates a zero-filled array having a specified length.
53-
*
54-
* @param length - array length
55-
* @param dtype - data type
56-
* @returns zero-filled array
57-
*
58-
* @example
59-
* var arr = zeros( 2, 'complex128' );
60-
* // returns <Complex128Array>
61-
*/
62-
declare function zeros( length: number, dtype: 'complex128' ): Complex128Array;
63-
64-
/**
65-
* Creates a zero-filled array having a specified length.
66-
*
67-
* @param length - array length
68-
* @param dtype - data type
69-
* @returns zero-filled array
70-
*
71-
* @example
72-
* var arr = zeros( 2, 'complex64' );
73-
* // returns <Complex64Array>
74-
*/
75-
declare function zeros( length: number, dtype: 'complex64' ): Complex64Array;
76-
77-
/**
78-
* Creates a zero-filled array having a specified length.
79-
*
80-
* @param length - array length
81-
* @param dtype - data type
82-
* @returns zero-filled array
83-
*
84-
* @example
85-
* var arr = zeros( 2, 'int32' );
86-
* // returns <Int32Array>[ 0, 0 ]
87-
*/
88-
declare function zeros( length: number, dtype: 'int32' ): Int32Array;
89-
90-
/**
91-
* Creates a zero-filled array having a specified length.
92-
*
93-
* @param length - array length
94-
* @param dtype - data type
95-
* @returns zero-filled array
96-
*
97-
* @example
98-
* var arr = zeros( 2, 'int16' );
99-
* // returns <Int16Array>[ 0, 0 ]
100-
*/
101-
declare function zeros( length: number, dtype: 'int16' ): Int16Array;
102-
103-
/**
104-
* Creates a zero-filled array having a specified length.
105-
*
106-
* @param length - array length
107-
* @param dtype - data type
108-
* @returns zero-filled array
109-
*
110-
* @example
111-
* var arr = zeros( 2, 'int8' );
112-
* // returns <Int8Array>[ 0, 0 ]
113-
*/
114-
declare function zeros( length: number, dtype: 'int8' ): Int8Array;
115-
116-
/**
117-
* Creates a zero-filled array having a specified length.
118-
*
119-
* @param length - array length
120-
* @param dtype - data type
121-
* @returns zero-filled array
122-
*
123-
* @example
124-
* var arr = zeros( 2, 'uint32' );
125-
* // returns <Uint32Array>[ 0, 0 ]
126-
*/
127-
declare function zeros( length: number, dtype: 'uint32' ): Uint32Array;
128-
129-
/**
130-
* Creates a zero-filled array having a specified length.
131-
*
132-
* @param length - array length
133-
* @param dtype - data type
134-
* @returns zero-filled array
135-
*
136-
* @example
137-
* var arr = zeros( 2, 'uint16' );
138-
* // returns <Uint16Array>[ 0, 0 ]
139-
*/
140-
declare function zeros( length: number, dtype: 'uint16' ): Uint16Array;
141-
142-
/**
143-
* Creates a zero-filled array having a specified length.
144-
*
145-
* @param length - array length
146-
* @param dtype - data type
147-
* @returns zero-filled array
148-
*
149-
* @example
150-
* var arr = zeros( 2, 'uint8' );
151-
* // returns <Uint8Array>[ 0, 0 ]
152-
*/
153-
declare function zeros( length: number, dtype: 'uint8' ): Uint8Array;
154-
155-
/**
156-
* Creates a zero-filled array having a specified length.
157-
*
158-
* @param length - array length
159-
* @param dtype - data type
160-
* @returns zero-filled array
161-
*
162-
* @example
163-
* var arr = zeros( 2, 'uint8c' );
164-
* // returns <Uint8ClampedArray>[ 0, 0 ]
165-
*/
166-
declare function zeros( length: number, dtype: 'uint8c' ): Uint8ClampedArray;
167-
168-
/**
169-
* Creates a zero-filled array having a specified length.
170-
*
171-
* @param length - array length
172-
* @param dtype - data type
173-
* @returns zero-filled array
174-
*
175-
* @example
176-
* var arr = zeros( 2, 'generic' );
177-
* // returns [ 0, 0 ]
178-
*/
179-
declare function zeros( length: number, dtype: 'generic' ): Array<number>;
23+
import { NumericAndGenericDataTypeMap } from '@stdlib/types/array';
18024

18125
/**
18226
* Creates a zero-filled array having a specified length.
@@ -208,7 +52,7 @@ declare function zeros( length: number, dtype: 'generic' ): Array<number>;
20852
* var arr = zeros( 2, 'float32' );
20953
* // returns <Float32Array>[ 0.0, 0.0 ]
21054
*/
211-
declare function zeros( length: number, dtype?: DataType ): Float64Array;
55+
declare function zeros<T extends keyof NumericAndGenericDataTypeMap<number> = 'float64'>( length: number, dtype?: T ): NumericAndGenericDataTypeMap<number>[T];
21256

21357

21458
// EXPORTS //

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,28 +41,28 @@
4141
"@stdlib/array-ctors": "^0.2.0",
4242
"@stdlib/array-defaults": "^0.2.0",
4343
"@stdlib/assert-is-nonnegative-integer": "^0.2.0",
44-
"@stdlib/string-format": "^0.2.0",
45-
"@stdlib/types": "^0.3.1"
44+
"@stdlib/string-format": "^0.2.1",
45+
"@stdlib/types": "^0.3.2"
4646
},
4747
"devDependencies": {
48-
"@stdlib/array-complex128": "^0.1.0",
49-
"@stdlib/array-complex64": "^0.1.0",
48+
"@stdlib/array-complex128": "^0.2.0",
49+
"@stdlib/array-complex64": "^0.2.0",
5050
"@stdlib/array-dtypes": "^0.2.0",
51-
"@stdlib/array-float32": "^0.2.0",
52-
"@stdlib/array-float64": "^0.2.0",
53-
"@stdlib/array-int16": "^0.2.0",
54-
"@stdlib/array-int32": "^0.2.0",
55-
"@stdlib/array-int8": "^0.2.0",
56-
"@stdlib/array-uint16": "^0.2.0",
57-
"@stdlib/array-uint32": "^0.2.0",
58-
"@stdlib/array-uint8": "^0.2.0",
59-
"@stdlib/array-uint8c": "^0.2.0",
60-
"@stdlib/assert-instance-of": "^0.2.0",
61-
"@stdlib/assert-is-array": "^0.2.0",
51+
"@stdlib/array-float32": "^0.2.1",
52+
"@stdlib/array-float64": "^0.2.1",
53+
"@stdlib/array-int16": "^0.2.1",
54+
"@stdlib/array-int32": "^0.2.1",
55+
"@stdlib/array-int8": "^0.2.1",
56+
"@stdlib/array-uint16": "^0.2.1",
57+
"@stdlib/array-uint32": "^0.2.1",
58+
"@stdlib/array-uint8": "^0.2.1",
59+
"@stdlib/array-uint8c": "^0.2.1",
60+
"@stdlib/assert-instance-of": "^0.2.1",
61+
"@stdlib/assert-is-array": "^0.2.1",
6262
"@stdlib/assert-is-typed-array": "^0.2.0",
6363
"@stdlib/assert-is-typed-array-like": "^0.2.0",
6464
"@stdlib/math-base-special-pow": "^0.2.0",
65-
"@stdlib/strided-base-reinterpret-complex128": "^0.2.0",
65+
"@stdlib/strided-base-reinterpret-complex128": "^0.2.1",
6666
"@stdlib/strided-base-reinterpret-complex64": "^0.2.0",
6767
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
6868
"istanbul": "^0.4.1",

0 commit comments

Comments
 (0)