Skip to content

Commit c465b73

Browse files
committed
Auto-generated commit
1 parent 786498a commit c465b73

File tree

6 files changed

+27
-197
lines changed

6 files changed

+27
-197
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
@@ -212,8 +212,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
212212
[npm-image]: http://img.shields.io/npm/v/@stdlib/array-ones.svg
213213
[npm-url]: https://npmjs.org/package/@stdlib/array-ones
214214

215-
[test-image]: https://github.com/stdlib-js/array-ones/actions/workflows/test.yml/badge.svg?branch=v0.2.0
216-
[test-url]: https://github.com/stdlib-js/array-ones/actions/workflows/test.yml?query=branch:v0.2.0
215+
[test-image]: https://github.com/stdlib-js/array-ones/actions/workflows/test.yml/badge.svg?branch=main
216+
[test-url]: https://github.com/stdlib-js/array-ones/actions/workflows/test.yml?query=branch:main
217217

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

docs/types/index.d.ts

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

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

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

18925
/**
19026
* Creates an array filled with ones and having a specified length.
@@ -216,7 +52,7 @@ declare function ones( length: number, dtype: 'generic' ): Array<number>;
21652
* var arr = ones( 2, 'float32' );
21753
* // returns <Float32Array>[ 1.0, 1.0 ]
21854
*/
219-
declare function ones( length: number, dtype?: DataType ): Float64Array;
55+
declare function ones<T extends keyof NumericAndGenericDataTypeMap<number> = 'float64'>( length: number, dtype?: T ): NumericAndGenericDataTypeMap<number>[T];
22056

22157

22258
// EXPORTS //

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,27 @@
4141
"@stdlib/array-full": "^0.2.0",
4242
"@stdlib/complex-float32": "^0.2.0",
4343
"@stdlib/complex-float64": "^0.2.0",
44-
"@stdlib/types": "^0.3.1"
44+
"@stdlib/types": "^0.3.2"
4545
},
4646
"devDependencies": {
47-
"@stdlib/array-complex128": "^0.1.0",
48-
"@stdlib/array-complex64": "^0.1.0",
47+
"@stdlib/array-complex128": "^0.2.0",
48+
"@stdlib/array-complex64": "^0.2.0",
4949
"@stdlib/array-dtypes": "^0.2.0",
50-
"@stdlib/array-float32": "^0.2.0",
51-
"@stdlib/array-float64": "^0.2.0",
52-
"@stdlib/array-int16": "^0.2.0",
53-
"@stdlib/array-int32": "^0.2.0",
54-
"@stdlib/array-int8": "^0.2.0",
55-
"@stdlib/array-uint16": "^0.2.0",
56-
"@stdlib/array-uint32": "^0.2.0",
57-
"@stdlib/array-uint8": "^0.2.0",
58-
"@stdlib/array-uint8c": "^0.2.0",
59-
"@stdlib/assert-instance-of": "^0.2.0",
60-
"@stdlib/assert-is-array": "^0.2.0",
50+
"@stdlib/array-float32": "^0.2.1",
51+
"@stdlib/array-float64": "^0.2.1",
52+
"@stdlib/array-int16": "^0.2.1",
53+
"@stdlib/array-int32": "^0.2.1",
54+
"@stdlib/array-int8": "^0.2.1",
55+
"@stdlib/array-uint16": "^0.2.1",
56+
"@stdlib/array-uint32": "^0.2.1",
57+
"@stdlib/array-uint8": "^0.2.1",
58+
"@stdlib/array-uint8c": "^0.2.1",
59+
"@stdlib/assert-instance-of": "^0.2.1",
60+
"@stdlib/assert-is-array": "^0.2.1",
6161
"@stdlib/assert-is-typed-array": "^0.2.0",
6262
"@stdlib/assert-is-typed-array-like": "^0.2.0",
6363
"@stdlib/math-base-special-pow": "^0.2.0",
64-
"@stdlib/strided-base-reinterpret-complex128": "^0.2.0",
64+
"@stdlib/strided-base-reinterpret-complex128": "^0.2.1",
6565
"@stdlib/strided-base-reinterpret-complex64": "^0.2.0",
6666
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
6767
"istanbul": "^0.4.1",

0 commit comments

Comments
 (0)