Skip to content

Commit 15d15d6

Browse files
deps(dev): bump aegir from 37.12.1 to 38.1.8 (#50)
* deps(dev): bump aegir from 37.12.1 to 38.1.8 Bumps [aegir](https://github.com/ipfs/aegir) from 37.12.1 to 38.1.8. - [Release notes](https://github.com/ipfs/aegir/releases) - [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md) - [Commits](ipfs/aegir@v37.12.1...v38.1.8) --- updated-dependencies: - dependency-name: aegir dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore: fix linting --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: achingbrain <[email protected]>
1 parent f930a60 commit 15d15d6

File tree

9 files changed

+81
-35
lines changed

9 files changed

+81
-35
lines changed

.github/workflows/js-test-and-release.yml

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ name: test & maybe release
22
on:
33
push:
44
branches:
5-
- master # with #262 - ${{{ github.default_branch }}}
5+
- master
66
pull_request:
7-
branches:
8-
- master # with #262 - ${{{ github.default_branch }}}
97

108
jobs:
119

@@ -26,7 +24,7 @@ jobs:
2624
strategy:
2725
matrix:
2826
os: [windows-latest, ubuntu-latest, macos-latest]
29-
node: [16]
27+
node: [lts/*]
3028
fail-fast: true
3129
steps:
3230
- uses: actions/checkout@v3
@@ -35,7 +33,7 @@ jobs:
3533
node-version: ${{ matrix.node }}
3634
- uses: ipfs/aegir/actions/cache-node-modules@master
3735
- run: npm run --if-present test:node
38-
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
36+
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
3937
with:
4038
flags: node
4139

@@ -49,7 +47,7 @@ jobs:
4947
node-version: lts/*
5048
- uses: ipfs/aegir/actions/cache-node-modules@master
5149
- run: npm run --if-present test:chrome
52-
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
50+
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
5351
with:
5452
flags: chrome
5553

@@ -63,7 +61,7 @@ jobs:
6361
node-version: lts/*
6462
- uses: ipfs/aegir/actions/cache-node-modules@master
6563
- run: npm run --if-present test:chrome-webworker
66-
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
64+
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
6765
with:
6866
flags: chrome-webworker
6967

@@ -77,7 +75,7 @@ jobs:
7775
node-version: lts/*
7876
- uses: ipfs/aegir/actions/cache-node-modules@master
7977
- run: npm run --if-present test:firefox
80-
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
78+
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
8179
with:
8280
flags: firefox
8381

@@ -91,10 +89,48 @@ jobs:
9189
node-version: lts/*
9290
- uses: ipfs/aegir/actions/cache-node-modules@master
9391
- run: npm run --if-present test:firefox-webworker
94-
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
92+
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
9593
with:
9694
flags: firefox-webworker
9795

96+
test-webkit:
97+
needs: check
98+
runs-on: ${{ matrix.os }}
99+
strategy:
100+
matrix:
101+
os: [ubuntu-latest, macos-latest]
102+
node: [lts/*]
103+
fail-fast: true
104+
steps:
105+
- uses: actions/checkout@v3
106+
- uses: actions/setup-node@v3
107+
with:
108+
node-version: lts/*
109+
- uses: ipfs/aegir/actions/cache-node-modules@master
110+
- run: npm run --if-present test:webkit
111+
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
112+
with:
113+
flags: webkit
114+
115+
test-webkit-webworker:
116+
needs: check
117+
runs-on: ${{ matrix.os }}
118+
strategy:
119+
matrix:
120+
os: [ubuntu-latest, macos-latest]
121+
node: [lts/*]
122+
fail-fast: true
123+
steps:
124+
- uses: actions/checkout@v3
125+
- uses: actions/setup-node@v3
126+
with:
127+
node-version: lts/*
128+
- uses: ipfs/aegir/actions/cache-node-modules@master
129+
- run: npm run --if-present test:webkit-webworker
130+
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
131+
with:
132+
flags: webkit-webworker
133+
98134
test-electron-main:
99135
needs: check
100136
runs-on: ubuntu-latest
@@ -105,7 +141,7 @@ jobs:
105141
node-version: lts/*
106142
- uses: ipfs/aegir/actions/cache-node-modules@master
107143
- run: npx xvfb-maybe npm run --if-present test:electron-main
108-
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
144+
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
109145
with:
110146
flags: electron-main
111147

@@ -119,14 +155,14 @@ jobs:
119155
node-version: lts/*
120156
- uses: ipfs/aegir/actions/cache-node-modules@master
121157
- run: npx xvfb-maybe npm run --if-present test:electron-renderer
122-
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
158+
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
123159
with:
124160
flags: electron-renderer
125161

126162
release:
127-
needs: [test-node, test-chrome, test-chrome-webworker, test-firefox, test-firefox-webworker, test-electron-main, test-electron-renderer]
163+
needs: [test-node, test-chrome, test-chrome-webworker, test-firefox, test-firefox-webworker, test-webkit, test-webkit-webworker, test-electron-main, test-electron-renderer]
128164
runs-on: ubuntu-latest
129-
if: github.event_name == 'push' && github.ref == 'refs/heads/master' # with #262 - 'refs/heads/${{{ github.default_branch }}}'
165+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
130166
steps:
131167
- uses: actions/checkout@v3
132168
with:
@@ -141,5 +177,5 @@ jobs:
141177
docker-username: ${{ secrets.DOCKER_USERNAME }}
142178
- run: npm run --if-present release
143179
env:
144-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
180+
GITHUB_TOKEN: ${{ secrets.UCI_GITHUB_TOKEN || github.token }}
145181
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
node_modules
2+
build
23
dist
3-
types
4-
docs
4+
.docs
5+
.coverage
6+
node_modules
57
package-lock.json
8+
yarn.lock
9+
.vscode

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
# uint8arrays <!-- omit in toc -->
22

33
[![codecov](https://img.shields.io/codecov/c/github/achingbrain/uint8arrays.svg?style=flat-square)](https://codecov.io/gh/achingbrain/uint8arrays)
4-
[![CI](https://img.shields.io/github/workflow/status/achingbrain/uint8arrays/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/achingbrain/uint8arrays/actions/workflows/js-test-and-release.yml)
4+
[![CI](https://img.shields.io/github/actions/workflow/status/achingbrain/uint8arrays/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/achingbrain/uint8arrays/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)
55

66
> Utility functions to make dealing with Uint8Arrays easier
77
88
## Table of contents <!-- omit in toc -->
99

1010
- [Install](#install)
11+
- [Browser `<script>` tag](#browser-script-tag)
1112
- [API](#api)
1213
- [alloc(size)](#allocsize)
1314
- [Example](#example)
1415
- [allocUnsafe(size)](#allocunsafesize)
1516
- [Example](#example-1)
1617
- [compare(a, b)](#comparea-b)
1718
- [Example](#example-2)
18-
- [concat(arrays, [length])](#concatarrays-length)
19+
- [concat(arrays, \[length\])](#concatarrays-length)
1920
- [Example](#example-3)
2021
- [equals(a, b)](#equalsa-b)
2122
- [Example](#example-4)
@@ -26,14 +27,22 @@
2627
- [xor(a, b)](#xora-b)
2728
- [Example](#example-7)
2829
- [License](#license)
29-
- [Contribute](#contribute)
30+
- [Contribution](#contribution)
3031

3132
## Install
3233

3334
```console
3435
$ npm i uint8arrays
3536
```
3637

38+
### Browser `<script>` tag
39+
40+
Loading this module through a script tag will make it's exports available as `Uint8arrays` in the global namespace.
41+
42+
```html
43+
<script src="https://unpkg.com/uint8arrays/dist/index.min.js"></script>
44+
```
45+
3746
- [Install](#install)
3847
- [API](#api)
3948
- [alloc(size)](#allocsize)
@@ -42,7 +51,7 @@ $ npm i uint8arrays
4251
- [Example](#example-1)
4352
- [compare(a, b)](#comparea-b)
4453
- [Example](#example-2)
45-
- [concat(arrays, \[length])](#concatarrays-length)
54+
- \[concat(arrays, \[length])]\(#concatarrays-length)
4655
- [Example](#example-3)
4756
- [equals(a, b)](#equalsa-b)
4857
- [Example](#example-4)
@@ -199,6 +208,6 @@ Licensed under either of
199208
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
200209
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
201210

202-
## Contribute
211+
## Contribution
203212

204213
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

benchmarks/concat.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ $ npx playwright-test benchmarks/concat.js --runner benchmark
66
*/
77

88
import Benchmark from 'benchmark'
9-
import { fromString } from '../dist/src/from-string.js'
10-
import { concat } from '../dist/src/concat.js'
119
import { allocUnsafe } from '../dist/src/alloc.js'
10+
import { concat } from '../dist/src/concat.js'
11+
import { fromString } from '../dist/src/from-string.js'
1212

1313
const string = 'Hello world, this is a Uint8Array created from a string'
1414
const DATA1 = fromString(string)

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
"bugs": {
1313
"url": "https://github.com/achingbrain/uint8arrays/issues"
1414
},
15-
"engines": {
16-
"node": ">=16.0.0",
17-
"npm": ">=7.0.0"
18-
},
1915
"type": "module",
2016
"types": "./dist/src/index.d.ts",
2117
"typesVersions": {
@@ -36,7 +32,7 @@
3632
},
3733
"files": [
3834
"src",
39-
"dist/src",
35+
"dist",
4036
"!dist/test",
4137
"!**/*.tsbuildinfo"
4238
],
@@ -175,14 +171,15 @@
175171
"test:firefox-webworker": "aegir test -t webworker -- --browser firefox",
176172
"lint": "aegir lint",
177173
"release": "aegir release",
178-
"build": "aegir build"
174+
"build": "aegir build",
175+
"dep-check": "aegir dep-check"
179176
},
180177
"dependencies": {
181178
"multiformats": "^11.0.0"
182179
},
183180
"devDependencies": {
184181
"@types/benchmark": "^2.1.1",
185-
"aegir": "^37.5.5",
182+
"aegir": "^39.0.9",
186183
"benchmark": "^2.1.4"
187184
}
188185
}

src/from-string.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import bases, { SupportedEncodings } from './util/bases.js'
21
import { asUint8Array } from './util/as-uint8array.js'
2+
import bases, { type SupportedEncodings } from './util/bases.js'
33

44
export type { SupportedEncodings }
55

src/to-string.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import bases, { SupportedEncodings } from './util/bases.js'
1+
import bases, { type SupportedEncodings } from './util/bases.js'
22

33
export type { SupportedEncodings }
44

src/util/bases.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { MultibaseCodec } from 'multiformats'
21
import { bases } from 'multiformats/basics'
32
import { allocUnsafe } from '../alloc.js'
3+
import type { MultibaseCodec } from 'multiformats'
44

55
function createCodec (name: string, prefix: string, encode: (buf: Uint8Array) => string, decode: (str: string) => Uint8Array): MultibaseCodec<any> {
66
return {
@@ -50,7 +50,7 @@ const BASES: Record<SupportedEncodings, MultibaseCodec<any>> = {
5050
'utf-8': string,
5151
hex: bases.base16,
5252
latin1: ascii,
53-
ascii: ascii,
53+
ascii,
5454
binary: ascii,
5555

5656
...bases

test/from-string.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-env mocha */
22

33
import { expect } from 'aegir/chai'
4-
import { fromString, SupportedEncodings } from '../src/from-string.js'
4+
import { fromString, type SupportedEncodings } from '../src/from-string.js'
55
import { toString } from '../src/to-string.js'
66
import bases from '../src/util/bases.js'
77

0 commit comments

Comments
 (0)