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

Angular 12 #1242

Merged
merged 8 commits into from
Feb 19, 2024
Merged

Angular 12 #1242

merged 8 commits into from
Feb 19, 2024

Conversation

cheehongw
Copy link
Contributor

@cheehongw cheehongw commented Feb 6, 2024

Summary:

This pull request addresses some of the outdated packages in our application.

Changes Made:

  • Upgrade to Angular 12 using ng update

    • See: https://update.angular.io/?l=3&v=11.0-12.0
    • All the items in the above link were reviewed and it doesn't seem we are affected by any of the changes. These are:
      • If you extend the HttpParams class you may have to update the signature of its method to reflect changes in the parameter types.
      • If you use Angular forms, min and max attributes on will now trigger validation logic.
      • If your app has custom classes that extend FormArray or FormGroup classes and override the above-mentioned methods, you may need to update your implementation
      • routerLinkActiveOptions property of RouterLinkActive now has a more specific type. You may need to update code accessing this property to align with the changes.
      • The initializer callbacks now have more specific return types, which may require update of your code if you are getting an APP_INITIALIZER instance via Injector.get or TestBed.inject.
      • The router fragments now could be null. Add null checks to avoid TypeScript failing with type errors.
      • Make sure you don't rely on ng.getDirectives throwing an error if it can't find a directive associated with a particular DOM node.
    • This item was skipped:

      You can run the optional migration for enabling production builds by default ng update @angular/cli@12 --migrate-only production-by-default.

  • Update dependency ngx-markdown@12.0.1 (from @11.2.0) to support angular 12

  • Update dependency ts-node@^10.9.2 from @^7.0.1

    • The cosmiconfig-typescript-loader library used by graphQL-codegen requires ts-node v10 as peer-dependency. Since no other libraries depend on ts-node, this upgrade should be safe to perform.
  • Freeze dependency @graphql-codegen/cli@2.16.4 from ^2.6.4

    • The latest major version of this dependency is 2.16.5, which sets cosmiconfig-typescript-loader@^4.3.0 as dependency. The latest major version (4.4.0) of cosmiconfig-typescript-loader only supports Node v14.21.3 and above

Proposed Commit Message:

Upgrade to Angular 12

Some of our packages are old and outdated. We should actively maintain 
and keep these packages up-to-date so it is easier to maintain in the 
future.

Let's upgrade to Angular 12 to keep our packages up-to-date.

The cosmiconfig-typescript-loader library used by graphQL-codegen
requires ts-node v10 as peer-dependency. Since no other libraries depend
on ts-node, this update should be safe to perform.
@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a1b5000) 53.13% compared to head (070732e) 54.77%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1242      +/-   ##
==========================================
+ Coverage   53.13%   54.77%   +1.63%     
==========================================
  Files         105      105              
  Lines        2951     2859      -92     
  Branches      549      503      -46     
==========================================
- Hits         1568     1566       -2     
  Misses       1030     1030              
+ Partials      353      263      -90     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The latest major version (v2.16.5) uses
cosmiconfig-typescript-loader@^4.3.0 instead of v4.3.0. This causes the
npm installer to pull the latest major version of
cosmiconfig-typescript-loader@4.4.0, which requires Node v14.21.3
@cheehongw
Copy link
Contributor Author

Kindly provide your Node, npm and OS version, when you test this PR.

@luminousleek
Copy link
Contributor

System

OS: macOS Ventura 13.6.3
Browser: Safari
Browser Version: Version 16.6 (18615.3.12.11.2)
Local Angular Version: 12.2.18

Actions Run

npm install: success
npm run ng:serve:web

Tested Phases

  1. Bug Reporting Phase
  2. Team's Response Phase
  3. Tester's Response Phase (Team Disagree response)

No bugs found

@chunweii
Copy link
Contributor

System

OS: Windows 11 22H2
Browser: Chrome
Browser Version: Version 121.0.6167.161 (Official Build) (64-bit)
Local Angular Version: 12.2.18

Actions Run

npm install: success
npm run ng:serve:web

Tested Phases

  1. Bug Reporting Phase
  2. Team's Response Phase
  3. Tester's Response Phase

No bugs found

@cheehongw
Copy link
Contributor Author

System

OS: ubuntu 22.04
Browser: chrome
Browser Version: Version 114.0.5735.133 (Official Build) (64-bit)
Local Angular Version: 12.2.18
node version: 14.21.2
npm version: 6.14.17

Actions Run

npm install: success
npm run ng:serve:web
npm run test
npm run e2e

Tested Phases

  1. Bug Reporting Phase
  2. Team's Response Phase
  3. Tester's Response Phase (Team Disagree response)

No bugs found

@cheehongw cheehongw merged commit e319865 into CATcher-org:master Feb 19, 2024
4 of 5 checks passed
vigneshsankariyer1234567890 added a commit that referenced this pull request Mar 4, 2024
* Fix broken duplicate link (#1233)

Fix the broken link of a duplicate issue

Currently, the user cannot open the link to a duplicate issue
when opening an issue, as described in #1228.

The links now work as expected.

* Add whitespace validation (#1237)

* Add whitespace validation

* Update whitespace validation for new issue

* Update whitespace validation for title of new issues

* Update whitespace validation for title of new issues

* Move validators into core

* Update import order

---------

Co-authored-by: Misra Aditya <e1096355@u.nus.edu>

* Fix uncaught errors when attempting to access an invalid route

There is an uncaught error when the users click on an invalid internal link in Markdown or enter an invalid link in browser.

Internal links are unlikely to be used for bug reporting and are more likely to be invalid.

Let's show an error toaster and stop the navigation when clicking on an internal link in Markdown. Also, redirect the users to the login page if the users enter invalid link in browser.

* Set default branch to `main`

Previously, image uploads depend on the user's default branch.
Now, we set the branch for image upload to be `main`. Images will 
be uploaded to `main` as a result.

---------

Co-authored-by: Chee Hong <c.h.wong2606@gmail.com>

* Preserve linebreaks (#1241)

With preserving linebreaks, subset list items are rendered as a list,
and paragraph rendering is the same as Github.

* Faulty list view when back navigating (#1243)

Issue table settings such as page index are not 
saved when table is re-mounted.

This behavior inconveniences users as their settings 
are reset everytime they navigate to a specific issue and back.

Let's lift up the table settings of each mounted table to 
a service which the tables pull from when mounted.

* Upgrade to Angular 12 (#1242)

Some of our packages are old and outdated. We should actively maintain 
and keep these packages up-to-date so it is easier to maintain in the 
future.

Let's upgrade to Angular 12 to keep our packages up-to-date.

* Fix markdown blockquote preview difference (#1245)

Due to DOMPurify, the content used for preview is different.
However, given that ngx-markdown already has sufficient sanitation
by default, we remove sanitation by DOMPurify.

* Create release for v3.5.3

---------

Co-authored-by: Nguyen <87511888+nknguyenhc@users.noreply.github.com>
Co-authored-by: AdityaMisra <114080910+MadLamprey@users.noreply.github.com>
Co-authored-by: Misra Aditya <e1096355@u.nus.edu>
Co-authored-by: NereusWB922 <107099783+NereusWB922@users.noreply.github.com>
Co-authored-by: Chee Hong <c.h.wong2606@gmail.com>
Co-authored-by: Arif Khalid <88131400+Arif-Khalid@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants