Skip to content

Commit e91eb66

Browse files
committed
Auto-generated commit
1 parent d404d1d commit e91eb66

File tree

6 files changed

+143
-11
lines changed

6 files changed

+143
-11
lines changed

.github/.keepalive

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2022-03-01T00:57:00.049Z
1+
2022-03-16T08:00:57.556Z

.github/workflows/bundle.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
# Replace links to other packages with links to the deno branch:
6666
find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/";
6767
68-
# Replace reference to `@stdlib/types` with deno.land link:
69-
find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ <reference types=\"@stdlib\/types\"\/>/\/\/\/ <reference types=\"https:\/\/deno.land\/x\/stdlib_types\/index.d.ts\"\/>/g"
68+
# Replace reference to `@stdlib/types` with CDN link:
69+
find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ <reference types=\"@stdlib\/types\"\/>/\/\/\/ <reference types=\"https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/types@main\/index.d.ts\"\/>/g"
7070
7171
# Change wording of project description to avoid reference to JavaScript and Node.js:
7272
find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g"
@@ -83,6 +83,9 @@ jobs:
8383
find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?<section class=\"cli\">[\s\S]+<\!\-\- \/.cli \-\->//g"
8484
find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?<section class=\"c\">[\s\S]+<\!\-\- \/.c \-\->//g"
8585
86+
# Create package.json file for deno branch:
87+
jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json
88+
8689
- name: Publish to deno branch
8790
uses: peaceiris/actions-gh-pages@v3
8891
with:
@@ -152,6 +155,9 @@ jobs:
152155
# Wrap contents of `<script type="text/javascript">` tag contents in an IIFE:
153156
find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/<script type=\"text\/javascript\">([\s\S]+?)<\/script>/<script type=\"text\/javascript\">\n\(function \(\) {\1}\)\(\)\n<\/script>/g"
154157
158+
# Create package.json file for umd branch:
159+
jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "main": "./bundle.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./umd/package.json
160+
155161
- name: Publish to umd branch
156162
uses: peaceiris/actions-gh-pages@v3
157163
with:
@@ -227,6 +233,9 @@ jobs:
227233
# Rewrite examples section to be a HTML file:
228234
find ./esm -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\#\# Examples([\s\S]*)\`\`\`javascript([\s\S]+?)\`\`\`/\#\# Examples\1\`\`\`html\n<\!DOCTYPE html>\n<html lang=\"en\">\n<body>\n<script type=\"module\">\n\2\n<\/script>\n<\/body>\n<\/html>\n\`\`\`/g"
229235
236+
# Create package.json file for esm branch:
237+
jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./index.mjs", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./esm/package.json
238+
230239
- name: Publish to esm branch
231240
uses: peaceiris/actions-gh-pages@v3
232241
with:

.github/workflows/publish.yml

+24
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,30 @@ jobs:
5959
steps: ${{ toJson(steps) }}
6060
channel: '#npm-ci'
6161
if: failure()
62+
increment:
63+
runs-on: ubuntu-latest
64+
steps:
65+
- name: Checkout main branch
66+
uses: actions/checkout@v2
67+
with:
68+
ref: main
69+
- name: Increment version in `package.json` to the version number of the tag
70+
run: |
71+
VERSION=$(echo ${{ github.ref }} | sed -E 's/refs\/tags\/v?([0-9]+.[0-9]+.[0-9]+).*/\1/')
72+
sed -Ei "s/\"version\": \"[^\"]+\"/\"version\": \"$VERSION\"/g" package.json
73+
- name: Configure git
74+
run: |
75+
git config --local user.email "[email protected]"
76+
git config --local user.name "stdlib-bot"
77+
- name: Commit changes
78+
run: |
79+
git add package.json
80+
git commit -m "Auto-generated commit"
81+
- name: Push changes
82+
run: |
83+
SLUG=${{ github.repository }}
84+
echo "Pushing changes to $SLUG..."
85+
git push "https://$GITHUB_ACTOR:[email protected]/$SLUG.git" main
6286
cancel:
6387
runs-on: ubuntu-latest
6488
timeout-minutes: 3

