version bump 1.2.2

This commit is contained in:
SheetJS 2022-04-04 18:53:34 -04:00
parent a1bcb01e8e
commit 6a752a8568
14 changed files with 289 additions and 16 deletions

92
.github/workflows/node-4+.yml vendored Normal file

@ -0,0 +1,92 @@
name: 'Tests: node.js'
on: [pull_request, push]
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
type: 'majors'
preset: '>=4'
latest:
needs: [matrix]
name: 'latest majors'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
include:
- node-version: '14.'
env:
TZ: America/New_York
- node-version: '13.'
env:
TZ: Europe/London
- node-version: '12.'
env:
TZ: Asia/Seoul
- node-version: '11.'
env:
TZ: America/Los_Angeles
FMTS: misc
- node-version: '10.'
env:
TZ: Europe/Berlin
FMTS: misc
- node-version: '9.'
env:
TZ: Asia/Kolkata
FMTS: misc
- node-version: '8.'
env:
TZ: Asia/Shanghai
FMTS: misc
- node-version: '7.'
env:
TZ: America/Cancun
FMTS: misc
- node-version: '6.'
env:
TZ: Asia/Seoul
FMTS: misc
- node-version: '5.'
env:
TZ: America/Anchorage
FMTS: misc
- node-version: '4.'
env:
TZ: America/Barbados
FMTS: misc
- node-version: '4.4.7' # see GH issue #1150
env:
TZ: Asia/Tokyo
FMTS: misc
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: sudo curl -Lo /usr/bin/rooster https://github.com/SheetJS/rooster/releases/download/v0.2.0/rooster-v0.2.0-linux-amd64
- run: sudo chmod a+x /usr/bin/rooster
#- run: make init
#- run: 'cd test_files; make all; cd -'
- run: npm run test
#- run: 'cd packages/ssf; npm install; npm run tests-only; cd -'
node:
name: 'node 4+'
needs: [latest]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'

45
.github/workflows/node-iojs.yml vendored Normal file

@ -0,0 +1,45 @@
name: 'Tests: node.js (io.js)'
on: [pull_request, push]
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
type: 'majors'
preset: 'iojs'
latest:
needs: [matrix]
name: 'latest majors'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.latest) }}
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
skip-ls-check: true
- run: sudo curl -Lo /usr/bin/rooster https://github.com/SheetJS/rooster/releases/download/v0.2.0/rooster-v0.2.0-linux-amd64
- run: sudo chmod a+x /usr/bin/rooster
#- run: make init
#- run: 'cd test_files; make all; cd -'
- run: npm run test
#- run: 'cd packages/ssf; npm run tests-only; cd -'
node:
name: 'io.js'
needs: [latest]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'

32
.github/workflows/node-pretest.yml vendored Normal file

@ -0,0 +1,32 @@
name: 'Tests: pretest/posttest'
on: [pull_request, push]
jobs:
pretest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
node-version: 'lts/*'
- run: sudo curl -Lo /usr/bin/rooster https://github.com/SheetJS/rooster/releases/download/v0.2.0/rooster-v0.2.0-linux-amd64
- run: sudo chmod a+x /usr/bin/rooster
#- run: make init
#- run: 'cd test_files; make all; cd -'
#- run: npm run pretest
# posttest:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: ljharb/actions/node/install@main
# name: 'nvm install lts/* && npm install'
# with:
# node-version: 'lts/*'
# - run: make init
# - run: 'cd test_files; make all; cd -'
# - run: npm run posttest

88
.github/workflows/node-zero.yml vendored Normal file

@ -0,0 +1,88 @@
name: 'Tests: node.js (0.x)'
on: [pull_request, push]
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
stable: ${{ steps.set-matrix.outputs.requireds }}
# unstable: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
preset: '0.x'
stable:
needs: [matrix]
name: 'stable minors'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.stable) }}
include:
- node-version: '0.12.'
env:
TZ: America/Cayman
FMTS: misc
- node-version: '0.10.'
env:
TZ: Pacific/Honolulu
FMTS: misc
#- node-version: '0.8.'
# env:
# TZ: America/Mexico_City
# FMTS: misc
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
skip-ls-check: true
- run: sudo curl -Lo /usr/bin/rooster https://github.com/SheetJS/rooster/releases/download/v0.2.0/rooster-v0.2.0-linux-amd64
- run: sudo chmod a+x /usr/bin/rooster
#- run: make init
#- run: 'cd test_files; make all; cd -'
- run: npm run test
#- run: 'cd packages/ssf; npm run tests-only; cd -'
# unstable:
# needs: [matrix, stable]
# name: 'unstable minors'
# continue-on-error: true
# if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# node-version: ${{ fromJson(needs.matrix.outputs.unstable) }}
#
# steps:
# - uses: actions/checkout@v2
# - uses: ljharb/actions/node/install@main
# name: 'nvm install ${{ matrix.node-version }} && npm install'
# with:
# node-version: ${{ matrix.node-version }}
# cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
# skip-ls-check: true
# - run: sudo curl -Lo /usr/bin/rooster https://github.com/SheetJS/rooster/releases/download/v0.2.0/rooster-v0.2.0-linux-amd64
# - run: sudo chmod a+x /usr/bin/rooster
# - run: make init
# - run: 'cd test_files; make all; cd -'
# - run: npm run tests-only
node:
name: 'node 0.x'
# needs: [stable, unstable]
needs: [stable]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'

@ -37,7 +37,7 @@ crc32c.flow.js: crc32.flow.js
.PHONY: test mocha
test mocha: test.js $(TARGET) baseline ## Run test suite
mocha -R spec -t 60000
./node_modules/.bin/mocha -R spec -t 60000
.PHONY: ctest
ctest: ## Build browser test (into ctest/ subdirectory)
@ -65,7 +65,7 @@ fullint: lint old-lint tslint flow mdlint ## Run all checks
.PHONY: lint
lint: $(TARGET) $(AUXTARGETS) ## Run eslint checks
@eslint --ext .js,.njs,.json,.html,.htm $(TARGET) $(AUXTARGETS) $(CMDS) $(HTMLLINT) package.json bower.json
@eslint --ext .js,.njs,.json,.html,.htm $(TARGET) $(AUXTARGETS) $(CMDS) $(HTMLLINT) package.json
if [ -e $(CLOSURE) ]; then java -jar $(CLOSURE) $(REQS) $(FLOWTARGET) --jscomp_warning=reportUnknownTypes >/dev/null; fi
.PHONY: old-lint
@ -91,11 +91,11 @@ flow: lint ## Run flow checker
cov: misc/coverage.html ## Run coverage test
misc/coverage.html: $(TARGET) test.js
mocha --require blanket -R html-cov -t 60000 > $@
./node_modules/.bin/mocha --require blanket -R html-cov -t 60000 > $@
.PHONY: coveralls
coveralls: ## Coverage Test + Send to coveralls.io
mocha --require blanket --reporter mocha-lcov-reporter -t 60000 | node ./node_modules/coveralls/bin/coveralls.js
./node_modules/.bin/mocha --require blanket --reporter mocha-lcov-reporter -t 60000 | node ./node_modules/coveralls/bin/coveralls.js
MDLINT=README.md
.PHONY: mdlint

