ReactLibraries / storybook-addon-module-mock

Provides module mocking functionality like jest.mock on Storybook.
MIT License
42 stars 5 forks source link

use lower minimatch version (don't use * version) #13

Open JordanDDisch opened 9 months ago

JordanDDisch commented 9 months ago

im runnining into build issues where npm is installing a much earlier version of minimatch for another dependency. Also looking at my dependency tree these are quite recent and widely used modules.

I've since forked this and lowered the version myself (which fixes the issue for me).

The error: TypeError: ./.storybook/preview.tsx: (0 , minimatch_1.minimatch) is not a function

running npm ls minimatch:

├─┬ @next/eslint-plugin-next@14.0.4 │ └─┬ glob@7.1.7 │ └── minimatch@9.0.3 invalid: "^3.0.4" from node_modules/glob ├─┬ @tanstack/eslint-plugin-query@5.12.1 │ └─┬ eslint@8.54.0 │ ├─┬ @eslint/eslintrc@2.1.3 │ │ └── minimatch@9.0.3 invalid: "^3.1.2" from node_modules/@eslint/eslintrc │ ├─┬ @humanwhocodes/config-array@0.11.13 │ │ └── minimatch@9.0.3 invalid: "^3.0.5" from node_modules/@humanwhocodes/config-array │ └── minimatch@9.0.3 invalid: "^3.1.2" from node_modules/eslint ├─┬ eslint-config-custom@0.0.0 -> ./packages/eslint-config-custom │ └─┬ eslint-plugin-mdx@2.2.0 │ └─┬ eslint-mdx@2.2.0 │ └─┬ unified-engine@10.1.0 │ ├─┬ glob@8.1.0 │ │ └── minimatch@5.1.6 │ └─┬ load-plugin@5.1.0 │ └─┬ @npmcli/config@6.4.0 │ └─┬ @npmcli/map-workspaces@3.0.4 │ ├─┬ glob@10.3.10 │ │ └── minimatch@9.0.3 deduped │ └── minimatch@9.0.3 ├─┬ eslint-config-next@14.0.4 │ ├─┬ eslint-plugin-import@2.29.0 │ │ └── minimatch@9.0.3 invalid: "^3.1.2" from node_modules/eslint-plugin-import │ ├─┬ eslint-plugin-jsx-a11y@6.8.0 │ │ └── minimatch@9.0.3 invalid: "^3.1.2" from node_modules/eslint-plugin-jsx-a11y │ └─┬ eslint-plugin-react@7.33.2 │ └── minimatch@9.0.3 invalid: "^3.1.2" from node_modules/eslint-plugin-react ├─┬ eslint-plugin-perfectionist@2.4.0 │ └── minimatch@9.0.3 ├─┬ jest@29.7.0 │ └─┬ @jest/core@29.7.0 │ └─┬ @jest/transform@29.7.0 │ └─┬ babel-plugin-istanbul@6.1.1 │ └─┬ test-exclude@6.0.0 │ └── minimatch@9.0.3 invalid: "^3.0.4" from node_modules/test-exclude ├─┬ rimraf@5.0.5 │ └─┬ glob@10.3.10 │ └── minimatch@9.0.3 └─┬ storybook@0.0.0 -> ./apps/storybook ├─┬ @storybook/addon-essentials@8.0.0-alpha.8 │ └─┬ @storybook/core-common@8.0.0-alpha.8 │ └─┬ glob@10.3.10 │ └── minimatch@9.0.3 ├─┬ @storybook/nextjs@8.0.0-alpha.8 │ └─┬ @storybook/builder-webpack5@8.0.0-alpha.8 │ └─┬ fork-ts-checker-webpack-plugin@8.0.0 │ └── minimatch@3.1.2 deduped ├─┬ @storybook/react-vite@8.0.0-alpha.8 │ └─┬ @joshwooding/vite-plugin-react-docgen-typescript@0.3.0 │ └─┬ glob@7.2.3 │ └── minimatch@3.1.2 deduped ├─┬ serve@14.2.1 │ └─┬ serve-handler@6.1.5 │ └── minimatch@3.1.2 deduped ├─┬ storybook-addon-module-mock@1.1.3 │ └── minimatch@3.1.2 └─┬ storybook@8.0.0-alpha.8 └─┬ @storybook/cli@8.0.0-alpha.8 ├─┬ @storybook/core-server@8.0.0-alpha.8 │ └─┬ @storybook/builder-manager@8.0.0-alpha.8 │ └─┬ ejs@3.1.9 │ └─┬ jake@10.8.7 │ ├─┬ filelist@1.0.4 │ │ └── minimatch@5.1.6 │ └── minimatch@3.1.2 deduped └─┬ jscodeshift@0.15.1 └─┬ node-dir@0.1.17 └── minimatch@3.1.2 deduped