rsm-hcd / AndcultureCode.JavaScript.React.Components

Common atomically designed react components used at andculture
6 stars 8 forks source link

Reevaluate production vs. peer/dev dependencies #103

Open brandongregoryscott opened 3 years ago

brandongregoryscott commented 3 years ago

After some recent debugging during the attempted axios upgrade, and looking at other packages for reference, @wintondeshong and I are suspecting that the current dependencies list is incorrect, and most (if not all) of them should be listed as peerDependencies and devDependencies. This leaves it up to the consumer to install them if they are using external libraries we are referencing, such as axios, react, react-dom, etc, while maintaining copies for local development.

This should alleviate potential issues with multiple versions of the same package, ie having multiple instances of axios configured differently, or React errors from running multiple instances. It should also remove the need to re-export react-router-dom components, which was a workaround solution to use our routing abstraction in another project.

In addition to specifying these external libraries as peer dependencies, we should lighten the version requirement on them so consumers are not locked in to just the specific version of the package we are using for development, which is rigid and can cause dependency update nightmare. Use your best judgement for specifying a range or minimum version requirement based on the versions we're currently pulling in. This may need to be tweaked as the new package structure rolls out.

Because this is a pretty major change to the way the package is being used currently, we'll want to make sure we update the readme to reflect this new behavior.


Issue cloned from AndcultureCode/AndcultureCode.JavaScript.Core#95 via and-cli