-
Notifications
You must be signed in to change notification settings - Fork 79
build(angular): remove event detail types patch by exporting them from the entry point #8177
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jcfranco
approved these changes
Nov 15, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
I think Stencil 4 includes custom event types in |
benelan
added a commit
that referenced
this pull request
Nov 15, 2023
…m the entry point (#8177) **Related Issue:** #8084 ## Summary I ran into build errors related to event detail types when adding the Angular output target to the monorepo. Stencil's auto-generated Angular code expected the types to be exported from the `@esri/calcite-components` entry point, but they were not. Here is one of the error messages: ``` angular-workspace:build: projects/component-library/src/lib/stencil-generated/components.ts:1014:15 - error TS2459: Module '"@esri/calcite-components"' declares 'HandleNudge' locally, but it is not exported. angular-workspace:build: angular-workspace:build: 1014 import type { HandleNudge as ICalciteHandleHandleNudge } from '@esri/calcite-components'; angular-workspace:build: ~~~~~~~~~~~ angular-workspace:build: angular-workspace:build: ../calcite-components/dist/types/components.d.ts:42:24 angular-workspace:build: 42 import { HandleChange, HandleNudge } from "./components/handle/interfaces"; angular-workspace:build: ~~~~~~~~~~~ angular-workspace:build: 'HandleNudge' is declared here. ``` To resolve the errors, I added a prebuild patch to the Angular output target that fixed the import paths for the three event detail types. As a result, a Calcite Components fix/feat that added a new event detail would create an unrelated entry in the Angular changelog. This is because the new event detail would need to be added to the patch, which lived in the Angular package's directory. This came up in: #8123 (comment) This pull request exports the event detail types from the entry point, so the patch can be removed. **When adding a new event detail, it must be exported from [`packages/calcite-components/src/index.ts`](https://github.com/Esri/calcite-design-system/blob/main/packages/calcite-components/src/index.ts) to prevent build errors.**
benelan
added a commit
that referenced
this pull request
Nov 16, 2023
…m the entry point (#8177) **Related Issue:** #8084 I ran into build errors related to event detail types when adding the Angular output target to the monorepo. Stencil's auto-generated Angular code expected the types to be exported from the `@esri/calcite-components` entry point, but they were not. Here is one of the error messages: ``` angular-workspace:build: projects/component-library/src/lib/stencil-generated/components.ts:1014:15 - error TS2459: Module '"@esri/calcite-components"' declares 'HandleNudge' locally, but it is not exported. angular-workspace:build: angular-workspace:build: 1014 import type { HandleNudge as ICalciteHandleHandleNudge } from '@esri/calcite-components'; angular-workspace:build: ~~~~~~~~~~~ angular-workspace:build: angular-workspace:build: ../calcite-components/dist/types/components.d.ts:42:24 angular-workspace:build: 42 import { HandleChange, HandleNudge } from "./components/handle/interfaces"; angular-workspace:build: ~~~~~~~~~~~ angular-workspace:build: 'HandleNudge' is declared here. ``` To resolve the errors, I added a prebuild patch to the Angular output target that fixed the import paths for the three event detail types. As a result, a Calcite Components fix/feat that added a new event detail would create an unrelated entry in the Angular changelog. This is because the new event detail would need to be added to the patch, which lived in the Angular package's directory. This came up in: #8123 (comment) This pull request exports the event detail types from the entry point, so the patch can be removed. **When adding a new event detail, it must be exported from [`packages/calcite-components/src/index.ts`](https://github.com/Esri/calcite-design-system/blob/main/packages/calcite-components/src/index.ts) to prevent build errors.**
DitwanP
pushed a commit
that referenced
this pull request
Nov 16, 2023
…m the entry point (#8177) **Related Issue:** #8084 I ran into build errors related to event detail types when adding the Angular output target to the monorepo. Stencil's auto-generated Angular code expected the types to be exported from the `@esri/calcite-components` entry point, but they were not. Here is one of the error messages: ``` angular-workspace:build: projects/component-library/src/lib/stencil-generated/components.ts:1014:15 - error TS2459: Module '"@esri/calcite-components"' declares 'HandleNudge' locally, but it is not exported. angular-workspace:build: angular-workspace:build: 1014 import type { HandleNudge as ICalciteHandleHandleNudge } from '@esri/calcite-components'; angular-workspace:build: ~~~~~~~~~~~ angular-workspace:build: angular-workspace:build: ../calcite-components/dist/types/components.d.ts:42:24 angular-workspace:build: 42 import { HandleChange, HandleNudge } from "./components/handle/interfaces"; angular-workspace:build: ~~~~~~~~~~~ angular-workspace:build: 'HandleNudge' is declared here. ``` To resolve the errors, I added a prebuild patch to the Angular output target that fixed the import paths for the three event detail types. As a result, a Calcite Components fix/feat that added a new event detail would create an unrelated entry in the Angular changelog. This is because the new event detail would need to be added to the patch, which lived in the Angular package's directory. This came up in: #8123 (comment) This pull request exports the event detail types from the entry point, so the patch can be removed. **When adding a new event detail, it must be exported from [`packages/calcite-components/src/index.ts`](https://github.com/Esri/calcite-design-system/blob/main/packages/calcite-components/src/index.ts) to prevent build errors.**
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
chore
Issues with changes that don't modify src or test files.
pr ready for visual snapshots
Adding this label will run visual snapshot testing.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue: #8084
Summary
I ran into build errors related to event detail types when adding the Angular output target to the monorepo. Stencil's auto-generated Angular code expected the types to be exported from the
@esri/calcite-components
entry point, but they were not. Here is one of the error messages:To resolve the errors, I added a prebuild patch to the Angular output target that fixed the import paths for the three event detail types. As a result, a Calcite Components fix/feat that added a new event detail would create an unrelated entry in the Angular changelog. This is because the new event detail would need to be added to the patch, which lived in the Angular package's directory. This came up in: #8123 (comment)
This pull request exports the event detail types from the entry point, so the patch can be removed. When adding a new event detail, it must be exported from
packages/calcite-components/src/index.ts
to prevent build errors.