Skip to content

Commit e3276a9

Browse files
committed
Auto-generated commit
1 parent b0db621 commit e3276a9

File tree

4 files changed

+203
-1
lines changed

4 files changed

+203
-1
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2024 The Stdlib Authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#/
18+
19+
# Workflow name:
20+
name: test_published_package
21+
22+
# Workflow triggers:
23+
on:
24+
# Run workflow on a weekly schedule:
25+
schedule:
26+
# * is a special character in YAML so you have to quote this string
27+
- cron: '30 6 * * 1'
28+
29+
# Run workflow upon completion of `publish` workflow run:
30+
workflow_run:
31+
workflows: ["publish"]
32+
types: [completed]
33+
34+
# Allow workflow to be manually run:
35+
workflow_dispatch:
36+
37+
# Workflow jobs:
38+
jobs:
39+
test-published:
40+
# Define a display name:
41+
name: 'Test running examples of published package'
42+
43+
# Define the type of virtual host machine:
44+
runs-on: ubuntu-latest
45+
46+
# Define environment variables:
47+
env:
48+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
49+
50+
# Run workflow job if `publish` workflow run is successful or when the workflow is manually run:
51+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
52+
53+
# Define the job's steps:
54+
steps:
55+
# Checkout the repository:
56+
- name: 'Checkout repository'
57+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
58+
59+
# Install Node.js:
60+
- name: 'Install Node.js'
61+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
62+
with:
63+
node-version: 20
64+
timeout-minutes: 5
65+
66+
# Create test directory and run examples:
67+
- name: 'Create test directory and run examples'
68+
run: |
69+
cd ..
70+
mkdir test-published
71+
cd test-published
72+
73+
# Copy example file:
74+
cp $GITHUB_WORKSPACE/examples/index.js .
75+
76+
# Create a minimal package.json
77+
echo '{
78+
"name": "test-published",
79+
"version": "1.0.0",
80+
"main": "index.js",
81+
"dependencies": {}
82+
}' > package.json
83+
84+
# Get package name and modify example file:
85+
PACKAGE_NAME=$(jq -r '.name' $GITHUB_WORKSPACE/package.json)
86+
ESCAPED_PACKAGE_NAME=$(echo "$PACKAGE_NAME" | sed 's/[\/&]/\\&/g')
87+
88+
sed -i "s/require( '.\/..\/lib' )/require( '$ESCAPED_PACKAGE_NAME' )/g" index.js
89+
90+
# Extract and install dependencies:
91+
DEPS=$(grep -oP "require\(\s*'([^']+)'\s*\)" index.js | sed "s/require(\s*'//" | sed "s/'\s*)//" | grep -v "^\.")
92+
for dep in $DEPS; do
93+
npm install $dep --save
94+
done
95+
96+
# Run the example:
97+
node index.js
98+
99+
# Send Slack notification if job fails:
100+
- name: 'Send notification to Slack in case of failure'
101+
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
102+
with:
103+
status: ${{ job.status }}
104+
channel: '#npm-ci'
105+
if: failure()

CHANGELOG.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2024-10-08)
7+
## Unreleased (2024-11-20)
88

99
<section class="packages">
1010

@@ -20,6 +20,7 @@
2020

2121
##### Features
2222

