added support to generate ts declarations (#175)

* added support to generate ts declarations

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes
This commit is contained in:
Ritesh Kumar authored and GitHub committed 2020-02-19 15:43:17 +05:30
1 parent acb0ffa9e7
commit aa39aaa4eb
11 files changed
+436 -63

No files matched your search

+53 -27
View File
@@ -106,8 +106,8 @@ export type AlertProps = {
testId: string,
}
type AlertTypeIconMap = {
+[AlertType]: IconType,
export type AlertTypeIconMap = {
success: 'tick' | 'started',
}
const Alert = ({ type, text, testId }: AlertProps) => {
@@ -296,30 +296,56 @@ export const jsonLdContext = `{
"@context": "https://schema.org/"
}`;
export const typescript = `export interface PaneProps {
elevation?: number;
className?: string;
css?: any;
is?: any;
}
export const typescript = `
import React from 'react';
export interface Props {
/** The user's name */
name: string;
/** Should the name be rendered in bold */
priority?: boolean
}
type Intent = "none" | "success" | "warning" | "danger";
type Appearance = "minimal" | "primary" | "default";
export interface FauxactClassComponent<Props extends {}, State = {}> {
props: Props
state: State
export interface ButtonProps {
intent?: Intent;
appearance?: Appearance;
isLoading?: boolean;
isActive?: boolean;
iconBefore?: string;
iconAfter?: string;
disabled?: boolean;
theme?: any;
className?: string;
children: any;
is?: string;
href?: string;
onClick?: () => void;
css?: any;
}
`;
setState: (prevState: State, props: Props) => Props
callback?: () => void
render(): FauxactClassComponent<any> | null
}
export const PrintName: React.FC<Props> = (props) => {
return (
<div>
<p style={{ fontWeight: props.priority ? "bold" : "normal" }}>{props.name}</p>
</div>
)
}
export const ShowUser: React.FC<Props> = (props) => {
return <PrintName name="Ned" />
}
let username = "Cersei"
export const ShowStoredUser: React.FC<Props> = (props) => {
return <PrintName name={username} priority />
}
import { useState, useEffect } from 'react';
export const CounterExample = () => {
const [count, setCount] = useState(0);
useEffect(() => {
document.title = \`You clicked $\{count\} times\`;
});
return (
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>
Click me
</button>
</div>
);
}`;
+2 -2
View File
@@ -36,6 +36,7 @@
"@graphql-codegen/typescript-resolvers": "^1.4.0",
"@graphql-codegen/typescript-stencil-apollo": "^1.4.0",
"@graphql-codegen/typescript-urql": "^1.4.0",
"@khanacademy/flow-to-ts": "^0.1.6",
"@svgr/core": "^4.3.2",
"@svgr/plugin-jsx": "^4.3.2",
"@types/jsonld": "^1.5.0",
@@ -45,7 +46,6 @@
"babel-standalone": "^6.26.0",
"clipboard-copy": "^3.1.0",
"evergreen-ui": "^4.18.1",
"flow-to-ts": "gist:3f49c8bd7a2b71429dcae28f2c2d1d97",
"flowgen": "^1.10.0",
"formik": "^1.5.8",
"generate-schema": "^2.6.0",
@@ -85,6 +85,7 @@
"text-encoding-utf-8": "^1.0.2",
"transform-json-types": "^0.7.0",
"ts-json-schema-generator": "^0.58.1",
"typescript": "3.5.3",
"xml-js": "^1.6.11",
"yaml": "^1.7.2"
},
@@ -106,7 +107,6 @@
"postinstall-postinstall": "^2.0.0",
"prettier": "^1.18.2",
"pretty-quick": "^1.11.1",
"typescript": "3.5.3",
"ui-box": "2.1.0",
"webpack": "^4.38.0",
"worker-loader": "^2.0.0"
+49
View File
@@ -0,0 +1,49 @@
import { NextApiRequest, NextApiResponse } from "next";
import convert from "@khanacademy/flow-to-ts";
import * as ts from "typescript";
export default (req: NextApiRequest, res: NextApiResponse) => {
try {
const { value, declarationOnly, isTS } = JSON.parse(req.body);
const tsCode = isTS ? value : convert(value);
if (!declarationOnly) {
res.status(200).send(tsCode);
return;
}
let output = "";
const options = {
allowJs: true,
declaration: true,
emitDeclarationOnly: true,
jsx: ts.JsxEmit.React,
skipDefaultLibCheck: true,
skipLibCheck: true
};
const host = ts.createCompilerHost(options);
host.getSourceFile = filename => {
if (filename === "file.ts") {
return ts.createSourceFile(filename, tsCode, undefined);
}
return ts.createSourceFile(filename, "", undefined);
};
host.writeFile = (_name, text) => {
output = text;
};
const program = ts.createProgram(["file.ts"], options, host);
program.emit();
res.status(200).send(output);
} catch (e) {
console.log(e);
res.status(500).send(e.message);
}
};
+35
View File
@@ -0,0 +1,35 @@
import ConversionPanel from "@components/ConversionPanel";
import * as React from "react";
import { useCallback } from "react";
import request from "@utils/request";
import { Alert } from "evergreen-ui";
export default function() {
const transformer = useCallback(
({ value }) =>
request("/api/flow-to-typescript", {
value,
declarationOnly: true
}),
[]
);
return (
<ConversionPanel
transformer={transformer}
editorTitle="Flow"
editorLanguage="plaintext"
editorDefaultValue="flow"
resultTitle="TypeScript Declarations"
resultLanguage={"typescript"}
resultEditorProps={{
topNotifications: () => (
<Alert
backgroundColor="#e7f7ff"
title="This code is converted on the server."
/>
)
}}
/>
);
}
+18 -9
View File
@@ -1,17 +1,18 @@
import ConversionPanel from "@components/ConversionPanel";
import * as React from "react";
import { useCallback } from "react";
import request from "@utils/request";
import { Alert } from "evergreen-ui";
let flow2ts;
if (IN_BROWSER) {
require("flow-to-ts");
// @ts-ignore
flow2ts = window.flow2ts;
}
export default function() {
const transformer = useCallback(async ({ value }) => {
return flow2ts(value);
}, []);
const transformer = useCallback(
({ value }) =>
request("/api/flow-to-typescript", {
value,
declarationOnly: false
}),
[]
);
return (
<ConversionPanel
@@ -21,6 +22,14 @@ export default function() {
editorDefaultValue="flow"
resultTitle="TypeScript"
resultLanguage={"typescript"}
resultEditorProps={{
topNotifications: () => (
<Alert
backgroundColor="#e7f7ff"
title="This code is converted on the server."
/>
)
}}
/>
);
}
@@ -0,0 +1,35 @@
import ConversionPanel from "@components/ConversionPanel";
import * as React from "react";
import { useCallback } from "react";
import request from "@utils/request";
import { Alert } from "evergreen-ui";
export default function() {
const transformer = useCallback(
({ value }) =>
request("/api/flow-to-typescript", {
value,
declarationOnly: true,
isTS: true
}),
[]
);
return (
<ConversionPanel
transformer={transformer}
editorTitle="TypeScript"
editorLanguage="typescript"
resultTitle="TypeScript"
resultLanguage="typescript"
resultEditorProps={{
topNotifications: () => (
<Alert
backgroundColor="#e7f7ff"
title="This code is converted on the server."
/>
)
}}
/>
);
}
-13
View File
@@ -1,13 +0,0 @@
diff --git a/node_modules/flow-to-ts/flow-to-typescript.js b/node_modules/flow-to-ts/flow-to-typescript.js
index 04d034f..99371df 100644
--- a/node_modules/flow-to-ts/flow-to-typescript.js
+++ b/node_modules/flow-to-ts/flow-to-typescript.js
@@ -119061,6 +119061,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _src_convert_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_src_convert_js__WEBPACK_IMPORTED_MODULE_0__);
console.log(_src_convert_js__WEBPACK_IMPORTED_MODULE_0___default()("\ntype A = {a: string}\n"));
+
+window.flow2ts = _src_convert_js__WEBPACK_IMPORTED_MODULE_0___default();
/* harmony default export */ __webpack_exports__["default"] = (_src_convert_js__WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
@@ -0,0 +1,48 @@
diff --git a/node_modules/json-schema-to-typescript/dist/src/formatter.js b/node_modules/json-schema-to-typescript/dist/src/formatter.js
index 1c2c709..ccc647b 100644
--- a/node_modules/json-schema-to-typescript/dist/src/formatter.js
+++ b/node_modules/json-schema-to-typescript/dist/src/formatter.js
@@ -11,9 +11,8 @@ var __assign = (this && this.__assign) || function () {
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
-var prettier_1 = require("prettier");
function format(code, options) {
- return prettier_1.format(code, __assign({ parser: 'typescript' }, options.style));
+ return code;
}
exports.format = format;
//# sourceMappingURL=formatter.js.map
diff --git a/node_modules/json-schema-to-typescript/dist/src/index.js b/node_modules/json-schema-to-typescript/dist/src/index.js
index 068d6dc..b7c5ac9 100644
--- a/node_modules/json-schema-to-typescript/dist/src/index.js
+++ b/node_modules/json-schema-to-typescript/dist/src/index.js
@@ -59,9 +59,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
}
};
Object.defineProperty(exports, "__esModule", { value: true });
-var fs_1 = require("fs");
var lodash_1 = require("lodash");
-var path_1 = require("path");
var formatter_1 = require("./formatter");
var generator_1 = require("./generator");
var normalizer_1 = require("./normalizer");
@@ -88,17 +86,7 @@ exports.DEFAULT_OPTIONS = {
},
unreachableDefinitions: false
};
-function compileFromFile(filename, options) {
- if (options === void 0) { options = exports.DEFAULT_OPTIONS; }
- var contents = utils_1.Try(function () { return fs_1.readFileSync(filename); }, function () {
- throw new ReferenceError("Unable to read file \"" + filename + "\"");
- });
- var schema = utils_1.Try(function () { return JSON.parse(contents.toString()); }, function () {
- throw new TypeError("Error parsing JSON in file \"" + filename + "\"");
- });
- return compile(schema, utils_1.stripExtension(filename), __assign({ cwd: path_1.dirname(filename) }, options));
-}
-exports.compileFromFile = compileFromFile;
+
function compile(schema, name, options) {
if (options === void 0) { options = {}; }
return __awaiter(this, void 0, void 0, function () {
+1 -1
View File
@@ -13092,7 +13092,7 @@ function js_beautify(js_source_text, options) {
/*!******************************************************************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/language/html/_deps/vscode-html-languageservice/htmlLanguageService.js ***!
\******************************************************************************************************************/
/*! exports provided: Position, Range, Location, LocationLink, Color, ColorInformation, ColorPresentation, FoldingRangeKind, FoldingRange, DiagnosticRelatedInformation, DiagnosticSeverity, Diagnostic, Command, TextEdit, TextDocumentEdit, CreateFile, RenameFile, DeleteFile, WorkspaceEdit, WorkspaceChange, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, MarkupKind, MarkupContent, CompletionItemKind, InsertTextFormat, CompletionItem, CompletionList, MarkedString, Hover, ParameterInformation, SignatureInformation, DocumentHighlightKind, DocumentHighlight, SymbolKind, SymbolInformation, DocumentSymbol, CodeActionKind, CodeActionContext, CodeAction, CodeLens, FormattingOptions, DocumentLink, EOL, TextDocument, TextDocumentSaveReason, getLanguageService, newHTMLDataProvider, SelectionRangeKind, TokenType, ScannerState */
/*! exports provided: getLanguageService, newHTMLDataProvider, SelectionRangeKind, TokenType, ScannerState, Position, Range, Location, LocationLink, Color, ColorInformation, ColorPresentation, FoldingRangeKind, FoldingRange, DiagnosticRelatedInformation, DiagnosticSeverity, Diagnostic, Command, TextEdit, TextDocumentEdit, CreateFile, RenameFile, DeleteFile, WorkspaceEdit, WorkspaceChange, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, MarkupKind, MarkupContent, CompletionItemKind, InsertTextFormat, CompletionItem, CompletionList, MarkedString, Hover, ParameterInformation, SignatureInformation, DocumentHighlightKind, DocumentHighlight, SymbolKind, SymbolInformation, DocumentSymbol, CodeActionKind, CodeActionContext, CodeAction, CodeLens, FormattingOptions, DocumentLink, EOL, TextDocument, TextDocumentSaveReason */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+15 -7
View File
@@ -272,6 +272,10 @@ export const categorizedRoutes = [
packageName: "flowgen",
packageUrl: "https://github.com/joarwilk/flowgen"
},
{
label: "to TypeScript Declaration",
path: "/typescript-to-typescript-declaration"
},
{
label: "to JSON Schema",
path: "/typescript-to-json-schema",
@@ -281,19 +285,23 @@ export const categorizedRoutes = [
]
},
{
category: "Others",
category: "Flow",
iconName: "",
content: [
{
label: "Flow to TypeScript",
label: "to TypeScript",
path: "/flow-to-typescript"
},
{
label: "TypeScript to Flow",
path: "/typescript-to-flow",
packageName: "flowgen",
packageUrl: "https://github.com/joarwilk/flowgen"
},
label: "to TypeScript Declaration",
path: "/flow-to-typescript-declaration"
}
]
},
{
category: "Others",
iconName: "",
content: [
{
label: "XML to JSON",
path: "/xml-to-json",
+180 -4
View File
@@ -36,6 +36,12 @@
dependencies:
"@babel/highlight" "^7.0.0"
"@babel/code-frame@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e"
dependencies:
"@babel/highlight" "^7.8.3"
"@babel/core@7.4.5":
version "7.4.5"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.5.tgz#081f97e8ffca65a9b4b0fdc7e274e703f000c06a"
@@ -55,6 +61,26 @@
semver "^5.4.1"
source-map "^0.5.0"
"@babel/core@^7.4.0":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.4.tgz#d496799e5c12195b3602d0fddd77294e3e38e80e"
dependencies:
"@babel/code-frame" "^7.8.3"
"@babel/generator" "^7.8.4"
"@babel/helpers" "^7.8.4"
"@babel/parser" "^7.8.4"
"@babel/template" "^7.8.3"
"@babel/traverse" "^7.8.4"
"@babel/types" "^7.8.3"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.1"
json5 "^2.1.0"
lodash "^4.17.13"
resolve "^1.3.2"
semver "^5.4.1"
source-map "^0.5.0"
"@babel/core@^7.4.5":
version "7.5.5"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.5.5.tgz#17b2686ef0d6bc58f963dddd68ab669755582c30"
@@ -103,6 +129,15 @@
lodash "^4.17.13"
source-map "^0.5.0"
"@babel/generator@^7.8.4":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.4.tgz#35bbc74486956fe4251829f9f6c48330e8d0985e"
dependencies:
"@babel/types" "^7.8.3"
jsesc "^2.5.1"
lodash "^4.17.13"
source-map "^0.5.0"
"@babel/helper-annotate-as-pure@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32"
@@ -186,6 +221,14 @@
"@babel/template" "^7.7.4"
"@babel/types" "^7.7.4"
"@babel/helper-function-name@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca"
dependencies:
"@babel/helper-get-function-arity" "^7.8.3"
"@babel/template" "^7.8.3"
"@babel/types" "^7.8.3"
"@babel/helper-get-function-arity@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3"
@@ -198,6 +241,12 @@
dependencies:
"@babel/types" "^7.7.4"
"@babel/helper-get-function-arity@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5"
dependencies:
"@babel/types" "^7.8.3"
"@babel/helper-hoist-variables@^7.4.4":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz#0298b5f25c8c09c53102d52ac4a98f773eb2850a"
@@ -249,6 +298,10 @@
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250"
"@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670"
"@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.4.4.tgz#a47e02bc91fb259d2e6727c2a30013e3ac13c4a2"
@@ -293,6 +346,12 @@
dependencies:
"@babel/types" "^7.7.4"
"@babel/helper-split-export-declaration@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9"
dependencies:
"@babel/types" "^7.8.3"
"@babel/helper-wrap-function@^7.7.4":
version "7.7.4"
resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.7.4.tgz#37ab7fed5150e22d9d7266e830072c0cdd8baace"
@@ -318,6 +377,14 @@
"@babel/traverse" "^7.5.5"
"@babel/types" "^7.5.5"
"@babel/helpers@^7.8.4":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.4.tgz#754eb3ee727c165e0a240d6c207de7c455f36f73"
dependencies:
"@babel/template" "^7.8.3"
"@babel/traverse" "^7.8.4"
"@babel/types" "^7.8.3"
"@babel/highlight@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4"
@@ -326,6 +393,18 @@
esutils "^2.0.2"
js-tokens "^4.0.0"
"@babel/highlight@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797"
dependencies:
chalk "^2.0.0"
esutils "^2.0.2"
js-tokens "^4.0.0"
"@babel/parser@^7.4.2", "@babel/parser@^7.8.3", "@babel/parser@^7.8.4":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.4.tgz#d1dbe64691d60358a974295fa53da074dd2ce8e8"
"@babel/parser@^7.4.4", "@babel/parser@^7.4.5":
version "7.4.5"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.5.tgz#04af8d5d5a2b044a2a1bffacc1e5e6673544e872"
@@ -360,6 +439,13 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-json-strings" "^7.2.0"
"@babel/plugin-proposal-nullish-coalescing-operator@^7.4.4":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz#e4572253fdeed65cddeecfdab3f928afeb2fd5d2"
dependencies:
"@babel/helper-plugin-utils" "^7.8.3"
"@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0"
"@babel/plugin-proposal-object-rest-spread@7.4.4":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz#1ef173fcf24b3e2df92a678f027673b55e7e3005"
@@ -407,6 +493,18 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-dynamic-import@^7.2.0":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3"
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
"@babel/plugin-syntax-flow@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.8.3.tgz#f2c883bd61a6316f2c89380ae5122f923ba4527f"
dependencies:
"@babel/helper-plugin-utils" "^7.8.3"
"@babel/plugin-syntax-json-strings@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470"
@@ -425,6 +523,12 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9"
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
"@babel/plugin-syntax-object-rest-spread@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e"
@@ -443,6 +547,12 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-optional-chaining@^7.2.0":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a"
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
"@babel/plugin-syntax-typescript@^7.7.4":
version "7.7.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.7.4.tgz#5d037ffa10f3b25a16f32570ebbe7a8c2efa304b"
@@ -522,6 +632,13 @@
"@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-flow-strip-types@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.8.3.tgz#da705a655466b2a9b36046b57bf0cbcd53551bd4"
dependencies:
"@babel/helper-plugin-utils" "^7.8.3"
"@babel/plugin-syntax-flow" "^7.8.3"
"@babel/plugin-transform-for-of@^7.4.4":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz#0267fc735e24c808ba173866c6c4d1440fc3c556"
@@ -769,6 +886,13 @@
js-levenshtein "^1.1.3"
semver "^5.5.0"
"@babel/preset-flow@^7.0.0":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.8.3.tgz#52af74c6a4e80d889bd9436e8e278d0fecac6e18"
dependencies:
"@babel/helper-plugin-utils" "^7.8.3"
"@babel/plugin-transform-flow-strip-types" "^7.8.3"
"@babel/preset-react@7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.0.0.tgz#e86b4b3d99433c7b3e9e91747e2653958bc6b3c0"
@@ -832,6 +956,14 @@
"@babel/parser" "^7.7.4"
"@babel/types" "^7.7.4"
"@babel/template@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8"
dependencies:
"@babel/code-frame" "^7.8.3"
"@babel/parser" "^7.8.3"
"@babel/types" "^7.8.3"
"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.4":
version "7.4.5"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.4.5.tgz#4e92d1728fd2f1897dafdd321efbff92156c3216"
@@ -874,6 +1006,20 @@
globals "^11.1.0"
lodash "^4.17.13"
"@babel/traverse@^7.8.4":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.4.tgz#f0845822365f9d5b0e312ed3959d3f827f869e3c"
dependencies:
"@babel/code-frame" "^7.8.3"
"@babel/generator" "^7.8.4"
"@babel/helper-function-name" "^7.8.3"
"@babel/helper-split-export-declaration" "^7.8.3"
"@babel/parser" "^7.8.4"
"@babel/types" "^7.8.3"
debug "^4.1.0"
globals "^11.1.0"
lodash "^4.17.13"
"@babel/types@^7.0.0", "@babel/types@^7.4.4":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.4.tgz#8db9e9a629bb7c29370009b4b779ed93fe57d5f0"
@@ -882,6 +1028,14 @@
lodash "^4.17.11"
to-fast-properties "^2.0.0"
"@babel/types@^7.4.0", "@babel/types@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c"
dependencies:
esutils "^2.0.2"
lodash "^4.17.13"
to-fast-properties "^2.0.0"
"@babel/types@^7.5.5":
version "7.5.5"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.5.tgz#97b9f728e182785909aa4ab56264f090a028d18a"
@@ -1098,6 +1252,22 @@
iterall "^1.1.3"
uuid "^3.1.0"
"@khanacademy/flow-to-ts@^0.1.6":
version "0.1.6"
resolved "https://registry.yarnpkg.com/@khanacademy/flow-to-ts/-/flow-to-ts-0.1.6.tgz#5951e25c09d49b6392d1e5c6e6687252e3b2a89c"
dependencies:
"@babel/core" "^7.4.0"
"@babel/parser" "^7.4.2"
"@babel/plugin-proposal-nullish-coalescing-operator" "^7.4.4"
"@babel/plugin-syntax-dynamic-import" "^7.2.0"
"@babel/plugin-syntax-optional-chaining" "^7.2.0"
"@babel/preset-flow" "^7.0.0"
"@babel/types" "^7.4.0"
commander "^2.19.0"
glob "^7.1.3"
prettier "^1.16.4"
trim-right "^1.0.1"
"@next/bundle-analyzer@^9.0.2":
version "9.0.2"
resolved "https://registry.yarnpkg.com/@next/bundle-analyzer/-/bundle-analyzer-9.0.2.tgz#b5a09f83d5bb2034675ea038a6f50ea922237f5c"
@@ -2718,6 +2888,12 @@ convert-source-map@1.6.0, convert-source-map@^1.1.0:
dependencies:
safe-buffer "~5.1.1"
convert-source-map@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442"
dependencies:
safe-buffer "~5.1.1"
cookie-signature@1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
@@ -4040,10 +4216,6 @@ flatten@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
"flow-to-ts@gist:3f49c8bd7a2b71429dcae28f2c2d1d97":
version "1.0.0"
resolved "https://gist.github.com/3f49c8bd7a2b71429dcae28f2c2d1d97.git#6b8f373939221c750a128ba6e301283494e635d9"
flowgen@^1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/flowgen/-/flowgen-1.10.0.tgz#a041ae31d543d22166e7ba7c296b8445deb3c2e4"
@@ -4226,6 +4398,10 @@ generate-schema@^2.6.0:
commander "^2.9.0"
type-of-is "^3.4.0"
gensync@^1.0.0-beta.1:
version "1.0.0-beta.1"
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269"
get-own-enumerable-property-symbols@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz#b877b49a5c16aefac3655f2ed2ea5b684df8d203"