diff --git a/package-lock.json b/package-lock.json index f8d0a196a..f0918841e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "fs-extra": "^11.3.5", "hash-wasm": "^4.12.0", "idb-keyval": "^6.2.5", - "js-yaml": "^4.2.0", + "js-yaml": "^5.3.0", "jwt-simple": "^0.5.6", "less": "^4.8.1", "lodash": "^4.18.1", @@ -3344,6 +3344,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", + "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@eslint/js": { "version": "9.7.0", "dev": true, @@ -6387,6 +6410,29 @@ } } }, + "node_modules/cosmiconfig/node_modules/js-yaml": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", + "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/create-react-class": { "version": "15.7.0", "license": "MIT", @@ -9974,7 +10020,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.3.1", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.3.0.tgz", + "integrity": "sha512-muutsYr+e2+d3rTgUGslq5rxbBlUy3cJ61IsHag2QNDQV+7zXWjkUpmALIajhrlLlrgRUiymj6U3zUr/TMK84Q==", "funding": [ { "type": "github", @@ -9990,7 +10038,7 @@ "argparse": "^2.0.1" }, "bin": { - "js-yaml": "bin/js-yaml.js" + "js-yaml": "bin/js-yaml.mjs" } }, "node_modules/jsdom": { diff --git a/package.json b/package.json index 6e057f352..cf1625ad2 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "fs-extra": "^11.3.5", "hash-wasm": "^4.12.0", "idb-keyval": "^6.2.5", - "js-yaml": "^4.2.0", + "js-yaml": "^5.3.0", "jwt-simple": "^0.5.6", "less": "^4.8.1", "lodash": "^4.18.1", diff --git a/server/homebrew.api.js b/server/homebrew.api.js index d619977e0..d5c2b23e1 100644 --- a/server/homebrew.api.js +++ b/server/homebrew.api.js @@ -5,7 +5,7 @@ import express from 'express'; import zlib from 'zlib'; import GoogleActions from './googleActions.js'; import Markdown from '../shared/markdown.js'; -import yaml from 'js-yaml'; +import * as yaml from 'js-yaml'; import asyncHandler from 'express-async-handler'; import { nanoid } from 'nanoid'; import { makePatches, applyPatches, stringifyPatches, parsePatch } from '@sanity/diff-match-patch'; diff --git a/shared/helpers.js b/shared/helpers.js index 3610ccea4..3165d31eb 100644 --- a/shared/helpers.js +++ b/shared/helpers.js @@ -1,5 +1,5 @@ import _ from 'lodash'; -import yaml from 'js-yaml'; +import * as yaml from 'js-yaml'; import request from '../client/homebrew/utils/request-middleware.js'; // Convert the templates from a brew to a Snippets Structure.