Skip to content

Commit 5cdc8dd

Browse files
committed
Auto-generated commit
1 parent 3480a4d commit 5cdc8dd

File tree

6 files changed

+29
-199
lines changed

6 files changed

+29
-199
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
@@ -227,8 +227,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
227227
[npm-image]: http://img.shields.io/npm/v/@stdlib/array-one-to.svg
228228
[npm-url]: https://npmjs.org/package/@stdlib/array-one-to
229229

230-
[test-image]: https://github.com/stdlib-js/array-one-to/actions/workflows/test.yml/badge.svg?branch=v0.2.0
231-
[test-url]: https://github.com/stdlib-js/array-one-to/actions/workflows/test.yml?query=branch:v0.2.0
230+
[test-image]: https://github.com/stdlib-js/array-one-to/actions/workflows/test.yml/badge.svg?branch=main
231+
[test-url]: https://github.com/stdlib-js/array-one-to/actions/workflows/test.yml?query=branch:main
232232

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

18925
/**
19026
* Generates a linearly spaced numeric array whose elements increment by 1 starting from one.
@@ -201,7 +37,7 @@ declare function oneTo( n: number, dtype: 'generic' ): Array<number>;
20137
* var arr = oneTo( 2, 'float32' );
20238
* // returns <Float32Array>[ 1.0, 2.0 ]
20339
*/
204-
declare function oneTo( n: number, dtype?: NumericDataType ): Float64Array;
40+
declare function oneTo<T extends keyof NumericAndGenericDataTypeMap<number> = 'float64'>( n: number, dtype?: T ): NumericAndGenericDataTypeMap<number>[T];
20541

20642

20743
// EXPORTS //

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,29 @@
4141
"@stdlib/array-defaults": "^0.2.0",
4242
"@stdlib/array-zeros": "^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",
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",
48+
"@stdlib/array-complex128": "^0.2.0",
49+
"@stdlib/array-complex64": "^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/blas-ext-base-gsort2hp": "^0.2.0",
6464
"@stdlib/math-base-special-pow": "^0.2.0",
65-
"@stdlib/random-array-discrete-uniform": "^0.1.0",
66-
"@stdlib/strided-base-reinterpret-complex128": "^0.2.0",
65+
"@stdlib/random-array-discrete-uniform": "^0.2.0",
66+
"@stdlib/strided-base-reinterpret-complex128": "^0.2.1",
6767
"@stdlib/strided-base-reinterpret-complex64": "^0.2.0",
6868
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
6969
"istanbul": "^0.4.1",

0 commit comments

Comments
 (0)