Skip to content

Commit 2f44f17

Browse files
committedMay 1, 2022
Auto-generated commit
1 parent f4a7489 commit 2f44f17

18 files changed

+943
-426
lines changed
 

‎.github/.keepalive

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2022-04-01T01:55:16.973Z
1+
2022-05-01T01:29:32.375Z

‎.github/workflows/benchmark.yml

+25-5
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,42 @@ name: benchmark
2121

2222
# Workflow triggers:
2323
on:
24+
# Allow the workflow to be manually run:
2425
workflow_dispatch:
2526

2627
# Workflow jobs:
2728
jobs:
29+
30+
# Define a job to run benchmarks:
2831
benchmark:
29-
runs-on: ubuntu-latest
32+
33+
# Define a display name:
34+
name: 'Run benchmarks'
35+
36+
# Define the type of virtual host machine:
37+
runs-on: 'ubuntu-latest'
38+
39+
# Define the sequence of job steps...
3040
steps:
31-
- uses: actions/checkout@v3
32-
- uses: actions/setup-node@v2
41+
42+
# Checkout the repository:
43+
- name: 'Checkout repository'
44+
uses: actions/checkout@v3
45+
46+
# Install Node.js:
47+
- name: 'Install Node.js'
48+
uses: actions/setup-node@v2
3349
with:
3450
node-version: 16
3551
timeout-minutes: 5
36-
- name: Install production and development dependencies
52+
53+
# Install dependencies:
54+
- name: 'Install production and development dependencies'
3755
run: |
3856
npm install || npm install || npm install
3957
timeout-minutes: 15
40-
- name: Run benchmarks
58+
59+
# Run benchmarks:
60+
- name: 'Run benchmarks'
4161
run: |
4262
npm run benchmark

‎.github/workflows/bundle.yml

+299-59
Large diffs are not rendered by default.

‎.github/workflows/cancel.yml

+17-2
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,30 @@ name: cancel
2121

2222
# Workflow triggers:
2323
on:
24+
# Allow the workflow to be manually run:
2425
workflow_dispatch:
2526

2627
# Workflow jobs:
2728
jobs:
29+
30+
# Define a job to cancel existing workflow runs:
2831
cancel:
29-
runs-on: ubuntu-latest
32+
33+
# Define a display name:
34+
name: 'Cancel workflow runs'
35+
36+
# Define the type of virtual host machine:
37+
runs-on: 'ubuntu-latest'
38+
39+
# Time limit:
3040
timeout-minutes: 3
41+
42+
# Define the sequence of job steps...
3143
steps:
32-
- uses: styfle/cancel-workflow-action@0.9.0
44+
45+
# Cancel existing workflow runs:
46+
- name: 'Cancel existing workflow runs'
47+
uses: styfle/cancel-workflow-action@0.9.0
3348
with:
3449
workflow_id: >-
3550
benchmark.yml,

‎.github/workflows/close_pull_requests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#/
1818

1919
# Workflow name:
20-
name: Close Pull Requests
20+
name: close_pull_requests
2121

2222
# Workflow triggers:
2323
on:

‎.github/workflows/examples.yml

+24-4
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,42 @@ name: examples
2121

2222
# Workflow triggers:
2323
on:
24+
# Allow the workflow to be manually run:
2425
workflow_dispatch:
2526

2627
# Workflow jobs:
2728
jobs:
29+
30+
# Define a job to run the package examples...
2831
examples:
32+
33+
# Define display name:
34+
name: 'Run examples'
35+
36+
# Define the type of virtual host machine on which to run the job:
2937
runs-on: ubuntu-latest
38+
39+
# Define the sequence of job steps...
3040
steps:
31-
- uses: actions/checkout@v3
32-
- uses: actions/setup-node@v2
41+
42+
# Checkout the repository:
43+
- name: 'Checkout the repository'
44+
uses: actions/checkout@v3
45+
46+
# Install Node.js:
47+
- name: 'Install Node.js'
48+
uses: actions/setup-node@v2
3349
with:
3450
node-version: 16
3551
timeout-minutes: 5
36-
- name: Install production and development dependencies
52+
53+
# Install dependencies:
54+
- name: 'Install production and development dependencies'
3755
run: |
3856
npm install || npm install || npm install
3957
timeout-minutes: 15
40-
- name: Run examples
58+
59+
# Run examples:
60+
- name: 'Run examples'
4161
run: |
4262
npm run examples

