Bump dependency versions to unbreak build (#253)

I ended up in a horrible peer dependency hell and apparently needed to bump the versions of quicktype, typescript, ts-jest, *and* jest to get out of it. But I think I got out of it!

Local builds and deployment builds both seem to work after these changes.
This commit is contained in:
Jamie Wong 2020-01-15 23:32:14 -08:00 committed by GitHub
parent 5ae9abcf1d
commit 375040e892
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 2326 additions and 3202 deletions

5490
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -37,7 +37,7 @@
"coveralls": "3.0.1", "coveralls": "3.0.1",
"eslint": "4.19.1", "eslint": "4.19.1",
"eslint-plugin-prettier": "2.6.0", "eslint-plugin-prettier": "2.6.0",
"jest": "23.0.1", "jest": "24.3.0",
"jsverify": "0.8.3", "jsverify": "0.8.3",
"jszip": "3.1.5", "jszip": "3.1.5",
"pako": "1.0.6", "pako": "1.0.6",
@ -46,10 +46,10 @@
"preact-redux": "jlfwong/preact-redux#a56dcc4", "preact-redux": "jlfwong/preact-redux#a56dcc4",
"prettier": "1.12.0", "prettier": "1.12.0",
"protobufjs": "6.8.8", "protobufjs": "6.8.8",
"quicktype": "15.0.45", "quicktype": "15.0.209",
"redux": "^4.0.0", "redux": "^4.0.0",
"ts-jest": "22.4.6", "ts-jest": "24.3.0",
"typescript": "2.8.1", "typescript": "3.2.4",
"typescript-eslint-parser": "17.0.1", "typescript-eslint-parser": "17.0.1",
"uglify-es": "3.2.2" "uglify-es": "3.2.2"
}, },

View File

@ -455,7 +455,8 @@ export namespace WebGL {
widthInAppUnits: number, widthInAppUnits: number,
heightInAppUnits: number, heightInAppUnits: number,
) { ) {
const bounds = this._gl.canvas.getBoundingClientRect() let canvas = this._gl.canvas as HTMLCanvasElement
const bounds = canvas.getBoundingClientRect()
if ( if (
this._width === widthInAppUnits && this._width === widthInAppUnits &&
@ -467,7 +468,6 @@ export namespace WebGL {
return return
} }
let canvas = this._gl.canvas
let style = canvas.style let style = canvas.style
canvas.width = widthInPixels canvas.width = widthInPixels
canvas.height = heightInPixels canvas.height = heightInPixels
@ -1086,11 +1086,17 @@ export namespace WebGL {
_compileShader(gl: WebGLRenderingContext, type: GLenum, source: string) { _compileShader(gl: WebGLRenderingContext, type: GLenum, source: string) {
let shader = gl.createShader(type) let shader = gl.createShader(type)
if (!shader) {
throw new Error('Failed to create shader')
}
gl.shaderSource(shader, source) gl.shaderSource(shader, source)
gl.compileShader(shader) gl.compileShader(shader)
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
throw new Error(`${gl.getShaderInfoLog(shader)}`) throw new Error(`${gl.getShaderInfoLog(shader)}`)
} }
if (!this._program) {
throw new Error('Tried to attach shader before program was created')
}
gl.attachShader(this._program, shader) gl.attachShader(this._program, shader)
} }

View File

@ -633,7 +633,7 @@ export function readInstrumentsKeyedArchive(buffer: ArrayBuffer): any {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
export function decodeUTF8(bytes: Uint8Array): string { export function decodeUTF8(bytes: Uint8Array): string {
let text = String.fromCharCode.apply(String, bytes) let text = String.fromCharCode.apply(String, Array.from(bytes))
if (text.slice(-1) === '\0') text = text.slice(0, -1) // Remove a single trailing null character if present if (text.slice(-1) === '\0') text = text.slice(0, -1) // Remove a single trailing null character if present
return decodeURIComponent(escape(text)) return decodeURIComponent(escape(text))
} }
@ -740,7 +740,10 @@ function paternMatchObjectiveC(
// Replace NSString with a string // Replace NSString with a string
case 'NSString': case 'NSString':
case 'NSMutableString': case 'NSMutableString':
return decodeUTF8(value['NS.bytes']) if (value['NS.string']) return value['NS.string']
if (value['NS.bytes']) return decodeUTF8(value['NS.bytes'])
console.warn(`Unexpected ${name} format: `, value)
return null
// Replace NSArray with an Array // Replace NSArray with an Array
case 'NSArray': case 'NSArray':

View File

@ -1,6 +1,6 @@
import {checkProfileSnapshot} from '../lib/test-utils' import {checkProfileSnapshot} from '../lib/test-utils'
describe('importFromLinuxPerf', async () => { describe('importFromLinuxPerf', () => {
test('simple.linux-perf.txt', async () => { test('simple.linux-perf.txt', async () => {
await checkProfileSnapshot('./sample/profiles/linux-perf/simple.linux-perf.txt') await checkProfileSnapshot('./sample/profiles/linux-perf/simple.linux-perf.txt')
}) })

View File

@ -1,6 +1,6 @@
import {checkProfileSnapshot} from './test-utils' import {checkProfileSnapshot} from './test-utils'
describe('importSpeedscopeProfiles', async () => { describe('importSpeedscopeProfiles', () => {
test('0.0.1 evented profile', async () => { test('0.0.1 evented profile', async () => {
await checkProfileSnapshot('./sample/profiles/speedscope/0.0.1/simple.speedscope.json') await checkProfileSnapshot('./sample/profiles/speedscope/0.0.1/simple.speedscope.json')
}) })

View File

@ -402,6 +402,8 @@ export class Application extends StatelessComponent<ApplicationProps> {
this.props.setDragActive(false) this.props.setDragActive(false)
ev.preventDefault() ev.preventDefault()
if (!ev.dataTransfer) return
const firstItem = ev.dataTransfer.items[0] const firstItem = ev.dataTransfer.items[0]
if ('webkitGetAsEntry' in firstItem) { if ('webkitGetAsEntry' in firstItem) {
const webkitEntry: FileSystemDirectoryEntry = firstItem.webkitGetAsEntry() const webkitEntry: FileSystemDirectoryEntry = firstItem.webkitGetAsEntry()
@ -490,7 +492,9 @@ export class Application extends StatelessComponent<ApplicationProps> {
ev.preventDefault() ev.preventDefault()
ev.stopPropagation() ev.stopPropagation()
const pasted = (ev as ClipboardEvent).clipboardData.getData('text') const clipboardData = (ev as ClipboardEvent).clipboardData
if (!clipboardData) return
const pasted = clipboardData.getData('text')
this.loadProfile(async () => { this.loadProfile(async () => {
return await importProfilesFromText('From Clipboard', pasted) return await importProfilesFromText('From Clipboard', pasted)
}) })
@ -611,7 +615,8 @@ export class Application extends StatelessComponent<ApplicationProps> {
href="https://github.com/jlfwong/speedscope/issues" href="https://github.com/jlfwong/speedscope/issues"
> >
report any issues on GitHub report any issues on GitHub
</a>. </a>
.
</p> </p>
</div> </div>
</div> </div>