-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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 angular 9 #2234
Upgrade angular 9 #2234
Conversation
@@ -47,7 +47,7 @@ describe('createEffect()', () => { | |||
expectSnippet(` | |||
const effect = createEffect(() => ({ foo: 'a' }), { dispatch: false }); | |||
`).toFail( | |||
/Type '{ foo: string; }' is not assignable to type 'Observable<{}> | ((...args: any[]) => Observable<{}>)'./ | |||
/Type '{ foo: string; }' is not assignable to type 'Observable<unknown> | ((...args: any[]) => Observable<unknown>)'./ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to take a look why this happens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you sync? :)
f70600f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be because TS is upgraded.
It only occurs when a non-observable is returned.
For a non-dispatching effect that's returning an observable, the effect has the correct returntype:
loginSuccess$ = createEffect(
() =>
this.actions$.pipe(
ofType(AuthApiActions.loginSuccess),
tap(() => this.router.navigate(['/']))
),
{ dispatch: false }
);
Returns
AuthEffects.loginSuccess$: Observable<{
user: User;
} & TypedAction<"[Auth/API] Login Success">> & CreateEffectMetadata
@@ -10,7 +11,7 @@ | |||
"lib": ["es2017", "dom"], | |||
"outDir": "../out-tsc/app", | |||
"target": "es5", | |||
"module": "es2015", | |||
"module": "esnext", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be able to use the dynamic import syntax:
import('@example-app/books/books.module').then(m => m.BooksModule),
@@ -1,4 +1,5 @@ | |||
{ | |||
"extends": "../../tsconfig.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, we had problems to run the example app:
ERROR in Unable to write a reference to EffectsRootModule
Followed the following doc https://hackmd.io/zhu28RUcRiaG0DZq5bLy1A?view
Tests and example app are working. |
da1128a
to
f51f623
Compare
"@angular-devkit/build-angular": "~0.800.0", | ||
"@bazel/bazel": "0.26.0", | ||
"@angular-devkit/build-angular": "~0.900.0-rc.0", | ||
"@bazel/bazel": "1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I took it too far here to also upgrade bazel, I can revert/create a separate PR for it.
Having some troubles to get it working during CI tho, and I'm not able to reproduce it locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably need to bump the cache key here for CI to 12 https://github.com/ngrx/platform/blob/master/.circleci/config.yml#L13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we modify the cache key from the master
branch?
I tried bumping the version of this branch, but with the same result.
Seems related to bazelbuild/bazel#9366 and bazel-contrib/rules_nodejs#1027, I already tried re-running multiple times.
@@ -47,7 +47,7 @@ describe('createEffect()', () => { | |||
expectSnippet(` | |||
const effect = createEffect(() => ({ foo: 'a' }), { dispatch: false }); | |||
`).toFail( | |||
/Type '{ foo: string; }' is not assignable to type 'Observable<{}> | ((...args: any[]) => Observable<{}>)'./ | |||
/Type '{ foo: string; }' is not assignable to type 'Observable<unknown> | ((...args: any[]) => Observable<unknown>)'./ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you sync? :)
f70600f
projects/example-app/src/app/auth/components/logout-confirmation-dialog.component.spec.ts
Show resolved
Hide resolved
projects/example-app/src/app/auth/containers/login-page.component.spec.ts
Show resolved
Hide resolved
BREAKING CHANGE: Must use Angular 9
9f094d5
to
442539b
Compare
@alex-okrushko I did sync again but it's still inferring to unknown. About |
We'll need to add |
Am I looking at the wrong place? Both imports were resolved by importing general |
@alex-okrushko it's the material module from |
Thanks @timdeschryver ! Looks like I was looking at the wrong place :) |
This file needs to be updated also https://github.com/ngrx/platform/blob/master/tools/defaults.bzl with version 9 |
2af1101
to
6bd86b0
Compare
db0e4d1
to
b5b0874
Compare
b5b0874
to
0b7ac9f
Compare
Preview docs changes for 4bbde2a at https://previews.ngrx.io/pr2234-4bbde2a/ |
@@ -169,14 +175,14 @@ jobs: | |||
- run: npm rebuild node-sass | |||
- run: yarn build-for next --progress false --base-href /pr$CIRCLE_PULL_REQUEST_NUMBER-$SHORT_GIT_HASH/ --output-path dist/ngrx.io/pr$CIRCLE_PULL_REQUEST_NUMBER-$SHORT_GIT_HASH/ && yarn copy-404-page | |||
- run: cp -rf src/extra-files/next/. dist/ngrx.io/pr$CIRCLE_PULL_REQUEST_NUMBER-$SHORT_GIT_HASH/ | |||
- run: yarn --cwd ../../ install && yarn --cwd ../../ run deploy:preview | |||
- run: yarn --cwd ../../ install --ignore-engines && yarn --cwd ../../ run deploy:preview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added --ignore-engines
because we have a version mismatch between the docs and the rest of the packages, otherwise the install command would fail.
I reached a point where I could use some guidance to fix the errors during the CI 😅. |
😂 I'll take a look |
It isn't part of the migration see angular/angular#33727 and angular/angular-cli#16145
Seems like some builds are now succeeding after the decrease of jobs 🤔 |
@timdeschryver is this ready to merge? I guess we'll see how CI holds up after it lands. |
I'll continue with following issue once this PR is merged.. |
@brandonroberts It's ready (I just pushed a commit to upgrade to the latest rc). |
(Had to retrigger the CI in order to get it green) |
Great!. Will work on #2240 now. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Closes #2211
What is the new behavior?
Does this PR introduce a breaking change?
Other information