‎.github/workflows/npm_downloads.yml

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2022 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: npm_downloads
21+
22+
# Workflow triggers:
23+
on:
24+
# Run this workflow weekly:
25+
schedule:
26+
# cron: '<minutes> <hours> <day_of_month> <month> <day_of_week>'
27+
- cron: '0 8 * * 6'
28+
29+
# Allow the workflow to be manually run:
30+
workflow_dispatch:
31+
32+
# Workflow jobs:
33+
jobs:
34+
35+
# Define a job for retrieving npm download counts...
36+
npm_downloads:
37+
38+
# Define display name:
39+
name: 'Retrieve npm download counts'
40+
41+
# Define the type of virtual host machine on which to run the job:
42+
runs-on: ubuntu-latest
43+
44+
# Define the sequence of job steps...
45+
steps:
46+
# Checkout the repository:
47+
- name: 'Checkout repository'
48+
uses: actions/checkout@v3
49+
timeout-minutes: 10
50+
51+
# Install Node.js:
52+
- name: 'Install Node.js'
53+
uses: actions/setup-node@v2
54+
with:
55+
node-version: 16
56+
timeout-minutes: 5
57+
58+
# Resolve package name:
59+
- name: 'Resolve package name'
60+
id: package_name
61+
run: |
62+
name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'`
63+
echo "::set-output name=package_name::$name"
64+
timeout-minutes: 5
65+
66+
# Fetch download data:
67+
- name: 'Fetch data'
68+
id: download_data
69+
run: |
70+
url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}"
71+
echo "$url"
72+
data=$(curl "$url")
73+
mkdir ./tmp
74+
echo "$data" > ./tmp/npm_downloads.json
75+
echo "::set-output name=data::$data"
76+
timeout-minutes: 5
77+
78+
# Upload the download data:
79+
- name: 'Upload data'
80+
uses: actions/upload-artifact@v2
81+
with:
82+
# Define a name for the uploaded artifact (ensuring a unique name for each job):
83+
name: npm_downloads
84+
85+
# Specify the path to the file to upload:
86+
path: ./tmp/npm_downloads.json
87+
88+
# Specify the number of days to retain the artifact (default is 90 days):
89+
retention-days: 90
90+
timeout-minutes: 10
91+
if: success()
92+
93+
# Send data to events server:
94+
- name: 'Post data'
95+
uses: distributhor/workflow-webhook@v2
96+
env:
97+
webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }}
98+
webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }}
99+
data: '{ "downloads": ${{ steps.download_data.outputs.data }} }'
100+
timeout-minutes: 5
101+
if: success()

‎.github/workflows/productionize.yml

+160
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2022 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: productionize
21+
22+
# Workflow triggers:
23+
on:
24+
# Run workflow when a new commit is pushed to the repository:
25+
push:
26+
27+
# Allow the workflow to be manually run:
28+
workflow_dispatch:
29+
30+
# Workflow jobs:
31+
jobs:
32+
33+
# Define a job to create a production build...
34+
productionize:
35+
36+
# Define display name:
37+
name: 'Productionize'
38+
39+
# Define the type of virtual host machine:
40+
runs-on: 'ubuntu-latest'
41+
42+
# Define the sequence of job steps...
43+
steps:
44+
# Checkout main branch of repository:
45+
- name: 'Checkout main branch'
46+
uses: actions/checkout@v3
47+
with:
48+
ref: main
49+
50+
# Install Node.js:
51+
- name: 'Install Node.js'
52+
uses: actions/setup-node@v2
53+
with:
54+
node-version: 16
55+
timeout-minutes: 5
56+
57+
# Create production branch:
58+
- name: 'Create production branch'
59+
run: |
60+
git checkout -b production
61+
62+
# Transform error messages:
63+
- name: 'Transform error messages'
64+
id: transform-error-messages
65+
uses: stdlib-js/transform-errors-action@main
66+
67+
# Format error messages:
68+
- name: 'Replace double quotes with single quotes in rewritten format string error messages'
69+
run: |
70+
find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \;
71+
72+
# Format string literal error messages:
73+
- name: 'Replace double quotes with single quotes in rewritten string literal error messages'
74+
run: |
75+
find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \;
76+
77+
# Format code:
78+
- name: 'Replace double quotes with single quotes in inserted `require` calls'
79+
run: |
80+
find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \;
81+
82+
# Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency:
83+
- name: 'Update dependencies in package.json'
84+
run: |
85+
if grep -q '"@stdlib/string-format"' package.json; then
86+
sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json
87+
else
88+
node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );"
89+
fi
90+
91+
# Configure git:
92+
- name: 'Configure git'
93+
run: |
94+
git config --local user.email "noreply@stdlib.io"
95+
git config --local user.name "stdlib-bot"
96+
97+
# Commit changes:
98+
- name: 'Commit changes'
99+
run: |
100+
git add -A
101+
git commit -m "Transform error messages"
102+
103+
# Push changes:
104+
- name: 'Push changes'
105+
run: |
106+
SLUG=${{ github.repository }}
107+
echo "Pushing changes to $SLUG..."
108+
git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force
109+
110+
# Define a job for running tests of the productionized code...
111+
test:
112+
113+
# Define a display name:
114+
name: 'Run Tests'
115+
116+
# Define the type of virtual host machine:
117+
runs-on: 'ubuntu-latest'
118+
119+
# Indicate that this job depends on the prior job finishing:
120+
needs: test
121+
122+
# Run this job regardless of the outcome of the prior job:
123+
if: always()
124+
125+
# Define the sequence of job steps...
126+
steps:
127+
128+
# Checkout the repository:
129+
- name: 'Checkout repository'
130+
uses: actions/checkout@v3
131+
with:
132+
# Use the `production` branch:
133+
ref: production
134+
135+
# Install Node.js:
136+
- name: 'Install Node.js'
137+
uses: actions/setup-node@v2
138+
with:
139+
node-version: 16
140+
timeout-minutes: 5
141+
142+
# Install dependencies:
143+
- name: 'Install production and development dependencies'
144+
id: install
145+
run: |
146+
npm install || npm install || npm install
147+
timeout-minutes: 15
148+
149+
# Build native add-on if present:
150+
- name: 'Build native add-on (if present)'
151+
run: |
152+
if [ -f "binding.gyp" ]; then
153+
npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild
154+
fi
155+
156+
# Run tests:
157+
- name: 'Run tests'
158+
id: tests
159+
run: |
160+
npm test || npm test || npm test

