Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
285 stars 76 forks source link

`type-fest` build error after upgrading to Calcite 2.8.0 #9307

Closed nwhittaker closed 4 months ago

nwhittaker commented 4 months ago

Check existing issues

Actual Behavior

Encountering a build error after upgrading to Calcite 2.8.0 in a project and then referencing Calcite's components.d.ts file in the project's tsconfig.json:

  "files": [
    "node_modules/@esri/calcite-components/dist/types/components.d.ts",
  ]

Expected Behavior

No build error.

Reproduction Sample

https://github.com/nwhittaker/stencil-component

Reproduction Steps

  1. Check out the GitHub repo at the calcite-2.8.0-type-fest-build-error tag
  2. Run npm i
  3. Run npm run build and should see error here

Reproduction Version

2.8.0

Relevant Info

[ ERROR ]  TypeScript: node_modules/@esri/calcite-components/dist/types/utils/form.d.ts:2:10
           Module '"type-fest"' has no exported member 'Writable'.

      L1:  import { FunctionalComponent } from "../stencil-public-runtime";
      L2:  import { Writable } from "type-fest";
      L3:  import { Status } from "../components";

[21:11.6]  build failed in 1.58 s

Regression?

2.7.1

Priority impact

p1 - need for current milestone

Impact

Workarounds appear to be to either enable skipLibCheck or add the type-fest dependency explicitly.

Calcite package

Esri team

ArcGIS Field Apps

github-actions[bot] commented 4 months ago

Installed and assigned for verification.

DitwanP commented 4 months ago

🍭 Verified locally