Skip to content

Commit ba49e38

Browse files
Merge branch 'develop' of https://github.com/Neerajpathak07/stdlib into object/none-in-by
2 parents f436338 + 39a5bf0 commit ba49e38

File tree

1,971 files changed

+110535
-10613
lines changed

Some content is hidden

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

1,971 files changed

+110535
-10613
lines changed

.github/workflows/check_licenses.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
# Install Node.js:
8282
- name: 'Install Node.js'
8383
# Pin action to full length commit SHA
84-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
84+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
8585
with:
8686
node-version: '20' # 'lts/*'
8787
timeout-minutes: 5
@@ -128,7 +128,7 @@ jobs:
128128
# Upload the log file:
129129
- name: 'Upload log file'
130130
# Pin action to full length commit SHA
131-
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
131+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
132132
if: always()
133133
with:
134134
# Define a name for the uploaded artifact:

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
# Install Node.js:
122122
- name: 'Install Node.js'
123123
# Pin action to full length commit SHA
124-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
124+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
125125
with:
126126
node-version: '20' # 'lts/*'
127127
timeout-minutes: 5

.github/workflows/first_time_greeting.yml

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

46+
# Only run this job if the pull request did not have label `automated-pr` and is not from bots:
47+
if: >
48+
contains(github.event.pull_request.labels.*.name, 'automated-pr') == false &&
49+
github.event.pull_request.user.login != 'stdlib-bot' &&
50+
github.event.pull_request.user.login != 'dependabot[bot]'
51+
4652
# Define the sequence of job steps...
4753
steps:
4854

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2025 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: generate_monthly_changelog
21+
22+
# Workflow triggers:
23+
on:
24+
# Run the workflow at midnight UTC on the first day of each month:
25+
schedule:
26+
- cron: '0 0 1 * *'
27+
28+
# Allow the workflow to be manually run:
29+
workflow_dispatch:
30+
31+
# Global permissions:
32+
permissions:
33+
# Allow read-only access to the repository contents:
34+
contents: read
35+
36+
# Workflow jobs:
37+
jobs:
38+
# Generate a monthly changelog:
39+
generate-monthly-changelog:
40+
# Define a display name:
41+
name: 'Generate Monthly Changelog'
42+
43+
# Define the type of virtual host machine:
44+
runs-on: ubuntu-latest
45+
46+
# Workflow steps:
47+
steps:
48+
- name: 'Checkout source repository'
49+
# Pin action to full length commit SHA
50+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
51+
with:
52+
# Specify whether to remove untracked files before checking out the repository:
53+
clean: false
54+
55+
# Fetch entire history so that we are guaranteed to have all commit messages for the last month:
56+
fetch-depth: 0
57+
58+
# Token for accessing the repository:
59+
token: ${{ secrets.STDLIB_BOT_FGPAT_REPO_READ }}
60+
61+
# Avoid storing GitHub token in local Git configuration:
62+
persist-credentials: false
63+
64+
# Install Node.js:
65+
- name: 'Install Node.js'
66+
# Pin action to full length commit SHA
67+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
68+
with:
69+
node-version: '20' # 'lts/*'
70+
timeout-minutes: 5
71+
72+
# Install dependencies (accounting for possible network failures, etc, when installing node module dependencies):
73+
- name: 'Install dependencies'
74+
run: |
75+
make install-node-modules || make install-node-modules || make install-node-modules
76+
timeout-minutes: 15
77+
78+
- name: 'Checkout monthly changelog repository'
79+
# Pin action to full length commit SHA
80+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
81+
with:
82+
# Monthly changelog repository:
83+
repository: 'stdlib-js/www-blog-monthly-changelog'
84+
85+
# File path to checkout to:
86+
path: './www-blog-monthly-changelog'
87+
88+
# Specify whether to remove untracked files before checking out the repository:
89+
clean: false
90+
91+
# Limit clone depth to the most recent commit:
92+
fetch-depth: 1
93+
94+
# Token for accessing the repository:
95+
token: ${{ secrets.STDLIB_BOT_FGPAT_REPO_READ }}
96+
97+
# Avoid storing GitHub token in local Git configuration:
98+
persist-credentials: false
99+
100+
# Generate changelog for last month:
101+
- name: 'Generate changelog for last month'
102+
run: |
103+
UNTIL=$(date +"%Y-%m-01")
104+
node lib/node_modules/@stdlib/_tools/scripts/generate_monthly_changelog.js > ./www-blog-monthly-changelog/monthly_changelog_${UNTIL//-/_}.md
105+
106+
# Import GPG key to sign commits:
107+
- name: 'Import GPG key to sign commits'
108+
# Pin action to full length commit SHA
109+
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
110+
with:
111+
gpg_private_key: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
112+
passphrase: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}
113+
git_user_signingkey: true
114+
git_commit_gpgsign: true
115+
116+
# Commit and push changes:
117+
- name: 'Commit and push changes'
118+
env:
119+
REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
120+
USER_NAME: stdlib-bot
121+
run: |
122+
cd ./www-blog-monthly-changelog
123+
git config --local user.email "82920195+stdlib-bot@users.noreply.github.com"
124+
git config --local user.name "stdlib-bot"
125+
git add .
126+
git commit -m "Add monthly changelog" || exit 0
127+
git push "https://$USER_NAME:$REPO_GITHUB_TOKEN@github.com/stdlib-js/www-blog-monthly-changelog.git" main