.github/workflows/test_bundles.yml

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
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: Test Loading Bundles
21+
22+
# Workflow triggers:
23+
on:
24+
workflow_run:
25+
workflows: ["bundle"]
26+
types: [completed]
27+
workflow_dispatch:
28+
29+
# Workflow jobs:
30+
jobs:
31+
test-umd:
32+
runs-on: ubuntu-latest
33+
env:
34+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
35+
steps:
36+
- name: Checkout branch with UMD build
37+
uses: actions/checkout@v2
38+
with:
39+
ref: umd
40+
- name: Setup Node.js
41+
uses: actions/setup-node@v2
42+
with:
43+
node-version: 17
44+
- name: Try loading UMD module
45+
run: |
46+
node --eval "require( './bundle.js' )" || exit $?
47+
- name: Send status to Slack channel in case of failure
48+
uses: act10ns/slack@v1
49+
with:
50+
status: ${{ job.status }}
51+
steps: ${{ toJson(steps) }}
52+
channel: '#npm-ci'
53+
if: failure()
54+
test-esm:
55+
runs-on: ubuntu-latest
56+
env:
57+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
58+
steps:
59+
- name: Checkout branch with ESM build
60+
uses: actions/checkout@v2
61+
with:
62+
ref: esm
63+
- name: Setup Node.js
64+
uses: actions/setup-node@v2
65+
with:
66+
node-version: 17
67+
- name: Try loading ESM
68+
run: |
69+
node --experimental-network-imports --eval "import( './index.mjs' )" || exit $?
70+
- name: Send status to Slack channel in case of failure
71+
uses: act10ns/slack@v1
72+
with:
73+
status: ${{ job.status }}
74+
steps: ${{ toJson(steps) }}
75+
channel: '#npm-ci'
76+
if: failure()
77+
test-deno:
78+
runs-on: ubuntu-latest
79+
env:
80+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
81+
steps:
82+
- name: Checkout branch with Deno build
83+
uses: actions/checkout@v2
84+
with:
85+
ref: deno
86+
- name: Install Deno
87+
uses: denoland/setup-deno@v1
88+
with:
89+
deno-version: vx.x.x
90+
- name: Try loading Deno build
91+
run: |
92+
deno eval "import main from './mod.js'" || exit $?
93+
- name: Send status to Slack channel in case of failure
94+
uses: act10ns/slack@v1
95+
with:
96+
status: ${{ job.status }}
97+
steps: ${{ toJson(steps) }}
98+
channel: '#npm-ci'
99+
if: failure()

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -196,20 +196,20 @@ Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
196196
197197
-->
198198

199-
[umd]: https://github.com/umdjs/umd
200-
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
201-
202-
[deno-url]: https://github.com/stdlib-js/assert-has-float32array-support/tree/deno
203-
[umd-url]: https://github.com/stdlib-js/assert-has-float32array-support/tree/umd
204-
[esm-url]: https://github.com/stdlib-js/assert-has-float32array-support/tree/esm
205-
206199
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
207200
[chat-url]: https://gitter.im/stdlib-js/stdlib/
208201

209202
[stdlib]: https://github.com/stdlib-js/stdlib
210203

211204
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
212205

206+
[umd]: https://github.com/umdjs/umd
207+
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
208+
209+
[deno-url]: https://github.com/stdlib-js/assert-has-float32array-support/tree/deno
210+
[umd-url]: https://github.com/stdlib-js/assert-has-float32array-support/tree/umd
211+
[esm-url]: https://github.com/stdlib-js/assert-has-float32array-support/tree/esm
212+
213213
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/assert-has-float32array-support/main/LICENSE
214214

215215
[mdn-float32array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stdlib/assert-has-float32array-support",
3-
"version": "0.0.8",
3+
"version": "0.0.0",
44
"description": "Detect native Float32Array support.",
55
"license": "Apache-2.0",
66
"author": {

0 commit comments

Comments
 (0)