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 17 #2934

Merged
merged 23 commits into from Apr 15, 2024
Merged

Upgrade to angular 17 #2934

merged 23 commits into from Apr 15, 2024

Conversation

atarix83
Copy link
Contributor

References

Description

This PR provides upgrade to angular 17. It also includes a bug-fixing for #2924

Instructions for Reviewers

The major changes introduced by Angular in the 17 version is on server-side rendering. Universal SSR and build-time prerendering are now directly supported in Angular CLI and do not require a separate integration with Universal.

List of main changes in this PR:

  • Removed Universal dependency in order to migrate to new @angular/ssr
  • Changed Universal app config in order to reflect new nomenclature

Include guidance for how to test or review your PR.
Review this PR by running the application (against sandbox rest server) to verify everything works properly as the current sandbox environment.

Please verify also #2924 is fixed

Checklist

  • 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.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • 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 libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

Andrea Barbasso and others added 23 commits March 15, 2024 15:51
# Conflicts:
#	server.ts
#	src/config/universal-config.interface.ts
#	src/environments/environment.production.ts
#	src/environments/environment.ts
@tdonohue tdonohue added dependencies Pull requests that update a dependency file high priority labels Apr 15, 2024
@tdonohue tdonohue added this to the 8.0 milestone Apr 15, 2024
@tdonohue
Copy link
Member

NOTE: It appears Angular 17 now requires Node 18.3.0 or 20.9.0 or later. Just hit this error when I tried a yarn build:prod on Node v18.12.1:

error @angular/animations@17.3.4: The engine "node" is incompatible with this module. Expected version "^18.13.0 || >=20.9.0". Got "18.12.1"
error Found incompatible module.

This is just something we'll need to update in our Installation Documentation once this is merged.

Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @atarix83 ! This looks great and appears to work well. I've done basic testing of the user interface and verified that SSR still works with JS disabled (since SSR settings have changed in Angular 17). I've also verified that the bug with Version History is fixed.

I'm going to merge this immediately in order to deploy it to https://sandbox.dspace.org for further testing during Testathon. Additionally, I noticed that most of this PR is really just dependency updates. The majority of the actual code changes are related to fixing the Version History bug & small refactoring of SSR for Angular 17

However, if we find later issues or if @artlowel finds issues with this PR, we may ask for some follow-up work.

@tdonohue tdonohue merged commit 0a1764c into DSpace:main Apr 15, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file high priority
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Version History causes Item page to hang Upgrade to Angular 17
3 participants