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

build: add Angular 19 support #2269

Merged
merged 12 commits into from
Nov 29, 2024
Merged

build: add Angular 19 support #2269

merged 12 commits into from
Nov 29, 2024

Conversation

arturovt
Copy link
Member

@arturovt arturovt commented Nov 21, 2024

Issue: #2268

Copy link

nx-cloud bot commented Nov 21, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit c9f6d69. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 4 targets

Sent with 💌 from NxCloud.

Copy link

pkg-pr-new bot commented Nov 21, 2024

Open in Stackblitz

@ngxs/devtools-plugin

npm i https://pkg.pr.new/@ngxs/devtools-plugin@2269

@ngxs/hmr-plugin

npm i https://pkg.pr.new/@ngxs/hmr-plugin@2269

@ngxs/form-plugin

npm i https://pkg.pr.new/@ngxs/form-plugin@2269

@ngxs/router-plugin

npm i https://pkg.pr.new/@ngxs/router-plugin@2269

@ngxs/storage-plugin

npm i https://pkg.pr.new/@ngxs/storage-plugin@2269

@ngxs/store

npm i https://pkg.pr.new/@ngxs/store@2269

@ngxs/websocket-plugin

npm i https://pkg.pr.new/@ngxs/websocket-plugin@2269

commit: c9f6d69

Copy link

bundlemon bot commented Nov 21, 2024

BundleMon

Files updated (3)
Status Path Size Limits
fesm2022/ngxs-store.mjs
101.86KB (+1.24KB +1.23%) 103KB / +0.5%
fesm2022/ngxs-store-internals-testing.mjs
6.8KB (-32B -0.46%) 7KB / +0.5%
fesm2022/ngxs-store-experimental.mjs
574B (-862B -60.03%) 2KB / +0.5%
Unchanged files (3)
Status Path Size Limits
fesm2022/ngxs-store-internals.mjs
11.29KB 13KB / +0.5%
fesm2022/ngxs-store-operators.mjs
6.22KB 7KB / +0.5%
fesm2022/ngxs-store-plugins.mjs
2.38KB 3KB / +0.5%

Total files change +371B +0.28%

