nordtheme / web

The official Nord website and documentation
https://www.nordtheme.com
MIT License
97 stars 24 forks source link

Dependency Update April-October 2019 #183

Closed arcticicestudio closed 5 years ago

arcticicestudio commented 5 years ago

This is the regular batch update for outdated dependencies.

Deprecated Packages

The following packages have been deprecated in favour of new (scoped) packages:

Known Issues

The react-pose and react-spring package are intentionally not updated in order to prevent incompatibilities. Due to the transitive dependency of react-pose to the stylefire package, some SVG animations would break because the latest version of stylefire changed the way how x & y CSS transform and translate propertiy values are handled. This results in SVG element not being scaled from their original position but from the top of the viewBox. Using the latest version of react-spring causes a value not defined error for the animation of the floating port project logos. Both problems will be solved later on by finding the root cause of the undefined value as well as migrating away from the deprecated react-pose package to the new framer-motion package and API.

Updated ESLint Configuration

The ESLint configuration will be adapted to the new @arcticicestudio/eslint-config package. This simplifies the configuration at all by removing custom overrides that were missing in the preset. It also removes the import of the import/no-extraneous-dependencies rule object from the @arcticicestudio/eslint-config-base package since the rule will be disabled for all files matching the **/.gatsby/**/*.js pattern.

The new preset also comes with the new development dependency package eslint-config-prettier. In order to resolve alias imports the eslint-import-resolver-alias package will also be added and configured.

After updating all configurations the whole code base will be linted and possible errors and warnings will be fixed.

Testing Setup

The awesome react-testing libraries moved to the @testing-library package scope which requires some changes to be done to migrate the test setup:

  1. Update all package import paths, e.g. react-testing-library to @testing-library/react.
  2. Remove the deprecated import of the cleanup-after-each function that yields the following warning

    The module @testing-library/react/cleanup-after-each has been deprecated and no longer does anything (it is not needed). You no longer need to import this module and can safely remove any import or configuration which imports this module.

  3. Update failing snapshots were only the class name of styled components changed. This is because the generated class names are now starting with a counter of 0 instead of 1 causing only changes like this:
    -.c1
    +.c0
Production Dependencies
Development Dependencies