Skip to content

Commit ba8e3ac

Browse files
committed
Auto-generated commit
1 parent e000e76 commit ba8e3ac

File tree

5 files changed

+11
-54
lines changed

5 files changed

+11
-54
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#/
22
# @license Apache-2.0
33
#
4-
# Copyright (c) 2021 The Stdlib Authors.
4+
# Copyright (c) 2023 The Stdlib Authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -46,7 +46,7 @@ jobs:
4646
publish:
4747

4848
# Define display name:
49-
name: 'Publish package to npm'
49+
name: 'Publish top-level package to npm'
5050

5151
# Define the type of virtual host machine on which to run the job:
5252
runs-on: ubuntu-latest
@@ -103,54 +103,6 @@ jobs:
103103
SLUG=${{ github.repository }}
104104
git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" --follow-tags
105105
106-
# Remove CLI:
107-
- name: 'Remove CLI'
108-
if: ${{ github.ref == 'refs/heads/main' }}
109-
run: |
110-
# Exit if the package does not have a CLI:
111-
if ! grep -q '"bin":' package.json; then
112-
exit 0
113-
fi
114-
rm -rf ./bin/cli
115-
rm -f test/test.cli.js
116-
rm -f etc/cli_opts.json
117-
rm -f docs/usage.txt
118-
119-
# For all dependencies, check in all *.js files if they are still used; if not, remove them:
120-
jq -r '.dependencies | keys[]' ./package.json | while read -r dep; do
121-
dep=$(echo "$dep" | xargs)
122-
if ! grep -q "$dep" lib/** && ! grep -q -s "$dep" manifest.json && ! grep -q -s "$dep" include.gypi; then
123-
jq --indent 2 "del(.dependencies[\"$dep\"])" ./package.json > ./package.json.tmp
124-
mv ./package.json.tmp ./package.json
125-
fi
126-
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 ! grep -q "$dep" lib/** && ! 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
137-
138-
# Remove CLI section:
139-
find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?<section class=\"cli\">[\s\S]+?<\!\-\- \/.cli \-\->//"
140-
141-
# Remove CLI from package.json:
142-
jq -r 'del(.bin)' package.json > package.json.tmp
143-
mv package.json.tmp package.json
144-
145-
# Add entry for CLI package to See Also section of README.md:
146-
cliPkgName=$(jq -r '.name' package.json)-cli
147-
escapedPkg=$(echo "$cliPkgName" | sed -e 's/\//\\\//g')
148-
escapedPkg=$(echo "$escapedPkg" | sed -e 's/\@/\\\@/g')
149-
find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/<section class=\"related\">(?:\n\n\* \* \*\n\n## See Also\n\n)?/<section class=\"related\">\n\n## See Also\n\n- <span class=\"package-name\">[\`$escapedPkg\`][$escapedPkg]<\/span><span class=\"delimiter\">: <\/span><span class=\"description\">CLI package for use as a command-line utility.<\/span>\n/"
150-
151-
# Add link definition for CLI package to README.md:
152-
find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/<section class=\"links\">/<section class=\"links\">\n\n[$escapedPkg]: https:\/\/www.npmjs.com\/package\/$escapedPkg/"
153-
154106
# Replace GitHub MathJax equations with SVGs:
155107
- name: 'Replace GitHub MathJax equations with SVGs'
156108
run: |

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,8 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
577577
[npm-image]: http://img.shields.io/npm/v/@stdlib/assert.svg
578578
[npm-url]: https://npmjs.org/package/@stdlib/assert
579579

580-
[test-image]: https://github.com/stdlib-js/assert/actions/workflows/test.yml/badge.svg?branch=v0.1.1
581-
[test-url]: https://github.com/stdlib-js/assert/actions/workflows/test.yml?query=branch:v0.1.1
580+
[test-image]: https://github.com/stdlib-js/assert/actions/workflows/test.yml/badge.svg?branch=main
581+
[test-url]: https://github.com/stdlib-js/assert/actions/workflows/test.yml?query=branch:main
582582

583583
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/assert/main.svg
584584
[coverage-url]: https://codecov.io/github/stdlib-js/assert?branch=main

is-bigint/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ var isBigInt = require( '@stdlib/assert/is-bigint' );
3535
Tests if a value is a [`BigInt`][mdn-bigint].
3636

3737
```javascript
38+
var Object = require( '@stdlib/object/ctor' );
3839
var BigInt = require( '@stdlib/bigint/ctor' );
3940

4041
var bool = isBigInt( BigInt( '1' ) );
@@ -49,6 +50,7 @@ bool = isBigInt( Object( BigInt( '1' ) ) );
4950
Tests if a `value` is a primitive [`BigInt`][mdn-bigint].
5051

5152
```javascript
53+
var Object = require( '@stdlib/object/ctor' );
5254
var BigInt = require( '@stdlib/bigint/ctor' );
5355

5456
var bool = isBigInt.isPrimitive( BigInt( '1' ) );
@@ -63,6 +65,7 @@ bool = isBigInt.isPrimitive( Object( BigInt( '1' ) ) );
6365
Tests if a `value` is a [`BigInt`][mdn-bigint] object.
6466

6567
```javascript
68+
var Object = require( '@stdlib/object/ctor' );
6669
var BigInt = require( '@stdlib/bigint/ctor' );
6770

6871
var bool = isBigInt.isObject( BigInt( '1' ) );

is-class/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var isClass = require( '@stdlib/assert/is-class' );
3434

3535
Tests if a value is a [`class`][mdn-class].
3636

37-
<!-- eslint-disable max-classes-per-file, no-restricted-syntax -->
37+
<!-- eslint-disable max-classes-per-file, no-restricted-syntax, node/no-unsupported-features/es-syntax -->
3838

3939
```javascript
4040
var bool = isClass( class Animal {
@@ -68,7 +68,7 @@ bool = isClass( null );
6868

6969
<!-- eslint no-undef: "error" -->
7070

71-
<!-- eslint-disable no-restricted-syntax, no-empty-function -->
71+
<!-- eslint-disable no-restricted-syntax, no-empty-function, node/no-unsupported-features/es-syntax -->
7272

7373
```javascript
7474
var isClass = require( '@stdlib/assert/is-class' );

is-regexp/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ bool = isRegExp( {} );
5050

5151
## Examples
5252

53+
<!-- eslint-disable prefer-regex-literals -->
54+
5355
<!-- eslint no-undef: "error" -->
5456

5557
```javascript

0 commit comments

Comments
 (0)