From ba8e3acfe8822e4d623dfffe10091f39bfbf45d9 Mon Sep 17 00:00:00 2001 From: stdlib-bot <noreply@stdlib.io> Date: Thu, 9 Nov 2023 08:23:10 +0000 Subject: [PATCH] Auto-generated commit --- .github/workflows/publish.yml | 52 ++--------------------------------- README.md | 4 +-- is-bigint/README.md | 3 ++ is-class/README.md | 4 +-- is-regexp/README.md | 2 ++ 5 files changed, 11 insertions(+), 54 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0037bdbc..e4a7c7c6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,7 @@ #/ # @license Apache-2.0 # -# Copyright (c) 2021 The Stdlib Authors. +# Copyright (c) 2023 The Stdlib Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ jobs: publish: # Define display name: - name: 'Publish package to npm' + name: 'Publish top-level package to npm' # Define the type of virtual host machine on which to run the job: runs-on: ubuntu-latest @@ -103,54 +103,6 @@ jobs: SLUG=${{ github.repository }} git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" --follow-tags - # Remove CLI: - - name: 'Remove CLI' - if: ${{ github.ref == 'refs/heads/main' }} - run: | - # Exit if the package does not have a CLI: - if ! grep -q '"bin":' package.json; then - exit 0 - fi - rm -rf ./bin/cli - rm -f test/test.cli.js - rm -f etc/cli_opts.json - rm -f docs/usage.txt - - # For all dependencies, check in all *.js files if they are still used; if not, remove them: - jq -r '.dependencies | keys[]' ./package.json | while read -r dep; do - dep=$(echo "$dep" | xargs) - if ! grep -q "$dep" lib/** && ! grep -q -s "$dep" manifest.json && ! grep -q -s "$dep" include.gypi; then - jq --indent 2 "del(.dependencies[\"$dep\"])" ./package.json > ./package.json.tmp - mv ./package.json.tmp ./package.json - fi - done - jq -r '.devDependencies | keys[]' ./package.json | while read -r dep; do - if [[ "$dep" != "@stdlib"* ]]; then - continue - fi - dep=$(echo "$dep" | xargs) - if ! grep -q "$dep" lib/** && ! grep -q -s "$dep" manifest.json && ! grep -q -s "$dep" include.gypi; then - jq --indent 2 "del(.devDependencies[\"$dep\"])" ./package.json > ./package.json.tmp - mv ./package.json.tmp ./package.json - fi - done - - # Remove CLI section: - find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?<section class=\"cli\">[\s\S]+?<\!\-\- \/.cli \-\->//" - - # Remove CLI from package.json: - jq -r 'del(.bin)' package.json > package.json.tmp - mv package.json.tmp package.json - - # Add entry for CLI package to See Also section of README.md: - cliPkgName=$(jq -r '.name' package.json)-cli - escapedPkg=$(echo "$cliPkgName" | sed -e 's/\//\\\//g') - escapedPkg=$(echo "$escapedPkg" | sed -e 's/\@/\\\@/g') - 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/" - - # Add link definition for CLI package to README.md: - 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/" - # Replace GitHub MathJax equations with SVGs: - name: 'Replace GitHub MathJax equations with SVGs' run: | diff --git a/README.md b/README.md index 84c34b69..758a2903 100644 --- a/README.md +++ b/README.md @@ -577,8 +577,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. [npm-image]: http://img.shields.io/npm/v/@stdlib/assert.svg [npm-url]: https://npmjs.org/package/@stdlib/assert -[test-image]: https://github.com/stdlib-js/assert/actions/workflows/test.yml/badge.svg?branch=v0.1.1 -[test-url]: https://github.com/stdlib-js/assert/actions/workflows/test.yml?query=branch:v0.1.1 +[test-image]: https://github.com/stdlib-js/assert/actions/workflows/test.yml/badge.svg?branch=main +[test-url]: https://github.com/stdlib-js/assert/actions/workflows/test.yml?query=branch:main [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/assert/main.svg [coverage-url]: https://codecov.io/github/stdlib-js/assert?branch=main diff --git a/is-bigint/README.md b/is-bigint/README.md index 93f27582..b866eb9c 100644 --- a/is-bigint/README.md +++ b/is-bigint/README.md @@ -35,6 +35,7 @@ var isBigInt = require( '@stdlib/assert/is-bigint' ); Tests if a value is a [`BigInt`][mdn-bigint]. ```javascript +var Object = require( '@stdlib/object/ctor' ); var BigInt = require( '@stdlib/bigint/ctor' ); var bool = isBigInt( BigInt( '1' ) ); @@ -49,6 +50,7 @@ bool = isBigInt( Object( BigInt( '1' ) ) ); Tests if a `value` is a primitive [`BigInt`][mdn-bigint]. ```javascript +var Object = require( '@stdlib/object/ctor' ); var BigInt = require( '@stdlib/bigint/ctor' ); var bool = isBigInt.isPrimitive( BigInt( '1' ) ); @@ -63,6 +65,7 @@ bool = isBigInt.isPrimitive( Object( BigInt( '1' ) ) ); Tests if a `value` is a [`BigInt`][mdn-bigint] object. ```javascript +var Object = require( '@stdlib/object/ctor' ); var BigInt = require( '@stdlib/bigint/ctor' ); var bool = isBigInt.isObject( BigInt( '1' ) ); diff --git a/is-class/README.md b/is-class/README.md index d93282c4..a13ff8cc 100644 --- a/is-class/README.md +++ b/is-class/README.md @@ -34,7 +34,7 @@ var isClass = require( '@stdlib/assert/is-class' ); Tests if a value is a [`class`][mdn-class]. -<!-- eslint-disable max-classes-per-file, no-restricted-syntax --> +<!-- eslint-disable max-classes-per-file, no-restricted-syntax, node/no-unsupported-features/es-syntax --> ```javascript var bool = isClass( class Animal { @@ -68,7 +68,7 @@ bool = isClass( null ); <!-- eslint no-undef: "error" --> -<!-- eslint-disable no-restricted-syntax, no-empty-function --> +<!-- eslint-disable no-restricted-syntax, no-empty-function, node/no-unsupported-features/es-syntax --> ```javascript var isClass = require( '@stdlib/assert/is-class' ); diff --git a/is-regexp/README.md b/is-regexp/README.md index 60475f04..afd107a7 100644 --- a/is-regexp/README.md +++ b/is-regexp/README.md @@ -50,6 +50,8 @@ bool = isRegExp( {} ); ## Examples +<!-- eslint-disable prefer-regex-literals --> + <!-- eslint no-undef: "error" --> ```javascript