Skip to content

Commit

Permalink
Merge 05ee070 into 84f893b
Browse files Browse the repository at this point in the history
  • Loading branch information
kawanet committed Oct 24, 2020
2 parents 84f893b + 05ee070 commit eb58623
Show file tree
Hide file tree
Showing 14 changed files with 102 additions and 9,065 deletions.
1 change: 0 additions & 1 deletion .coveralls.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/nodejs.yml
@@ -0,0 +1,44 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on: [push, pull_request]

jobs:
test:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build --if-present
- run: npm test
- run: make test-coverage
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./.nyc_output/lcov.info
flag-name: node-${{ matrix.node-version }}
parallel: true

# https://github.com/marketplace/actions/coveralls-github-action
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,3 +6,4 @@
gh-pages
node_modules
npm-debug.log*
package-lock.json
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015-2018 Yusuke Kawasaki
Copyright (c) 2015-2020 Yusuke Kawasaki

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
19 changes: 10 additions & 9 deletions Makefile
Expand Up @@ -7,25 +7,26 @@ DIST=./dist
JSDEST=./dist/int64-buffer.min.js
JSGZIP=./dist/int64-buffer.min.js.gz

all: test $(JSGZIP)
all: $(JSGZIP)

clean:
rm -fr $(JSDEST)
rm -fr $(JSDEST) $(JSGZIP)

$(DIST):
mkdir -p $(DIST)
mkdir -p $@

$(JSDEST): $(SRC) $(DIST)
./node_modules/.bin/uglifyjs $(SRC) -c -m -o $(JSDEST)
./node_modules/.bin/terser $< -c -m -o $@

$(JSGZIP): $(JSDEST)
gzip -9 < $(JSDEST) > $(JSGZIP)
ls -l $(JSDEST) $(JSGZIP)
gzip -9 < $^ > $@
ls -l $^ $@

test:
@if [ "x$(BROWSER)" = "x" ]; then make test-node; else make test-browser; fi
test: all jshint mocha

test-node: jshint mocha
test-coverage:
./node_modules/.bin/nyc make mocha
./node_modules/.bin/nyc report --reporter=text-lcov > .nyc_output/lcov.info

mocha:
./node_modules/.bin/mocha -R spec $(TESTS)
Expand Down
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -2,7 +2,9 @@

64bit Long Integer on Buffer/Array/ArrayBuffer in Pure JavaScript

[![npm version](https://badge.fury.io/js/int64-buffer.svg)](http://badge.fury.io/js/int64-buffer) [![Build Status](https://travis-ci.org/kawanet/int64-buffer.svg?branch=master)](https://travis-ci.org/kawanet/int64-buffer) [![Coverage Status](https://coveralls.io/repos/github/kawanet/int64-buffer/badge.svg?branch=master)](https://coveralls.io/github/kawanet/int64-buffer?branch=master)
[![npm version](https://badge.fury.io/js/int64-buffer.svg)](https://www.npmjs.com/package/int64-buffer)
[![Node.js CI](https://github.com/kawanet/int64-buffer/workflows/Node.js%20CI/badge.svg?branch=master)](https://github.com/kawanet/int64-buffer/actions/)
[![Coverage Status](https://coveralls.io/repos/github/kawanet/int64-buffer/badge.svg?branch=master)](https://coveralls.io/github/kawanet/int64-buffer?branch=master)

JavaScript's number based on IEEE-754 could only handle [53 bits](https://en.wikipedia.org/wiki/Double-precision_floating-point_format) precision.
This module provides two pair of classes: `Int64BE`/`Uint64BE` and `Int64LE`/`Uint64LE` which could hold 64 bits long integer and loose no bit.
Expand Down Expand Up @@ -213,7 +215,7 @@ npm install int64-buffer --save

### The MIT License (MIT)

Copyright (c) 2015-2018 Yusuke Kawasaki
Copyright (c) 2015-2020 Yusuke Kawasaki

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion dist/int64-buffer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion int64-buffer.js
Expand Up @@ -100,7 +100,7 @@ var Uint64BE, Int64BE, Uint64LE, Int64LE;
raddix = offset;
value = buffer;
offset = 0;
buffer = new _storage(8);
buffer = (storage === BUFFER) ? BUFFER.alloc(8) : new _storage(8);
}

that.buffer = buffer;
Expand Down

0 comments on commit eb58623

Please sign in to comment.