Skip to content

Commit 1823d26

Browse files
authored
Merge branch 'stdlib-js:develop' into develop
2 parents 5045a39 + afe5811 commit 1823d26

File tree

2,440 files changed

+163988
-8975
lines changed

Some content is hidden

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

2,440 files changed

+163988
-8975
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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: check_duplicate_prs
21+
22+
# Workflow triggers:
23+
on:
24+
# Run the workflow daily at 3 AM UTC:
25+
schedule:
26+
- cron: '0 3 * * *'
27+
28+
# Allow the workflow to be manually run:
29+
workflow_dispatch:
30+
inputs:
31+
debug:
32+
description: 'Enable debug output'
33+
required: false
34+
default: 'false'
35+
type: choice
36+
options:
37+
- 'true'
38+
- 'false'
39+
40+
# Global permissions:
41+
permissions:
42+
# Allow read-only access to the repository contents:
43+
contents: read
44+
45+
# Workflow jobs:
46+
jobs:
47+
48+
# Define a job for checking duplicate PRs...
49+
check_duplicates:
50+
51+
# Define a display name:
52+
name: 'Check Duplicate PRs'
53+
54+
# Ensure the job does not run on forks:
55+
if: github.repository == 'stdlib-js/stdlib'
56+
57+
# Define the type of virtual host machine:
58+
runs-on: ubuntu-latest
59+
60+
# Define the sequence of job steps...
61+
steps:
62+
# Checkout the repository:
63+
- name: 'Checkout repository'
64+
# Pin action to full length commit SHA
65+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
66+
with:
67+
# Ensure we have access to the scripts directory:
68+
sparse-checkout: |
69+
.github/workflows/scripts
70+
sparse-checkout-cone-mode: false
71+
timeout-minutes: 10
72+
73+
# Check for duplicate PRs:
74+
- name: 'Check for duplicate PRs'
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
77+
DEBUG: ${{ inputs.debug || 'false' }}
78+
run: |
79+
. "$GITHUB_WORKSPACE/.github/workflows/scripts/check_duplicate_prs"
80+
timeout-minutes: 15

.github/workflows/first_time_greeting.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020
name: first_time_greeting
2121

2222
# Workflow triggers:
23-
on: [pull_request_target, issues]
23+
on:
24+
pull_request_target:
25+
types: [opened]
26+
issues:
27+
types: [opened]
2428

2529
# Global permissions:
2630
permissions:
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
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+
# Limit clone depth to the most recent commit:
56+
fetch-depth: 1
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@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.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 -e "
105+
var generate = require( '@stdlib/_tools/changelog/generate' );
106+
var changelog = generate( '@stdlib', {
107+
'flags': {
108+
'since': '$UNTIL - 1 month',
109+
'until': '$UNTIL'
110+
},
111+
'format': 'aggregated'
112+
});
113+
console.log( changelog.content );
114+
115+
" > ./www-blog-monthly-changelog/monthly_changelog_${UNTIL//-/_}.md
116+
117+
# Import GPG key to sign commits:
118+
- name: 'Import GPG key to sign commits'
119+
# Pin action to full length commit SHA
120+
uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0
121+
with:
122+
gpg_private_key: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
123+
passphrase: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}
124+
git_user_signingkey: true
125+
git_commit_gpgsign: true
126+
127+
# Commit and push changes:
128+
- name: 'Commit and push changes'
129+
env:
130+
REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
131+
USER_NAME: stdlib-bot
132+
run: |
133+
cd ./www-blog-monthly-changelog
134+
git config --local user.email "[email protected]"
135+
git config --local user.name "stdlib-bot"
136+
git add .
137+
git commit -m "Add monthly changelog" || exit 0
138+
git push "https://$USER_NAME:[email protected]/stdlib-js/www-blog-monthly-changelog.git" main

.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_changed_files.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ jobs:
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

0 commit comments

Comments
 (0)