Skip to content

build: resolve type bundling issues #24865

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
merged 1 commit into from
May 3, 2022

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented May 3, 2022

Updating @angular/bazel to 14.0.0-next.15 reveals some issues with type bundling. These changes aim to resolve the issues by moving some code around.

@crisbeto crisbeto force-pushed the type-bundling-errors branch 2 times, most recently from 2d85ec3 to 396e3ea Compare May 3, 2022 13:28
@crisbeto crisbeto marked this pull request as ready for review May 3, 2022 13:34
@crisbeto crisbeto requested review from a team and andrewseguin as code owners May 3, 2022 13:34
@crisbeto crisbeto requested a review from devversion May 3, 2022 13:34
@crisbeto crisbeto assigned crisbeto and unassigned crisbeto May 3, 2022
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: major This PR is targeted for the next major release labels May 3, 2022
devversion
devversion previously approved these changes May 3, 2022
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label May 3, 2022
@andrewseguin
Copy link
Contributor

A team seems to be depending on the export of ClusterIconStyle. Before they just weren't importing it somehow. Is that class being exported through index.ts?

@andrewseguin
Copy link
Contributor

Should this line be added to the public-api.ts?

export {ClusterIconStyle} from './map-marker-clusterer/marker-clusterer-types';

Updating `@angular/bazel` to `14.0.0-next.15` reveals some issues with type bundling. These changes aim to resolve the issues by moving some code around.
@crisbeto
Copy link
Member Author

crisbeto commented May 3, 2022

I'm guessing that the /// <reference> we had previously was exposing all the types globally for anybody who imported the file. I've re-exported ClusterIconStyle and a couple of other types that are referenced by inputs.

@andrewseguin andrewseguin self-assigned this May 3, 2022
@andrewseguin andrewseguin merged commit e31343f into angular:main May 3, 2022
crisbeto added a commit to crisbeto/material2 that referenced this pull request May 8, 2022
In angular#24865 the access of the global `MarkerClusterer` class changed to go through the `window`. This causes a runtime error for apps minified through Closure, because the name is no longer minified and it doesn't align with the minified class name on the `window`. These changes move around our code so that we reference the clusterer without going through the `window`.
crisbeto added a commit that referenced this pull request May 8, 2022
In #24865 the access of the global `MarkerClusterer` class changed to go through the `window`. This causes a runtime error for apps minified through Closure, because the name is no longer minified and it doesn't align with the minified class name on the `window`. These changes move around our code so that we reference the clusterer without going through the `window`.

(cherry picked from commit 8840b3c)
crisbeto added a commit that referenced this pull request May 8, 2022
In #24865 the access of the global `MarkerClusterer` class changed to go through the `window`. This causes a runtime error for apps minified through Closure, because the name is no longer minified and it doesn't align with the minified class name on the `window`. These changes move around our code so that we reference the clusterer without going through the `window`.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants