8000 Auto-generated commit · stdlib-js/slice-base-shape@2c3b223 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 2c3b223

Browse files
committed
Auto-generated commit
1 parent 6355142 commit 2c3b223

File tree

6 files changed

+18
-98
lines changed

6 files changed

+18
-98
lines changed

.github/.keepalive

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-11-01T03:33:29.160Z

.github/workflows/publish.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ jobs:
182182
fi
183183
# Trim leading and trailing whitespace:
184184
dep=$(echo "$dep" | xargs)
185-
version="^$(npm view $dep version)"
185+
version="$(npm view $dep version)"
186+
if [[ -z "$version" ]]; then
187+
continue
188+
fi
189+
version="^$version"
186190
jq -r --arg dep "$dep" --arg version "$version" '.dependencies[$dep] = $version' package.json > package.json.tmp
187191
mv package.json.tmp package.json
188192
done
@@ -192,7 +196,11 @@ jobs:
192196
fi
193197
# Trim leading and trailing whitespace:
194198
dep=$(echo "$dep" | xargs)
195-
version="^$(npm view $dep version)"
199+
version="$(npm view $dep version)"
200+
if [[ -z "$version" ]]; then
201+
continue
202+
fi
203+
version="^$version"
196204
jq -r --arg dep "$dep" --arg version "$version" '.devDependencies[$dep] = $version' package.json > package.json.tmp
197205
mv package.json.tmp package.json
198206
done

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ Stephannie Jiménez Gacha <steff456@hotmail.com>
3737
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
3838
orimiles5 <97595296+orimiles5@users.noreply.github.com>
3939
rei2hu <reimu@reimu.ws>
40+
Robert Gislason <gztown2216@yahoo.com>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
217217
[npm-image]: http://img.shields.io/npm/v/@stdlib/slice-base-shape.svg
218218
[npm-url]: https://npmjs.org/package/@stdlib/slice-base-shape
219219

220-
[test-image]: https://github.com/stdlib-js/slice-base-shape/actions/workflows/test.yml/badge.svg?branch=v0.1.1
221-
[test-url]: https://github.com/stdlib-js/slice-base-shape/actions/workflows/test.yml?query=branch:v0.1.1
220+
[test-image]: https://github.com/stdlib-js/slice-base-shape/actions/workflows/test.yml/badge.svg?branch=main
221+
[test-url]: https://github.com/stdlib-js/slice-base-shape/actions/workflows/test.yml?query=branch:main
222222

