From 9770eaf432bacff9de1b9911adef1db368b8cc70 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 24 Oct 2018 01:26:15 +0200 Subject: Throw in tslint and fix style --- package.json | 1 + src/index.ts | 18 +++---- src/model/MapData.ts | 31 ++++++------ src/util.ts | 12 ++--- src/view/MapLoader.ts | 77 +++++++++++++++--------------- src/view/MapView.ts | 82 +++++++++++++++---------------- src/view/Renderer.ts | 102 +++++++++++++++++++-------------------- tslint.json | 14 ++++++ yarn.lock | 130 ++++++++++++++++++++++++++++++++++++++++++++++++-- 9 files changed, 300 insertions(+), 167 deletions(-) create mode 100644 tslint.json diff --git a/package.json b/package.json index 058fc3e..2105441 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "@types/gl-matrix": "^2.4.4", "raw-loader": "^0.5.1", "ts-loader": "^5.2.2", + "tslint": "^5.11.0", "typescript": "^3.1.3", "uglifyjs-webpack-plugin": "^2.0.1", "webpack": "^4.22.0", diff --git a/src/index.ts b/src/index.ts index 6390017..1c2035f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import MapData from './model/MapData'; -import Renderer from './view/Renderer'; import {loadMap} from './view/MapLoader'; +import Renderer from './view/Renderer'; window.onload = () => { const canvas = document.getElementById('rpgedit') as HTMLCanvasElement; @@ -10,15 +10,15 @@ window.onload = () => { const renderer = new Renderer(canvas); - let xhr = new XMLHttpRequest(); + const xhr = new XMLHttpRequest(); - xhr.addEventListener('load', async function() { - let mapDef = new MapData(JSON.parse(this.responseText)); + xhr.addEventListener('load', async function() { + const mapDef = new MapData(JSON.parse(this.responseText)); - let mapView = await loadMap(renderer, mapDef); - mapView.draw(); - }); + const mapView = await loadMap(renderer, mapDef); + mapView.draw(); + }); - xhr.open('GET', 'resources/map/test.json', true); - xhr.send(); + xhr.open('GET', 'resources/map/test.json', true); + xhr.send(); }; diff --git a/src/model/MapData.ts b/src/model/MapData.ts index b83e146..dcb98b8 100644 --- a/src/model/MapData.ts +++ b/src/model/MapData.ts @@ -1,26 +1,25 @@ import {mapFromObject} from '../util'; - interface Input { - tiles: {[key: string]: string}; - collision: string[]; - layers: string[][][]; + tiles: {[key: string]: string}; + collision: string[]; + layers: string[][][]; } export default class MapData { - tiles: Map; - collision: string[]; - layers: string[][][]; + public tiles: Map; + public collision: string[]; + public layers: string[][][]; - width: number; - height: number; + public width: number; + public height: number; - constructor(data: Input) { - this.tiles = mapFromObject(data.tiles); - this.collision = data.collision; - this.layers = data.layers; + constructor(data: Input) { + this.tiles = mapFromObject(data.tiles); + this.collision = data.collision; + this.layers = data.layers; - this.height = this.collision.length; - this.width = this.collision[0].length; - } + this.height = this.collision.length; + this.width = this.collision[0].length; + } } diff --git a/src/util.ts b/src/util.ts index 73788ad..453966e 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,25 +1,25 @@ export function mapFromObject(obj: {[key: string]: T}): Map { - let ret = new Map(); + const ret = new Map(); - for (let k of Object.keys(obj)) + for (const k of Object.keys(obj)) ret.set(k, obj[k]); return ret; } export function mapValues(f: (v: V1) => V2, map: Map): Map { - let ret: Map = new Map(); + const ret: Map = new Map(); - for (let [k, v] of map) + for (const [k, v] of map) ret.set(k, f(v)); return ret; } export async function mapValuesAsync(f: (v: V1) => Promise, map: Map): Promise> { - let ret: Map = new Map(); + const ret: Map = new Map(); - for (let [k, v] of mapValues(f, map)) + for (const [k, v] of mapValues(f, map)) ret.set(k, await v); return ret; diff --git a/src/view/MapLoader.ts b/src/view/MapLoader.ts index f39700e..f178c69 100644 --- a/src/view/MapLoader.ts +++ b/src/view/MapLoader.ts @@ -1,63 +1,62 @@ import {mapValues, mapValuesAsync, nextPowerOf2} from '../util'; -import Renderer from './Renderer'; -import MapView from './MapView'; import MapData from '../model/MapData'; - +import MapView from './MapView'; +import Renderer from './Renderer'; function loadImage(url: string): Promise { - return new Promise(function(resolve, reject) { - let img = new Image(); - img.addEventListener('load', () => { resolve(img); }); - img.addEventListener('error', () => { reject(Error('failed to load ' + url)); }); - img.src = url; - }); + return new Promise((resolve, reject) => { + const img = new Image(); + img.addEventListener('load', () => { resolve(img); }); + img.addEventListener('error', () => { reject(Error('failed to load ' + url)); }); + img.src = url; + }); } function loadImages(urls: Map): Promise> { - return mapValuesAsync(loadImage, urls); + return mapValuesAsync(loadImage, urls); } function loadTiles(tiles: Map): Promise> { - return loadImages(mapValues(t => `resources/sprite/tile/${t}.png`, tiles)); + return loadImages(mapValues((t) => `resources/sprite/tile/${t}.png`, tiles)); } function mkTexture(gl: WebGLRenderingContext, src: HTMLCanvasElement|HTMLImageElement): WebGLTexture { - let texture = gl.createTexture(); - if (!texture) - throw new Error('unable to create texture'); - - gl.bindTexture(gl.TEXTURE_2D, texture); - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, src); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); - - return texture; + const texture = gl.createTexture(); + if (!texture) + throw new Error('unable to create texture'); + + gl.bindTexture(gl.TEXTURE_2D, texture); + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, src); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); + + return texture; } -function mkTileTexture(gl: WebGLRenderingContext, tiles: Map): [WebGLTexture, Map] { - let canvas = document.createElement('canvas'); - canvas.width = nextPowerOf2(tiles.size) * MapView.tileSize; - canvas.height = MapView.tileSize; +function mkTileTexture(gl: WebGLRenderingContext, tiles: Map): +[WebGLTexture, Map] { + const canvas = document.createElement('canvas'); + canvas.width = nextPowerOf2(tiles.size) * MapView.tileSize; + canvas.height = MapView.tileSize; - let i = 0; - let ret: Map = new Map(); - let ctx = canvas.getContext('2d') as CanvasRenderingContext2D; + let i = 0; + const ret: Map = new Map(); + const ctx = canvas.getContext('2d') as CanvasRenderingContext2D; - for (let [k, tile] of tiles) { - ctx.drawImage(tile, i * MapView.tileSize, 0); - ret.set(k, i++); - } + for (const [k, tile] of tiles) { + ctx.drawImage(tile, i * MapView.tileSize, 0); + ret.set(k, i++); + } - return [mkTexture(gl, canvas), ret]; + return [mkTexture(gl, canvas), ret]; } - export async function loadMap(r: Renderer, mapData: MapData): Promise { - let tiles = await loadTiles(mapData.tiles); - let [tileTexture, tileMap] = mkTileTexture(r.gl, tiles); + const tiles = await loadTiles(mapData.tiles); + const [tileTexture, tileMap] = mkTileTexture(r.gl, tiles); - return new MapView(r, mapData, tileTexture, tileMap); + return new MapView(r, mapData, tileTexture, tileMap); } diff --git a/src/view/MapView.ts b/src/view/MapView.ts index 21f83d5..97d5d7d 100644 --- a/src/view/MapView.ts +++ b/src/view/MapView.ts @@ -1,49 +1,30 @@ import {nextPowerOf2} from '../util'; -import Renderer from './Renderer'; import MapData from '../model/MapData'; +import Renderer from './Renderer'; +export default class MapView { + public static readonly tileSize: number = 32; -class MapView { - private redrawPending: boolean = false; + private redrawPending: boolean = false; private vertexBuffer: WebGLBuffer; private textureBuffer: WebGLBuffer; + constructor( + private r: Renderer, + private map: MapData, + private tileTexture: WebGLTexture, + private tileMap: Map, + ) { + const vertexData: number[] = []; + const textureData: number[] = []; - private addTile(vertexData: number[], textureData: number[], x: number, y: number, tile: string, tileCount: number) { - let tileID = this.tileMap.get(tile); - if (tileID === undefined) - throw new Error('invalid tile specifier in map data'); - - vertexData.push(x); vertexData.push(y); - vertexData.push(x+1); vertexData.push(y); - vertexData.push(x); vertexData.push(y+1); - - vertexData.push(x); vertexData.push(y+1); - vertexData.push(x+1); vertexData.push(y); - vertexData.push(x+1); vertexData.push(y+1); - - textureData.push((tileID) / tileCount); textureData.push(0); - textureData.push((tileID+1) / tileCount); textureData.push(0); - textureData.push((tileID) / tileCount); textureData.push(1); - - textureData.push((tileID) / tileCount); textureData.push(1); - textureData.push((tileID+1) / tileCount); textureData.push(0); - textureData.push((tileID+1) / tileCount); textureData.push(1); - } - - constructor(private r: Renderer, private map: MapData, private tileTexture: WebGLTexture, private tileMap: Map) { - let vertexData: number[] = []; - let textureData: number[] = []; + const tileCount = nextPowerOf2(tileMap.size); - let tileCount = nextPowerOf2(tileMap.size); - - for (let x = 0; x < map.width; x++) { - for (let y = 0; y < map.height; y++) { - this.addTile(vertexData, textureData, x, y, map.layers[0][y][x], tileCount); - } - } + for (let x = 0; x < map.width; x++) + for (let y = 0; y < map.height; y++) + this.addTile(vertexData, textureData, x, y, map.layers[0][y][x], tileCount); this.vertexBuffer = r.createBuffer(); r.gl.bindBuffer(r.gl.ARRAY_BUFFER, this.vertexBuffer); @@ -52,9 +33,9 @@ class MapView { this.textureBuffer = r.createBuffer(); r.gl.bindBuffer(r.gl.ARRAY_BUFFER, this.textureBuffer); r.gl.bufferData(r.gl.ARRAY_BUFFER, new Float32Array(textureData), r.gl.STATIC_DRAW); - } + } - draw(): void { + public draw(): void { this.r.gl.clear(this.r.gl.COLOR_BUFFER_BIT); this.r.gl.activeTexture(this.r.gl.TEXTURE0); @@ -68,12 +49,27 @@ class MapView { this.r.gl.vertexAttribPointer(this.r.textureCoordLoc, 2, this.r.gl.FLOAT, false, 0, 0); this.r.gl.drawArrays(this.r.gl.TRIANGLES, 0, 6 * this.map.width * this.map.height); - } -} + } -module MapView { - export const tileSize = 32; -} + private addTile(vertexData: number[], textureData: number[], x: number, y: number, tile: string, tileCount: number) { + const tileID = this.tileMap.get(tile); + if (tileID === undefined) + throw new Error('invalid tile specifier in map data'); + vertexData.push(x); vertexData.push(y); + vertexData.push(x + 1); vertexData.push(y); + vertexData.push(x); vertexData.push(y + 1); -export default MapView; + vertexData.push(x); vertexData.push(y + 1); + vertexData.push(x + 1); vertexData.push(y); + vertexData.push(x + 1); vertexData.push(y + 1); + + textureData.push((tileID) / tileCount); textureData.push(0); + textureData.push((tileID + 1) / tileCount); textureData.push(0); + textureData.push((tileID) / tileCount); textureData.push(1); + + textureData.push((tileID) / tileCount); textureData.push(1); + textureData.push((tileID + 1) / tileCount); textureData.push(0); + textureData.push((tileID + 1) / tileCount); textureData.push(1); + } +} diff --git a/src/view/Renderer.ts b/src/view/Renderer.ts index 9b7bfe3..ae3c6e7 100644 --- a/src/view/Renderer.ts +++ b/src/view/Renderer.ts @@ -1,85 +1,62 @@ import {mat4} from 'gl-matrix'; - -import vertexShaderSrc from './default.vs'; import fragmentShaderSrc from './default.fs'; - +import vertexShaderSrc from './default.vs'; export default class Renderer { public gl: WebGLRenderingContext; public vertexPosLoc!: number; public textureCoordLoc!: number; - private viewportLoc!: WebGLUniformLocation; - private translateLoc!: WebGLUniformLocation; public samplerLoc!: WebGLUniformLocation; private viewport: mat4 = mat4.create(); - private mkContext(): WebGLRenderingContext { - let gl = (this.canvas.getContext('webgl') || this.canvas.getContext('experimental-webgl')) as WebGLRenderingContext|null; - if (!gl) - throw new Error('unable to initialize WebGL context'); - - return gl; - } + private viewportLoc!: WebGLUniformLocation; + private translateLoc!: WebGLUniformLocation; - getAttribLocation(program: WebGLProgram, name: string): number { - let ret = this.gl.getAttribLocation(program, name); - if (ret < 0) - throw new Error("unable to get location of attribute '" + name + "'"); + constructor(private canvas: HTMLCanvasElement) { + this.gl = this.mkContext(); - return ret; - } + this.initShaders(); - getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation { - let ret = this.gl.getUniformLocation(program, name); - if (!ret) - throw new Error("unable to get location of uniform '" + name + "'"); + this.gl.clearColor(0.0, 0.0, 0.0, 1.0); - return ret; + this.setSize(); } - createBuffer(): WebGLBuffer { - let ret = this.gl.createBuffer(); + public createBuffer(): WebGLBuffer { + const ret = this.gl.createBuffer(); if (!ret) throw new Error('unable to create buffer'); return ret; } - compileShader(type: number, src: string): WebGLShader { - let shader = this.gl.createShader(type); - if (!shader) - throw new Error('Unable to create shader'); - - this.gl.shaderSource(shader, src); - this.gl.compileShader(shader); - - if (!this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS)) { - let err = this.gl.getShaderInfoLog(shader); - this.gl.deleteShader(shader); - throw new Error('Unable to compile shader: ' + err); - } + private mkContext(): WebGLRenderingContext { + const gl = ( + this.canvas.getContext('webgl') || this.canvas.getContext('experimental-webgl') + ) as WebGLRenderingContext|null; + if (!gl) + throw new Error('unable to initialize WebGL context'); - return shader; + return gl; } private initShaders(): void { - let shaderProgram = this.gl.createProgram(); + const shaderProgram = this.gl.createProgram(); if (!shaderProgram) throw new Error('Unable to create shader program'); - let vertexShader = this.compileShader(this.gl.VERTEX_SHADER, vertexShaderSrc); - let fragmentShader = this.compileShader(this.gl.FRAGMENT_SHADER, fragmentShaderSrc); - + const vertexShader = this.compileShader(this.gl.VERTEX_SHADER, vertexShaderSrc); + const fragmentShader = this.compileShader(this.gl.FRAGMENT_SHADER, fragmentShaderSrc); this.gl.attachShader(shaderProgram, vertexShader); this.gl.attachShader(shaderProgram, fragmentShader); this.gl.linkProgram(shaderProgram); if (!this.gl.getProgramParameter(shaderProgram, this.gl.LINK_STATUS)) { - let err = this.gl.getProgramInfoLog(shaderProgram); + const err = this.gl.getProgramInfoLog(shaderProgram); this.gl.deleteShader(vertexShader); this.gl.deleteShader(fragmentShader); @@ -102,8 +79,8 @@ export default class Renderer { } private setSize(): void { - let w = this.canvas.width; - let h = this.canvas.height; + const w = this.canvas.width; + const h = this.canvas.height; this.gl.viewport(0, 0, w, h); this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT); @@ -115,13 +92,36 @@ export default class Renderer { this.gl.uniform2f(this.translateLoc, -5.0, -5.0); } - constructor(private canvas: HTMLCanvasElement) { - this.gl = this.mkContext(); + private getAttribLocation(program: WebGLProgram, name: string): number { + const ret = this.gl.getAttribLocation(program, name); + if (ret < 0) + throw new Error("unable to get location of attribute '" + name + "'"); - this.initShaders(); + return ret; + } - this.gl.clearColor(0.0, 0.0, 0.0, 1.0); + private getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation { + const ret = this.gl.getUniformLocation(program, name); + if (!ret) + throw new Error("unable to get location of uniform '" + name + "'"); - this.setSize(); + return ret; + } + + private compileShader(type: number, src: string): WebGLShader { + const shader = this.gl.createShader(type); + if (!shader) + throw new Error('Unable to create shader'); + + this.gl.shaderSource(shader, src); + this.gl.compileShader(shader); + + if (!this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS)) { + const err = this.gl.getShaderInfoLog(shader); + this.gl.deleteShader(shader); + throw new Error('Unable to compile shader: ' + err); + } + + return shader; } } diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000..75849af --- /dev/null +++ b/tslint.json @@ -0,0 +1,14 @@ +{ + "defaultSeverity": "warning", + "extends": [ + "tslint:recommended" + ], + "jsRules": {}, + "rules": { + "curly": [true, "as-needed"], + "indent": [true, "tabs"], + "no-bitwise": false, + "quotemark": [true, "single", "avoid-escape", "avoid-template"] + }, + "rulesDirectory": [] +} diff --git a/yarn.lock b/yarn.lock index ab2cbf5..79c3fce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -225,6 +225,11 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -253,6 +258,13 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" @@ -331,6 +343,15 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== +babel-code-frame@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -519,6 +540,11 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" +builtin-modules@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= + builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -588,6 +614,17 @@ camelcase@^4.1.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= +chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + chalk@^2.3.0, chalk@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" @@ -681,6 +718,11 @@ color-name@1.1.3: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= +commander@^2.12.1: + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== + commander@~2.13.0: version "2.13.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" @@ -987,6 +1029,11 @@ detect-node@^2.0.3: resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== +diff@^3.2.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -1087,7 +1134,7 @@ escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= -escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -1100,6 +1147,11 @@ eslint-scope@^4.0.0: esrecurse "^4.1.0" estraverse "^4.1.1" +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + esrecurse@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" @@ -1112,6 +1164,11 @@ estraverse@^4.1.0, estraverse@^4.1.1: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= + etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" @@ -1434,7 +1491,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob@^7.0.3, glob@^7.0.5, glob@^7.1.2: +glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== @@ -1472,6 +1529,13 @@ handle-thing@^1.2.5: resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" integrity sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ= +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -1878,6 +1942,19 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + +js-yaml@^3.7.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" + integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -2599,6 +2676,11 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= +path-parse@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -2892,6 +2974,13 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= +resolve@^1.3.2: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== + dependencies: + path-parse "^1.0.5" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -3195,6 +3284,11 @@ split-string@^3.0.1, split-string@^3.0.2: dependencies: extend-shallow "^3.0.0" +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + ssri@^5.2.4: version "5.3.0" resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.3.0.tgz#ba3872c9c6d33a0704a7d71ff045e5ec48999d06" @@ -3307,6 +3401,11 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + supports-color@^5.1.0, supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -3393,11 +3492,36 @@ ts-loader@^5.2.2: micromatch "^3.1.4" semver "^5.0.1" -tslib@^1.9.0: +tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== +tslint@^5.11.0: + version "5.11.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.11.0.tgz#98f30c02eae3cde7006201e4c33cb08b48581eed" + integrity sha1-mPMMAurjzecAYgHkwzywi0hYHu0= + dependencies: + babel-code-frame "^6.22.0" + builtin-modules "^1.1.1" + chalk "^2.3.0" + commander "^2.12.1" + diff "^3.2.0" + glob "^7.1.1" + js-yaml "^3.7.0" + minimatch "^3.0.4" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.8.0" + tsutils "^2.27.2" + +tsutils@^2.27.2: + version "2.29.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" + integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== + dependencies: + tslib "^1.8.1" + tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" -- cgit v1.2.3