Skip to content

Conversation

@clydin
Copy link
Member

@clydin clydin commented May 8, 2023

When using the esbuild-based browser application builder, CommonJS file warnings were incorrectly being issued for relative file imports. The CommonJS warnings are only intended to be generated for node module imports.

@clydin clydin added the target: patch This PR is targeted for the next patch release label May 8, 2023
@clydin clydin force-pushed the esbuild/relative-commonjs-checker branch 2 times, most recently from 8d1f3ea to 53090c9 Compare May 8, 2023 18:02
@clydin clydin marked this pull request as ready for review May 8, 2023 18:16
@clydin clydin requested a review from alan-agius4 May 8, 2023 18:16
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label May 8, 2023
@clydin clydin force-pushed the esbuild/relative-commonjs-checker branch 2 times, most recently from 3fa3715 to 2f4a7f1 Compare May 9, 2023 14:55
…ive imports with esbuild builders

When using the esbuild-based browser application builder, CommonJS file warnings were incorrectly being
issued for relative file imports. The CommonJS warnings are only intended to be generated for node module
imports.
@clydin clydin force-pushed the esbuild/relative-commonjs-checker branch from 2f4a7f1 to 70695fc Compare May 9, 2023 14:55
@clydin clydin requested a review from alan-agius4 May 9, 2023 14:56
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM, one little nit

* @returns True, if specifier is potentially relative; false, otherwise.
*/
function isPotentialRelative(specifier: string): boolean {
if (specifier[0] === '.') {
Copy link
Collaborator

@alan-agius4 alan-agius4 May 9, 2023

Choose a reason for hiding this comment

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

Can be changed to just return specifier[0] === '.'

@clydin clydin added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels May 9, 2023
@angular-robot angular-robot bot merged commit 82bdc9e into angular:main May 9, 2023
@clydin clydin deleted the esbuild/relative-commonjs-checker branch May 9, 2023 15:52
@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 9, 2023
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 target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants