This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!window.OffscreenCanvas) { | |
window.OffscreenCanvas = class OffscreenCanvas { | |
constructor(width, height) { | |
this.canvas = document.createElement("canvas"); | |
this.canvas.width = width; | |
this.canvas.height = height; | |
this.canvas.convertToBlob = () => { | |
return new Promise(resolve => { | |
this.canvas.toBlob(resolve); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const fetchAsBlob = url => fetch(url) | |
.then(response => response.blob()); | |
export const convertBlobToBase64 = blob => new Promise((resolve, reject) => { | |
const reader = new FileReader; | |
reader.onerror = reject; | |
reader.onload = () => { | |
resolve(reader.result); | |
}; | |
reader.readAsDataURL(blob); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from 'fs'; | |
import * as path from 'path'; | |
import { | |
getIntrospectionQuery, | |
buildClientSchema, | |
} 'graphql'; | |
async function main() { | |
const response = await fetch(process.env.GRAPHQL_API_URL, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { observer } from 'mobx-react' | |
function ArtistList({ uiState: { artistData } }) { | |
const { data } = artistData; | |
if ( !data || !data.artists || !data.artists.length ) { | |
return <div>No artists bruh.</div> | |
} | |
const { artists } = data | |
return ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {createServer, GraphQLYogaError } from "@graphql-yoga/node" | |
const server = createServer({ | |
schema: { | |
typeDefs: /* GraphQL */ ` | |
type Query { | |
foo: String | |
bar: String | |
} | |
`, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/./diff/old/dist/batch-delegate/src/getLoader.d.ts b/./diff/new/dist/batch-delegate/src/getLoader.d.ts | |
index b00864d6..f8dd9c23 100644 | |
--- a/./diff/old/dist/batch-delegate/src/getLoader.d.ts | |
+++ b/./diff/new/dist/batch-delegate/src/getLoader.d.ts | |
@@ -1,3 +1,3 @@ | |
import DataLoader from 'dataloader'; | |
import { BatchDelegateOptions } from './types'; | |
-export declare function getLoader<K = any, V = any, C = K>(options: BatchDelegateOptions): DataLoader<K, V, C>; | |
+export declare function getLoader<K = any, V = any, C = K>(options: BatchDelegateOptions<any>): DataLoader<K, V, C>; | |
diff --git a/./diff/old/dist/batch-execute/src/getBatchingExecutor.d.ts b/./diff/new/dist/batch-execute/src/getBatchingExecutor.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Template | |
id="skillCheck" | |
var-skill={{"type":"select","label":"Skills","options":[{"label":"Fliegen","value":{"score":0,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Gewandheit","value":13}}},{"label":"Gaukeleien","value":{"score":10,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Charisma","value":12},"attr3":{"name":"Fingerfertigkeit","value":13}}},{"label":"Klettern","value":{"score":9,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Gewandheit","value":13},"attr3":{"name":"Körperkraft","value":16}}},{"label":"Körperbeherrschung","value":{"score":10,"attr1":{"name":"Gewandheit","value":13},"attr2":{"name":"Gewandheit","value":13},"attr3":{"name":"Konstitution","value":14}}},{"label":"Kraftakt","value":{"score":10,"attr1":{"name":"Konstitution","value":14},"attr2":{"name":"Körperkraft","value":16},"attr3":{"name":"Körperkraft","value":16}}},{"label":"Reiten","value":{"score":10,"attr1":{"name":"Charisma","value":12},"attr2":{"name":"Gewandheit","value":1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is a simple script for detecting conflicting | |
* version ranges across packages inside a mono repository. | |
*/ | |
import fs from "fs"; | |
import glob from "glob"; // yarn add -W -E -E -D glob@7.1.6 | |
import { promisify } from "util"; | |
const globP = promisify(glob); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { isAsyncIterable } from "@n1ru4l/push-pull-async-iterable-iterator"; | |
type MaybePromise<T> = Promise<T> | T; | |
const map = <T, O>(map: (input: T) => Promise<O> | O) => | |
async function* mapGenerator(asyncIterable: AsyncIterableIterator<T>) { | |
for await (const value of asyncIterable) { | |
yield map(value); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// window.crypto.subtle is undefined on page served via http :( | |
const crypto: null | SubtleCrypto = window?.crypto?.subtle ?? null; | |
const i2hex = (i: number): string => { | |
return ("00" + i.toString(16)).slice(-2); | |
}; | |
const generateHexFromUint8Array = (arr: Uint8Array) => | |
Array.prototype.map.call(arr, i2hex).join(""); |
NewerOlder