Skip to content

Conversation

@devversion
Copy link
Member

@devversion devversion commented Mar 2, 2022

Fixes the standalone release checks running outside of the .ng-dev config load (which
comes with the global.ReleaseAction). In standalone checks this variable is not
defined and therefore currently causes errors like:

/.ng-dev/release.ts:14
const actionProto = (global as any).ReleaseAction.prototype;
                                                  ^
TypeError: Cannot read properties of undefined (reading 'prototype')
    at Object.<anonymous>

We can fallback to the imported ReleaseAction constructor object if the global reference
is not provided. In such cases the monkey-patching is a noop anyway.

…eleaseAction` instance

Fixes the standalone release checks running outside of the `.ng-dev` config load, which
comes with the `global.ReleaseAction`. In standalone checks this variable is not
defined and therefore currently causes errors like:

```
/.ng-dev/release.ts:14
const actionProto = (global as any).ReleaseAction.prototype;
                                                  ^
TypeError: Cannot read properties of undefined (reading 'prototype')
    at Object.<anonymous>
```

We can fallback to the imported `ReleaseAction` constructor object if the global reference
is not provided. In such cases the monkey-patching is a noop anyway.
@devversion devversion requested a review from a team as a code owner March 2, 2022 21:51
@devversion devversion added merge safe target: patch This PR is targeted for the next patch release labels Mar 2, 2022
@amysorto amysorto added the action: merge The PR is ready for merge by the caretaker label Mar 2, 2022
@amysorto amysorto merged commit 55549cc into angular:master Mar 2, 2022
amysorto pushed a commit that referenced this pull request Mar 2, 2022
…eleaseAction` instance (#24509)

Fixes the standalone release checks running outside of the `.ng-dev` config load, which
comes with the `global.ReleaseAction`. In standalone checks this variable is not
defined and therefore currently causes errors like:

```
/.ng-dev/release.ts:14
const actionProto = (global as any).ReleaseAction.prototype;
                                                  ^
TypeError: Cannot read properties of undefined (reading 'prototype')
    at Object.<anonymous>
```

We can fallback to the imported `ReleaseAction` constructor object if the global reference
is not provided. In such cases the monkey-patching is a noop anyway.

(cherry picked from commit 55549cc)
@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 Apr 2, 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.

2 participants