Skip to content

Commit

Permalink
chore(release): v2 (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasgloning authored Jun 22, 2023
2 parents c4231da + dc737a6 commit 51d0678
Show file tree
Hide file tree
Showing 33 changed files with 27,330 additions and 7,447 deletions.
12 changes: 7 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "semistandard",
"env": {
"browser": true
}
}
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
]
}
34 changes: 34 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +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

name: Node.js CI

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

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/

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/[email protected]
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
23 changes: 23 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# From https://til.simonwillison.net/github-actions/prettier-github-actions
name: Check JavaScript for conformance with Prettier

on:
push:
pull_request:

jobs:
prettier:
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 .
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release
on:
push:
branches:
- rc
- stable
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GH_TOKEN }}
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}
run: npx semantic-release
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.parcel-cache
coverage
node_modules/
.cache/
.idea/
*.log
*.log
dist/
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dist
package-lock.json
coverage

# semantic-release
CHANGELOG.md
3 changes: 3 additions & 0 deletions .prettierrc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
trailingComma = "all"
semi = true
useTabs = true
17 changes: 17 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"branches": [
"stable",
{
"name": "rc",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git",
"@semantic-release/github"
]
}
12 changes: 6 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"standard.semistandard": true,
"standard.usePackageJson": true,
"standard.autoFixOnSave": true,
"javascript.validate.enable": false,
"eslint.autoFixOnSave": true
}
"standard.semistandard": true,
"standard.usePackageJson": true,
"standard.autoFixOnSave": true,
"javascript.validate.enable": false,
"eslint.autoFixOnSave": true
}
51 changes: 0 additions & 51 deletions Gruntfile.js

This file was deleted.

4 changes: 0 additions & 4 deletions Makefile

This file was deleted.

8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
BinaryPack for Javascript browsers
========
# BinaryPack

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

Inspired by: https://github.com/cuzic/MessagePack-JS
This library is mainly used by [PeerJS](https://peerjs.com) to transfer objects via data channels.
Bug reports and fixes are welcome, but we are unlikely to implement new features.

Inspired by: https://github.com/cuzic/MessagePack-JS
18 changes: 18 additions & 0 deletions __test__/bugs.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { expect, describe, it } from "@jest/globals";

import { packAndUnpack } from "./util";

describe("Bugs", () => {
describe("Objects", () => {
it("replaces undefined with null ", async () => {
expect(await packAndUnpack(undefined)).toBe(null);
});
});
describe("Numbers", () => {
it("gives back wrong value on INT64_MAX ", async () => {
expect(await packAndUnpack(0x7fffffffffffffff)).toBe(
-9223372036854776000,
);
});
});
});
Loading

0 comments on commit 51d0678

Please sign in to comment.