Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Mar 16, 2022
1 parent d050962 commit d057cb6
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/.keepalive
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2022-03-01T00:36:10.534Z
2022-03-16T07:47:23.932Z
13 changes: 11 additions & 2 deletions .github/workflows/bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ jobs:
# Replace links to other packages with links to the deno branch:
find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/";
# Replace reference to `@stdlib/types` with deno.land link:
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"
# Replace reference to `@stdlib/types` with CDN link:
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"
# Change wording of project description to avoid reference to JavaScript and Node.js:
find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g"
Expand All @@ -83,6 +83,9 @@ jobs:
find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?<section class=\"cli\">[\s\S]+<\!\-\- \/.cli \-\->//g"
find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?<section class=\"c\">[\s\S]+<\!\-\- \/.c \-\->//g"
# Create package.json file for deno branch:
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
- name: Publish to deno branch
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down Expand Up @@ -152,6 +155,9 @@ jobs:
# Wrap contents of `<script type="text/javascript">` tag contents in an IIFE:
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"
# Create package.json file for umd branch:
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
- name: Publish to umd branch
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down Expand Up @@ -227,6 +233,9 @@ jobs:
# Rewrite examples section to be a HTML file:
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"
# Create package.json file for esm branch:
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
- name: Publish to esm branch
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,30 @@ jobs:
steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
increment:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v2
with:
ref: main
- name: Increment version in `package.json` to the version number of the tag
run: |
VERSION=$(echo ${{ github.ref }} | sed -E 's/refs\/tags\/v?([0-9]+.[0-9]+.[0-9]+).*/\1/')
sed -Ei "s/\"version\": \"[^\"]+\"/\"version\": \"$VERSION\"/g" package.json
- name: Configure git
run: |
git config --local user.email "[email protected]"
git config --local user.name "stdlib-bot"
- name: Commit changes
run: |
git add package.json
git commit -m "Auto-generated commit"
- name: Push changes
run: |
SLUG=${{ github.repository }}
echo "Pushing changes to $SLUG..."
git push "https://$GITHUB_ACTOR:[email protected]/$SLUG.git" main
cancel:
runs-on: ubuntu-latest
timeout-minutes: 3
Expand Down
99 changes: 99 additions & 0 deletions .github/workflows/test_bundles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#/
# @license Apache-2.0
#
# Copyright (c) 2022 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#/

# Workflow name:
name: Test Loading Bundles

# Workflow triggers:
on:
workflow_run:
workflows: ["bundle"]
types: [completed]
workflow_dispatch:

# Workflow jobs:
jobs:
test-umd:
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Checkout branch with UMD build
uses: actions/checkout@v2
with:
ref: umd
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 17
- name: Try loading UMD module
run: |
node --eval "require( './bundle.js' )" || exit $?
- name: Send status to Slack channel in case of failure
uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
test-esm:
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Checkout branch with ESM build
uses: actions/checkout@v2
with:
ref: esm
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 17
- name: Try loading ESM
run: |
node --experimental-network-imports --eval "import( './index.mjs' )" || exit $?
- name: Send status to Slack channel in case of failure
uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
test-deno:
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Checkout branch with Deno build
uses: actions/checkout@v2
with:
ref: deno
- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: vx.x.x
- name: Try loading Deno build
run: |
deno eval "import main from './mod.js'" || exit $?
- name: Send status to Slack channel in case of failure
uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
channel: '#npm-ci'
if: failure()
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,20 @@ Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
-->

[umd]: https://github.com/umdjs/umd
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

[deno-url]: https://github.com/stdlib-js/assert-is-uint32array/tree/deno
[umd-url]: https://github.com/stdlib-js/assert-is-uint32array/tree/umd
[esm-url]: https://github.com/stdlib-js/assert-is-uint32array/tree/esm

[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
[chat-url]: https://gitter.im/stdlib-js/stdlib/

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

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

[umd]: https://github.com/umdjs/umd
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

[deno-url]: https://github.com/stdlib-js/assert-is-uint32array/tree/deno
[umd-url]: https://github.com/stdlib-js/assert-is-uint32array/tree/umd
[esm-url]: https://github.com/stdlib-js/assert-is-uint32array/tree/esm

[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/assert-is-uint32array/main/LICENSE

[mdn-uint32array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stdlib/assert-is-uint32array",
"version": "0.0.8",
"version": "0.0.0",
"description": "Test if a value is a Uint32Array.",
"license": "Apache-2.0",
"author": {
Expand Down

0 comments on commit d057cb6

Please sign in to comment.