Groups removed (1)
Status Path Size Limits
@ngxs/store(esm2022)[gzip]
./esm2022/**/*.mjs
-224.12KB +1%
Groups updated (1)
Status Path Size Limits
@ngxs/store(fesm2022)[gzip]
./fesm2022/*.mjs
31.02KB (+57B +0.18%) +1%

Final result: ❌

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link

bundlemon bot commented Nov 21, 2024

BundleMon (NGXS Plugins)

Unchanged files (9)
Status Path Size Limits
Plugins(fesm2022)[gzip]
storage-plugin/fesm2022/ngxs-storage-plugin.m
js
4.03KB +0.5%
Plugins(fesm2022)[gzip]
router-plugin/fesm2022/ngxs-router-plugin.mjs
3.01KB +0.5%
Plugins(fesm2022)[gzip]
hmr-plugin/fesm2022/ngxs-hmr-plugin.mjs
2.61KB +0.5%
Plugins(fesm2022)[gzip]
websocket-plugin/fesm2022/ngxs-websocket-plug
in.mjs
2.57KB +0.5%
Plugins(fesm2022)[gzip]
form-plugin/fesm2022/ngxs-form-plugin.mjs
2.44KB +0.5%
Plugins(fesm2022)[gzip]
devtools-plugin/fesm2022/ngxs-devtools-plugin
.mjs
2.14KB +0.5%
Plugins(fesm2022)[gzip]
logger-plugin/fesm2022/ngxs-logger-plugin.mjs
2.01KB +0.5%
Plugins(fesm2022)[gzip]
storage-plugin/fesm2022/ngxs-storage-plugin-i
nternals.mjs
861B +0.5%
Plugins(fesm2022)[gzip]
router-plugin/fesm2022/ngxs-router-plugin-int
ernals.mjs
396B +0.5%

Total files change -30B -0.15%

Groups updated (1)
Status Path Size Limits
All Plugins(fesm2022)[gzip]
./-plugin/fesm2022/.mjs
20.04KB (-30B -0.15%) +0.5%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link

bundlemon bot commented Nov 21, 2024

BundleMon (Integration Projects)

Files added (1)
Status Path Size Limits
Main bundles(Gzip)
hello-world-ng19/dist-integration/browser/mai
n-(hash).js
+66.37KB +1%
Files removed (3)
Status Path Size Limits
Main bundles(Gzip)
hello-world-ng18/dist-integration/browser/mai
n-(hash).js
-70.1KB +1%
Main bundles(Gzip)
hello-world-ng17/dist-integration/main.(hash)
.js
-68.24KB +1%
Main bundles(Gzip)
hello-world-ng16/dist-integration/main.(hash)
.js
-67.3KB +1%

Total files change -139.27KB -67.72%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@arturovt arturovt marked this pull request as ready for review November 21, 2024 12:25
Copy link
Member

@markwhitfeld markwhitfeld left a comment

Choose a reason for hiding this comment

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

Great work, but it seems that in the following file:
packages\store\experimental\src\pending-tasks.ts
We import ExperimentalPendingTasks from @angular/core.
In Angular 19, this is now available as PendingTasks from @angular/core.
(as a side note, our tests didn't pick up this missing Angular API in this PR, so I think we are short on some test coverage of this feature)

This means that we can move the withExperimentalNgxsPendingTasks utility from the @ngxs/store/experimental sub package to withNgxsPendingTasks in the main @ngxs/store package (unless you can think of a more ideal place?).
Related to this change would be a version bump of NGXS v18 to NGXS v19 (especially because of this breaking change)🎉

@arturovt
Copy link
Member Author

I agree.

@arturovt
Copy link
Member Author

But we should wait until the Nx allows migrating to Angular 19 in order to update the workspace version too.

@markwhitfeld
Copy link
Member

What is the dependency on NX which would be blocking us?
Can we not release an NGXS v19 independently of the version of NX?
Surely we can do the workspace update separately.

PS. We should still keep the experimental subpackage around.
We can export the withExperimentalNgxsPendingTasks with a deprecation notice. This function would just use the withNgxsPendingTasks function that has moved to the main package.

@arturovt
Copy link
Member Author

We can but not with the pending tasks change. The workspace is using Angular 18 which doesn't expose PendingTasks from the core.

@markwhitfeld
Copy link
Member

Ok, so we are blocked until this NX PR is merged:
nrwl/nx#28847
That NX PR is, in turn blocked by a number of their dependencies, waiting for upgrade.

Is there any way that we can decouple the angular version that our libraries reference from the version of NX?
I'm wondering if there is something we can do with overrides in the package.json, or if we could use the aliasing functionality of tsconfigs to "redirect" the referenced angular version use in our libraries?
What we build with doesn't necessarily determine what our code references. Any ideas?

@markwhitfeld
Copy link
Member

markwhitfeld commented Nov 25, 2024 via email

@arturovt
Copy link
Member Author

I have looked at what NgRx did, they upgraded workspace version w/o waiting for the Nx upgrade.

I upgraded the workspace version and had to update unit tests because components are standalone by default now.

@markwhitfeld
Copy link
Member

markwhitfeld commented Nov 25, 2024 via email

@arturovt
Copy link
Member Author

@markwhitfeld what do we with ng16/17/18 integrations? They're not compatible anymore because we're using PendingTasks. Do we remove them completely because we want to bump the version to ngxs@19 and make it compatible with angular >= 19.0.0?

@ngxs ngxs deleted a comment from codeclimate bot Nov 25, 2024
@tejasv-tagline
Copy link

Is anyone taking care of changes for this PR? Many users are waiting for Angular 19 support.

packages/store/experimental/src/pending-tasks.ts Outdated Show resolved Hide resolved
packages/store/src/pending-tasks.ts Outdated Show resolved Hide resolved
packages/store/src/pending-tasks.ts Show resolved Hide resolved
Copy link

codeclimate bot commented Nov 28, 2024

Code Climate has analyzed commit c9f6d69 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 95.3% (0.0% change).

View more on Code Climate.

Copy link
Member

@markwhitfeld markwhitfeld left a comment

Choose a reason for hiding this comment

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

Great work!!!!
Let's get this released!

@markwhitfeld markwhitfeld merged commit a9e7ff3 into master Nov 29, 2024
14 checks passed
@markwhitfeld markwhitfeld deleted the build/ng19 branch November 29, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants