Skip to content

Commit

Permalink
housekeeping: @kyleshockey/js-yaml -> js-yaml (via #2025)
Browse files Browse the repository at this point in the history
* `@kyleshockey/js-yaml` -> `js-yaml`

* externalize `esprima`
  • Loading branch information
shockey authored Jul 31, 2019
1 parent e3b76b2 commit 2b10f55
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 9 deletions.
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"watch": "webpack --config webpack/core.babel.js --watch --progress"
},
"dependencies": {
"@kyleshockey/js-yaml": "^1.0.1",
"ajv": "^5.2.2",
"ajv-errors": "^1.0.1",
"ajv-keywords": "^3.4.0",
Expand All @@ -61,6 +60,7 @@
"file-dialog": "0.0.7",
"immutable": "^3.x.x",
"is-json": "^2.0.1",
"js-yaml": "^3.13.1",
"json-beautify": "^1.0.1",
"json-refs": "^3.0.4",
"lodash": "^4.17.15",
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/editor/editor-plugins/json-to-yaml.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import YAML from "@kyleshockey/js-yaml"
import YAML from "js-yaml"

export default function(editor) {
editor.on("paste", e => {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/json-schema-validator/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// JSON-Schema ( draf04 ) validator
import JsonSchemaWebWorker from "./validator.worker.js"
import YAML from "@kyleshockey/js-yaml"
import YAML from "js-yaml"
import PromiseWorker from "promise-worker"
import debounce from "lodash/debounce"
import swagger2SchemaYaml from "./swagger2-schema.yaml"
Expand Down
2 changes: 1 addition & 1 deletion src/standalone/topbar-insert/forms/components/AddForm.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from "react"
import PropTypes from "prop-types"
import YAML from "@kyleshockey/js-yaml"
import YAML from "js-yaml"
import { checkForErrors } from "../helpers/validation-helpers"

class AddForm extends Component {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from "react"
import PropTypes from "prop-types"

import fileDialog from "file-dialog"
import YAML from "@kyleshockey/js-yaml"
import YAML from "js-yaml"
import isJsonObject from "is-json"

export default class ImportFileMenuItem extends Component {
Expand Down
2 changes: 1 addition & 1 deletion src/standalone/topbar/topbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import URL from "url"
import "whatwg-fetch"
import DropdownMenu from "./DropdownMenu"
import reactFileDownload from "react-file-download"
import YAML from "@kyleshockey/js-yaml"
import YAML from "js-yaml"
import beautifyJson from "json-beautify"

import Logo from "./logo_small.svg"
Expand Down
2 changes: 1 addition & 1 deletion test/unit/plugins/json-schema-validator/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import YAML from "@kyleshockey/js-yaml"
import YAML from "js-yaml"
import JSONSchemaValidator from "src/plugins/json-schema-validator/validator/index.js"
import swagger2SchemaYaml from "src/plugins/json-schema-validator/swagger2-schema.yaml"
import oas3SchemaYaml from "src/plugins/json-schema-validator/oas3-schema.yaml"
Expand Down
4 changes: 2 additions & 2 deletions webpack/_config-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export default function buildConfig(
? {
// json-react-schema/deeper depends on buffertools, which fails.
buffertools: true,
esprima: true,
}
: (context, request, cb) => {
// webpack injects some stuff into the resulting file,
Expand All @@ -168,8 +169,7 @@ export default function buildConfig(
resolve: {
extensions: [".js", ".jsx", "json"],
alias: {
react: path.resolve(projectBasePath, "node_modules", "react"),
"js-yaml": "@kyleshockey/js-yaml", // TODO: fix??
react: path.resolve(projectBasePath, "node_modules", "react")
},
},

Expand Down

0 comments on commit 2b10f55

Please sign in to comment.