Theme-ui: Missing typescript types in scoped packages

Created on 15 Mar 2020  路  8Comments  路  Source: system-ui/theme-ui

Describe the bug
@theme-ui/* packages have missing typescript types.

To Reproduce

Inspect the latest version of @theme-ui/[email protected]:

$ npm view @theme-ui/color                       

@theme-ui/[email protected] | MIT | deps: 2 | versions: 14
Color manipulation utilities for Theme UI

dist
.tarball: https://registry.npmjs.org/@theme-ui/color/-/color-0.3.1.tgz
.shasum: fceffc0be305ad6ca6be9755ac9cafc955b1e6f5
.integrity: sha512-Bgew6etspp087AdrKuMpcWjIQDQ8UTp28wtHCXgi1Ip5ClFn9i91DvaKgqXk9UwQJFL/IwydX8Bks/+u9tf0WA==
.unpackedSize: 26.9 kB

dependencies:
@theme-ui/css: ^0.3.1 polished: ^3.4.1      

maintainers:
- johno <[email protected]>
- jxnblk <[email protected]>

dist-tags:
latest: 0.3.1        next: 0.3.0-alpha.6  

published a month ago by jxnblk <[email protected]>

If we download the package: https://registry.npmjs.org/@theme-ui/color/-/color-0.3.1.tgz

We found out that types are missing:

{
  "name": "@theme-ui/color",
  "version": "0.3.1",
  "main": "dist/index.js",
  "module": "dist/index.esm.js",
  "scripts": {
    "prepare": "microbundle --no-compress",
    "watch": "microbundle watch --no-compress"
  },
  "dependencies": {
    "@theme-ui/css": "^0.3.1",
    "polished": "^3.4.1"
  },
  "publishConfig": {
    "access": "public"
  },
  "license": "MIT",
  "gitHead": "f6380fc356ce97e64bf50ba60e0bc6f38a25dabe"
}

This is quite weird since I'm able to build the project locally and I can confirm that types are being outputted to /dist and the relevant entry shows up in the package.json file.

I can't see the build process (ci) but I'm guessing there's something happening during ci/build that is dropping or not considering typescript types, maybe something to do with missing .npmignore file or a missing files entry in package.json

Expected behavior
Output packages should have typescript type definitions

Screenshots
-

Additional context
I can confirm this is also happening with other packages like @theme-ui/core

Most helpful comment

hey @ivoreis, it's already published https://www.npmjs.com/package/theme-ui/v/0.4.0-alpha.0

All 8 comments

Any idea why @jxnblk ?

AFAIK TS adoption wasn't published yet. I've blatantly copied emitted types to my projects.
A _running-candidate/alpha_ version might be useful.

We'd like to (but haven't yet) publish an alpha/rc for the 0.4 typescript conversion. The latest published version should still be using types from Definitely Types AFAIK

Cheers, it makes sense now.

An alpha/rc release sounds good, is that something that you鈥檙e considering to do soon or is there anything I can do to help?

hey @ivoreis, it's already published https://www.npmjs.com/package/theme-ui/v/0.4.0-alpha.0

Cheers 馃憤 I didn鈥檛 realize that

@ivoreis FYI there's an umbrella issue tracking the conversion to TS: https://github.com/system-ui/theme-ui/issues/668

Going to close this issue in favor of tracking in #668

Was this page helpful?
0 / 5 - 0 ratings