Skip to content

fix(@ngtools/webpack): support locating PNPM lock file during NGCC processing #22633

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
Feb 7, 2022
Merged

fix(@ngtools/webpack): support locating PNPM lock file during NGCC processing #22633

merged 1 commit into from
Feb 7, 2022

Conversation

alan-agius4
Copy link
Collaborator

Previously, we only handled Yarn and NPM lock files even though PNPM is supported as package manager.

The lock file is used to perform checks to determine if an initial execution of NGCC was already performed.

Closes #22632

@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Feb 2, 2022
…ocessing

Previously, we only handled Yarn and NPM lock files even though PNPM is supported as package manager.

The lock file is used to perform checks to determine if an initial execution of NGCC was already performed.

Closes #22632
@alan-agius4 alan-agius4 requested a review from dgp1130 February 2, 2022 18:26
} catch {}
}

throw new Error('Cannot locate a package manager lock file.');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we list the files we tried in this error message? Otherwise it's hard to know if the CLI is looking in the wrong place or if the file itself was misplaced.

Copy link
Collaborator Author

@alan-agius4 alan-agius4 Feb 2, 2022

Choose a reason for hiding this comment

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

Actually this error message is never shown to the users. As this is non fatal and the exception is caught at a later stage.

// Any error means an ngcc execution is needed

Copy link
Collaborator

Choose a reason for hiding this comment

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

Up to you, could be useful for local development if it's ever thrown for an unexpected reason.

@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Feb 2, 2022
@filipesilva filipesilva merged commit 966dd01 into angular:master Feb 7, 2022
@alan-agius4 alan-agius4 deleted the pnpm-packagr-manager branch February 8, 2022 10:37
@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 Mar 11, 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 target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@ngtools/webpack expects yarn or npm, but not pnpm
3 participants