diff --git a/lib/metalsmith.js b/lib/metalsmith.js index 0ab967404b..70f6d74b01 100644 --- a/lib/metalsmith.js +++ b/lib/metalsmith.js @@ -13,7 +13,7 @@ const permalinks = require('metalsmith-permalinks') // apply a permalink pattern const canonical = require('metalsmith-canonical') // add a canonical url property to pages const sass = require('@metalsmith/sass') // convert Sass files to CSS using Dart Sass -const postcss = require('metalsmith-postcss') +const postcss = require('@metalsmith/postcss') const rollup = require('metalsmith-rollup') // used to build GOV.UK Frontend JavaScript const resolve = require('rollup-plugin-node-resolve') // rollup plugin to resolve node_modules diff --git a/package-lock.json b/package-lock.json index a26123f3d5..a7036c103b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { + "@metalsmith/postcss": "^5.0.0", "acorn": "^6.4.1", "autoprefixer": "^9.5.1", "clipboard": "^2.0.4", @@ -18,9 +19,8 @@ "highlight.js": "^10.4.1", "html5shiv": "^3.7.3", "lunr": "^2.3.6", - "metalsmith-postcss": "^4.2.0", "modernizr": "^3.7.1", - "postcss": "^6.0.23", + "postcss": "^8.4.14", "sass-export": "^2.1.0", "serve-static": "^1.13.2", "slugger": "^1.0.1" @@ -1869,6 +1869,18 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@metalsmith/postcss": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@metalsmith/postcss/-/postcss-5.0.0.tgz", + "integrity": "sha512-sMjGcerJMi76m9tFac/3I+20dvLHkmYfMnYFDnLrWyWNSerqNjS/vdI81sSQRvAhNRjr0QK+F+YBOKguBIcdUA==", + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "metalsmith": "^2.4.1", + "postcss": "^5.0.4 || ^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/@metalsmith/sass": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@metalsmith/sass/-/sass-1.0.0.tgz", @@ -3330,7 +3342,6 @@ }, "node_modules/cross-spawn": { "version": "7.0.3", - "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -3343,7 +3354,6 @@ }, "node_modules/cross-spawn/node_modules/path-key": { "version": "3.1.1", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -3351,7 +3361,6 @@ }, "node_modules/cross-spawn/node_modules/shebang-command": { "version": "2.0.0", - "dev": true, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -3362,7 +3371,6 @@ }, "node_modules/cross-spawn/node_modules/shebang-regex": { "version": "3.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -3370,7 +3378,6 @@ }, "node_modules/cross-spawn/node_modules/which": { "version": "2.0.2", - "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -6240,7 +6247,6 @@ }, "node_modules/is-utf8": { "version": "0.2.1", - "dev": true, "license": "MIT" }, "node_modules/is-wsl": { @@ -9389,7 +9395,6 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/metalsmith/-/metalsmith-2.5.0.tgz", "integrity": "sha512-tBFpCMq8t/ZeD8qbvyWSLjyW7aO8RJYeFSk8LyclgHYaeMWiSPrMxXc3NORVCJ3iG17aRxuL/+nla58Qq3DBcQ==", - "dev": true, "hasInstallScript": true, "dependencies": { "commander": "^6.2.1", @@ -9655,16 +9660,6 @@ "dev": true, "license": "MIT" }, - "node_modules/metalsmith-postcss": { - "version": "4.2.0", - "license": "MIT", - "dependencies": { - "minimatch": "^3.0.4" - }, - "peerDependencies": { - "postcss": "^5.0.4 || ^6.0.0" - } - }, "node_modules/metalsmith-rollup": { "version": "2.0.0", "dev": true, @@ -9716,7 +9711,6 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true, "engines": { "node": ">= 6" } @@ -9725,7 +9719,6 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -9742,7 +9735,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -9761,14 +9753,12 @@ "node_modules/metalsmith/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/metalsmith/node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, "dependencies": { "glob": "^7.1.3" }, @@ -9783,7 +9773,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-1.0.0.tgz", "integrity": "sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg==", - "dev": true, "engines": { "node": ">= 6" } @@ -9792,7 +9781,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -10099,6 +10087,17 @@ "version": "0.0.7", "license": "ISC" }, + "node_modules/nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "license": "MIT" @@ -10595,6 +10594,11 @@ "dev": true, "license": "MIT" }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -10847,60 +10851,32 @@ } }, "node_modules/postcss": { - "version": "6.0.23", - "license": "MIT", + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], "dependencies": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" }, "engines": { - "node": ">=4.0.0" + "node": "^10 || ^12 || >=14" } }, "node_modules/postcss-value-parser": { "version": "3.3.1", "license": "MIT" }, - "node_modules/postcss/node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss/node_modules/chalk": { - "version": "2.4.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss/node_modules/source-map": { - "version": "0.6.1", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postcss/node_modules/supports-color": { - "version": "5.5.0", - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/preact": { "version": "8.5.3", "dev": true, @@ -12257,8 +12233,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.1", - "license": "BSD-3-Clause", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "engines": { "node": ">=0.10.0" } @@ -13561,7 +13538,6 @@ }, "node_modules/ware": { "version": "1.3.0", - "dev": true, "license": "MIT", "dependencies": { "wrap-fn": "^0.1.0" @@ -13629,7 +13605,6 @@ }, "node_modules/wrap-fn": { "version": "0.1.5", - "dev": true, "license": "MIT", "dependencies": { "co": "3.1.0" @@ -13637,7 +13612,6 @@ }, "node_modules/wrap-fn/node_modules/co": { "version": "3.1.0", - "dev": true, "license": "MIT" }, "node_modules/wrappy": { @@ -15148,6 +15122,12 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@metalsmith/postcss": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@metalsmith/postcss/-/postcss-5.0.0.tgz", + "integrity": "sha512-sMjGcerJMi76m9tFac/3I+20dvLHkmYfMnYFDnLrWyWNSerqNjS/vdI81sSQRvAhNRjr0QK+F+YBOKguBIcdUA==", + "requires": {} + }, "@metalsmith/sass": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@metalsmith/sass/-/sass-1.0.0.tgz", @@ -16167,7 +16147,6 @@ }, "cross-spawn": { "version": "7.0.3", - "dev": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -16175,23 +16154,19 @@ }, "dependencies": { "path-key": { - "version": "3.1.1", - "dev": true + "version": "3.1.1" }, "shebang-command": { "version": "2.0.0", - "dev": true, "requires": { "shebang-regex": "^3.0.0" } }, "shebang-regex": { - "version": "3.0.0", - "dev": true + "version": "3.0.0" }, "which": { "version": "2.0.2", - "dev": true, "requires": { "isexe": "^2.0.0" } @@ -18158,8 +18133,7 @@ "dev": true }, "is-utf8": { - "version": "0.2.1", - "dev": true + "version": "0.2.1" }, "is-wsl": { "version": "1.1.0", @@ -20214,7 +20188,6 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/metalsmith/-/metalsmith-2.5.0.tgz", "integrity": "sha512-tBFpCMq8t/ZeD8qbvyWSLjyW7aO8RJYeFSk8LyclgHYaeMWiSPrMxXc3NORVCJ3iG17aRxuL/+nla58Qq3DBcQ==", - "dev": true, "requires": { "commander": "^6.2.1", "cross-spawn": "^7.0.3", @@ -20230,14 +20203,12 @@ "commander": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "requires": { "ms": "2.1.2" } @@ -20246,7 +20217,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -20259,14 +20229,12 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, "requires": { "glob": "^7.1.3" } @@ -20274,8 +20242,7 @@ "stat-mode": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-1.0.0.tgz", - "integrity": "sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg==", - "dev": true + "integrity": "sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg==" } } }, @@ -20474,12 +20441,6 @@ } } }, - "metalsmith-postcss": { - "version": "4.2.0", - "requires": { - "minimatch": "^3.0.4" - } - }, "metalsmith-rollup": { "version": "2.0.0", "dev": true, @@ -20517,7 +20478,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, "requires": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -20721,6 +20681,11 @@ "mute-stream": { "version": "0.0.7" }, + "nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" + }, "natural-compare": { "version": "1.4.0" }, @@ -21025,6 +20990,11 @@ "version": "2.1.0", "dev": true }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + }, "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -21182,36 +21152,13 @@ } }, "postcss": { - "version": "6.0.23", + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "source-map": { - "version": "0.6.1" - }, - "supports-color": { - "version": "5.5.0", - "requires": { - "has-flag": "^3.0.0" - } - } + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" } }, "postcss-value-parser": { @@ -22211,7 +22158,9 @@ } }, "source-map-js": { - "version": "1.0.1" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" }, "source-map-support": { "version": "0.5.20", @@ -23110,7 +23059,6 @@ }, "ware": { "version": "1.3.0", - "dev": true, "requires": { "wrap-fn": "^0.1.0" } @@ -23158,14 +23106,12 @@ }, "wrap-fn": { "version": "0.1.5", - "dev": true, "requires": { "co": "3.1.0" }, "dependencies": { "co": { - "version": "3.1.0", - "dev": true + "version": "3.1.0" } } }, diff --git a/package.json b/package.json index 1918d880a6..fef0406bbb 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ ] }, "dependencies": { + "@metalsmith/postcss": "^5.0.0", "acorn": "^6.4.1", "autoprefixer": "^9.5.1", "clipboard": "^2.0.4", @@ -38,9 +39,8 @@ "highlight.js": "^10.4.1", "html5shiv": "^3.7.3", "lunr": "^2.3.6", - "metalsmith-postcss": "^4.2.0", "modernizr": "^3.7.1", - "postcss": "^6.0.23", + "postcss": "^8.4.14", "sass-export": "^2.1.0", "serve-static": "^1.13.2", "slugger": "^1.0.1"