forked from binaryjs/js-binarypack
-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'async-for-blobs' into rc
- Loading branch information
Showing
25 changed files
with
1,626 additions
and
25,954 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: Bun CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: oven-sh/setup-bun@v1 | ||
- run: bun install --frozen-lockfile | ||
- run: bun run build | ||
- run: bun test | ||
- run: bun run check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
# # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: Node.js CI | ||
# name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
branches: ["master"] | ||
# on: | ||
# push: | ||
# branches: ["master"] | ||
# pull_request: | ||
# branches: ["master"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x, 18.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
# strategy: | ||
# matrix: | ||
# node-version: [16.x, 18.x, 20.x] | ||
# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm run coverage | ||
- name: Publish code coverage to CodeClimate | ||
uses: paambaati/codeclimate-action@v3.2.0 | ||
env: | ||
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Use Node.js ${{ matrix.node-version }} | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: ${{ matrix.node-version }} | ||
# cache: "npm" | ||
# - run: npm ci | ||
# - run: npm run build | ||
# - run: npm run coverage | ||
# - name: Publish code coverage to CodeClimate | ||
# uses: paambaati/codeclimate-action@v5.0.0 | ||
# env: | ||
# CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
# From https://til.simonwillison.net/github-actions/prettier-github-actions | ||
name: Check JavaScript for conformance with Prettier | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
prettier: | ||
biome: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
name: Configure npm caching | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
- name: Run prettier | ||
run: |- | ||
npx prettier --check . | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Biome | ||
uses: biomejs/setup-biome@v1 | ||
- name: Run Biome | ||
run: biome ci . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
{ | ||
"standard.semistandard": true, | ||
"standard.usePackageJson": true, | ||
"standard.autoFixOnSave": true, | ||
"javascript.validate.enable": false, | ||
"eslint.autoFixOnSave": true | ||
"editor.defaultFormatter": "biomejs.biome" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
# [2.0.0-rc.1](https://github.com/peers/js-binarypack/compare/v1.0.3-rc.1...v2.0.0-rc.1) (2023-02-25) | ||
# [2.0.0](https://github.com/peers/js-binarypack/compare/v1.0.2...v2.0.0) (2023-06-22) | ||
|
||
|
||
### Features | ||
### Bug Fixes | ||
|
||
* return `ArrayBuffer` instead of `Blob` ([689eafd](https://github.com/peers/js-binarypack/commit/689eafd471fccb7eae0d68528b764d691e9d96b2)) | ||
* empty TypedArray can now be packed ([3475f45](https://github.com/peers/js-binarypack/commit/3475f450a7bc97b757325cd54bc7ba7ffc84118b)) | ||
* undefined will stay undefined instead of null ([83af274](https://github.com/peers/js-binarypack/commit/83af274ea82fdd44d93546f18cbcf547abe77804)) | ||
|
||
|
||
### BREAKING CHANGES | ||
|
||
* Return type of `pack` is now `ArrayBuffer` | ||
### Features | ||
|
||
## [1.0.3-rc.1](https://github.com/peers/js-binarypack/compare/v1.0.2...v1.0.3-rc.1) (2023-02-25) | ||
* return `ArrayBuffer` instead of `Blob` ([6b70875](https://github.com/peers/js-binarypack/commit/6b70875b4d7db791fdd14a1f3ff3776d12febfb2)) | ||
|
||
|
||
### Bug Fixes | ||
### Reverts | ||
|
||
* empty TypedArray can now be packed ([3475f45](https://github.com/peers/js-binarypack/commit/3475f450a7bc97b757325cd54bc7ba7ffc84118b)) | ||
* undefined will stay undefined instead of null ([83af274](https://github.com/peers/js-binarypack/commit/83af274ea82fdd44d93546f18cbcf547abe77804)) | ||
* Revert "fix: undefined will stay undefined instead of null" ([da49137](https://github.com/peers/js-binarypack/commit/da4913787d9ab96845bd8e512d5f501574746a35)) | ||
|
||
|
||
### Reverts | ||
### BREAKING CHANGES | ||
|
||
* Revert "fix: undefined will stay undefined instead of null" ([da49137](https://github.com/peers/js-binarypack/commit/da4913787d9ab96845bd8e512d5f501574746a35)) | ||
* Return type of `pack` is now `ArrayBuffer` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect, describe, it } from "@jest/globals"; | ||
|
||
import { packAndUnpack } from "./util"; | ||
|
||
import { objWithBlob } from "./data"; | ||
|
||
describe("Blobs", () => { | ||
it("replaces Blobs with ArrayBuffer ", async () => { | ||
const objWithAB = { | ||
...objWithBlob, | ||
blob: await objWithBlob.blob.arrayBuffer(), | ||
}; | ||
expect(await packAndUnpack(objWithBlob)).toStrictEqual(objWithAB); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.