lifeomic / lambda-tools

Common utilities for Lambda testing and development
MIT License
23 stars 7 forks source link

fix: Move `@types/*` to dev deps #323

Closed macsj200 closed 2 years ago

macsj200 commented 2 years ago

Move each @types/* package into devDependencies instead of dependencies. This is because we don't need to depend on @types/* packages at runtime, only compile-time.

Related: https://github.com/lifeomic/lambda-tools/pull/322

macsj200 commented 2 years ago

~TODO: figure out lockfile changes~ see related: https://github.com/yarnpkg/yarn/issues/5091

~~Update: I ended up following these steps: yarn remove $EVERY_TYPES_PACKAGE_IN_DEPS this removes the packages and their entries in yarn.lock Manually paste each types package $EVERY_TYPES_PACKAGE_IN_DEPS into devDependencies (at the same version constraints they were at before) Re-run yarn/yarn install to install each package via devDependencies, this caused the yarn.lock file to be updated again.~~

Second update: I reverted the yarn.lock file to the one currently checked in to master because there was a types issue in the CI run:

Could not find a declaration file for module 'terser-webpack-plugin'. '/home/runner/work/lambda-tools/lambda-tools/node_modules/terser-webpack-plugin/dist/cjs.js' implicitly has an 'any' type.

I believe this is because of the large diff I created by manually removing and re-adding the @types/* dependencies, even using the same version constraints from before. I believe various dependencies & sub-dependencies were upgraded to versions that weren't actually compatible, see note on npm/semver. I have chosen to keep the yarn.lock as-is for now, as of commit 83fce40ac5d7562213640bfa612ce1debe6f1ea9.

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 16.0.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: