From c498c062597085126af110f8b57f918953940586 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Mon, 13 Mar 2023 15:08:19 +0100 Subject: [PATCH] fix(deps): add missing dependencies + fix knip (#49691) * refactor: use pnpm dlx over npx * fix: create config before running knip * chore: fix challenge-parser dependencies * chore: add missing client + plugin dependencies * chore: pin deps --- .github/workflows/node.js-find-unused.yml | 1 + client/package.json | 1 + .../plugins/fcc-source-challenges/package.json | 6 +++++- package.json | 4 ++-- pnpm-lock.yaml | 17 ++++++++++++----- tools/challenge-parser/package.json | 4 ++-- tools/ui-components/package.json | 2 +- 7 files changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/node.js-find-unused.yml b/.github/workflows/node.js-find-unused.yml index ba4d1d15a55..092d0db899c 100644 --- a/.github/workflows/node.js-find-unused.yml +++ b/.github/workflows/node.js-find-unused.yml @@ -41,4 +41,5 @@ jobs: run: | echo pnpm version $(pnpm -v) pnpm install + pnpm run create:config pnpm run knip diff --git a/client/package.json b/client/package.json index 8ce17bb7f21..534e7cdd995 100644 --- a/client/package.json +++ b/client/package.json @@ -174,6 +174,7 @@ "chokidar": "3.5.3", "copy-webpack-plugin": "9.1.0", "core-js": "2.6.12", + "dotenv": "16.0.3", "gatsby-plugin-webpack-bundle-analyser-v2": "1.1.30", "jest-json-schema-extended": "1.0.1", "monaco-editor-webpack-plugin": "4.2.0", diff --git a/client/plugins/fcc-source-challenges/package.json b/client/plugins/fcc-source-challenges/package.json index 8c5688335f0..b4a47b6eda2 100644 --- a/client/plugins/fcc-source-challenges/package.json +++ b/client/plugins/fcc-source-challenges/package.json @@ -17,5 +17,9 @@ }, "homepage": "https://github.com/freeCodeCamp/freeCodeCamp#readme", "author": "freeCodeCamp ", - "main": "none" + "main": "none", + "devDependencies": { + "chokidar": "3.5.3", + "readdirp": "3.6.0" + } } diff --git a/package.json b/package.json index 6c3621d7912..7cff0dc6478 100644 --- a/package.json +++ b/package.json @@ -66,8 +66,8 @@ "format:prettier": "prettier --write .", "hooks:install": "node node_modules/husky/husky.js install", "hooks:uninstall": "node node_modules/husky/husky.js uninstall", - "knip": "npx -y knip@^1.0.0-beta.10 --include files", - "knip:all": "npx -y knip@^1.0.0-beta.10", + "knip": "pnpm dlx knip --include files", + "knip:all": "pnpm dlx knip", "prelint": "pnpm run -F=client predevelop", "lint": "npm-run-all create:* -p lint:*", "lint:challenges": "cd ./curriculum && pnpm run lint", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b4cbe8a0764..dabf615ee33 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -332,6 +332,7 @@ importers: core-js: 2.6.12 crypto-browserify: 3.12.0 date-fns: 2.29.3 + dotenv: 16.0.3 enzyme: 3.11.0 enzyme-adapter-react-16: 1.15.7 eslint: '7' @@ -548,6 +549,7 @@ importers: chokidar: 3.5.3 copy-webpack-plugin: 9.1.0_webpack@5.76.1 core-js: 2.6.12 + dotenv: 16.0.3 gatsby-plugin-webpack-bundle-analyser-v2: 1.1.30_gatsby@3.15.0 jest-json-schema-extended: 1.0.1 monaco-editor-webpack-plugin: 4.2.0_iq5jyfjbskrhrr45x6xdwyuq74 @@ -560,7 +562,12 @@ importers: webpack-cli: 4.10.0_webpack@5.76.1 client/plugins/fcc-source-challenges: - specifiers: {} + specifiers: + chokidar: 3.5.3 + readdirp: 3.6.0 + devDependencies: + chokidar: 3.5.3 + readdirp: 3.6.0 client/plugins/gatsby-remark-node-identity: specifiers: {} @@ -715,11 +722,11 @@ importers: js-yaml: 3.14.1 lodash: 4.17.21 mdast-builder: 1.1.1 - mdast-util-from-markdown: 0.8.5 - mdast-util-gfm: 0.1.2 + mdast-util-directive: 1.0.1 mdast-util-gfm-strikethrough: 0.2.3 mdast-util-gfm-table: 0.1.6 mdast-util-to-hast: 9.1.2 + mdast-util-to-markdown: 0.6.5 micromark-extension-gfm-strikethrough: 0.6.5 micromark-extension-gfm-table: 0.4.3 remark: 13.0.0 @@ -746,11 +753,11 @@ importers: js-yaml: 3.14.1 lodash: 4.17.21 mdast-builder: 1.1.1 - mdast-util-from-markdown: 0.8.5 - mdast-util-gfm: 0.1.2 + mdast-util-directive: 1.0.1 mdast-util-gfm-strikethrough: 0.2.3 mdast-util-gfm-table: 0.1.6 mdast-util-to-hast: 9.1.2 + mdast-util-to-markdown: 0.6.5 micromark-extension-gfm-strikethrough: 0.6.5 micromark-extension-gfm-table: 0.4.3 remark: 13.0.0 diff --git a/tools/challenge-parser/package.json b/tools/challenge-parser/package.json index 9d2264ccec6..c14bf976a0a 100644 --- a/tools/challenge-parser/package.json +++ b/tools/challenge-parser/package.json @@ -26,11 +26,11 @@ "js-yaml": "3.14.1", "lodash": "4.17.21", "mdast-builder": "1.1.1", - "mdast-util-from-markdown": "0.8.5", - "mdast-util-gfm": "0.1.2", + "mdast-util-directive": "1.0.1", "mdast-util-gfm-strikethrough": "0.2.3", "mdast-util-gfm-table": "0.1.6", "mdast-util-to-hast": "9.1.2", + "mdast-util-to-markdown": "0.6.5", "micromark-extension-gfm-strikethrough": "0.6.5", "micromark-extension-gfm-table": "0.4.3", "remark": "13.0.0", diff --git a/tools/ui-components/package.json b/tools/ui-components/package.json index 34f20002e4e..07c4b10b3df 100644 --- a/tools/ui-components/package.json +++ b/tools/ui-components/package.json @@ -63,7 +63,7 @@ "storybook:theming": "pnpm run storybook --no-manager-cache", "build-storybook": "build-storybook", "build": "cross-env NODE_ENV=production rollup -c", - "build:css": "npx tailwindcss -i ./src/base.css -o ./dist/base.css --minify", + "build:css": "pnpm dlx tailwindcss -i ./src/base.css -o ./dist/base.css --minify", "dev": "cross-env NODE_ENV=development rollup -c -w", "clean": "rimraf dist/*", "gen-component": "ts-node ./utils/gen-component-script"