Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 748c967

Browse filesBrowse files
committed
Auto-generated commit
1 parent 422de25 commit 748c967
Copy full SHA for 748c967

File tree

Expand file treeCollapse file tree

6 files changed

+143
-11
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+143
-11
lines changed

‎.github/.keepalive

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2022-03-01T01:20:16.485Z
1+
2022-03-16T08:16:34.789Z

‎.github/workflows/bundle.yml

Copy file name to clipboardExpand all lines: .github/workflows/bundle.yml
+11-2Lines changed: 11 additions & 2 deletions
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

Copy file name to clipboardExpand all lines: .github/workflows/publish.yml
+24Lines changed: 24 additions & 0 deletions
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 "noreply@stdlib.io"
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:$GITHUB_TOKEN@github.com/$SLUG.git" main
6286
cancel:
6387
runs-on: ubuntu-latest
6488
timeout-minutes: 3

‎.github/workflows/test_bundles.yml

Copy file name to clipboard
+99Lines changed: 99 additions & 0 deletions
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

Copy file name to clipboardExpand all lines: README.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,20 +190,20 @@ Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
190190
191191
-->
192192

193-
[umd]: https://github.com/umdjs/umd
194-
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
195-
196-
[deno-url]: https://github.com/stdlib-js/buffer-from-array/tree/deno
197-
[umd-url]: https://github.com/stdlib-js/buffer-from-array/tree/umd
198-
[esm-url]: https://github.com/stdlib-js/buffer-from-array/tree/esm
199-
200193
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
201194
[chat-url]: https://gitter.im/stdlib-js/stdlib/
202195

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

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

200+
[umd]: https://github.com/umdjs/umd
201+
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
202+
203+
[deno-url]: https://github.com/stdlib-js/buffer-from-array/tree/deno
204+
[umd-url]: https://github.com/stdlib-js/buffer-from-array/tree/umd
205+
[esm-url]: https://github.com/stdlib-js/buffer-from-array/tree/esm
206+
207207
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/buffer-from-array/main/LICENSE
208208

209209
<!-- <related-links> -->

‎package.json

Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stdlib/buffer-from-array",
3-
"version": "0.0.7",
3+
"version": "0.0.0",
44
"description": "Allocate a buffer using an octet array.",
55
"license": "Apache-2.0",
66
"author": {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.