diff --git a/CHANGELOG.md b/CHANGELOG.md index e4695bdd..4d9b59f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 3.0.2 + - Pinned `cheerio@1.0.0-rc.12` + - Fixed SCSS deprecation warning + ### 3.0.1 - Added `ensure-npm` developer script - Dependency updates diff --git a/package.json b/package.json index a69c5235..7ae914ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spectaql", - "version": "3.0.1", + "version": "3.0.2", "description": "A powerful library for autogenerating static GraphQL API documentation", "author": "Anvil Foundry Inc. ", "homepage": "https://github.com/anvilco/spectaql", @@ -23,7 +23,7 @@ "generator" ], "engines": { - "node": ">=14", + "node": ">=16", "npm": ">=7" }, "main": "index.js", @@ -88,7 +88,7 @@ "@graphql-tools/merge": "^8.1.2", "@graphql-tools/schema": "^9.0.1", "@graphql-tools/utils": "^9.1.1", - "cheerio": "^1.0.0-rc.10", + "cheerio": "1.0.0-rc.12", "coffeescript": "^2.6.1", "commander": "^10.0.0", "fast-glob": "^3.2.12", diff --git a/src/lib/common.js b/src/lib/common.js index debecb18..892158ee 100644 --- a/src/lib/common.js +++ b/src/lib/common.js @@ -1,7 +1,7 @@ import JSON5 from 'json5' // https://www.npmjs.com/package/json-stringify-pretty-compact import stringify from 'json-stringify-pretty-compact' -import cheerio from 'cheerio' +import { load as cheerioLoad } from 'cheerio' import { marked } from 'marked' import hljs from 'highlight.js' import { @@ -148,7 +148,7 @@ export function markdown( let html = marked.parse(value) // We strip the surrounding

-tag, if if (stripParagraph) { - let $ = cheerio.load('' + html + '')('root') + let $ = cheerioLoad('' + html + '')('root') // Only strip

-tags and only if there is just one of them. if ($.children().length === 1 && $.children('p').length === 1) { html = $.children('p').html() @@ -156,7 +156,7 @@ export function markdown( } if (addClass) { - let $ = cheerio.load('' + html + '')('root') + let $ = cheerioLoad('' + html + '')('root') if ($.children().length === 1) { $.children().first().addClass(addClass) html = $.html() @@ -473,5 +473,5 @@ export function printSchema(value, _root) { // There is an issue with `marked` not formatting a leading quote in a single, // quoted string value. By unwinding the special tags after converting to markdown // we can avoid that issue. - return cheerio.load(unwindTags(quoted)).html() + return cheerioLoad(unwindTags(quoted)).html() } diff --git a/src/themes/spectaql/stylesheets/main.scss b/src/themes/spectaql/stylesheets/main.scss index 4ddab094..f2f94846 100644 --- a/src/themes/spectaql/stylesheets/main.scss +++ b/src/themes/spectaql/stylesheets/main.scss @@ -341,12 +341,12 @@ $background-sidebar: $background-subtle; margin-bottom: $container-padding-desktop; font-weight: normal; - @include containerPaddingHorizontal(); - background: $background-sidebar; border-top: 1px solid $border-color-subtle; border-bottom: 1px solid $border-color-subtle; + @include containerPaddingHorizontal(); + @media (min-width: $size-content-break) { width: 50%; } diff --git a/yarn.lock b/yarn.lock index 0948ac77..55be9466 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1790,7 +1790,7 @@ cheerio-select@^2.1.0: domhandler "^5.0.3" domutils "^3.0.1" -cheerio@^1.0.0-rc.10: +cheerio@1.0.0-rc.12: version "1.0.0-rc.12" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== @@ -4809,16 +4809,7 @@ string-template@~0.2.1: resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" integrity sha512-Yptehjogou2xm4UJbxJ4CxgZx12HBfeystp0y3x7s4Dj32ltVVG1Gg8YhKjHZkHicuKpZX/ffilA8505VbUbpw== -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -4848,7 +4839,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -4862,13 +4853,6 @@ strip-ansi@^3.0.0: dependencies: ansi-regex "^2.0.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" @@ -5189,7 +5173,7 @@ workerpool@6.2.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -5207,15 +5191,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"