Skip to content

Commit c5f152f

Browse files
authored
Merge pull request #56 from json-schema-tools/feat/transpiler
feat: switch to transpiler
2 parents 58ee712 + 6efb220 commit c5f152f

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
]
3737
},
3838
"dependencies": {
39-
"@etclabscore/json-schema-to-types": "^1.10.1",
39+
"@json-schema-tools/transpiler": "^1.5.4",
4040
"@etclabscore/monaco-add-json-schema-diagnostics": "^1.0.3",
4141
"@etclabscore/react-monaco-editor": "^1.0.3",
4242
"@material-ui/core": "^4.5.1",

src/containers/MyApp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import WbSunnyIcon from "@material-ui/icons/WbSunny";
99
import { lightTheme, darkTheme } from "../themes/theme";
1010
import { useTranslation } from "react-i18next";
1111
import SplitPane from "react-split-pane";
12-
import JsonSchemaToTypes, { SupportedLanguages } from "@etclabscore/json-schema-to-types";
12+
import Transpiler, { SupportedLanguages } from "@json-schema-tools/transpiler";
1313
import "./MyApp.css";
1414
import Editor from "@etclabscore/react-monaco-editor";
1515
import { addDiagnostics } from "@etclabscore/monaco-add-json-schema-diagnostics";
@@ -33,7 +33,7 @@ const MyApp: React.FC = () => {
3333
function handleTranspile() {
3434
try {
3535
const result = JSON.parse(value);
36-
const tr = new JsonSchemaToTypes(result);
36+
const tr = new Transpiler(result);
3737
setResults(tr.to(selectedLanguage));
3838
} catch (e) {
3939
console.error(e);

0 commit comments

Comments
 (0)