@ -33,7 +33,7 @@ function help()/*:number*/ {
function version()/*:number*/ { console.log(X.version); return 0; }
var fs = require('fs');
require('exit-on-epipe');
try { require('exit-on-epipe'); } catch(e) {}
function die(msg/*:string*/, ec/*:?number*/)/*:void*/ { console.error(msg); process.exit(ec || 0); }
@ -59,7 +59,14 @@ for(var i = 0; i < args.length; ++i) {
case "--hex": case "-x": fmt = "%0.8x"; break;
case "--HEX": case "-X": fmt = "%0.8X"; break;
case "--format": case "-F":
fmt = ((m!=arg) ? arg.substr(m.length+1) : args[++i])||""; break;
try {
require("printj");
fmt = ((m!=arg) ? arg.substr(m.length+1) : args[++i])||"";
} catch(e) {
console.error("The `crc-32` module removed the `printj` dependency for formatting");
console.error("Use the `crc32-cli` module instead:");
console.error(" $ npx crc32-cli [options] [filename]");
} break;
case "--hex-seed": case "-H": r = 16;
/* falls through */
@ -82,7 +89,15 @@ writable._writev = function(chunks, cb) {
cb();
};
writable.on('finish', function() {
console.log(fmt === "" ? crc32 : require("printj").sprintf(fmt, crc32));
if(fmt === "") console.log(crc32);
else try { console.log(require("printj").sprintf(fmt, crc32)); } catch(e) {
switch(fmt) {
case "%d": console.log(crc32); break;
case "%u": console.log(crc32 >>> 0); break;
case "%0.8x": console.log((crc32 >>> 0).toString(16).padStart(8, "0").toLowerCase()); break;
case "%0.8X": console.log((crc32 >>> 0).toString(16).padStart(8, "0").toUpperCase()); break;
}
}
});
if(filename === "-") process.stdin.pipe(writable);

@ -1 +1 @@
CRC32.version = '1.2.1';
CRC32.version = '1.2.2';

@ -25,7 +25,7 @@ var CRC32/*:CRC32Module*/;
/*eslint-enable */
/*jshint ignore:end */
}(function(CRC32/*:CRC32Module*/) {
CRC32.version = '1.2.1';
CRC32.version = '1.2.2';
/*::
type CRC32Type = number;
type ABuf = Array<number> | Buffer | Uint8Array;

@ -23,7 +23,7 @@ var CRC32;
/*eslint-enable */
/*jshint ignore:end */
}(function(CRC32) {
CRC32.version = '1.2.1';
CRC32.version = '1.2.2';
/*global Int32Array */
function signed_crc_table() {
var c = 0, table = new Array(256);

@ -25,7 +25,7 @@ var CRC32C/*:CRC32Module*/;
/*eslint-enable */
/*jshint ignore:end */
}(function(CRC32C/*:CRC32Module*/) {
CRC32C.version = '1.2.1';
CRC32C.version = '1.2.2';
/*::
type CRC32Type = number;
type ABuf = Array<number> | Buffer | Uint8Array;

@ -23,7 +23,7 @@ var CRC32C;
/*eslint-enable */
/*jshint ignore:end */
}(function(CRC32C) {
CRC32C.version = '1.2.1';
CRC32C.version = '1.2.2';
/*global Int32Array */
function signed_crc_table() {
var c = 0, table = new Array(256);

@ -23,7 +23,7 @@ var CRC32;
/*eslint-enable */
/*jshint ignore:end */
}(function(CRC32) {
CRC32.version = '1.2.1';
CRC32.version = '1.2.2';
/*global Int32Array */
function signed_crc_table() {
var c = 0, table = new Array(256);

@ -1,6 +1,6 @@
{
"name": "crc-32",
"version": "1.2.1",
"version": "1.2.2",
"author": "sheetjs",
"description": "Pure-JS CRC-32",
"keywords": [ "crc", "crc32", "checksum" ],
@ -11,10 +11,10 @@
"types": "types/index.d.ts",
"typesVersions": { "*": { "*": ["types/index.d.ts" ] } },
"dependencies": {
"printj": "~1.3.1",
"exit-on-epipe": "~1.0.1"
},
"devDependencies": {
"printj": "~1.3.1",
"exit-on-epipe": "~1.0.1",
"mocha": "~2.5.3",
"blanket": "~1.2.3",
"codepage": "~1.10.0",

@ -0,0 +1 @@
*.tgz