Skip to content

Commit 7dca603

Browse files
authored
Merge branch 'develop' into migrate-math-base-ops-imul
Signed-off-by: Athan <[email protected]>
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 <[email protected]> Khaldon
2828
2929
Ahmed Kashkoush <[email protected]> Ahmed_Kashkoush
3030

31+
Aksshay Balasubramanian <[email protected]> Aksshay88
32+
3133
3234
Aman Bhansali <[email protected]> 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 <[email protected]>
66
Aayush Khanna <[email protected]>
7+
Abdelrahman Samir <[email protected]>
8+
Abhay Punia <[email protected]>
79
Abhijit Raut <[email protected]>
810
Abhishek Jain <[email protected]>
911
Adarsh Palaskar <[email protected]>
1012
Aditya Sapra <[email protected]>
1113
Ahmed Atwa <[email protected]>
1214
Ahmed Kashkoush <[email protected]>
1315
Ahmed Khaled <[email protected]>
16+
Aksshay Balasubramanian <[email protected]>
1417
Aleksandr <[email protected]>
1518
Ali Salesi <[email protected]>
1619
Aman Bhansali <[email protected]>
1720
Amit Jimiwal <[email protected]>
21+
Anshu Kumar <[email protected]>
1822
Anudeep Sanapala <[email protected]>
1923
Athan Reines <[email protected]>
2024
@@ -30,6 +34,7 @@ Debashis Maharana <[email protected]>
3034
Desh Deepak Kant <[email protected]>
3135
3236
Dhruv Arvind Singh <[email protected]>
37+
Dhruvil Mehta <[email protected]>
3338
Divyansh Seth <[email protected]>
3439
Dominic Lim <[email protected]>
3540
Dominik Moritz <[email protected]>
@@ -45,8 +50,10 @@ Gururaj Gurram <[email protected]>
4550
4651
4752
Harshita Kalani <[email protected]>
53+
Hemant M Mehta <[email protected]>
4854
Hridyanshu <[email protected]>
4955
Jaimin Godhani <[email protected]>
56+
Jalaj Kumar <[email protected]>
5057
James Gelok <[email protected]>
5158
Jaysukh Makvana <[email protected]>
5259
Jenish Thapa <[email protected]>
@@ -78,6 +85,7 @@ Naresh Jagadeesan <[email protected]>
7885
Naveen Kumar <[email protected]>
7986
Neeraj Pathak <[email protected]>
8087
Nishant Shinde <[email protected]>
88+
Nishchay Rajput <[email protected]>
8189
Nithin Katta <[email protected]>
8290
Nourhan Hasan <[email protected]>
8391
Ognjen Jevremović <[email protected]>
@@ -122,6 +130,7 @@ Spandan Barve <[email protected]>
122130
Stephannie Jiménez Gacha <[email protected]>
123131
Suhaib Ilahi <[email protected]>
124132
Suraj Kumar <[email protected]>
133+
Tanishq Ahuja <[email protected]>
125134
Tirtadwipa Manunggal <[email protected]>
126135
Tudor Pagu <[email protected]>
127136
Tufailahmed Bargir <[email protected]>
@@ -137,6 +146,7 @@ Yaswanth Kosuru <[email protected]>
137146
Yernar Yergaziyev <[email protected]>
138147
Yugal Kaushik <[email protected]>
139148
Yuvi Mittal <[email protected]>
149+
140150
ekambains <[email protected]>
141151
fadiothman22 <[email protected]>
142152
olenkabilonizhka <[email protected]>

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)