Skip to content

Commit 6119f50

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into strsv/ndarray
2 parents 14c9a1c + 992d620 commit 6119f50

711 files changed

Lines changed: 28289 additions & 799 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/markdown_equations.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ jobs:
9696
git config --local user.name "stdlib-bot"
9797
timeout-minutes: 5
9898

99+
# Disable Git hooks:
100+
- name: 'Disable Git hooks'
101+
run: |
102+
rm -rf .git/hooks
103+
99104
# Import GPG key to sign commits:
100105
- name: 'Import GPG key to sign commits'
101106
# Pin action to full length commit SHA
@@ -177,6 +182,9 @@ jobs:
177182
# Fetch the branch first so that --force-with-lease in the subsequent push has a local tracking reference and can verify the remote state:
178183
git fetch origin markdown-insert-equations 2>/dev/null || true
179184
gh api -X DELETE repos/stdlib-js/stdlib/git/refs/heads/markdown-insert-equations 2>/dev/null || true
185+
186+
# Delete the local tracking branch so that --force-with-lease does not reject the push due to stale info:
187+
git branch -dr origin/markdown-insert-equations 2>/dev/null || true
180188
timeout-minutes: 5
181189

182190
# Create a pull request with the updated equations:

etc/eslint/.eslintrc.benchmarks.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* limitations under the License.
1717
*/
1818

19+
/* eslint-disable stdlib/no-empty-lines-between-requires */
20+
1921
'use strict';
2022

2123
// MODULES //
@@ -127,11 +129,11 @@ eslint.rules[ 'stdlib/jsdoc-doctest' ] = 'off';
127129
eslint.rules[ 'stdlib/no-unnecessary-nested-functions' ] = 'off';
128130

129131
/**
130-
* Warn when using string concatenation in benchmark descriptions.
132+
* Disallow using string concatenation in benchmark descriptions.
131133
*
132134
* @private
133135
*/
134-
eslint.rules[ 'stdlib/no-bench-string-concat' ] = 'warn';
136+
eslint.rules[ 'stdlib/no-bench-string-concat' ] = 'error';
135137

136138

137139
// EXPORTS //

etc/eslint/.eslintrc.examples.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* limitations under the License.
1717
*/
1818

19+
/* eslint-disable stdlib/no-empty-lines-between-requires */
20+
1921
'use strict';
2022

2123
// MODULES //

etc/eslint/.eslintrc.tests.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* limitations under the License.
1717
*/
1818

19+
/* eslint-disable stdlib/no-empty-lines-between-requires */
20+
1921
'use strict';
2022

2123
// MODULES //

etc/eslint/.eslintrc.typescript.tests.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* limitations under the License.
1717
*/
1818

19+
/* eslint-disable stdlib/no-empty-lines-between-requires */
20+
1921
'use strict';
2022

2123
// MODULES //

lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-typedef-typos/lib/edit_distance.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
// MODULES //
2222

23-
var ndarray = require( '@stdlib/ndarray/array' );
23+
var zeros = require( '@stdlib/ndarray/zeros' );
2424
var minn = require( '@stdlib/math/base/special/minn' );
2525

2626

@@ -31,7 +31,7 @@ var minn = require( '@stdlib/math/base/special/minn' );
3131
*
3232
* ## Notes
3333
*
34-
* - the edit distance between two strings is the number of insertions, deletions, character substitutions, as well as transpositions of adjacent characters to convert one of the strings into the other.
34+
* - The edit distance between two strings is the number of insertions, deletions, character substitutions, as well as transpositions of adjacent characters to convert one of the strings into the other.
3535
*
3636
* [damerau-levenshtein]: https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance
3737
*
@@ -56,9 +56,7 @@ function editDistance( word1, word2 ) {
5656
n = word2.length;
5757

5858
// FIXME: all of the following needs to be cleaned up. There may be an opportunity for a `blas/ext/base` implementation of edit distance; however, we need to think carefully about this as the following doesn't take into account grapheme clusters.
59-
d = ndarray({
60-
'shape': [ m+1, n+1 ]
61-
});
59+
d = zeros( [ m+1, n+1 ] );
6260
for ( i = 0; i <= m; i++ ) {
6361
d.set( i, 0, i );
6462
}

lib/node_modules/@stdlib/_tools/repl-txt/rules/doctest/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ function main( context ) {
165165
return format( 'require(\'%s\')', pkg );
166166
}
167167
// If an alias does not exist in the global namespace, dynamically `require` a package so that the desired expression can be executed:
168-
return format( 'require(\'%s\')', pkg );
168+
return format( '(require(\'%s\'))', pkg );
169169
}
170170
alias = alias.split( '.' );
171171
len = alias.length;

lib/node_modules/@stdlib/_tools/repl-txt/rules/interface-spacing/lib/main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818

1919
'use strict';
2020

21+
// MODULES //
22+
23+
var format = require( '@stdlib/string/format' );
24+
25+
2126
// VARIABLES //
2227

2328
var DEFAULT_SPACING = 2;
@@ -52,7 +57,7 @@ function main( context ) {
5257
elem = interfaces[ i ];
5358
emptyLines = elem.start - end - 1;
5459
if ( emptyLines !== spacing ) {
55-
context.report( 'Interface documentation sections must be separated by `' + spacing + '` empty lines. Encountered: `'+ emptyLines+'`.', interfaces[ i ] );
60+
context.report( format( 'Interface documentation sections must be separated by `%s` empty lines. Encountered: `%s`.', spacing, emptyLines ), interfaces[ i ] );
5661
}
5762
end = elem.end;
5863
}

lib/node_modules/@stdlib/_tools/repl-txt/rules/section-heading-style/lib/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var isCapitalized = require( '@stdlib/assert/is-capitalized' );
24+
var format = require( '@stdlib/string/format' );
2425

2526

2627
// VARIABLES //
@@ -59,10 +60,10 @@ function main( context ) {
5960
*/
6061
function sectionStyle( section ) {
6162
if ( !isCapitalized( section.title ) ) {
62-
context.report( 'Section title "'+section.title+'" should be capitalized', section );
63+
context.report( format( 'Section title "%s" should be capitalized', section.title ), section );
6364
}
6465
if ( countHyphens( section.rawTitle ) !== section.title.length ) {
65-
context.report( 'Number of hyphens in the line following "'+section.title+'" must match the length of the title', section );
66+
context.report( format( 'Number of hyphens in the line following "%s" must match the length of the title', section.title ), section );
6667
}
6768
}
6869
return {

lib/node_modules/@stdlib/_tools/repl-txt/rules/section-order/lib/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var indexOf = require( '@stdlib/utils/index-of' );
24+
var format = require( '@stdlib/string/format' );
2425

2526

2627
// VARIABLES //
@@ -61,7 +62,7 @@ function main( context ) {
6162
section = sections[ i ];
6263
idx = indexOf( order, section.title );
6364
if ( last !== void 0 && idx < last ) {
64-
context.report( 'Sections have to be arranged in the following order: '+order.join( ', ' ), section );
65+
context.report( format( 'Sections have to be arranged in the following order: %s', order.join( ', ' ) ), section );
6566
}
6667
last = idx;
6768
}

0 commit comments

Comments
 (0)