Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 of 6 tasks
nwhittaker opened this issue May 10, 2024 · 2 comments
Closed
2 of 6 tasks

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

nwhittaker opened this issue May 10, 2024 · 2 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 1 Very small fix or change (potentially a single line), doesn't require updates to tests. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality

Comments

@nwhittaker
Copy link
Contributor

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/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Field Apps

@nwhittaker nwhittaker added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels May 10, 2024
@github-actions github-actions bot added calcite-components Issues specific to the @esri/calcite-components package. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. labels May 10, 2024
@jcfranco jcfranco added p - high Issue should be addressed in the current milestone, impacts component or core functionality estimate - 1 Very small fix or change (potentially a single line), doesn't require updates to tests. and removed needs triage Planning workflow - pending design/dev review. labels May 10, 2024
@benelan benelan added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. labels May 10, 2024
@benelan benelan self-assigned this May 10, 2024
benelan added a commit that referenced this issue May 11, 2024
**Related Issue:** #9307

## Summary

Add `type-fest` to the dependencies of `@esri/calcite-components` to
prevent build errors. `type-fest` can also be used to simplify/remove
the [preact type
generator](https://github.com/Esri/calcite-design-system/blob/27a82dcaf8b091c609b3bf765d8c8617c447d8e7/packages/calcite-components/support/preact.ts#L8)
in the future.
@benelan benelan added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels May 12, 2024
@github-actions github-actions bot assigned geospatialem and DitwanP and unassigned benelan May 12, 2024
Copy link
Contributor

Installed and assigned for verification.

@DitwanP
Copy link
Contributor

DitwanP commented May 14, 2024

🍭 Verified locally

@DitwanP DitwanP closed this as completed May 14, 2024
@DitwanP DitwanP added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels May 14, 2024
benelan added a commit that referenced this issue May 14, 2024
**Related Issue:** #9307

## Summary

Add `type-fest` to the dependencies of `@esri/calcite-components` to
prevent build errors. `type-fest` can also be used to simplify/remove
the [preact type
generator](https://github.com/Esri/calcite-design-system/blob/27a82dcaf8b091c609b3bf765d8c8617c447d8e7/packages/calcite-components/support/preact.ts#L8)
in the future.
benelan added a commit that referenced this issue May 14, 2024
**Related Issue:** #9307

## Summary

Add `type-fest` to the dependencies of `@esri/calcite-components` to
prevent build errors. `type-fest` can also be used to simplify/remove
the [preact type
generator](https://github.com/Esri/calcite-design-system/blob/27a82dcaf8b091c609b3bf765d8c8617c447d8e7/packages/calcite-components/support/preact.ts#L8)
in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 1 Very small fix or change (potentially a single line), doesn't require updates to tests. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality
Projects
None yet
Development

No branches or pull requests

5 participants