Skip to content

Commit fce6908

Browse files
committed
Update dependencies and bump version.
1 parent e5d6e4d commit fce6908

8 files changed

Lines changed: 22 additions & 31 deletions

File tree

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{
22
"name": "cxml",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Advanced schema-aware streaming XML parser",
55
"main": "dist/cxml.js",
66
"typings": "dist/cxml.d.ts",
77
"scripts": {
88
"tsc": "tsc",
9-
"typings": "typings",
10-
"prepublish": "typings install && tsc",
11-
"test": "npm link cxml && tsc -p test && node test/dir-example.js"
9+
"prepublish": "tsc -p src",
10+
"test": "tsc -p test && node test/dir-example.js"
1211
},
1312
"author": "Juha Järvi",
1413
"license": "MIT",
@@ -30,11 +29,13 @@
3029
"typescript"
3130
],
3231
"dependencies": {
33-
"bluebird": "~3.3.3",
34-
"sax": "~1.1.5"
32+
"@types/bluebird": "^3.0.37",
33+
"@types/node": "^7.0.0",
34+
"@types/sax": "0.0.28",
35+
"bluebird": "^3.4.7",
36+
"sax": "~1.2.1"
3537
},
3638
"devDependencies": {
37-
"typescript": "~1.8.7",
38-
"typings": "~0.6.9"
39+
"typescript": "^2.1.5"
3940
}
4041
}

tsconfig.json renamed to src/tsconfig.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"module": "commonjs",
66
"moduleResolution": "node",
77
"noImplicitAny": true,
8-
"outDir": "dist",
8+
"noImplicitThis": true,
9+
"outDir": "../dist",
10+
"removeComments": false,
911
"target": "es5"
1012
},
1113
"files": [
12-
"typings/main.d.ts",
13-
14-
"src/cxml.ts"
14+
"cxml.ts"
1515
]
1616
}

src/xml/Parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ export class Parser {
7272
realHandler._custom = true;
7373
}
7474

75-
parse<Output extends HandlerInstance>(stream: stream.Readable | string, output: Output, context?: Context) {
75+
parse<Output extends HandlerInstance>(stream: string | stream.Readable | NodeJS.ReadableStream, output: Output, context?: Context) {
7676
return(new Promise<Output>((resolve: (item: Output) => void, reject: (err: any) => void) =>
7777
this._parse<Output>(stream, output, context, resolve, reject)
7878
));
7979
}
8080

8181
_parse<Output extends HandlerInstance>(
82-
stream: stream.Readable | string,
82+
stream: string | stream.Readable | NodeJS.ReadableStream,
8383
output: Output,
8484
context: Context,
8585
resolve: (item: Output) => void,

test/dir-example.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as fs from 'fs';
22
import * as path from 'path';
3-
import * as cxml from 'cxml';
4-
import * as example from 'cxml/test/xmlns/dir-example';
3+
import * as cxml from '..';
4+
import * as example from './xmlns/dir-example';
55

66
var parser = new cxml.Parser();
77

test/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
"module": "commonjs",
44
"moduleResolution": "node",
55
"noImplicitAny": true,
6+
"noImplicitThis": true,
67
"target": "es5"
78
},
89
"files": [
9-
"../typings/main.d.ts",
10-
1110
"dir-example.ts"
1211
]
1312
}

test/xmlns/dir-example.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var cxml = require("cxml");
1+
var cxml = require('../..');
22
var Primitive = require('./xml-primitives');
33

44
cxml.register('dir-example', exports, [
@@ -19,4 +19,4 @@ cxml.register('dir-example', exports, [
1919
['owner', [2], 0],
2020
['size', [1], 0],
2121
['sizeUnit', [5], 0]
22-
]);
22+
]);

test/xmlns/xml-primitives.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var cxml = require("cxml");
1+
var cxml = require('../..');
22

33
cxml.register('xml-primitives', exports, [
44
], [
@@ -15,4 +15,4 @@ cxml.register('xml-primitives', exports, [
1515
[3, 4, [], []],
1616
[3, 5, [], []]
1717
], [
18-
]);
18+
]);

typings.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)