23+
- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec) - update namespace TypeScript declarations [(#3190)](https://github.com/stdlib-js/stdlib/pull/3190)
2324
- [`43aa58f`](https://github.com/stdlib-js/stdlib/commit/43aa58f81dcad604f11a5715a1546c015b0a9623) - add `isByteOrder` to namespace
2425
- [`81b39fe`](https://github.com/stdlib-js/stdlib/commit/81b39fec06b8575149b2ab1b834a7577e6ac5e5d) - add `hasEqualValuesIndexed` to namespace
2526
- [`cc56538`](https://github.com/stdlib-js/stdlib/commit/cc5653806325fe7b63037dfa49108be8016de3fc) - add `hasEqualValues` to namespace
@@ -28,6 +29,18 @@
2829

2930
<!-- /.features -->
3031

32+
<section class="breaking-changes">
33+
34+
##### BREAKING CHANGES
35+
36+
- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec): update namespace declarations
37+
38+
- 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.
39+
40+
</section>
41+
42+
<!-- /.breaking-changes -->
43+
3144
</details>
3245

3346
</section>
@@ -104,6 +117,18 @@
104117

105118
<!-- /.packages -->
106119

120+
<section class="breaking-changes">
121+
122+
### BREAKING CHANGES
123+
124+
- [`8b1548f`](https://github.com/stdlib-js/stdlib/commit/8b1548fb45c1ff131f5edac20cb984344a2d28ec): update namespace declarations
125+
126+
- 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.
127+
128+
</section>
129+
130+
<!-- /.breaking-changes -->
131+
107132
<section class="contributors">
108133

109134
### Contributors
@@ -124,6 +149,7 @@ A total of 3 people contributed to this release. Thank you to the following cont
124149

125150
<details>
126151

152+
- [`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)_
127153
- [`c00f27a`](https://github.com/stdlib-js/stdlib/commit/c00f27afb4b1853a7f4377fbbab7aec1dab9e34c) - **docs:** improve examples of `array/base/assert` namespace _(by Soumajit Chatterjee, Philipp Burckhardt)_
128154
- [`43aa58f`](https://github.com/stdlib-js/stdlib/commit/43aa58f81dcad604f11a5715a1546c015b0a9623) - **feat:** add `isByteOrder` to namespace _(by Athan Reines)_
129155
- [`b18478e`](https://github.com/stdlib-js/stdlib/commit/b18478e236e9cb6991d5a0f952d217e043e46587) - **feat:** add `array/base/assert/is-byte-order` _(by Athan Reines)_

CONTRIBUTORS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Contributors listed in alphabetical order.
44

55
Aayush Khanna <[email protected]>
6+
AbhijitRaut04 <[email protected]>
67
Adarsh Palaskar <[email protected]>
78
Aditya Sapra <[email protected]>
89
AgPriyanshu18 <[email protected]>
@@ -22,12 +23,14 @@ Dan Rose <[email protected]>
2223
Daniel Killenberger <[email protected]>
2324
Daniel Yu <[email protected]>
2425
Debashis Maharana <[email protected]>
26+
Dominic Lim <[email protected]>
2527
Dominik Moritz <[email protected]>
2628
Dorrin Sotoudeh <[email protected]>
2729
EuniceSim142 <[email protected]>
2830
Frank Kovacs <[email protected]>
2931
Golden Kumar <[email protected]>
3032
Gunj Joshi <[email protected]>
33+
Gururaj Gurram <[email protected]>
3134
3235
Harshita Kalani <[email protected]>
3336
Hridyanshu <[email protected]>
@@ -44,6 +47,7 @@ Justin Dennison <[email protected]>
4447
Kaif Mohd <[email protected]>
4548
Karthik Prakash <[email protected]>
4649
50+
Kohantika Nath <[email protected]>
4751
Krishnendu Das <[email protected]>
4852
4953
Manik Sharma <[email protected]>
@@ -55,6 +59,7 @@ Mohammad Kaif <[email protected]>
5559
Momtchil Momtchev <[email protected]>
5660
Muhammad Haris <[email protected]>
5761
Naresh Jagadeesan <[email protected]>
62+
Neeraj Pathak <[email protected]>
5863
NightKnight <[email protected]>
5964
Nithin Katta <[email protected]>
6065
Nourhan Hasan <[email protected]>
@@ -65,18 +70,22 @@ Prajwal Kulkarni <[email protected]>
6570
Pranav Goswami <[email protected]>
6671
6772
73+
Pratyush Kumar Chouhan <[email protected]>
6874
6975
Pushpendra Chandravanshi <[email protected]>
76+
7077
Raunak Kumar Gupta <[email protected]>
7178
Rejoan Sardar <[email protected]>
7279
Ricky Reusser <[email protected]>
7380
Ridam Garg <[email protected]>
7481
Robert Gislason <[email protected]>
7582
Roman Stetsyk <[email protected]>
7683
84+
Ruthwik Chikoti <[email protected]>
7785
Ryan Seal <[email protected]>
7886
Sai Srikar Dumpeti <[email protected]>
7987
SarthakPaandey <[email protected]>
88+
Saurabh Singh <[email protected]>
8089
Seyyed Parsa Neshaei <[email protected]>
8190
Shashank Shekhar Singh <[email protected]>
8291
@@ -94,6 +103,7 @@ Tudor Pagu <[email protected]>
94103
Tufailahmed Bargir <[email protected]>
95104
Utkarsh <http://[email protected]>
96105
Utkarsh Raj <[email protected]>
106+
UtkershBasnet <[email protected]>
97107
Vaibhav Patel <[email protected]>
98108
Varad Gupta <[email protected]>
99109
Xiaochuan Ye <[email protected]>

docs/types/index.d.ts

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@
2121
/* eslint-disable max-lines */
2222

2323
import contains = require( '@stdlib/array-base-assert-contains' );
24+
import hasEqualValues = require( '@stdlib/array-base-assert-has-equal-values' );
25+
import hasEqualValuesIndexed = require( '@stdlib/array-base-assert-has-equal-values-indexed' );
2426
import hasSameValues = require( '@stdlib/array-base-assert-has-same-values' );
2527
import isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' );
2628
import isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' );
2729
import isBooleanArray = require( '@stdlib/array-base-assert-is-booleanarray' );
30+
import isByteOrder = require( '@stdlib/array-base-assert-is-byte-order' );
2831
import isComplexFloatingPointDataType = require( '@stdlib/array-base-assert-is-complex-floating-point-data-type' );
2932
import isComplexTypedArray = require( '@stdlib/array-base-assert-is-complex-typed-array' );
3033
import isComplex64Array = require( '@stdlib/array-base-assert-is-complex64array' );
@@ -69,6 +72,46 @@ interface Namespace {
6972
*/
7073
contains: typeof contains;
7174

75+
/**
76+
* Tests if two arrays have equal values.
77+
*
78+
* ## Notes
79+
*
80+
* - If provided arrays of unequal length, the function returns `false`.
81+
*
82+
* @param x - first input array
83+
* @param y - second input array
84+
* @returns boolean indicating whether both arrays have equal values
85+
*
86+
* @example
87+
* var x = [ 0, 0, 1, 0 ];
88+
* var y = [ 0, 0, 1, 0 ];
89+
*
90+
* var out = ns.hasEqualValues( x, y );
91+
* // returns true
92+
*/
93+
hasEqualValues: typeof hasEqualValues;
94+
95+
/**
96+
* Tests if two indexed arrays have equal values.
97+
*
98+
* ## Notes
99+
*
100+
* - If provided arrays of unequal length, the function returns `false`.
101+
*
102+
* @param x - first input array
103+
* @param y - second input array
104+
* @returns boolean indicating whether both arrays have equal values
105+
*
106+
* @example
107+
* var x = [ 0, 0, 1, 0 ];
108+
* var y = [ 0, 0, 1, 0 ];
109+
*
110+
* var out = ns.hasEqualValuesIndexed( x, y );
111+
* // returns true
112+
*/
113+
hasEqualValuesIndexed: typeof hasEqualValuesIndexed;
114+
72115
/**
73116
* Tests if two arrays have the same values.
74117
*
@@ -178,6 +221,24 @@ interface Namespace {
178221
*/
179222
isBooleanArray: typeof isBooleanArray;
180223

224+
/**
225+
* Tests whether an input value is a supported array byte order.
226+
*
227+
* @param v - value to test
228+
* @returns boolean indicating whether an input value is a supported array byte order
229+
*
230+
* @example
231+
* var bool = ns.isByteOrder( 'little-endian' );
232+
* // returns true
233+
*
234+
* bool = ns.isByteOrder( 'big-endian' );
235+
* // returns true
236+
*
237+
* bool = ns.isByteOrder( 'foo' );
238+
* // returns false
239+
*/
240+
isByteOrder: typeof isByteOrder;
241+
181242
/**
182243
* Tests whether an input value is a supported array complex-valued floating-point data type.
183244
*

0 commit comments

Comments
 (0)