Skip to content

Standardize on index.ts entry points#2040

Open
josemontespg wants to merge 6 commits into
a2ui-project:mainfrom
josemontespg:agent/wt_83df8b9d
Open

Standardize on index.ts entry points#2040
josemontespg wants to merge 6 commits into
a2ui-project:mainfrom
josemontespg:agent/wt_83df8b9d

Conversation

@josemontespg

@josemontespg josemontespg commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Standardize on index.ts entry points.

What

  • Rename public_api.ts style entry point files to index.ts across Angular packages.
  • Update references in configuration files (package.json, tsconfig.json, etc.).
  • Update renderers/angular/src/index.ts to explicitly export v0_8/index instead of v0_8.

Why

  • Align with standard module resolution practices.
  • Address reviewer feedback to explicitly export /index to ensure robust resolution in strict ESM environments.
  • Tracked in b/535315569.

Effect

  • Standardized entry points simplify import structures and build configurations.
  • Explicit /index export prevents potential resolution failures.

Testing

  • Verified by running build/tests.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request standardizes the entry point configuration across several Angular packages and samples by transitioning from public-api.ts to index.ts. Feedback on these changes suggests explicitly appending /index to the export statement in renderers/angular/src/index.ts to ensure robust module resolution and avoid potential failures in strict ESM environments or specific bundler configurations.

Comment thread renderers/angular/src/index.ts Outdated

@josemontespg josemontespg left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Keep the public_api.ts files for backwards compatibility. Apps might be importing directly from public_api.ts and we don't want those imports to break.

You may keep lean public_api.ts files that just reexport everything from index.ts, with a comment saying that the public_api.ts file is there for the purpose of backwards compatibility.

@josemontespg josemontespg left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Are there any public_api.ts files to refactor in web_core or other web adapters, like lit and react? Apply the refactor in those as well.

@josemontespg
josemontespg enabled auto-merge (squash) July 17, 2026 20:11
@josemontespg
josemontespg requested a review from ditman July 17, 2026 20:11
@josemontespg

Copy link
Copy Markdown
Collaborator Author

Regarding keeping public_api.ts for backwards compatibility: I have confirmed that the public-api.ts files have been restored as backwards compatibility wrappers that re-export index.ts.

@josemontespg

Copy link
Copy Markdown
Collaborator Author

Regarding refactoring public_api.ts in other web adapters: I have searched for public-api.ts or public_api.ts files in web_core and lit packages and confirmed that there are none, so no refactoring was needed there.

@josemontespg
josemontespg disabled auto-merge July 18, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant