Skip to content

Commit d8b2f48

Browse files
committed
version bump 1.3.1: npm minutiae
1 parent 7847c20 commit d8b2f48

13 files changed

+49
-32
lines changed

Makefile

+24-13
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ FLOWTARGET=$(LIB).flow.js
1212
MJSTARGET=$(LIB).mjs
1313
FLOWTGTS=$(TARGET) $(AUXTARGETS)
1414
CLOSURE=/usr/local/lib/node_modules/google-closure-compiler/compiler.jar
15+
UGLIFY="./node_modules/@sheetjs/uglify-js/bin/uglifyjs"
16+
JSCS=./node_modules/.bin/jscs
17+
JSHINT=./node_modules/.bin/jshint
18+
MOCHA=./node_modules/.bin/mocha
19+
ESLINT=./node_modules/.bin/eslint
20+
ALEX=./node_modules/.bin/alex
21+
MDSPELL=./node_modules/.bin/mdspell
1522

1623
## Main Targets
1724

@@ -37,18 +44,22 @@ clean: clean-stress ## Remove targets and build artifacts
3744
@OUTDIR=$(PWD)/lib make -C bits clean
3845
rm -f $(TARGET) $(FLOWTARGET)
3946

47+
.PHONY: init
48+
init: ## Initial setup for development
49+
npm i
50+
4051
.PHONY: dist
4152
dist: $(TARGET) ## Prepare JS files for distribution
4253
cp $(TARGET) dist/
4354
cp LICENSE dist/
44-
uglifyjs $(TARGET) -o dist/$(LIB).min.js --source-map dist/$(LIB).min.map --preamble "$$(head -n 1 bits/00_header.js)"
55+
$(UGLIFY) $(TARGET) -o dist/$(LIB).min.js --source-map dist/$(LIB).min.map --preamble "$$(head -n 1 bits/00_header.js)"
4556
misc/strip_sourcemap.sh dist/$(LIB).min.js
4657

4758
## Testing
4859

4960
.PHONY: test mocha
5061
test mocha: test.js $(TARGET) ## Run test suite
51-
mocha -R spec -t 20000
62+
$(MOCHA) -R spec -t 20000
5263

5364
.PHONY: ctest
5465
ctest: ## Build browser test (into ctest/ subdirectory)
@@ -73,20 +84,20 @@ clean-stress: ## Remove stress tests
7384
## Code Checking
7485

7586
.PHONY: fullint
76-
fullint: lint old-lint tslint flow mdlint ## Run all checks
87+
fullint: lint old-lint tslint mdlint ## Run all checks
7788

7889
.PHONY: lint
7990
lint: $(TARGET) ## Run eslint checks
80-
@eslint --ext .js,.njs,.json,.html,.htm $(TARGET) $(AUXTARGETS) $(CMDS) $(HTMLLINT) package.json
91+
@$(ESLINT) --ext .js,.njs,.json,.html,.htm $(TARGET) $(AUXTARGETS) $(CMDS) $(HTMLLINT) package.json
8192
if [ -e $(CLOSURE) ]; then java -jar $(CLOSURE) $(FLOWTARGET) --jscomp_warning=reportUnknownTypes >/dev/null; fi
8293

8394
.PHONY: old-lint
8495
old-lint: $(TARGET) ## Run jshint and jscs checks
85-
@jshint --show-non-errors $(TARGET) $(AUXTARGETS)
86-
@jshint --show-non-errors $(CMDS)
87-
@jshint --show-non-errors package.json
88-
@jshint --show-non-errors --extract=always $(HTMLLINT)
89-
@jscs lib/*.js
96+
@$(JSHINT) --show-non-errors $(TARGET) $(AUXTARGETS)
97+
@$(JSHINT) --show-non-errors $(CMDS)
98+
@$(JSHINT) --show-non-errors package.json
99+
@$(JSHINT) --show-non-errors --extract=always $(HTMLLINT)
100+
@$(JSCS) lib/*.js
90101
if [ -e $(CLOSURE) ]; then java -jar $(CLOSURE) $(FLOWTARGET) --jscomp_warning=reportUnknownTypes >/dev/null; fi
91102

92103
.PHONY: tslint
@@ -102,17 +113,17 @@ flow: lint ## Run flow checker
102113
cov: misc/coverage.html ## Run coverage test
103114

104115
misc/coverage.html: $(TARGET) test.js
105-
mocha --require blanket -R html-cov -t 20000 > $@
116+
$(MOCHA) --require blanket -R html-cov -t 20000 > $@
106117

107118
.PHONY: coveralls
108119
coveralls: ## Coverage Test + Send to coveralls.io
109-
mocha --require blanket --reporter mocha-lcov-reporter -t 20000 | node ./node_modules/coveralls/bin/coveralls.js
120+
$(MOCHA) --require blanket --reporter mocha-lcov-reporter -t 20000 | node ./node_modules/coveralls/bin/coveralls.js
110121

111122
MDLINT=README.md
112123
.PHONY: mdlint
113124
mdlint: $(MDLINT) ## Check markdown documents
114-
alex $^
115-
mdspell -a -n -x -r --en-us $^
125+
$(ALEX) $^
126+
$(MDSPELL) -a -n -x -r --en-us $^
116127

117128
.PHONY: help
118129
help:

bin/printj.njs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env node
2-
/* printj.js (C) 2016-present SheetJS -- http://sheetjs.com */
2+
/* printj.js (C) 2016-present SheetJS -- https://sheetjs.com */
33
/* eslint-env node */
44
/* vim: set ts=2 ft=javascript: */
55
/*jshint node:true, evil:true */
@@ -28,8 +28,7 @@ function help() {
2828
" $ printj '|%s is %s|' s:1+2 e:1+2 # |1+2 is 3|",
2929
" $ printj '|%c %c|' s:69 n:69 # |6 E|",
3030
"",
31-
"Support email: [email protected]",
32-
"Web Demo: http://oss.sheetjs.com/printj/"
31+
"Web Demo: https://oss.sheetjs.com/printj/"
3332
].forEach(function(l) { console.log(l); });
3433
return 0;
3534
}

