-
-
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
Build update typescript to 3.4.x and rx js to 6.5.x #1795
Build update typescript to 3.4.x and rx js to 6.5.x #1795
Conversation
WIP, please do not review |
Preview docs changes for b553b4c at https://previews.ngrx.io/pr1795-b553b4c/ |
Hi @brandonroberts , Can you please guide i even tried to refer |
Preview docs changes for cf921f3 at https://previews.ngrx.io/pr1795-cf921f3/ |
I got this solved but it seems like I can't push to this branch 🤔 |
Preview docs changes for 0115238 at https://previews.ngrx.io/pr1795-0115238/ |
Thanks Tim, it worked now. |
Preview docs changes for 12f4996 at https://previews.ngrx.io/pr1795-12f4996/ |
Hi @timdeschryver , |
Preview docs changes for f0249c4 at https://previews.ngrx.io/pr1795-f0249c4/ |
Preview docs changes for 98f44a1 at https://previews.ngrx.io/pr1795-98f44a1/ |
I think it has something to do with bazel, i am referring to https://github.com/angular/angular/blob/master/WORKSPACE |
We probably have to update some bazel files 😅 |
Preview docs changes for c89f0ca at https://previews.ngrx.io/pr1795-c89f0ca/ |
Thanks, meanwhile am trying by referring angular repo. |
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.
Add rjxs
as a dep in schematics-core\build.bazel
:
package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "schematics-core",
srcs = glob(
[
"**/*.ts",
],
),
deps = [
"@npm//@angular-devkit/core",
"@npm//@angular-devkit/schematics",
"@npm//typescript",
"@npm//rxjs",
],
)
We should probably also rename this file to just BUILD
to be consistent
} from '@angular-devkit/schematics/testing'; | ||
import { concatMap } from 'rxjs/internal/operators/concatMap'; |
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.
import { concatMap } from 'rxjs/internal/operators/concatMap'; | |
import { concatMap } from 'rxjs/operators'; |
Not sure if this is the issue: |
Preview docs changes for cd3d644 at https://previews.ngrx.io/pr1795-cd3d644/ |
Preview docs changes for 72c1682 at https://previews.ngrx.io/pr1795-72c1682/ |
Preview docs changes for b10fcd4 at https://previews.ngrx.io/pr1795-b10fcd4/ |
Preview docs changes for b44d0c9 at https://previews.ngrx.io/pr1795-b44d0c9/ |
@@ -123,7 +123,7 @@ | |||
"hast-util-is-element": "^1.0.0", | |||
"hast-util-to-string": "^1.0.0", | |||
"html": "^1.0.0", | |||
"http-server": "^0.9.0", | |||
"http-server": "^0.11.1", |
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.
We had to update these because of a dependency removal - for more info see http-party/http-server#521
Preview docs changes for b44d0c9 at https://previews.ngrx.io/pr1795-b44d0c9/ |
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.
In default-pluralizer.spec
we should move the pluralizer = TestBed.get(Pluralizer);
assignment into the beforeEach
block. This should solve the remaining failing tests.
Preview docs changes for e03a2a8 at https://previews.ngrx.io/pr1795-e03a2a8/ |
Open for review now. |
Preview docs changes for fedf74d at https://previews.ngrx.io/pr1795-fedf74d/ |
I wonder why these tests needed to be converted to be async in the first place. Instead of using subscribes, add |
This line needs to be updated to |
https://github.com/ngrx/platform/pull/1795/files#diff-653388f9d55f0ae80bba217809819c24R10 |
Hi @brandonroberts , After updating to the beta version, we started getting errors to convert external schematics to async. |
🤯 ugh, so much cleaner. My bad ... 😅 |
Yes let me do this, so after this code we don't need to subscribe any more much cleaner code |
Hi @timdeschryver and @brandonroberts , I have changed the code, 6 test cases are failing will take a look into it tomorrow. |
Preview docs changes for ea72e05 at https://previews.ngrx.io/pr1795-ea72e05/ |
Update failing test case for reducer only. |
@@ -20,13 +22,6 @@ export const defaultAppOptions = { | |||
skipTests: false, | |||
}; | |||
|
|||
const defaultModuleOptions = { |
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.
Leave this code as its an unrelated change
modules/schematics/src/cli.spec.ts
Outdated
const content = tree.readContent(`${projectPath}/src/app/foo.ts`); | ||
|
||
expect(content).toMatch(/export class Foo/); | ||
schematicRunner |
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.
No subscribe, use async/await
`${projectPath}/src/app/foo/foo.component.ts` | ||
); | ||
expect(content).not.toMatch(/import \* as fromStore/); | ||
schematicRunner |
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.
No subscribe, use async/await
expect(content).toMatch(/import \* as fromStore from '..\/reducers\/foo';/); | ||
schematicRunner | ||
.runSchematicAsync('container', options, appTree) | ||
.subscribe(tree => { |
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.
No subscribe, use async/await
expect(content).toMatch(/import \* as fromStore from '..\/reducers';/); | ||
schematicRunner | ||
.runSchematicAsync('container', options, appTree) | ||
.subscribe(tree => { |
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.
No subscribe, use async/await
`${projectPath}/src/app/foo/foo.component.ts` | ||
); | ||
expect(content).toMatch(/import\ {\ Store\ }\ from\ '@ngrx\/store';/); | ||
schematicRunner |
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.
No subscribe, use async/await
); | ||
schematicRunner | ||
.runSchematicAsync('container', options, appTree) | ||
.subscribe(tree => { |
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.
No subscribe, use async/await
); | ||
schematicRunner | ||
.runSchematicAsync('container', options, appTree) | ||
.subscribe(tree => { |
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.
No subscribe, use async/await
beforeEach(() => { | ||
appTree = createReducers(createWorkspace(schematicRunner, appTree)); | ||
beforeEach(async () => { | ||
appTree = await createWorkspace(schematicRunner, appTree); |
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.
Why was createReducers
removed?
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.
It was by mistake and this is why my test cases were failing, thanks for pointing it out.
tools/defaults.bzl
Outdated
|
||
DEFAULT_TSCONFIG = "//:tsconfig.json" | ||
NG_VERSION = "^8.0.0-beta" | ||
RXJS_VERSION = "^6.4.0" | ||
RXJS_VERSION = "^6.5.1" |
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.
RXJS_VERSION = "^6.5.1" | |
RXJS_VERSION = "^6.5.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.
why not 6.5.1
?
Preview docs changes for 64455d9 at https://previews.ngrx.io/pr1795-64455d9/ |
Preview docs changes for 6c67e79 at https://previews.ngrx.io/pr1795-6c67e79/ |
Hi @brandonroberts , |
Preview docs changes for 16442a0 at https://previews.ngrx.io/pr1795-16442a0/ |
Preview docs changes for ad9e71a at https://previews.ngrx.io/pr1795-ad9e71a/ |
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.
Make pinned framework versions consistent
package.json
Outdated
"@angular/compiler-cli": "^8.0.0-beta.10", | ||
"@angular/core": "^8.0.0-beta.10", | ||
"@angular/forms": "^8.0.0-beta.10", | ||
"@angular/animations": "^8.0.0-beta.13", |
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.
Don't mix the beta and rc versions. Pin all the framework versions to ^8.0.0-rc.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.
Done @brandonroberts I have updated the version, also in rc version, @angular/http dependency has been removed and the package is not available so removed the same.
Preview docs changes for 04d547b at https://previews.ngrx.io/pr1795-04d547b/ |
Preview docs changes for 607d231 at https://previews.ngrx.io/pr1795-607d231/ |
LGTM. Once Tim approves, we'll get it merged. Thanks for working through the changes! |
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.
👋 someone called me? 😁
@santoshyadav198613 Fantastic work! Thanks! |
Thanks for appreciation@alex-okrushko mean a lot to me, |
Thanks @brandonroberts for giving me the opportunity to work on it. |
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 #1788
What is the new behavior?
Does this PR introduce a breaking change?
Other information