Skip to content

Commit ddc97cf

Browse files
committed
Merge branch 'master' into fix-typed-array-offset
2 parents a25f2cc + 026da28 commit ddc97cf

30 files changed

+19063
-7454
lines changed

.eslintrc.json

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2-
"extends": "semistandard",
3-
"env": {
4-
"browser": true
5-
}
6-
}
2+
"parser": "@typescript-eslint/parser",
3+
"extends": [
4+
"eslint:recommended",
5+
"plugin:@typescript-eslint/eslint-recommended",
6+
"plugin:@typescript-eslint/recommended"
7+
]
8+
}

.github/workflows/node.js.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# 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
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: ["master"]
9+
pull_request:
10+
branches: ["master"]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [16.x, 18.x]
19+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: "npm"
28+
- run: npm ci
29+
- run: npm run build
30+
- run: npm run coverage
31+
- name: Publish code coverage to CodeClimate
32+
uses: paambaati/[email protected]
33+
env:
34+
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}

.github/workflows/prettier.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# From https://til.simonwillison.net/github-actions/prettier-github-actions
2+
name: Check JavaScript for conformance with Prettier
3+
4+
on:
5+
push:
6+
pull_request:
7+
8+
jobs:
9+
prettier:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out repo
13+
uses: actions/checkout@v3
14+
- uses: actions/cache@v3
15+
name: Configure npm caching
16+
with:
17+
path: ~/.npm
18+
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }}
19+
restore-keys: |
20+
${{ runner.os }}-npm-
21+
- name: Run prettier
22+
run: |-
23+
npx prettier --check .

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
.parcel-cache
2+
coverage
13
node_modules/
24
.cache/
35
.idea/
4-
*.log
6+
*.log
7+
dist/

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist
2+
package-lock.json
3+
coverage

.prettierrc.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
trailingComma = "all"
2+
semi = true
3+
useTabs = true

.vscode/settings.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"standard.semistandard": true,
3-
"standard.usePackageJson": true,
4-
"standard.autoFixOnSave": true,
5-
"javascript.validate.enable": false,
6-
"eslint.autoFixOnSave": true
7-
}
2+
"standard.semistandard": true,
3+
"standard.usePackageJson": true,
4+
"standard.autoFixOnSave": true,
5+
"javascript.validate.enable": false,
6+
"eslint.autoFixOnSave": true
7+
}

Gruntfile.js

-51
This file was deleted.

Makefile

-4
This file was deleted.

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
BinaryPack for Javascript browsers
2-
========
1+
# BinaryPack for Javascript browsers
32

43
BinaryPack is 95% MessagePack. The protocol has been extended to support distinct string and binary types.
54

6-
Inspired by: https://github.com/cuzic/MessagePack-JS
5+
Inspired by: https://github.com/cuzic/MessagePack-JS

__test__/bugs.spec.ts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { expect, describe, it } from "@jest/globals";
2+
3+
import { packAndUnpack } from "./util";
4+
5+
describe("Bugs", () => {
6+
describe("Numbers", () => {
7+
it("gives back wrong value on INT64_MAX ", async () => {
8+
expect(await packAndUnpack(0x7fffffffffffffff)).toBe(
9+
-9223372036854776000,
10+
);
11+
});
12+
});
13+
});

0 commit comments

Comments
 (0)