‎.github/workflows/publish.yml

+72-14
Original file line numberDiff line numberDiff line change
@@ -21,73 +21,131 @@ name: publish
2121

2222
# Workflow triggers:
2323
on:
24+
# Run workflow when a new tag is pushed to the repository:
2425
push:
2526
tags: v[0-9]+.[0-9]+.[0-9]+
2627

2728
# Workflow jobs:
2829
jobs:
30+
31+
# Define job to publish package to npm:
2932
publish:
33+
34+
# Define display name:
35+
name: 'Publish to npm'
36+
37+
# Define the type of virtual host machine on which to run the job:
3038
runs-on: ubuntu-latest
39+
40+
# Define environment variables:
3141
env:
3242
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
43+
44+
# Define the sequence of job steps...
3345
steps:
34-
- uses: actions/checkout@v3
35-
- uses: actions/setup-node@v2
46+
47+
# Checkout the repository:
48+
- name: 'Checkout repository'
49+
uses: actions/checkout@v3
50+
51+
# Install Node.js:
52+
- name: 'Install Node.js'
53+
uses: actions/setup-node@v2
3654
with:
3755
node-version: 16
3856
timeout-minutes: 5
39-
- name: Replace all GitHub links to individual packages with npm links
57+
58+
# Replace GitHub links to individual packages with npm links:
59+
- name: 'Replace all GitHub links to individual packages with npm links'
4060
run: |
4161
find . -type f -name '*.md' -print0 | xargs -0 sed -Ei '/tree\/main/b; s/@stdlib\/([^:]*)\]: https:\/\/github.com\/stdlib-js/@stdlib\/\1\]: https:\/\/www.npmjs.com\/package\/@stdlib/g'
42-
- name: Replace list with links to other branches from installation section
62+
63+
# Replace list with links to other branches from installation section:
64+
- name: 'Replace list with links to other branches from installation section'
4365
run: |
4466
find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`\n\nAlternatively,[^<]+<\/section>/\`\`\`\n\n<\/section>/"
45-
- name: Replace all stdlib GitHub dependencies with the respective npm packages
67+
68+
# Replace all stdlib GitHub dependencies with the respective npm packages:
69+
- name: 'Replace all stdlib GitHub dependencies with the respective npm packages'
4670
run: |
4771
find package.json -type f -print0 | xargs -0 sed -Ei 's/"github:stdlib-js[^"]*"/"^0.0.x"/g'
48-
- name: Publish package to npm
72+
73+
# Publish package to npm:
74+
- name: 'Publish package to npm'
4975
uses: JS-DevTools/npm-publish@v1
5076
with:
5177
token: ${{ secrets.NPM_TOKEN }}
5278
access: public
53-
- name: Discard any uncommitted changes
79+
80+
# Discard any uncommitted changes:
81+
- name: 'Discard any uncommitted changes'
5482
run: |
5583
git reset --hard
56-
- uses: act10ns/slack@v1
84+
85+
# Send status to Slack channel if job fails:
86+
- name: 'Send status to Slack channel in case of failure'
87+
uses: act10ns/slack@v1
5788
with:
5889
status: ${{ job.status }}
5990
steps: ${{ toJson(steps) }}
6091
channel: '#npm-ci'
6192
if: failure()
93+
94+
# Define job to increment semver version and commit the changes to main branch...
6295
increment:
96+
97+
# Define the type of virtual host machine on which to run the job:
6398
runs-on: ubuntu-latest
99+
100+
# Define the sequence of job steps...
64101
steps:
65-
- name: Checkout main branch
102+
103+
# Checkout main branch of repository:
104+
- name: 'Checkout main branch'
66105
uses: actions/checkout@v3
67106
with:
68107
ref: main
69-
- name: Increment version in `package.json` to the version number of the tag
108+
109+
# Increment version:
110+
- name: 'Increment version in `package.json` to the version number of the tag'
70111
run: |
71112
VERSION=$(echo ${{ github.ref }} | sed -E 's/refs\/tags\/v?([0-9]+.[0-9]+.[0-9]+).*/\1/')
72113
sed -Ei "s/\"version\": \"[^\"]+\"/\"version\": \"$VERSION\"/g" package.json
73-
- name: Configure git
114+
115+
# Configure git:
116+
- name: 'Configure git'
74117
run: |
75118
git config --local user.email "noreply@stdlib.io"
76119
git config --local user.name "stdlib-bot"
77-
- name: Commit changes
120+
121+
# Commit changes:
122+
- name: 'Commit changes'
78123
run: |
79124
git add package.json
80125
git commit -m "Auto-generated commit"
81-
- name: Push changes
126+
127+
# Push changes:
128+
- name: 'Push changes'
82129
run: |
83130
SLUG=${{ github.repository }}
84131
echo "Pushing changes to $SLUG..."
85132
git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" main
133+
134+
# Define job to cancel any running or queued workflow runs...
86135
cancel:
136+
137+
# Define the type of virtual host machine on which to run the job:
87138
runs-on: ubuntu-latest
139+
140+
# Time out the job after 3 minutes:
88141
timeout-minutes: 3
142+
143+
# Define the sequence of job steps...
89144
steps:
90-
- uses: styfle/cancel-workflow-action@0.9.0
145+
146+
# Cancel any running or queued workflow runs:
147+
- name: 'Cancel running or queued workflow runs'
148+
uses: styfle/cancel-workflow-action@0.9.0
91149
with:
92150
workflow_id: >-
93151
benchmark.yml,

‎.github/workflows/test.yml

+37-7
Original file line numberDiff line numberDiff line change
@@ -21,39 +21,69 @@ name: test
2121

2222
# Workflow triggers:
2323
on:
24+
# Run workflow on a weekly schedule:
2425
schedule:
2526
# * is a special character in YAML so you have to quote this string
2627
- cron: '30 1 * * 6'
28+
29+
# Allow the workflow to be manually run:
2730
workflow_dispatch:
31+
32+
# Run workflow on each push:
2833
push:
2934

3035
# Workflow jobs:
3136
jobs:
37+
38+
# Define job to run tests...
3239
test:
33-
runs-on: ubuntu-latest
40+
41+
# Define display name:
42+
name: 'Run tests'
43+
44+
# Define the type of virtual host machine:
45+
runs-on: 'ubuntu-latest'
46+
47+
# Define environment variables:
3448
env:
3549
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
50+
51+
# Define the sequence of job steps...
3652
steps:
37-
- uses: actions/checkout@v3
38-
- uses: actions/setup-node@v2
53+
54+
# Checkout the repository:
55+
- name: 'Checkout repository'
56+
uses: actions/checkout@v3
57+
58+
# Install Node.js:
59+
- name: 'Install Node.js'
60+
uses: actions/setup-node@v2
3961
with:
4062
node-version: 16
4163
timeout-minutes: 5
42-
- name: Install production and development dependencies
64+
65+
# Install dependencies:
66+
- name: 'Install production and development dependencies'
4367
id: install
4468
run: |
4569
npm install || npm install || npm install
4670
timeout-minutes: 15
47-
- name: Build native add-on (if present)
71+
72+
# Build native add-on if present:
73+
- name: 'Build native add-on (if present)'
4874
run: |
4975
if [ -f "binding.gyp" ]; then
5076
npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild
5177
fi
52-
- name: Run tests
78+
79+
# Run tests:
80+
- name: 'Run tests'
5381
id: tests
5482
run: |
5583
npm test || npm test || npm test
56-
- name: Send status to Slack channel in case of failure
84+
85+
# Send status to Slack channel if job fails:
86+
- name: 'Send status to Slack channel in case of failure'
5787
uses: act10ns/slack@v1
5888
with:
5989
status: ${{ job.status }}

‎.github/workflows/test_bundles.yml

+72-13
Original file line numberDiff line numberDiff line change
@@ -21,76 +21,135 @@ name: test_bundles
2121

2222
# Workflow triggers:
2323
on:
24+
# Run workflow upon completion of `bundle` workflow run:
2425
workflow_run:
25-
workflows: ["test"]
26+
workflows: ["bundle"]
2627
types: [completed]
28+
29+
# Allow workflow to be manually run:
2730
workflow_dispatch:
2831

2932
# Workflow jobs:
3033
jobs:
34+
35+
# Define job to test UMD bundles...
3136
test-umd:
37+
38+
# Define display name:
39+
name: 'Test UMD Bundles'
40+
41+
# Define the type of virtual host machine on which to run the job:
3242
runs-on: ubuntu-latest
43+
44+
# Define environment variables:
3345
env:
3446
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
47+
48+
# Define the sequence of job steps...
3549
steps:
36-
- name: Checkout branch with UMD build
50+
# Checkout UMD branch of the repository:
51+
- name: 'Checkout branch with UMD build'
3752
uses: actions/checkout@v3
3853
with:
3954
ref: umd
40-
- name: Setup Node.js
55+
56+
# Install Node.js:
57+
- name: 'Install Node.js'
4158
uses: actions/setup-node@v2
4259
with:
4360
node-version: 17
44-
- name: Try loading UMD module
61+
62+
# Try loading the UMD bundle:
63+
- name: 'Try loading UMD bundle'
4564
run: |
4665
node --eval "require( './bundle.js' )" || exit $?
47-
- name: Send status to Slack channel in case of failure
66+
67+
# Send notification to Slack channel if job fails:
68+
- name: 'Send status to Slack channel in case of failure'
4869
uses: act10ns/slack@v1
4970
with:
5071
status: ${{ job.status }}
5172
steps: ${{ toJson(steps) }}
5273
channel: '#npm-ci'
5374
if: failure()
75+
76+
# Define job to test ES modules...
5477
test-esm:
78+
79+
# Define display name:
80+
name: 'Test ES Modules'
81+
82+
# Define the type of virtual host machine on which to run the job:
5583
runs-on: ubuntu-latest
84+
85+
# Define environment variables:
5686
env:
5787
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
88+
89+
# Define the sequence of job steps...
5890
steps:
59-
- name: Checkout branch with ESM build
91+
92+
# Checkout ES modules branch of the repository:
93+
- name: 'Checkout branch with ESM build'
6094
uses: actions/checkout@v3
6195
with:
6296
ref: esm
63-
- name: Setup Node.js
97+
98+
# Install Node.js:
99+
- name: 'Install Node.js'
64100
uses: actions/setup-node@v2
65101
with:
66102
node-version: 17
67-
- name: Try loading ESM
103+
104+
# Try loading the ES module bundle:
105+
- name: 'Try loading ESM'
68106
run: |
69107
node --experimental-network-imports --eval "import( './index.mjs' )" || exit $?
70-
- name: Send status to Slack channel in case of failure
108+
109+
# Send notification to Slack channel if job fails:
110+
- name: 'Send status to Slack channel in case of failure'
71111
uses: act10ns/slack@v1
72112
with:
73113
status: ${{ job.status }}
74114
steps: ${{ toJson(steps) }}
75115
channel: '#npm-ci'
76116
if: failure()
117+
118+
# Define job to test Deno bundles...
77119
test-deno:
120+
121+
# Define display name:
122+
name: 'Test Deno Bundles'
123+
124+
# Define the type of virtual host machine on which to run the job:
78125
runs-on: ubuntu-latest
126+
127+
# Define environment variables:
79128
env:
80129
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
130+
131+
# Define the sequence of job steps...
81132
steps:
82-
- name: Checkout branch with Deno build
133+
134+
# Checkout Deno branch of the repository:
135+
- name: 'Checkout branch with Deno build'
83136
uses: actions/checkout@v3
84137
with:
85138
ref: deno
86-
- name: Install Deno
139+
140+
# Install Deno:
141+
- name: 'Install Deno'
87142
uses: denoland/setup-deno@v1
88143
with:
89144
deno-version: vx.x.x
90-
- name: Try loading Deno build
145+
146+
# Try loading the Deno bundle:
147+
- name: 'Try loading Deno build'
91148
run: |
92149
deno eval "import main from './mod.js'" || exit $?
93-
- name: Send status to Slack channel in case of failure
150+
151+
# Send notification to Slack channel if job fails:
152+
- name: 'Send status to Slack channel in case of failure'
94153
uses: act10ns/slack@v1
95154
with:
96155
status: ${{ job.status }}

‎.github/workflows/test_coverage.yml

+43-10
Original file line numberDiff line numberDiff line change
@@ -21,53 +21,86 @@ name: test_coverage
2121

2222
# Workflow triggers:
2323
on:
24+
# Run workflow upon completion of `test` workflow run:
2425
workflow_run:
2526
workflows: ["test"]
2627
types: [completed]
28+
29+
# Allow workflow to be manually run:
2730
workflow_dispatch:
2831

2932
# Workflow jobs:
3033
jobs:
31-
test:
34+
35+
# Define job to run test coverage...
36+
coverage:
37+
38+
# Display name:
39+
name: 'Calculate Test Coverage'
40+
41+
# Define the type of virtual host machine on which to run the job:
3242
runs-on: ubuntu-latest
43+
44+
# Define the sequence of job steps...
3345
steps:
34-
- uses: actions/checkout@v3
35-
- uses: actions/setup-node@v2
46+
47+
# Checkout the repository:
48+
- name: 'Checkout repository'
49+
uses: actions/checkout@v3
50+
51+
# Install Node.js:
52+
- name: 'Install Node.js'
53+
uses: actions/setup-node@v2
3654
with:
3755
node-version: 16
3856
timeout-minutes: 5
39-
- name: Install production and development dependencies
57+
58+
# Install dependencies:
59+
- name: 'Install production and development dependencies'
4060
run: |
4161
npm install || npm install || npm install
4262
timeout-minutes: 15
43-
- name: Build native add-on (if present)
63+
64+
# Build native add-on if present:
65+
- name: 'Build native add-on (if present)'
4466
run: |
4567
if [ -f "binding.gyp" ]; then
4668
npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild
4769
fi
48-
- name: Calculate test coverage
70+
71+
# Calculate coverage:
72+
- name: 'Calculate test coverage'
4973
run: |
5074
npm run test-cov || npm run test-cov || npm run test-cov
5175
timeout-minutes: 15
52-
- name: Upload coverage to Codecov
76+
77+
# Upload coverage report to Codecov:
78+
- name: 'Upload coverage to Codecov'
5379
id: upload
5480
uses: codecov/codecov-action@v2
5581
with:
5682
directory: reports/coverage
5783
flags: unittests
5884
fail_ci_if_error: true
59-
- name: Extract coverage value and assign to output
85+
86+
# Extract coverage value:
87+
- name: 'Extract coverage value and assign to output'
6088
id: extract-coverage
6189
run: |
6290
coverage=`cat reports/coverage/lcov-report/index.html | grep "fraction" | grep -oP '\d+/\d+' | printf %s "$(cat)" | jq -R -s -c 'split("\n")'`
6391
echo "::set-output name=coverage::$coverage"
64-
- uses: act10ns/slack@v1
92+
93+
# Send Slack notification if job fails:
94+
- name: 'Send status to Slack channel in case of failure'
95+
uses: act10ns/slack@v1
6596
with:
6697
status: ${{ job.status }}
6798
steps: ${{ toJson(steps) }}
6899
channel: '#npm-ci'
69100
if: failure()
70-
- name: Send Webhook with status to stdlib backend
101+
102+
# Send data to events server:
103+
- name: 'Post data'
71104
uses: distributhor/workflow-webhook@v2
72105
env:
73106
webhook_url: ${{ secrets.STDLIB_COVERAGE_URL }}

‎.github/workflows/test_install.yml

+33-5
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,60 @@ name: test_install
2121

2222
# Workflow triggers:
2323
on:
24+
# Run workflow on a weekly schedule:
2425
schedule:
2526
# * is a special character in YAML so you have to quote this string
2627
- cron: '30 1 * * 6'
28+
29+
# Run workflow upon completion of `publish` workflow run:
2730
workflow_run:
2831
workflows: ["publish"]
2932
types: [completed]
33+
34+
# Allow workflow to be manually run:
3035
workflow_dispatch:
3136

3237
# Workflow jobs:
3338
jobs:
34-
on-success:
39+
40+
# Define job to test installing dependencies...
41+
test-install:
42+
43+
# Define display name:
44+
name: 'Test installing dependencies'
45+
46+
# Define the type of virtual host machine on which to run the job:
3547
runs-on: ubuntu-latest
48+
49+
# Define environment variables:
3650
env:
3751
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
52+
53+
# Run workflow job if `publish` workflow run is successful or when the workflow is manually run:
3854
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
55+
56+
# Define the sequence of job steps...
3957
steps:
40-
- uses: actions/checkout@v3
41-
- uses: actions/setup-node@v2
58+
59+
# Checkout the repository:
60+
- name: 'Checkout repository'
61+
uses: actions/checkout@v3
62+
63+
# Install Node.js:
64+
- name: 'Install Node.js'
65+
uses: actions/setup-node@v2
4266
with:
4367
node-version: 16
4468
timeout-minutes: 5
45-
- name: Install production dependencies via npm
69+
70+
# Install dependencies:
71+
- name: 'Install production dependencies via npm'
4672
run: |
4773
npm install --only=prod || npm install --only=prod || npm install --only=prod
4874
timeout-minutes: 15
49-
- name: Send notification to Slack in case of failure
75+
76+
# Send Slack notification if job fails:
77+
- name: 'Send notification to Slack in case of failure'
5078
uses: act10ns/slack@v1
5179
with:
5280
status: ${{ job.status }}

‎.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ CONTRIBUTING.md
2424
CONTRIBUTORS
2525
TODO.md
2626
ROADMAP.md
27+
branches.md
2728
.postinstall.json
2829
Makefile
2930

‎LICENSE

-304
Original file line numberDiff line numberDiff line change
@@ -175,307 +175,3 @@
175175
of your accepting any such warranty or additional liability.
176176

177177
END OF TERMS AND CONDITIONS
178-
179-
180-
181-
Boost Software License - Version 1.0 - August 17th, 2003
182-
183-
Permission is hereby granted, free of charge, to any person or organization
184-
obtaining a copy of the software and accompanying documentation covered by this
185-
license (the "Software") to use, reproduce, display, distribute, execute, and
186-
transmit the Software, and to prepare derivative works of the Software, and to
187-
permit third-parties to whom the Software is furnished to do so, all subject to
188-
the following:
189-
190-
The copyright notices in the Software and this entire statement, including the
191-
above license grant, this restriction and the following disclaimer, must be
192-
included in all copies of the Software, in whole or in part, and all derivative
193-
works of the Software, unless such copies or derivative works are solely in the
194-
form of machine-executable object code generated by a source language processor.
195-
196-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
197-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
198-
FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
199-
COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES
200-
OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
201-
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
202-
203-
204-
205-
206-
DEPENDENCIES
207-
208-
The library links against the following external libraries, which have their own
209-
licenses:
210-
211-
* OpenBLAS <https://raw.githubusercontent.com/xianyi/OpenBLAS/
212-
def146efed8d5908ea04e22668feeab7099599a0/LICENSE>
213-
214-
Copyright (c) 2011-2014, The OpenBLAS Project
215-
All rights reserved.
216-
217-
Redistribution and use in source and binary forms, with or without
218-
modification, are permitted provided that the following conditions are
219-
met:
220-
221-
1. Redistributions of source code must retain the above copyright
222-
notice, this list of conditions and the following disclaimer.
223-
224-
2. Redistributions in binary form must reproduce the above copyright
225-
notice, this list of conditions and the following disclaimer in
226-
the documentation and/or other materials provided with the
227-
distribution.
228-
229-
3. Neither the name of the OpenBLAS project nor the names of
230-
its contributors may be used to endorse or promote products
231-
derived from this software without specific prior written
232-
permission.
233-
234-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
235-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
236-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
237-
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
238-
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
239-
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
240-
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
241-
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
242-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
243-
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
244-
245-
246-
* Electron <https://raw.githubusercontent.com/electron/electron/
247-
c4cfb3e7110266b9d7ad80e1ae097c4db564501c/LICENSE>
248-
249-
Copyright (c) 2013-2017 GitHub Inc.
250-
251-
Permission is hereby granted, free of charge, to any person obtaining
252-
a copy of this software and associated documentation files (the
253-
"Software"), to deal in the Software without restriction, including
254-
without limitation the rights to use, copy, modify, merge, publish,
255-
distribute, sublicense, and/or sell copies of the Software, and to
256-
permit persons to whom the Software is furnished to do so, subject to
257-
the following conditions:
258-
259-
The above copyright notice and this permission notice shall be
260-
included in all copies or substantial portions of the Software.
261-
262-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
263-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
264-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
265-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
266-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
267-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
268-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
269-
270-
271-
* Boost <http://www.boost.org/LICENSE_1_0.txt>
272-
273-
Boost Software License - Version 1.0 - August 17th, 2003
274-
275-
Permission is hereby granted, free of charge, to any person or organization
276-
obtaining a copy of the software and accompanying documentation covered by
277-
this license (the "Software") to use, reproduce, display, distribute,
278-
execute, and transmit the Software, and to prepare derivative works of the
279-
Software, and to permit third-parties to whom the Software is furnished to
280-
do so, all subject to the following:
281-
282-
The copyright notices in the Software and this entire statement, including
283-
the above license grant, this restriction and the following disclaimer,
284-
must be included in all copies of the Software, in whole or in part, and
285-
all derivative works of the Software, unless such copies or derivative
286-
works are solely in the form of machine-executable object code generated by
287-
a source language processor.
288-
289-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
290-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
291-
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
292-
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
293-
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
294-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
295-
DEALINGS IN THE SOFTWARE.
296-
297-
298-
* Cephes <http://www.netlib.org/cephes/readme>
299-
300-
Copyright (c) 1984-2000 Stephen L. Moshier
301-
302-
Some software in this archive may be from the book _Methods and Programs for
303-
Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989)
304-
or from the Cephes Mathematical Library, a commercial product. In either event,
305-
it is copyrighted by the author. What you see here may be used freely but it
306-
comes with no support or guarantee.
307-
308-
Stephen L. Moshier
309-
moshier@na-net.ornl.gov
310-
311-
312-
313-
ATTRIBUTION
314-
315-
The library contains implementations from the following external libraries,
316-
which have their own licenses:
317-
318-
* FreeBSD <https://svnweb.freebsd.org/>
319-
320-
Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved.
321-
322-
Developed at SunPro, a Sun Microsystems, Inc. business.
323-
Permission to use, copy, modify, and distribute this
324-
software is freely granted, provided that this notice
325-
is preserved.
326-
327-
328-
* FDLIBM <http://www.netlib.org/fdlibm/>
329-
330-
Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
331-
332-
Developed at SunPro, a Sun Microsystems, Inc. business.
333-
Permission to use, copy, modify, and distribute this
334-
software is freely granted, provided that this notice
335-
is preserved.
336-
337-
338-
* Go <https://raw.githubusercontent.com/golang/go/master/LICENSE>
339-
340-
Copyright (c) 2009 The Go Authors. All rights reserved.
341-
342-
Redistribution and use in source and binary forms, with or without
343-
modification, are permitted provided that the following conditions are
344-
met:
345-
346-
* Redistributions of source code must retain the above copyright
347-
notice, this list of conditions and the following disclaimer.
348-
* Redistributions in binary form must reproduce the above
349-
copyright notice, this list of conditions and the following disclaimer
350-
in the documentation and/or other materials provided with the
351-
distribution.
352-
* Neither the name of Google Inc. nor the names of its
353-
contributors may be used to endorse or promote products derived from
354-
this software without specific prior written permission.
355-
356-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
357-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
358-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
359-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
360-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
361-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
362-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
363-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
364-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
365-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
366-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
367-
368-
369-
* SLATEC Common Mathematical Library <http://www.netlib.no/netlib/slatec/>
370-
371-
Public domain.
372-
373-
374-
* ESLint <https://raw.githubusercontent.com/eslint/eslint/master/LICENSE>
375-
376-
Copyright JS Foundation and other contributors, https://js.foundation
377-
378-
Permission is hereby granted, free of charge, to any person obtaining a copy
379-
of this software and associated documentation files (the "Software"), to deal
380-
in the Software without restriction, including without limitation the rights
381-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
382-
copies of the Software, and to permit persons to whom the Software is
383-
furnished to do so, subject to the following conditions:
384-
385-
The above copyright notice and this permission notice shall be included in
386-
all copies or substantial portions of the Software.
387-
388-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
389-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
390-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
391-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
392-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
393-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
394-
THE SOFTWARE.
395-
396-
397-
* StatsFuns.jl <https://raw.githubusercontent.com/JuliaStats/StatsFuns.jl/
398-
e66dd973650c375bc1739c820e5b96bb5bd000a8/LICENSE.md>
399-
400-
Copyright (c) 2015: Dahua Lin.
401-
402-
Permission is hereby granted, free of charge, to any person obtaining
403-
a copy of this software and associated documentation files (the
404-
"Software"), to deal in the Software without restriction, including
405-
without limitation the rights to use, copy, modify, merge, publish,
406-
distribute, sublicense, and/or sell copies of the Software, and to
407-
permit persons to whom the Software is furnished to do so, subject to
408-
the following conditions:
409-
410-
The above copyright notice and this permission notice shall be
411-
included in all copies or substantial portions of the Software.
412-
413-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
414-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
415-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
416-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
417-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
418-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
419-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
420-
421-
422-
* SpecialFunctions.jl <https://raw.githubusercontent.com/JuliaMath/
423-
SpecialFunctions.jl/02a173fbe24a61c4b392aec17a9764ac5727feb1/LICENSE>
424-
425-
The MIT License (MIT)
426-
427-
Copyright (c) 2017 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and others:
428-
429-
https://github.com/JuliaMath/SpecialFunctions.jl/graphs/contributors
430-
431-
Permission is hereby granted, free of charge, to any person obtaining a copy
432-
of this software and associated documentation files (the "Software"), to deal
433-
in the Software without restriction, including without limitation the rights
434-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
435-
copies of the Software, and to permit persons to whom the Software is
436-
furnished to do so, subject to the following conditions:
437-
438-
The above copyright notice and this permission notice shall be included in all
439-
copies or substantial portions of the Software.
440-
441-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
442-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
443-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
444-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
445-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
446-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
447-
SOFTWARE.
448-
449-
450-
* MT19937 <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/
451-
mt19937ar.c>
452-
453-
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
454-
All rights reserved.
455-
456-
Redistribution and use in source and binary forms, with or without
457-
modification, are permitted provided that the following conditions
458-
are met:
459-
460-
1. Redistributions of source code must retain the above copyright
461-
notice, this list of conditions and the following disclaimer.
462-
463-
2. Redistributions in binary form must reproduce the above copyright
464-
notice, this list of conditions and the following disclaimer in the
465-
documentation and/or other materials provided with the distribution.
466-
467-
3. The names of its contributors may not be used to endorse or promote
468-
products derived from this software without specific prior written
469-
permission.
470-
471-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
472-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
473-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
474-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
475-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
476-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
477-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
478-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
479-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
480-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
481-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

‎README.md

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ Alternatively,
5555
- If you are using Deno, visit the [`deno` branch][deno-url].
5656
- For use in Observable, or in browser/node environments, use the [Universal Module Definition (UMD)][umd] build available on the [`umd` branch][umd-url].
5757

58+
The [branches.md][branches-url] file summarizes the available branches and displays a diagram illustrating their relationships.
59+
5860
</section>
5961

6062
<section class="usage">
@@ -284,6 +286,7 @@ Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
284286
[deno-url]: https://github.com/stdlib-js/blas-ext-base-sasumpw/tree/deno
285287
[umd-url]: https://github.com/stdlib-js/blas-ext-base-sasumpw/tree/umd
286288
[esm-url]: https://github.com/stdlib-js/blas-ext-base-sasumpw/tree/esm
289+
[branches-url]: https://github.com/stdlib-js/blas-ext-base-sasumpw/blob/main/branches.md
287290

288291
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/blas-ext-base-sasumpw/main/LICENSE
289292

‎branches.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!--
2+
3+
@license Apache-2.0
4+
5+
Copyright (c) 2022 The Stdlib Authors.
6+
7+
Licensed under the Apache License, Version 2.0 (the "License");
8+
you may not use this file except in compliance with the License.
9+
You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
21+
# Branches
22+
23+
This repository has the following branches:
24+
25+
- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place.
26+
- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network).
27+
- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers.
28+
- **deno**: [Deno][deno-url] branch for use in Deno.
29+
- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments.
30+
31+
The following diagram illustrates the relationships among the above branches:
32+
33+
```mermaid
34+
graph TD;
35+
A[stdlib]-->|generate standalone package|B;
36+
B[main] -->|productionize| C[production];
37+
C -->|bundle| D[esm];
38+
C -->|bundle| E[deno];
39+
C -->|bundle| F[umd];
40+
41+
click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/sasumpw"
42+
click B href "https://github.com/stdlib-js/blas-ext-base-sasumpw/tree/main"
43+
click C href "https://github.com/stdlib-js/blas-ext-base-sasumpw/tree/production"
44+
click D href "https://github.com/stdlib-js/blas-ext-base-sasumpw/tree/esm"
45+
click E href "https://github.com/stdlib-js/blas-ext-base-sasumpw/tree/deno"
46+
click F href "https://github.com/stdlib-js/blas-ext-base-sasumpw/tree/umd"
47+
```
48+
49+
[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/ext/base/sasumpw
50+
[production-url]: https://github.com/stdlib-js/blas-ext-base-sasumpw/tree/production
51+
[deno-url]: https://github.com/stdlib-js/blas-ext-base-sasumpw/tree/deno
52+
[umd-url]: https://github.com/stdlib-js/blas-ext-base-sasumpw/tree/umd
53+
[esm-url]: https://github.com/stdlib-js/blas-ext-base-sasumpw/tree/esm

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stdlib/blas-ext-base-sasumpw",
3-
"version": "0.0.0",
3+
"version": "0.0.6",
44
"description": "Calculate the sum of absolute values (L1 norm) of single-precision floating-point strided array elements using pairwise summation.",
55
"license": "Apache-2.0",
66
"author": {

0 commit comments

Comments
 (0)
Please sign in to comment.