bits/01_version.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
PRINTJ.version = '1.3.0';
1+
PRINTJ.version = '1.3.1';

dist/printj.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var PRINTJ;
2525
/*jshint ignore:end */
2626
}(function(PRINTJ) {
2727

28-
PRINTJ.version = '1.3.0';
28+
PRINTJ.version = '1.3.1';
2929

3030
var tcache = {};
3131

dist/printj.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/loop_code.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
var PRINTJ/*:PRINTJModule*/ = /*::(*/{}/*:: :any)*/;
99

10-
PRINTJ.version = '1.3.0';
10+
PRINTJ.version = '1.3.1';
1111

1212
export const version = PRINTJ.version;
1313

package.json

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "printj",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"author": "sheetjs",
55
"description": "Pure-JS printf",
66
"keywords": [
@@ -10,10 +10,10 @@
1010
"string"
1111
],
1212
"bin": {
13-
"printj": "./bin/printj.njs"
13+
"printj": "bin/printj.njs"
1414
},
15-
"main": "./printj",
16-
"module": "./printj.mjs",
15+
"main": "printj.js",
16+
"module": "printj.mjs",
1717
"types": "types",
1818
"browser": {
1919
"process": false,
@@ -24,10 +24,16 @@
2424
"devDependencies": {
2525
"@sheetjs/uglify-js": "~2.7.3",
2626
"@types/node": "^8.0.7",
27+
"alex": "10.0.0",
2728
"blanket": "~1.2.3",
28-
"dtslint": "^0.1.2",
29-
"mocha": "~2.5.3",
30-
"typescript": "2.2.0"
29+
"dtslint": "4.2.1",
30+
"eslint": "6.8.0",
31+
"eslint-plugin-html": "6.0.0",
32+
"eslint-plugin-json": "1.4.0",
33+
"jscs": "3.0.7",
34+
"jshint": "2.9.6",
35+
"markdown-spellcheck": "1.3.1",
36+
"mocha": "~2.5.3"
3137
},
3238
"repository": {
3339
"type": "git",
@@ -46,6 +52,7 @@
4652
},
4753
"alex": {
4854
"allow": [
55+
"whitespace",
4956
"special",
5057
"period",
5158
"just",

printj.flow.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var PRINTJ/*:PRINTJModule*/;
2828
/*jshint ignore:end */
2929
}(function(PRINTJ/*:PRINTJModule*/) {
3030

31-
PRINTJ.version = '1.3.0';
31+
PRINTJ.version = '1.3.1';
3232

3333
var tcache = {};
3434

printj.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var PRINTJ;
2525
/*jshint ignore:end */
2626
}(function(PRINTJ) {
2727

28-
PRINTJ.version = '1.3.0';
28+
PRINTJ.version = '1.3.1';
2929

3030
var tcache = {};
3131

printj.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
var PRINTJ/*:PRINTJModule*/ = /*::(*/{}/*:: :any)*/;
99

10-
PRINTJ.version = '1.3.0';
10+
PRINTJ.version = '1.3.1';
1111

1212
export const version = PRINTJ.version;
1313

types/bin_printj.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ return 0;
3434

3535
function parse_arg(arg: string): any {
3636
const m: string = arg.substr(2);
37-
let p: number = 0;
37+
let p = 0;
3838
if(arg.charCodeAt(1) === 58) switch((p = arg.charCodeAt(0))) {
3939
case /*n*/ 110: return parseInt(m, 10);
4040
case /*f*/ 102: return parseFloat(m);

types/index.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* index.d.ts (C) 2015-present SheetJS */
2-
// TypeScript Version: 2.2
32

43
/** Version string */
54
export const version: string;

types/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"paths": { "printj": ["."] },
1010
"types": [],
1111
"noEmit": true,
12+
"strictFunctionTypes": true,
1213
"forceConsistentCasingInFileNames": true
1314
}
1415
}

0 commit comments

Comments
 (0)