Skip to content

Commit

Permalink
0.6.3 - Update to TypeScript 3.1 and fix some resulting compile error…
Browse files Browse the repository at this point in the history
…s, enable 'tsconfig.json' 'strict', update dev dependencies, remove compiled bin tarball in favor of git tags.
  • Loading branch information
TeamworkGuy2 committed Oct 16, 2018
1 parent d34a61c commit 0ed836c
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 19 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ This project does its best to adhere to [Semantic Versioning](http://semver.org/


--------
### [0.6.2](N/A) - 2018-04-08
### [0.6.3](N/A) - 2018-10-16
#### Changed
* Update to TypeScript 3.1
* Update dev dependencies and @types
* Enable `tsconfig.json` `strict` and fix compile errors
* Removed compiled bin tarball in favor of git tags


--------
### [0.6.2](https://github.com/TeamworkGuy2/dom-builder/commit/d34a61c4ba58e831c134b04b065a9507a73156a9) - 2018-04-08
#### Changed
* Added tarball and package.json npm script `build-package` reference for creating tarball

Expand Down
Binary file removed bin/dom-builder-0.6.2.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion dom/DomBuilderHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class DomBuilderHelper implements domBldr.BuilderHelper {

/** get multiple attributes from a Node and return them as an object */
public getNodeAttrs<K extends string>(elem: HasAttributes, attrNames: K[], skipNull?: boolean): { [P in K]: string };
public getNodeAttrs<T extends object>(elem: HasAttributes, attrNames: (keyof T)[], skipNull?: boolean): T {
public getNodeAttrs<T extends object>(elem: HasAttributes, attrNames: (keyof T & string)[], skipNull?: boolean): T {
var res = <T>{};
if (elem == null) {
return res;
Expand Down
6 changes: 6 additions & 0 deletions dom/DomLite.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ var DomLite;
DomLite.DocLike = DocLike;
var ElemLike = /** @class */ (function () {
function ElemLike(qualifiedName, namespaceUri) {
this.id = "";
this.nodeValue = null;
this.textContent = null;
this._attributes = null;
this._childNodes = null;
this.nodeName = qualifiedName;
}
Object.defineProperty(ElemLike.prototype, "attributes", {
Expand Down Expand Up @@ -131,6 +136,7 @@ var DomLite;
DomLite.ElemLike = ElemLike;
var TextNodeLike = /** @class */ (function () {
function TextNodeLike(data) {
this.textContent = null;
this.attributes = null;
this.childNodes = EMPTY_LIST;
this.nodeName = "#text";
Expand Down
12 changes: 6 additions & 6 deletions dom/DomLite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ module DomLite {


export class ElemLike implements ElementLike {
id: string;
id: string = "";
nodeName: string;
nodeValue: string | null;
textContent: string | null;
_attributes: (NamedNodeMapLike & AttributeLike[]) | null;
_childNodes: (NodeListLike & NodeLike[]) | null;
nodeValue: string | null = null;
textContent: string | null = null;
_attributes: (NamedNodeMapLike & AttributeLike[]) | null = null;
_childNodes: (NodeListLike & NodeLike[]) | null = null;
_classList?: (DOMTokenList & string[]) | null;
_style?: CSSStyleDeclaration | null;

Expand Down Expand Up @@ -176,7 +176,7 @@ module DomLite {
export class TextNodeLike implements NodeLike {
nodeName: string;
nodeValue: string | null;
textContent: string | null;
textContent: string | null = null;
attributes: NamedNodeMapLike = <any>null;
childNodes = EMPTY_LIST;

Expand Down
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
{
"name": "dom-builder",
"version": "0.6.2",
"version": "0.6.3",
"description": "TypeScript DOM builder utils, static helpers for element attributes and childNodes, and a virtual DOM implementation.",
"author": "TeamworkGuy2",
"homepage": "https://github.com/TeamworkGuy2/dom-builder",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"@types/chai": "~4.1.2",
"@types/mocha": "~5.0.0",
"chai": "~4.1.2",
"mocha": "~5.0.5",
"package-tarball": "~0.1.0",
"typescript": "~2.8.0"
"@types/chai": "~4.1.6",
"@types/mocha": "~5.2.5",
"chai": "~4.2.0",
"mocha": "~5.2.0",
"typescript": "~3.1.3"
},
"scripts": {
"build-package": "node ../package-tarball/index.js",
"test": "mocha -u tdd --recursive",
"tsc": "tsc"
}
Expand Down
4 changes: 1 addition & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
"lib": [ "es2017", "dom" ],
"module": "commonjs",
"noEmitOnError": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"removeComments": false,
"sourceMap": false,
"strictNullChecks": true,
"strict": true,
"target": "es5"
}
}

0 comments on commit 0ed836c

Please sign in to comment.