From a078384eca5a725431f3183a4ae9a30d1d71103c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 20 Nov 2024 03:16:44 +0000 Subject: [PATCH] Auto-generated commit --- .github/workflows/test_published_package.yml | 105 ++++++++++++++++ CHANGELOG.md | 88 +++++++++++++ CONTRIBUTORS | 4 + README.md | 4 +- docs/types/index.d.ts | 125 ++++++++++++++++++- 5 files changed, 323 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/test_published_package.yml diff --git a/.github/workflows/test_published_package.yml b/.github/workflows/test_published_package.yml new file mode 100644 index 00000000..bf2f71ef --- /dev/null +++ b/.github/workflows/test_published_package.yml @@ -0,0 +1,105 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2024 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# Workflow name: +name: test_published_package + +# Workflow triggers: +on: + # Run workflow on a weekly schedule: + schedule: + # * is a special character in YAML so you have to quote this string + - cron: '25 13 * * 6' + + # Run workflow upon completion of `publish` workflow run: + workflow_run: + workflows: ["publish"] + types: [completed] + + # Allow workflow to be manually run: + workflow_dispatch: + +# Workflow jobs: +jobs: + test-published: + # Define a display name: + name: 'Test running examples of published package' + + # Define the type of virtual host machine: + runs-on: ubuntu-latest + + # Define environment variables: + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + + # Run workflow job if `publish` workflow run is successful or when the workflow is manually run: + if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} + + # Define the job's steps: + steps: + # Checkout the repository: + - name: 'Checkout repository' + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + + # Install Node.js: + - name: 'Install Node.js' + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 + with: + node-version: 20 + timeout-minutes: 5 + + # Create test directory and run examples: + - name: 'Create test directory and run examples' + run: | + cd .. + mkdir test-published + cd test-published + + # Copy example file: + cp $GITHUB_WORKSPACE/examples/index.js . + + # Create a minimal package.json + echo '{ + "name": "test-published", + "version": "1.0.0", + "main": "index.js", + "dependencies": {} + }' > package.json + + # Get package name and modify example file: + PACKAGE_NAME=$(jq -r '.name' $GITHUB_WORKSPACE/package.json) + ESCAPED_PACKAGE_NAME=$(echo "$PACKAGE_NAME" | sed 's/[\/&]/\\&/g') + + sed -i "s/require( '.\/..\/lib' )/require( '$ESCAPED_PACKAGE_NAME' )/g" index.js + + # Extract and install dependencies: + DEPS=$(grep -oP "require\(\s*'([^']+)'\s*\)" index.js | sed "s/require(\s*'//" | sed "s/'\s*)//" | grep -v "^\.") + for dep in $DEPS; do + npm install $dep --save + done + + # Run the example: + node index.js + + # Send Slack notification if job fails: + - name: 'Send notification to Slack in case of failure' + uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 + with: + status: ${{ job.status }} + channel: '#npm-ci' + if: failure() diff --git a/CHANGELOG.md b/CHANGELOG.md index 18585dd9..0de65df6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,94 @@ > Package changelog. +
+ +## Unreleased (2024-11-20) + +
+ +### Packages + +
+ +#### [@stdlib/assert](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/assert) + +
+ +
+ +##### Features + +- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec) - update namespace TypeScript declarations [(#3190)](https://github.com/stdlib-js/stdlib/pull/3190) + +
+ + + +
+ +##### BREAKING CHANGES + +- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec): update namespace declarations + + - To migrate, users should consult the corresponding packages containing the respective implementations to determine what is breaking. The primary breakages come from the `blas/*` namespace, where we recently refactored how top-level BLAS APIs operate on input arguments. + +
+ + + +
+ +
+ + + +
+ + + +
+ +### BREAKING CHANGES + +- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec): update namespace declarations + + - To migrate, users should consult the corresponding packages containing the respective implementations to determine what is breaking. The primary breakages come from the `blas/*` namespace, where we recently refactored how top-level BLAS APIs operate on input arguments. + +
+ + + +
+ +### Contributors + +A total of 1 person contributed to this release. Thank you to this contributor: + +- Philipp Burckhardt + +
+ + + +
+ +### Commits + +
+ +- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec) - **feat:** update namespace TypeScript declarations [(#3190)](https://github.com/stdlib-js/stdlib/pull/3190) _(by stdlib-bot, Philipp Burckhardt)_ + +
+ +
+ + + +
+ + +
## 0.3.3 (2024-11-05) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index c9f811ce..f09b30e6 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -59,6 +59,7 @@ Mohammad Kaif <98884589+Kaif987@users.noreply.github.com> Momtchil Momtchev Muhammad Haris Naresh Jagadeesan +Neeraj Pathak NightKnight Nithin Katta <88046362+nithinkatta@users.noreply.github.com> Nourhan Hasan <109472010+TheNourhan@users.noreply.github.com> @@ -69,6 +70,7 @@ Prajwal Kulkarni Pranav Goswami Praneki <97080887+PraneGIT@users.noreply.github.com> Pratik <97464067+Pratik772846@users.noreply.github.com> +Pratyush Kumar Chouhan Priyansh <88396544+itsspriyansh@users.noreply.github.com> Pushpendra Chandravanshi RISHAV <115060907+rishav2404@users.noreply.github.com> @@ -79,9 +81,11 @@ Ridam Garg <67867319+RidamGarg@users.noreply.github.com> Robert Gislason Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com> Rutam <138517416+performant23@users.noreply.github.com> +Ruthwik Chikoti <145591715+ruthwikchikoti@users.noreply.github.com> Ryan Seal Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com> SarthakPaandey <145528240+SarthakPaandey@users.noreply.github.com> +Saurabh Singh Seyyed Parsa Neshaei Shashank Shekhar Singh Shivam <11shivam00@gmail.com> diff --git a/README.md b/README.md index 584ad40b..24ea6894 100644 --- a/README.md +++ b/README.md @@ -593,8 +593,8 @@ Copyright © 2016-2024. 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.3.3 -[test-url]: https://github.com/stdlib-js/assert/actions/workflows/test.yml?query=branch:v0.3.3 +[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/docs/types/index.d.ts b/docs/types/index.d.ts index 5691c62c..d489b496 100644 --- a/docs/types/index.d.ts +++ b/docs/types/index.d.ts @@ -28,9 +28,11 @@ import hasArrayBufferSupport = require( './../../has-arraybuffer-support' ); import hasArrowFunctionSupport = require( './../../has-arrow-function-support' ); import hasAsyncAwaitSupport = require( './../../has-async-await-support' ); import hasAsyncIteratorSymbolSupport = require( './../../has-async-iterator-symbol-support' ); +import hasAtobSupport = require( './../../has-atob-support' ); import hasBigIntSupport = require( './../../has-bigint-support' ); import hasBigInt64ArraySupport = require( './../../has-bigint64array-support' ); import hasBigUint64ArraySupport = require( './../../has-biguint64array-support' ); +import hasBtoaSupport = require( './../../has-btoa-support' ); import hasClassSupport = require( './../../has-class-support' ); import hasDataViewSupport = require( './../../has-dataview-support' ); import hasDefinePropertiesSupport = require( './../../has-define-properties-support' ); @@ -143,6 +145,7 @@ import isEmptyObject = require( './../../is-empty-object' ); import isEmptyString = require( './../../is-empty-string' ); import isEnumerableProperty = require( './../../is-enumerable-property' ); import isEnumerablePropertyIn = require( './../../is-enumerable-property-in' ); +import isEqualArray = require( './../../is-equal-array' ); import isError = require( './../../is-error' ); import isEvalError = require( './../../is-eval-error' ); import isEven = require( './../../is-even' ); @@ -189,6 +192,7 @@ import isnan = require( './../../is-nan' ); import isNaNArray = require( './../../is-nan-array' ); import isNativeFunction = require( './../../is-native-function' ); import isndarrayLike = require( './../../is-ndarray-like' ); +import isndarrayLikeWithDataType = require( './../../is-ndarray-like-with-data-type' ); import isNegativeInteger = require( './../../is-negative-integer' ); import isNegativeIntegerArray = require( './../../is-negative-integer-array' ); import isNegativeNumber = require( './../../is-negative-number' ); @@ -257,6 +261,7 @@ import isRelativeURI = require( './../../is-relative-uri' ); import isSafeInteger = require( './../../is-safe-integer' ); import isSafeIntegerArray = require( './../../is-safe-integer-array' ); import isSameArray = require( './../../is-same-array' ); +import isSameArrayLike = require( './../../is-same-array-like' ); import isSameComplex64 = require( './../../is-same-complex64' ); import isSameComplex64Array = require( './../../is-same-complex64array' ); import isSameComplex128 = require( './../../is-same-complex128' ); @@ -305,6 +310,7 @@ import isUppercase = require( './../../is-uppercase' ); import isURI = require( './../../is-uri' ); import isURIError = require( './../../is-uri-error' ); import isVectorLike = require( './../../is-vector-like' ); +import isWebAssemblyMemory = require( './../../is-wasm-memory' ); import IS_WEB_WORKER = require( './../../is-web-worker' ); import isWhitespace = require( './../../is-whitespace' ); import IS_WINDOWS = require( './../../is-windows' ); @@ -550,6 +556,17 @@ interface Namespace { */ hasAsyncIteratorSymbolSupport: typeof hasAsyncIteratorSymbolSupport; + /** + * Tests for native `atob` support. + * + * @returns boolean indicating if an environment has `atob` support + * + * @example + * var bool = ns.hasAtobSupport(); + * // returns + */ + hasAtobSupport: typeof hasAtobSupport; + /** * Tests for native `BigInt` support. * @@ -583,6 +600,17 @@ interface Namespace { */ hasBigUint64ArraySupport: typeof hasBigUint64ArraySupport; + /** + * Tests for native `btoa` support. + * + * @returns boolean indicating if an environment has `btoa` support + * + * @example + * var bool = ns.hasBtoaSupport(); + * // returns + */ + hasBtoaSupport: typeof hasBtoaSupport; + /** * Tests for native `class` support. * @@ -2861,6 +2889,33 @@ interface Namespace { */ isEnumerablePropertyIn: typeof isEnumerablePropertyIn; + /** + * Tests if two arguments are both generic arrays and have equal values. + * + * ## Notes + * + * - The function performs strict equality comparison; thus, the function treats `-0` and `+0` as equal and `NaNs` as distinct. + * + * @param v1 - first input value + * @param v2 - second input value + * @returns boolean indicating whether two arguments are equal + * + * @example + * var x = [ 1.0, 2.0, 3.0 ]; + * var y = [ 1.0, 2.0, 3.0 ]; + * + * var out = ns.isEqualArray( x, y ); + * // returns true + * + * @example + * var x = [ 1.0, 2.0, 3.0 ]; + * var y = [ 1.0, 2.0, 4.0 ]; + * + * var out = ns.isEqualArray( x, y ); + * // returns false + */ + isEqualArray: typeof isEqualArray; + /** * Tests if a value is an `Error` object. * @@ -3341,7 +3396,7 @@ interface Namespace { /** * Tests whether a string contains only hexadecimal digits. * - * @param x - value to test + * @param value - value to test * @returns boolean indicating if a string contains only hexadecimal digits * * @example @@ -3916,6 +3971,26 @@ interface Namespace { */ isndarrayLike: typeof isndarrayLike; + /** + * Tests if a value is an ndarray-like object having a specified data type. + * + * @param v - value to test + * @param dtype - data type + * @returns boolean indicating if a value is an ndarray-like object having a specified data type + * + * @example + * var ndarray = require( '@stdlib/ndarray/ctor' ); + * + * var arr = ndarray( 'generic', [ 0, 0, 0, 0 ], [ 2, 2 ], [ 2, 1 ], 0, 'row-major' ); + * + * var bool = ns.isndarrayLikeWithDataType( arr, 'generic' ); + * // returns true + * + * bool = ns.isndarrayLikeWithDataType( [], 'generic' ); + * // returns false + */ + isndarrayLikeWithDataType: typeof isndarrayLikeWithDataType; + /** * Tests if a value is a negative integer. * @@ -5692,6 +5767,33 @@ interface Namespace { */ isSameArray: typeof isSameArray; + /** + * Tests if two arguments are both array-like and have the same values. + * + * ## Notes + * + * - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same. + * + * @param v1 - first input value + * @param v2 - second input value + * @returns boolean indicating whether two arguments are the same + * + * @example + * var x = [ 1.0, 2.0, 3.0 ]; + * var y = [ 1.0, 2.0, 3.0 ]; + * + * var out = ns.isSameArrayLike( x, y ); + * // returns true + * + * @example + * var x = [ 1.0, 2.0, 3.0 ]; + * var y = [ 1.0, 2.0, 4.0 ]; + * + * var out = ns.isSameArrayLike( x, y ); + * // returns false + */ + isSameArrayLike: typeof isSameArrayLike; + /** * Tests if two arguments are both single-precision complex floating-point numbers and have the same value. * @@ -6992,6 +7094,27 @@ interface Namespace { */ isVectorLike: typeof isVectorLike; + /** + * Tests if a value is a WebAssembly memory instance. + * + * @param value - value to test + * @returns boolean indicating whether value is a WebAssembly memory instance + * + * @example + * var Memory = require( '@stdlib/wasm/memory' ); + * + * var mem = new Memory({ + * 'initial': 0 + * }); + * var bool = ns.isWebAssemblyMemory( mem ); + * // returns true + * + * @example + * var bool = ns.isWebAssemblyMemory( [] ); + * // returns false + */ + isWebAssemblyMemory: typeof isWebAssemblyMemory; + /** * Boolean indicating if the runtime is a web worker. *