Skip to content
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

Upgrade to Angular 12 #1550

Closed
wants to merge 11 commits into from
Closed

Conversation

ybnd
Copy link
Member

@ybnd ybnd commented Mar 10, 2022

References

Description

Upgrade to Angular 12

Dependencies

  • Major upgrades

    • webpack v4 → v5
    • postcss v7 → v8
    • @angular-builders/custom-webpack v10 → v12
    • @ng-dynamic-forms v13 → v14
  • A few packages don't support Angular 12 (haven't encountered any issues yet)

    • @kolkov/ngx-gallery (should be fine once we upgrade to Angular 13)
    • @nicky-lenaers/ngx-scroll-to
    • ngx-sortablejs

Remaining issues / TODO

  • Upgrade bootstrap v4 → v5
    • To keep v4 w/ Angular 12 we've had to specifically use sass <1.33 for sass-loader to suppress a bunch of warnings
  • Fix flaky GitHub CI
    • Unit tests for ds-submission-form-footer and ds-claimed-task-actions-reject
      • Flow: button → open modal → button → close modal → assert call → "never called"
      • Not sure what's going wrong now, other similar tests don't seem to be affected...
    • The app fails to start in SSR sometimes
      • Haven't been able to reproduce this locally, and the GitHub runner just spits out a ton of minified JS and Command failed with exit code 1 so it's not clear what's going wrong exactly.
      • Pretty sure it only happens ~ Node 12

Reviewing

  • Installation
    • Should work
    • The only dependency warnings should be the ones addressed above
  • Unit & e2e tests should all pass (WIP)
  • Application

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
    → most of the changes in yarn.lock
  • My PR passes TSLint validation using yarn run lint
  • My PR doesn't introduce circular dependencies
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • If my PR includes new, third-party dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.

ybnd and others added 11 commits March 10, 2022 13:14
After updating to Angular 12, it causes ng serve to fail with
  Conflict: Multiple assets emit different content to the same filename index.html

Confirmed that the application still builds and runs properly without it.

This plugin isn't used by @angular-builders/custom-webpack since Angular 8 (see https://www.justjeb.com/post/customizing-angular-cli-build#viewer-51npg), this is just the first time it's actually causing problems for us.

Removed script-ext-html-webpack-plugin as well since that's an extension to html-webpack-plugin & can't run without it.
Otherwise tests error out with
  Uncaught ReferenceError: sourceMapSupport is not defined

Check just-jeb/angular-builders issue 1046 for more info
Without this, Webpack errors out when building tests due to theme components missing from the TS compilation
@artlowel artlowel added this to the 7.3 milestone Mar 10, 2022
@artlowel artlowel added code task dependencies Pull requests that update a dependency file e/60 Estimate in hours high priority labels Mar 10, 2022
@ybnd ybnd force-pushed the w2p-87968_Upgrade-to-Angular-12 branch 7 times, most recently from 38d46af to 9bddaf6 Compare March 11, 2022 12:24
@ybnd
Copy link
Member Author

ybnd commented Mar 18, 2022

Skipping ahead to Angular 13 is feasible, closing this draft in favour of #1567

@ybnd ybnd closed this Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code task dependencies Pull requests that update a dependency file e/60 Estimate in hours high priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to PostCSS v8 for custom-webpack v11 (and above) Upgrade to Angular 12 or 13
2 participants