Popmotion / popmotion

Simple animation libraries for delightful user interfaces
https://popmotion.io
20k stars 663 forks source link

pose-core: version 2.1.1 includes typescript as dependency which bloats production installs #867

Closed seanstern closed 3 years ago

seanstern commented 4 years ago

Bug Description

pose-core@2.1.1 has the following dependency list

  "dependencies": {
    "@types/invariant": "^2.2.29",
    "@types/node": "^10.0.5",
    "hey-listen": "^1.0.5",
    "rollup-plugin-typescript2": "^0.25.2",
    "tslib": "^1.10.0",
    "typescript": "^3.7.2"
  },

Note that typescript is included as a dependency.

This is a problem for any project that

  1. uses pose-core as a dependency
  2. prunes out "devDependencies" in production environments (leaving only "dependncies") to reduce overall project size in production environments

Essentially, these projects pull in an additional 50Mb of unnecessary data because pose-core is pulling in typescript as a dependency.

I believe pose-core should specify typescript as a devDependency only.

How to reproduce

Steps to reproduce the behavior:

  1. Create a package.json with the following prop { "dependencies": "pose-core": "@2.1.1" }
  2. Run yarn install --production
  3. Go to node_modules/typescrpt to see that typescript has been installed

Expected behaviour

typescript should not be installed

Additional context

typescript was added as a dependency to packages/pose-core/package.json in this commit

It was not removed until this commit

However, the latter commit has not been published to npm or yarn because both still list typescript as a dependency

stefanoruth commented 4 years ago

This seems to be fixed, but not yet published, please publish a new version