.github/workflows/generate_pr_commit_message.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,23 @@ jobs:
8282
# Ensure the script itself doesn't fail the workflow:
8383
exit 0
8484
85+
# Check if the commit message already exists in the PR comments:
86+
- name: 'Check if commit message already exists in PR comments'
87+
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
88+
id: fc
89+
with:
90+
issue-number: ${{ github.event.pull_request.number }}
91+
body-includes: '<!-- PR_COMMIT_MESSAGE -->'
92+
8593
# Post commit message as PR comment:
8694
- name: 'Post commit message as PR comment'
8795
# Pin action to full length commit SHA
8896
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
8997
with:
9098
token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
99+
comment-id: ${{ steps.fc.outputs.comment-id }}
91100
issue-number: ${{ github.event.pull_request.number }}
101+
edit-mode: replace
92102
body: |
93103
### PR Commit Message
94104
@@ -99,3 +109,5 @@ jobs:
99109
*Please review the above commit message and make any necessary adjustments.*
100110
101111
${{ steps.commit_message.outputs.has_tracking_issue == 'true' && '⚠️ **Action Required**: This PR references tracking issues. Please update the PR description to replace any "Closes", "Fixes", or "Resolves" keywords with "Ref" when referencing these issues.' || '' }}
112+
113+
<!-- PR_COMMIT_MESSAGE -->

.github/workflows/git_note_filter_packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ name: git_note_filter_packages
2323
on:
2424
# Allow the workflow to be manually run:
2525
workflow_dispatch:
26-
# Define the input parameters for the workflow:a
26+
# Define the input parameters for the workflow:
2727
inputs:
2828
commit_hash:
2929
description: 'Commit hash to create note for'

.github/workflows/lint_autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
# Install Node.js:
9999
- name: 'Install Node.js'
100100
# Pin action to full length commit SHA
101-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
101+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
102102
with:
103103
node-version: '20' # 'lts/*'
104104
timeout-minutes: 5

.github/workflows/lint_changed_files.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ jobs:
6767
# Install Node.js:
6868
- name: 'Install Node.js'
6969
# Pin action to full length commit SHA
70-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
70+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
7171
with:
7272
node-version: '20' # 'lts/*'
7373
timeout-minutes: 5
7474

75-
# Cache dependencies:
76-
- name: 'Cache dependencies'
75+
# Restore cache if up-to-date:
76+
- name: 'Restore cache if up-to-date'
7777
# Pin action to full length commit SHA
78-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
78+
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
7979
id: cache
8080
with:
8181
path: |
@@ -135,6 +135,14 @@ jobs:
135135
run: |
136136
make lint-editorconfig-files EDITORCONFIG_FORMAT=github-actions FILES="${{ steps.changed-files.outputs.files }}"
137137
138+
# Save cache after editorconfig-checker binary has been downloaded:
139+
- name: 'Save cache after editorconfig-checker binary has been downloaded'
140+
if: always() && steps.cache.outputs.cache-hit != 'true'
141+
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
142+
with:
143+
path: ${{ github.workspace }}/node_modules
144+
key: ${{ steps.cache.outputs.cache-primary-key }}
145+
138146
# Lint Markdown files:
139147
- name: 'Lint Markdown files'
140148
if: success() || failure()
@@ -148,7 +156,7 @@ jobs:
148156
- name: 'Lint shell script files'
149157
if: success() || failure()
150158
run: |
151-
files=$(echo "${{ steps.random-files.outputs.files }}" | tr ' ' '\n' | grep -vE '\.(js|md|json|ts|c|h)$' | while read -r file; do head -n1 "$file" | grep -q '^\#\!/usr/bin/env bash' && echo "$file"; done | tr '\n' ' ' | sed 's/ $//')
159+
files=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | grep -vE '\.(js|md|json|ts|c|h)$' | while read -r file; do head -n1 "$file" | grep -q '^\#\!/usr/bin/env bash' && echo "$file"; done | tr '\n' ' ' | sed 's/ $//')
152160
if [[ -n "${files}" ]]; then
153161
# Install shellcheck:
154162
make install-deps-shellcheck

.github/workflows/lint_pr_title.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
# Install Node.js:
7373
- name: 'Install Node.js'
7474
# Pin action to full length commit SHA
75-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
75+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
7676
with:
7777
node-version: '20' # 'lts/*'
7878
timeout-minutes: 5

.github/workflows/lint_random_files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
# Install Node.js:
109109
- name: 'Install Node.js'
110110
# Pin action to full length commit SHA
111-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
111+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
112112
with:
113113
node-version: '20' # 'lts/*'
114114
timeout-minutes: 5

0 commit comments

Comments
 (0)