Skip to content

Commit 7dca603

Browse files
authored
Merge branch 'develop' into migrate-math-base-ops-imul
Signed-off-by: Athan <kgryte@gmail.com>
2 parents b830e28 + 1229ea7 commit 7dca603

File tree

653 files changed

+27633
-1868
lines changed

Some content is hidden

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

653 files changed

+27633
-1868
lines changed

.github/workflows/autoclose.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,44 @@ jobs:
211211
This pull request has been automatically closed because it has been inactive for an extended period after changes were requested. If you still wish to pursue this contribution, feel free to reopen the pull request or submit a new one.
212212
213213
We appreciate your interest in contributing to stdlib!
214+
215+
# Define a job which closes a pull request if a PR has an inappropriate Git history:
216+
git_history:
217+
218+
# Define job name:
219+
name: 'Check for Git History label'
220+
221+
# Only run this job if the pull request has a specific label:
222+
if: "${{ github.event.label.name == 'autoclose: Git History' }}"
223+
224+
# Define job permissions:
225+
permissions:
226+
contents: read
227+
pull-requests: write
228+
229+
# Define the type of virtual host machine:
230+
runs-on: ubuntu-latest
231+
232+
# Define the sequence of job steps:
233+
steps:
234+
235+
# Close the pull request:
236+
- name: 'Close pull request'
237+
run: gh pr close "$NUMBER" --comment "$BODY"
238+
env:
239+
GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
240+
GH_REPO: ${{ github.repository }}
241+
NUMBER: ${{ github.event.pull_request.number }}
242+
BODY: |
243+
Thank you for working on this pull request. However, we cannot accept your contribution due to Git history issues.
244+
245+
Some common issues include:
246+
247+
- Merge conflicts
248+
- Inappropriate commit messages
249+
- Unrelated commits
250+
- Including changes from merged branches that weren't intended for this PR
251+
252+
We recommend opening a new pull request with only the intended changes.
253+
254+
Thank you for your interest in stdlib, and we look forward to your future contributions.

.github/workflows/check_commit_metadata.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ jobs:
4343
# Define the type of virtual host machine:
4444
runs-on: ubuntu-latest
4545

46-
# Skip this job for PRs opened by automated bot accounts:
47-
if: github.event.pull_request.user.login != 'stdlib-bot' && github.event.pull_request.user.login != 'dependabot[bot]'
46+
# Temporarily disable the entire workflow:
47+
if: false
4848

4949
# Define the sequence of job steps...
5050
steps:
@@ -66,7 +66,8 @@ jobs:
6666
# Extract commit metadata from commit messages as JSON:
6767
- name: 'Extract commit metadata'
6868
id: extract-metadata
69-
uses: stdlib-js/metadata-action@v2
69+
# Pin action to full length commit SHA
70+
uses: stdlib-js/metadata-action@3ccf68f24c51ae23470319e8e5619d539df8212b # v3.0.0
7071

7172
# Check commit metadata:
7273
- name: 'Check commit metadata'

.github/workflows/scripts/check_contributing_guidelines_acceptance

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ main() {
7272
fi
7373

7474
# Check for the contributing guidelines checkbox:
75-
if echo "${pr_body}" | grep -qE '^\s*-\s*\[x\]\s*Read,\s*understood,\s*and\s*followed\s*the\s*\[contributing\s*guidelines\]'; then
75+
if echo "${pr_body}" | grep -qE '^\s*-\s*\[[xX]\]\s*Read,\s*understood,\s*and\s*followed\s*the\s*\[contributing\s*guidelines\]'; then
7676
echo "Contributing guidelines acknowledged."
7777
print_success
7878
exit 0

.github/workflows/scripts/rate_limit_contributions

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,17 @@ main() {
123123
pr_details=$(github_api "GET" "/repos/${repo_owner}/${repo_name}/pulls/${pr_number}")
124124
good_first_pr=$(echo "${pr_details}" | jq -r '.labels | any(.name == "Good First PR")')
125125

126+
# Check if the PR is labeled "Good First PR":
127+
if [ "${good_first_pr}" != "true" ]; then
128+
echo "PR is not labeled 'Good First PR'."
129+
print_success
130+
exit 0
131+
fi
132+
126133
pr_author=$(echo "${pr_details}" | jq -r '.user.login')
127134

128135
# Fetch other PRs of the same user:
129-
user_prs=$(github_api "GET" "/search/issues?q=state%3Aopen+author%3A${pr_author}+type%3Apr")
136+
user_prs=$(github_api "GET" "/search/issues?q=repo%3A${repo_owner}%2F${repo_name}+state%3Aopen+author%3A${pr_author}+type%3Apr")
130137

131138
# Count number of PRs labeled "Good First PR":
132139
num_good_first_prs=$(echo "${user_prs}" | jq -r '.items | map( select( .labels | any( .name == "Good First PR" ))) | length')

.github/workflows/too_many_good_first_prs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,6 @@ jobs:
6969
- name: 'Prevent contributors from opening too many "Good First PR"s'
7070
env:
7171
PR_NUMBER: ${{ github.event.pull_request.number }}
72+
GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
7273
run: |
7374
. "$GITHUB_WORKSPACE/.github/workflows/scripts/rate_limit_contributions" $PR_NUMBER

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Ahmed Khaled <kahmd1444@gmail.com> Khaldon
2828
Ahmed Kashkoush <ahmedkashkoush464@gmail.com> <89735230+ahmad-kashkoush@users.noreply.github.com>
2929
Ahmed Kashkoush <ahmedkashkoush464@gmail.com> Ahmed_Kashkoush
3030

31+
Aksshay Balasubramanian <119944779+Aksshay88@users.noreply.github.com> Aksshay88
32+
3133
Aman Bhansali <bhansali.1@iitj.ac.in> <92033532+aman-095@users.noreply.github.com>
3234
Aman Bhansali <bhansali.1@iitj.ac.in> aman-095
3335

CONTRIBUTORS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,21 @@
44

55
Aadish Jain <jain.aadishj@gmail.com>
66
Aayush Khanna <aayushiitbhu23@gmail.com>
7+
Abdelrahman Samir <60700731+abdelrahman04@users.noreply.github.com>
8+
Abhay Punia <156515195+Hecker165@users.noreply.github.com>
79
Abhijit Raut <abhijitmraut8010@gmail.com>
810
Abhishek Jain <40913033+abhishekblue@users.noreply.github.com>
911
Adarsh Palaskar <adarshpalaskar99@gmail.com>
1012
Aditya Sapra <adityaework@gmail.com>
1113
Ahmed Atwa <Ahmedatwa866@yahoo.com>
1214
Ahmed Kashkoush <ahmedkashkoush464@gmail.com>
1315
Ahmed Khaled <kahmd1444@gmail.com>
16+
Aksshay Balasubramanian <119944779+Aksshay88@users.noreply.github.com>
1417
Aleksandr <112382387+alextes90@users.noreply.github.com>
1518
Ali Salesi <ali_sal1381@yahoo.com>
1619
Aman Bhansali <bhansali.1@iitj.ac.in>
1720
Amit Jimiwal <amitjimiwal45@gmail.com>
21+
Anshu Kumar <132515490+anxhukumar@users.noreply.github.com>
1822
Anudeep Sanapala <anudeep0306@gmail.com>
1923
Athan Reines <kgryte@gmail.com>
2024
Ayaka <73595362+USERSATOSHI@users.noreply.github.com>
@@ -30,6 +34,7 @@ Debashis Maharana <debashismaharana7854@gmail.com>
3034
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
3135
Dev Goel <135586571+corsairier@users.noreply.github.com>
3236
Dhruv Arvind Singh <154677013+DhruvArvindSingh@users.noreply.github.com>
37+
Dhruvil Mehta <68022411+dhruvilmehta@users.noreply.github.com>
3338
Divyansh Seth <59174836+sethdivyansh@users.noreply.github.com>
3439
Dominic Lim <46486515+domlimm@users.noreply.github.com>
3540
Dominik Moritz <domoritz@gmail.com>
@@ -45,8 +50,10 @@ Gururaj Gurram <gururajgurram1512@gmail.com>
4550
Harsh <149176984+hrshya@users.noreply.github.com>
4651
HarshaNP <96897754+GittyHarsha@users.noreply.github.com>
4752
Harshita Kalani <harshitakalani02@gmail.com>
53+
Hemant M Mehta <92446645+hemantmm@users.noreply.github.com>
4854
Hridyanshu <124202756+HRIDYANSHU054@users.noreply.github.com>
4955
Jaimin Godhani <112328542+Jai0401@users.noreply.github.com>
56+
Jalaj Kumar <142599224+jalajk3004@users.noreply.github.com>
5057
James Gelok <jdgelok@gmail.com>
5158
Jaysukh Makvana <jaysukhmakvana2004@gmail.com>
5259
Jenish Thapa <141203631+jenish-thapa@users.noreply.github.com>
@@ -78,6 +85,7 @@ Naresh Jagadeesan <naresh.naresh000@gmail.com>
7885
Naveen Kumar <stupiddint@gmail.com>
7986
Neeraj Pathak <neerajrpathak710@gmail.com>
8087
Nishant Shinde <97207366+nishant-s7@users.noreply.github.com>
88+
Nishchay Rajput <121144841+NishchayRajput@users.noreply.github.com>
8189
Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
8290
Nourhan Hasan <109472010+TheNourhan@users.noreply.github.com>
8391
Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
@@ -122,6 +130,7 @@ Spandan Barve <contact@marsian.dev>
122130
Stephannie Jiménez Gacha <steff456@hotmail.com>
123131
Suhaib Ilahi <suhaib.elahi87@gmail.com>
124132
Suraj Kumar <125961509+kumarsuraj212003@users.noreply.github.com>
133+
Tanishq Ahuja <68651083+TheGEN1U5@users.noreply.github.com>
125134
Tirtadwipa Manunggal <tirtadwipa.manunggal@gmail.com>
126135
Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
127136
Tufailahmed Bargir <142114244+Tufailahmed-Bargir@users.noreply.github.com>
@@ -137,6 +146,7 @@ Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com>
137146
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
138147
Yugal Kaushik <yugalkaushik14@gmail.com>
139148
Yuvi Mittal <128018763+yuvi-mittal@users.noreply.github.com>
149+
ditsu <170345142+ditsus@users.noreply.github.com>
140150
ekambains <bainsinbusiness@gmail.com>
141151
fadiothman22 <48636283+fadiothman22@users.noreply.github.com>
142152
olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com>

etc/eslint/rules/stdlib.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4229,6 +4229,30 @@ rules[ 'stdlib/no-internal-require' ] = 'error';
42294229
*/
42304230
rules[ 'stdlib/no-multiple-empty-lines' ] = 'error';
42314231

4232+
/**
4233+
* Disallow usage of the built-in global `BigInt` literal syntax and constructor.
4234+
*
4235+
* @name no-builtin-big-int
4236+
* @memberof rules
4237+
* @type {string}
4238+
* @default 'error'
4239+
*
4240+
* @example
4241+
* // Bad...
4242+
* var x = BigInt( 123 );
4243+
* console.log( typeof x );
4244+
* // => 'bigint'
4245+
*
4246+
* @example
4247+
* // Good...
4248+
* var BigInt = require( '@stdlib/bigint/ctor' );
4249+
*
4250+
* var x = BigInt( 123 );
4251+
* console.log( typeof x );
4252+
* // => 'bigint'
4253+
*/
4254+
rules[ 'stdlib/no-builtin-big-int' ] = 'error';
4255+
42324256
/**
42334257
* Disallow usage of the built-in global `Math` object.
42344258
*

lib/node_modules/@stdlib/_tools/eslint/rules/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ var eslint = rules;
6565
- <span class="signature">[`new-cap-array`][@stdlib/_tools/eslint/rules/new-cap-array]</span><span class="delimiter">: </span><span class="description">ESLint rule enforcing that the `Array` constructor is invoked with the `new` keyword.</span>
6666
- <span class="signature">[`new-cap-error`][@stdlib/_tools/eslint/rules/new-cap-error]</span><span class="delimiter">: </span><span class="description">ESLint rule enforcing that error constructors are invoked with the `new` keyword.</span>
6767
- <span class="signature">[`new-cap-regexp`][@stdlib/_tools/eslint/rules/new-cap-regexp]</span><span class="delimiter">: </span><span class="description">ESLint rule enforcing that the `RegExp` constructor is invoked with the `new` keyword.</span>
68+
- <span class="signature">[`no-builtin-big-int`][@stdlib/_tools/eslint/rules/no-builtin-big-int]</span><span class="delimiter">: </span><span class="description">ESLint rule disallowing the use of the built-in global `BigInt` literal syntax and constructor.</span>
6869
- <span class="signature">[`no-builtin-math`][@stdlib/_tools/eslint/rules/no-builtin-math]</span><span class="delimiter">: </span><span class="description">ESLint rule enforcing that `stdlib` equivalents are used instead of the built-in global `Math` object.</span>
6970
- <span class="signature">[`no-dynamic-exports`][@stdlib/_tools/eslint/rules/no-dynamic-exports]</span><span class="delimiter">: </span><span class="description">ESLint rule enforcing that only statically analyzable values are exported.</span>
7071
- <span class="signature">[`no-dynamic-require`][@stdlib/_tools/eslint/rules/no-dynamic-require]</span><span class="delimiter">: </span><span class="description">ESLint rule enforcing that `require()` calls have only string literals as arguments.</span>
@@ -397,6 +398,8 @@ console.log( getKeys( rules ) );
397398

398399
[@stdlib/_tools/eslint/rules/new-cap-regexp]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/_tools/eslint/rules/new-cap-regexp
399400

401+
[@stdlib/_tools/eslint/rules/no-builtin-big-int]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/_tools/eslint/rules/no-builtin-big-int
402+
400403
[@stdlib/_tools/eslint/rules/no-builtin-math]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/_tools/eslint/rules/no-builtin-math
401404

402405
[@stdlib/_tools/eslint/rules/no-dynamic-exports]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/_tools/eslint/rules/no-dynamic-exports

lib/node_modules/@stdlib/_tools/eslint/rules/lib/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,15 @@ setReadOnly( rules, 'new-cap-error', require( '@stdlib/_tools/eslint/rules/new-c
837837
*/
838838
setReadOnly( rules, 'new-cap-regexp', require( '@stdlib/_tools/eslint/rules/new-cap-regexp' ) );
839839

840+
/**
841+
* @name no-builtin-big-int
842+
* @memberof rules
843+
* @readonly
844+
* @type {Function}
845+
* @see {@link module:@stdlib/_tools/eslint/rules/no-builtin-big-int}
846+
*/
847+
setReadOnly( rules, 'no-builtin-big-int', require( '@stdlib/_tools/eslint/rules/no-builtin-big-int' ) );
848+
840849
/**
841850
* @name no-builtin-math
842851
* @memberof rules

0 commit comments

Comments
 (0)