pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

Fix/Enhance NPM dependencies and redundant packages #7147

Open JoryHogeveen opened 1 year ago

JoryHogeveen commented 1 year ago

Description

Currently our package.json is quite large, might be best to check what dependencies are acturally required and what can be removed. For example, lodash is a large library which most of the time is only partially used. These functions can easily be replaced with our own functions that we can even optimize much more.

Besides this our dependencies are conflicting, just did a full reinstall (see log below) We should update our dependencies and switch to React 18 just like WP already has.

npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @wordpress/commands@0.7.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.0.0" from @wordpress/commands@0.7.0
npm WARN node_modules/@wordpress/commands
npm WARN   dev @wordpress/commands@"^0.7.0" from the root project
npm WARN
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^18.0.0" from @wordpress/commands@0.7.0
npm WARN   node_modules/@wordpress/commands
npm WARN     dev @wordpress/commands@"^0.7.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-autosize-textarea@7.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from react-autosize-textarea@7.1.0
npm WARN node_modules/react-autosize-textarea
npm WARN   react-autosize-textarea@"^7.1.0" from @wordpress/block-editor@8.6.0
npm WARN   node_modules/@wordpress/block-editor
npm WARN   2 more (@wordpress/editor, @wordpress/block-editor)
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN   peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from react-autosize-textarea@7.1.0
npm WARN   node_modules/react-autosize-textarea
npm WARN     react-autosize-textarea@"^7.1.0" from @wordpress/block-editor@8.6.0
npm WARN     node_modules/@wordpress/block-editor
npm WARN     2 more (@wordpress/editor, @wordpress/block-editor)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-autosize-textarea@7.1.0
npm WARN Found: react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN   dev react-dom@"^17.0.2" from the root project
npm WARN   52 more (@ariakit/react, @ariakit/react-core, @dnd-kit/core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^0.14.0 || ^15.0.0 || ^16.0.0" from react-autosize-textarea@7.1.0
npm WARN node_modules/react-autosize-textarea
npm WARN   react-autosize-textarea@"^7.1.0" from @wordpress/block-editor@8.6.0
npm WARN   node_modules/@wordpress/block-editor
npm WARN   2 more (@wordpress/editor, @wordpress/block-editor)
npm WARN
npm WARN Conflicting peer dependency: react-dom@16.14.0
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"^0.14.0 || ^15.0.0 || ^16.0.0" from react-autosize-textarea@7.1.0
npm WARN   node_modules/react-autosize-textarea
npm WARN     react-autosize-textarea@"^7.1.0" from @wordpress/block-editor@8.6.0
npm WARN     node_modules/@wordpress/block-editor
npm WARN     2 more (@wordpress/editor, @wordpress/block-editor)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-dates@17.2.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^0.14 || ^15.5.4 || ^16.1.1" from react-dates@17.2.0
npm WARN node_modules/react-dates
npm WARN   react-dates@"^17.1.1" from @wordpress/components@19.9.0
npm WARN   node_modules/@wordpress/components
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN   peer react@"^0.14 || ^15.5.4 || ^16.1.1" from react-dates@17.2.0
npm WARN   node_modules/react-dates
npm WARN     react-dates@"^17.1.1" from @wordpress/components@19.9.0
npm WARN     node_modules/@wordpress/components
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-dates@17.2.0
npm WARN Found: react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN   dev react-dom@"^17.0.2" from the root project
npm WARN   52 more (@ariakit/react, @ariakit/react-core, @dnd-kit/core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^0.14 || ^15.5.4 || ^16.1.1" from react-dates@17.2.0
npm WARN node_modules/react-dates
npm WARN   react-dates@"^17.1.1" from @wordpress/components@19.9.0
npm WARN   node_modules/@wordpress/components
npm WARN
npm WARN Conflicting peer dependency: react-dom@16.14.0
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"^0.14 || ^15.5.4 || ^16.1.1" from react-dates@17.2.0
npm WARN   node_modules/react-dates
npm WARN     react-dates@"^17.1.1" from @wordpress/components@19.9.0
npm WARN     node_modules/@wordpress/components
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @wordpress/components@25.2.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.0.0" from @wordpress/components@25.2.0
npm WARN node_modules/@wordpress/commands/node_modules/@wordpress/components
npm WARN   @wordpress/components@"^25.2.0" from @wordpress/commands@0.7.0
npm WARN   node_modules/@wordpress/commands
npm WARN
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^18.0.0" from @wordpress/components@25.2.0
npm WARN   node_modules/@wordpress/commands/node_modules/@wordpress/components
npm WARN     @wordpress/components@"^25.2.0" from @wordpress/commands@0.7.0
npm WARN     node_modules/@wordpress/commands
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @wordpress/data@9.6.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.0.0" from @wordpress/data@9.6.0
npm WARN node_modules/@wordpress/commands/node_modules/@wordpress/data
npm WARN   @wordpress/data@"^9.6.0" from @wordpress/commands@0.7.0
npm WARN   node_modules/@wordpress/commands
npm WARN   2 more (@wordpress/rich-text, @wordpress/keyboard-shortcuts)
npm WARN
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^18.0.0" from @wordpress/data@9.6.0
npm WARN   node_modules/@wordpress/commands/node_modules/@wordpress/data
npm WARN     @wordpress/data@"^9.6.0" from @wordpress/commands@0.7.0
npm WARN     node_modules/@wordpress/commands
npm WARN     2 more (@wordpress/rich-text, @wordpress/keyboard-shortcuts)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @wordpress/keyboard-shortcuts@4.13.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.0.0" from @wordpress/keyboard-shortcuts@4.13.0
npm WARN node_modules/@wordpress/commands/node_modules/@wordpress/keyboard-shortcuts
npm WARN   @wordpress/keyboard-shortcuts@"^4.13.0" from @wordpress/commands@0.7.0
npm WARN   node_modules/@wordpress/commands
npm WARN
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^18.0.0" from @wordpress/keyboard-shortcuts@4.13.0
npm WARN   node_modules/@wordpress/commands/node_modules/@wordpress/keyboard-shortcuts
npm WARN     @wordpress/keyboard-shortcuts@"^4.13.0" from @wordpress/commands@0.7.0
npm WARN     node_modules/@wordpress/commands
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: cmdk@0.2.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.0.0" from cmdk@0.2.0
npm WARN node_modules/@wordpress/commands/node_modules/cmdk
npm WARN   cmdk@"^0.2.0" from @wordpress/commands@0.7.0
npm WARN   node_modules/@wordpress/commands
npm WARN
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^18.0.0" from cmdk@0.2.0
npm WARN   node_modules/@wordpress/commands/node_modules/cmdk
npm WARN     cmdk@"^0.2.0" from @wordpress/commands@0.7.0
npm WARN     node_modules/@wordpress/commands
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-dom@18.2.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.2.0" from react-dom@18.2.0
npm WARN node_modules/@wordpress/commands/node_modules/react-dom
npm WARN   peer react-dom@">=16.8.0" from @floating-ui/react-dom@1.0.0
npm WARN   node_modules/@wordpress/commands/node_modules/@floating-ui/react-dom
npm WARN   4 more (@wordpress/components, framer-motion, ...)
npm WARN
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^18.2.0" from react-dom@18.2.0
npm WARN   node_modules/@wordpress/commands/node_modules/react-dom
npm WARN     peer react-dom@">=16.8.0" from @floating-ui/react-dom@1.0.0
npm WARN     node_modules/@wordpress/commands/node_modules/@floating-ui/react-dom
npm WARN     4 more (@wordpress/components, framer-motion, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: airbnb-prop-types@2.16.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^0.14 || ^15.0.0 || ^16.0.0-alpha" from airbnb-prop-types@2.16.0
npm WARN node_modules/react-dates/node_modules/airbnb-prop-types
npm WARN   airbnb-prop-types@"^2.10.0" from react-dates@17.2.0
npm WARN   node_modules/react-dates
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN   peer react@"^0.14 || ^15.0.0 || ^16.0.0-alpha" from airbnb-prop-types@2.16.0
npm WARN   node_modules/react-dates/node_modules/airbnb-prop-types
npm WARN     airbnb-prop-types@"^2.10.0" from react-dates@17.2.0
npm WARN     node_modules/react-dates
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: airbnb-prop-types@2.16.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^0.14 || ^15.0.0 || ^16.0.0-alpha" from airbnb-prop-types@2.16.0
npm WARN node_modules/react-outside-click-handler/node_modules/airbnb-prop-types
npm WARN   airbnb-prop-types@"^2.15.0" from react-outside-click-handler@1.3.0
npm WARN   node_modules/react-outside-click-handler
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN   peer react@"^0.14 || ^15.0.0 || ^16.0.0-alpha" from airbnb-prop-types@2.16.0
npm WARN   node_modules/react-outside-click-handler/node_modules/airbnb-prop-types
npm WARN     airbnb-prop-types@"^2.15.0" from react-outside-click-handler@1.3.0
npm WARN     node_modules/react-outside-click-handler
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-with-direction@1.4.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^0.14 || ^15 || ^16" from react-with-direction@1.4.0
npm WARN node_modules/react-with-styles/node_modules/react-with-direction
npm WARN   react-with-direction@"^1.3.0" from react-with-styles@3.2.3
npm WARN   node_modules/react-with-styles
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN   peer react@"^0.14 || ^15 || ^16" from react-with-direction@1.4.0
npm WARN   node_modules/react-with-styles/node_modules/react-with-direction
npm WARN     react-with-direction@"^1.3.0" from react-with-styles@3.2.3
npm WARN     node_modules/react-with-styles
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @wordpress/compose@6.13.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.0.0" from @wordpress/compose@6.13.0
npm WARN node_modules/@wordpress/commands/node_modules/@wordpress/components/node_modules/@wordpress/compose
npm WARN   @wordpress/compose@"^6.13.0" from @wordpress/components@25.2.0
npm WARN   node_modules/@wordpress/commands/node_modules/@wordpress/components
npm WARN   1 more (@wordpress/rich-text)
npm WARN
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^18.0.0" from @wordpress/compose@6.13.0
npm WARN   node_modules/@wordpress/commands/node_modules/@wordpress/components/node_modules/@wordpress/compose
npm WARN     @wordpress/compose@"^6.13.0" from @wordpress/components@25.2.0
npm WARN     node_modules/@wordpress/commands/node_modules/@wordpress/components
npm WARN     1 more (@wordpress/rich-text)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @wordpress/rich-text@6.13.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.0.0" from @wordpress/rich-text@6.13.0
npm WARN node_modules/@wordpress/commands/node_modules/@wordpress/components/node_modules/@wordpress/rich-text
npm WARN   @wordpress/rich-text@"^6.13.0" from @wordpress/components@25.2.0
npm WARN   node_modules/@wordpress/commands/node_modules/@wordpress/components
npm WARN
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^18.0.0" from @wordpress/rich-text@6.13.0
npm WARN   node_modules/@wordpress/commands/node_modules/@wordpress/components/node_modules/@wordpress/rich-text
npm WARN     @wordpress/rich-text@"^6.13.0" from @wordpress/components@25.2.0
npm WARN     node_modules/@wordpress/commands/node_modules/@wordpress/components
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: framer-motion@10.12.18
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peerOptional react@"^18.0.0" from framer-motion@10.12.18
npm WARN node_modules/@wordpress/commands/node_modules/@wordpress/components/node_modules/framer-motion
npm WARN   framer-motion@"^10.11.6" from @wordpress/components@25.2.0
npm WARN   node_modules/@wordpress/commands/node_modules/@wordpress/components
npm WARN
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peerOptional react@"^18.0.0" from framer-motion@10.12.18
npm WARN   node_modules/@wordpress/commands/node_modules/@wordpress/components/node_modules/framer-motion
npm WARN     framer-motion@"^10.11.6" from @wordpress/components@25.2.0
npm WARN     node_modules/@wordpress/commands/node_modules/@wordpress/components
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @wordpress/compose@6.13.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   dev react@"^17.0.2" from the root project
npm WARN   122 more (@ariakit/react, @ariakit/react-core, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.0.0" from @wordpress/compose@6.13.0
npm WARN node_modules/@wordpress/commands/node_modules/@wordpress/data/node_modules/@wordpress/compose
npm WARN   @wordpress/compose@"^6.13.0" from @wordpress/data@9.6.0
npm WARN   node_modules/@wordpress/commands/node_modules/@wordpress/data
npm WARN
npm WARN Conflicting peer dependency: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^18.0.0" from @wordpress/compose@6.13.0
npm WARN   node_modules/@wordpress/commands/node_modules/@wordpress/data/node_modules/@wordpress/compose
npm WARN     @wordpress/compose@"^6.13.0" from @wordpress/data@9.6.0
npm WARN     node_modules/@wordpress/commands/node_modules/@wordpress/data
heybran commented 1 year ago

Tried to install cypress and cypress-axe to work on accessibility #7201, but failed to add new dependencies with npm.

brandon@MacBook-Air pods % npm install -D cypress cypress-axe
npm WARN config init.author.name Use `--init-author-name` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @wordpress/commands@0.7.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   peer react@"^17.0.0 || ^18.0.0" from @ariakit/react@0.2.12
npm ERR!   node_modules/@ariakit/react
npm ERR!     @ariakit/react@"^0.2.10" from @wordpress/components@25.2.0
npm ERR!     node_modules/@wordpress/commands/node_modules/@wordpress/components
npm ERR!       @wordpress/components@"^25.2.0" from @wordpress/commands@0.7.0
npm ERR!       node_modules/@wordpress/commands
npm ERR!         dev @wordpress/commands@"^0.7.0" from the root project
npm ERR!   peer react@"^17.0.0 || ^18.0.0" from @ariakit/react-core@0.2.12
npm ERR!   node_modules/@ariakit/react-core
npm ERR!     @ariakit/react-core@"0.2.12" from @ariakit/react@0.2.12
npm ERR!     node_modules/@ariakit/react
npm ERR!       @ariakit/react@"^0.2.10" from @wordpress/components@25.2.0
npm ERR!       node_modules/@wordpress/commands/node_modules/@wordpress/components
npm ERR!         @wordpress/components@"^25.2.0" from @wordpress/commands@0.7.0
npm ERR!         node_modules/@wordpress/commands
npm ERR!   121 more (@dnd-kit/accessibility, @dnd-kit/core, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.0.0" from @wordpress/commands@0.7.0
npm ERR! node_modules/@wordpress/commands
npm ERR!   dev @wordpress/commands@"^0.7.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react@18.2.0
npm ERR! node_modules/react
npm ERR!   peer react@"^18.0.0" from @wordpress/commands@0.7.0
npm ERR!   node_modules/@wordpress/commands
npm ERR!     dev @wordpress/commands@"^0.7.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /Users/brandon/.npm/_logs/2023-10-17T15_09_27_435Z-eresolve-report.txt