Skip to content

Commit 9aa4f8d

Browse files
committed
version bump 1.10.0: pin dependencies
1 parent 2e57f80 commit 9aa4f8d

23 files changed

+64
-54
lines changed

bin/codepage.njs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ if(f !== "-" && !fs.existsSync(f)) {
4545
if(f === "-") process.stdin.pipe(require('concat-stream')(process_text));
4646
else process_text(fs.readFileSync(f));
4747

48-
function process_text(text) {
49-
var dec = codepage.utils.decode(fr, text);
48+
function process_text(text/*:Buffer*/) {
49+
var dec/*:Buffer*/ = codepage.utils.decode(fr, text);
5050

5151
var bom/*:Array<Buffer>*/ = [];
5252
bom[1200] = new Buffer([0xFF, 0xFE]);
@@ -58,7 +58,7 @@ function process_text(text) {
5858
bom[65001] = new Buffer([0xEF, 0xBB, 0xBF]);
5959

6060
var mybom = (program.bom && bom[to] ? bom[to] : "");
61-
var out = to === 65001 ? dec.toString('utf8') : codepage.utils.encode(to, dec);
61+
var out/*:any*/ = to === 65001 ? dec.toString('utf8') : codepage.utils.encode(to, dec);
6262

6363
/* if output file is specified */
6464
if(o) writefile(o, out, mybom);
@@ -76,12 +76,12 @@ function process_text(text) {
7676
}
7777
}
7878

79-
function logit(out, bom) {
79+
function logit(out/*:Buffer*/, bom) {
8080
process.stdout.write(bom);
8181
process.stdout.write(out);
8282
}
8383

84-
function writefile(o, out, bom) {
84+
function writefile(o, out/*:Buffer*/, bom) {
8585
fs.writeFileSync(o, bom);
8686
fs.appendFileSync(o, out);
8787
}

codepage.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ describe('failures', function() {
753753
```json>package.json
754754
{
755755
"name": "codepage",
756-
"version": "1.9.0",
756+
"version": "1.10.0",
757757
"author": "SheetJS",
758758
"description": "pure-JS library to handle codepages",
759759
"keywords": [ "codepage", "iconv", "convert", "strings" ],
@@ -770,13 +770,13 @@ describe('failures', function() {
770770
],
771771
"main": "cputils.js",
772772
"dependencies": {
773-
"voc":"",
774-
"concat-stream":"",
775-
"exit-on-epipe":"",
776-
"commander":""
773+
"voc":"~1.0.0",
774+
"concat-stream":"~1.6.0",
775+
"exit-on-epipe":"~1.0.1",
776+
"commander":"~2.11.0"
777777
},
778778
"devDependencies": {
779-
"mocha":""
779+
"mocha":"~2.5.3"
780780
},
781781
"repository": { "type":"git", "url":"git://github.com/SheetJS/js-codepage.git"},
782782
"scripts": {

cpexcel.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cptable.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cputils.flow.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,21 @@
22
/* vim: set ft=javascript: */
33
/*jshint newcap: false */
44
/*::
5-
type Data = string | Array<number> | Buffer;
6-
type StrData = string | Array<string> | Buffer;
7-
type OutType = Data;
85
type Decoder = (data:Data)=>string;
96
type Encoder = (data:StrData, ofmt:?string)=>Data;
10-
type CPIndex = number|string;
11-
type EMap = {[e:string]:number};
12-
type DMap = Array<string>;
137
type EncoderMap = {[id:CPIndex]:Encoder};
148
type DecoderMap = {[id:CPIndex]:Decoder};
15-
type CPEntry = {enc:EMap, dec:DMap};
169
*/
1710
(function(root/*:any*/, factory) {
1811
"use strict";
1912
if(typeof cptable === "undefined") {
2013
if(typeof require !== "undefined"){
21-
var cpt = require('./cpt' + 'able');
14+
var cpt/*:CPTable*/ = require('./cptable');
2215
if (typeof module !== 'undefined' && module.exports) module.exports = factory(cpt);
2316
else root.cptable = factory(cpt);
2417
} else throw new Error("cptable not found");
2518
} else cptable = factory(cptable);
26-
}(this, function(cpt){
19+
}(this, function(cpt/*:CPTable*/){
2720
"use strict";
2821
var magic/*:{[id:CPIndex]:string}*/ = {
2922
"1200":"utf16le",
@@ -414,7 +407,7 @@ type CPEntry = {enc:EMap, dec:DMap};
414407
out = out.slice(0,j);
415408
if(!has_buf) return (ofmt == 'str') ? (out/*:any*/).map(sfcc).join("") : out;
416409
if(!ofmt || ofmt === 'buf') return out;
417-
if(ofmt !== 'arr') return out.toString('binary');
410+
if(ofmt !== 'arr') return /*::((*/out/*:: :any) :Buffer)*/.toString('binary');
418411
return [].slice.call(out);
419412
};
420413
var decode = function decode(cp/*:CPIndex*/, data/*:Data*/)/*:string*/ {

misc/codepage.md.ascii

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ describe('failures', function() {
753753
```json>package.json
754754
{
755755
"name": "codepage",
756-
"version": "1.9.0",
756+
"version": "1.10.0",
757757
"author": "SheetJS",
758758
"description": "pure-JS library to handle codepages",
759759
"keywords": [ "codepage", "iconv", "convert", "strings" ],
@@ -770,13 +770,13 @@ describe('failures', function() {
770770
],
771771
"main": "cputils.js",
772772
"dependencies": {
773-
"voc":"",
774-
"concat-stream":"",
775-
"exit-on-epipe":"",
776-
"commander":""
773+
"voc":"~1.0.0",
774+
"concat-stream":"~1.6.0",
775+
"exit-on-epipe":"~1.0.1",
776+
"commander":"~2.11.0"
777777
},
778778
"devDependencies": {
779-
"mocha":""
779+
"mocha":"~2.5.3"
780780
},
781781
"repository": { "type":"git", "url":"git://github.com/SheetJS/js-codepage.git"},
782782
"scripts": {

misc/codepage.md.utf16be

64 Bytes
Binary file not shown.

misc/codepage.md.utf16le

64 Bytes
Binary file not shown.

misc/codepage.md.utf32be

128 Bytes
Binary file not shown.

misc/codepage.md.utf32le

128 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy