Skip to content

Conversation

@alan-agius4
Copy link
Contributor

@alan-agius4 alan-agius4 commented Mar 23, 2023

Several updates to Angular Package Format.

BREAKING CHANGE:

Several changes to the Angular Package Format (APF)

  • Removal of FESM2015
  • Replacing ES2020 with ES2022
  • Replacing FESM2020 with FESM2022

Resubmit of #49332 as it did not causes breakages in G3.
TGP 🟢: http://test/OCL:518773575:BASE:518788596:1679562605010:5c0b8a16

Several updates to Angular Package Format.

BREAKING CHANGE:

Several changes to the Angular Package Format (APF)
- Removal of FESM2015
- Replacing ES2020 with ES2022
- Replacing FESM2020 with FESM2022
This commit updates parts of the FW to be ES2022 complaint.

These changes are needed to fix the following problems problems with using properties before they are initialized.

Example
```ts
class Foo {
   bar = this.buz;
   constructor(private buz: unknown){}
}
```
google-closure-compiler does not support ES2022

(cherry picked from commit 54365418bb8388ffa9b6388ae438e4d6ac4e081d)
These are currently broken due to the APF v16 changes which dropped support for ES2015.
This commit patches `ts_library` to be able to produce `ES2022`. Also, updates the build tsconfig and sets `useDefineForClassFields` to `false` to keep the same behaviour of `ng_module`.
Benchpress requires a decent amount of work to be ES2022 compliant. This will be done in a followup PR.
@angular-robot angular-robot bot added detected: breaking change PR contains a commit with a breaking change detected: feature PR contains a feature commit area: build & ci Related the build and CI infrastructure of the project labels Mar 23, 2023
@ngbot ngbot bot added this to the Backlog milestone Mar 23, 2023
@alan-agius4 alan-agius4 added PullApprove: disable target: major This PR is targeted for the next major release action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: merge The PR is ready for merge by the caretaker labels Mar 23, 2023
@alan-agius4 alan-agius4 marked this pull request as ready for review March 23, 2023 09:32
@alan-agius4
Copy link
Contributor Author

Caretaker note: no need for re-approvals as this is an exact re-submit of #49332

@alan-agius4 alan-agius4 requested a review from atscott March 23, 2023 09:32
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Mar 23, 2023
@atscott
Copy link
Contributor

atscott commented Mar 23, 2023

This PR was merged into the repository by commit 6161c50.

@atscott atscott closed this in 6e26af5 Mar 23, 2023
atscott pushed a commit that referenced this pull request Mar 23, 2023
This commit updates parts of the FW to be ES2022 complaint.

These changes are needed to fix the following problems problems with using properties before they are initialized.

Example
```ts
class Foo {
   bar = this.buz;
   constructor(private buz: unknown){}
}
```

PR Close #49559
atscott pushed a commit that referenced this pull request Mar 23, 2023
google-closure-compiler does not support ES2022

(cherry picked from commit 54365418bb8388ffa9b6388ae438e4d6ac4e081d)

PR Close #49559
atscott pushed a commit that referenced this pull request Mar 23, 2023
These are currently broken due to the APF v16 changes which dropped support for ES2015.

PR Close #49559
atscott pushed a commit that referenced this pull request Mar 23, 2023
This commit patches `ts_library` to be able to produce `ES2022`. Also, updates the build tsconfig and sets `useDefineForClassFields` to `false` to keep the same behaviour of `ng_module`.

PR Close #49559
atscott pushed a commit that referenced this pull request Mar 23, 2023
Benchpress requires a decent amount of work to be ES2022 compliant. This will be done in a followup PR.

PR Close #49559
@alan-agius4 alan-agius4 deleted the apf-2022-v16-update branch March 23, 2023 15:22
@jk-570057587
Copy link

大佬好

@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 24, 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 area: build & ci Related the build and CI infrastructure of the project detected: breaking change PR contains a commit with a breaking change detected: feature PR contains a feature commit merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note PullApprove: disable 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