223223
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/slice-base-shape/main.svg
224224
[coverage-url]: https://codecov.io/github/stdlib-js/slice-base-shape?branch=main

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"url": "https://github.com/stdlib-js/stdlib/issues"
3838
},
3939
"dependencies": {
40-
"@stdlib/slice-base-length": "^0.1.0",
40+
"@stdlib/slice-base-length": "^0.1.1",
4141
"@stdlib/types": "^0.1.0"
4242
},
4343
"devDependencies": {

test/dist/test.js

Lines changed: 3 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -16,108 +16,18 @@
1616
* limitations under the License.
1717
*/
1818

19-
/* eslint-disable max-len */
20-
2119
'use strict';
2220

2321
// MODULES //
2422

2523
var tape = require( 'tape' );
26-
var S = require( '@stdlib/slice-ctor' );
27-
var MultiSlice = require( '@stdlib/slice-multi' );
28-
var normalizeMultiSlice = require( '@stdlib/slice-base-normalize-multi-slice' );
29-
var sliceShape = require( './../../dist' );
24+
var main = require( './../../dist' );
3025

3126

3227
// TESTS //
3328

34-
tape( 'main export is a function', function test( t ) {
29+
tape( 'main export is defined', function test( t ) {
3530
t.ok( true, __filename );
36-
t.strictEqual( typeof sliceShape, 'function', 'main export is a function' );
37-
t.end();
38-
});
39-
40-
tape( 'the function returns the shape of a normalized multi-slice', function test( t ) {
41-
var expected;
42-
var actual;
43-
var values;
44-
var shape;
45-
var i;
46-
47-
shape = [ 10, 5 ];
48-
49-
/* eslint-disable new-cap */
50-
51-
values = [
52-
normalizeMultiSlice( new MultiSlice( S(), null ), shape, false ),
53-
normalizeMultiSlice( new MultiSlice( 2, S( 10 ) ), shape, false ),
54-
normalizeMultiSlice( new MultiSlice( S( 2, 10 ), S() ), shape, false ),
55-
normalizeMultiSlice( new MultiSlice( null, S( 2, null ) ), shape, false ),
56-
normalizeMultiSlice( new MultiSlice( S( null, 10 ), S( null, 10 ) ), shape, false ),
57-
normalizeMultiSlice( new MultiSlice( S( -2 ), -2 ), shape, false ),
58-
normalizeMultiSlice( new MultiSlice( -2, S( -5, -2 ) ), shape, false ),
59-
normalizeMultiSlice( new MultiSlice( S( null, 10, 2 ), S( -5, null ) ), shape, false ),
60-
normalizeMultiSlice( new MultiSlice( null, S( 3, 3, 1 ) ), shape, false ),
61-
normalizeMultiSlice( new MultiSlice( S( 5, 3, 1 ), null ), shape, false ),
62-
normalizeMultiSlice( new MultiSlice( S( 3, 5, -1 ), 2 ), shape, false ),
63-
normalizeMultiSlice( new MultiSlice( S( -5, -5, 1 ), S() ), shape, false ),
64-
normalizeMultiSlice( new MultiSlice( null, S( 0, 0, 1 ) ), shape, false ),
65-
normalizeMultiSlice( new MultiSlice( S( 10, 10, 1 ), S( 1, 1, 1 ) ), shape, false ),
66-
normalizeMultiSlice( new MultiSlice( S( null, 10, 3 ), S( -5, null, 2 ) ), shape, false )
67-
];
68-
69-
/* eslint-enable new-cap */
70-
71-
expected = [
72-
// Slice( 0, 10, 1 ), Slice( 0, 5, 1 )
73-
[ 10, 5 ],
74-
75-
// Slice( 2, 3, 1 ), Slice( 0, 5, 1 )
76-
[ 1, 5 ],
77-
78-
// Slice( 2, 10, 1 ), S( 0, 5, 1 )
79-
[ 8, 5 ],
80-
81-
// Slice( 0, 10, 1 ), Slice( 2, 5, 1 )
82-
[ 10, 3 ],
83-
84-
// Slice( 0, 10, 1 ), Slice( 0, 5, 1 )
85-
[ 10, 5 ],
86-
87-
// Slice( 0, 8, 1 ), Slice( 3, 4, 1 )
88-
[ 8, 1 ],
89-
90-
// Slice( 8, 9, 1 ), Slice( 0, 3, 1 )
91-
[ 1, 3 ],
92-
93-
// Slice( 0, 10, 2 ), Slice( 0, 5, 1 )
94-
[ 5, 5 ],
95-
96-
// Slice( 0, 10, 1 ), Slice( 3, 3, 1 )
97-
[ 10, 0 ],
98-
99-
// Slice( 5, 3, 1 ), Slice( 0, 5, 1 )
100-
[ 0, 5 ],
101-
102-
// Slice( 3, 5, -1 ), Slice( 2, 3, 1 )
103-
[ 0, 1 ],
104-
105-
// Slice( 5, 5, 1 ), Slice( 0, 5, 1 )
106-
[ 0, 5 ],
107-
108-
// Slice( 0, 10, 1 ), Slice( 0, 0, 1 )
109-
[ 10, 0 ],
110-
111-
// Slice( 10, 10, 1 ), Slice( 1, 1, 1 )
112-
[ 0, 0 ],
113-
114-
// Slice( 0, 10, 3 ), Slice( 0, 5, 2 )
115-
[ 4, 3 ]
116-
];
117-
118-
for ( i = 0; i < values.length; i++ ) {
119-
actual = sliceShape( values[ i ] );
120-
t.deepEqual( actual, expected[ i ], 'returns expected value. slice: ' + values[ i ].toString() );
121-
}
31+
t.strictEqual( main !== void 0, true, 'main export is defined' );
12232
t.end();
12333
});

0 commit comments

Comments
 (0)
0