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

Lock rxjs version to same version as @angular-devkit uses #16

Closed
wants to merge 1 commit into from

Conversation

hlovdal
Copy link

@hlovdal hlovdal commented Sep 23, 2019

Running

$ git clone https://github.com/briebug/jest-schematic
...
$ cd jest-schematic/
$ npm install
...
$ npm run build

results in error

src/jest/index.ts(46,3): error TS2322: Type '(tree: Tree, context: TypedSchematicContext<{}, {}>) => Observable<Tree>' is not assignable to type 'Rule'.
  Type 'Observable<Tree>' is not assignable to type 'void | Tree | Rule | Observable<Tree>'.
    Type 'import("C:/github/jest-schematic/node_modules/rxjs/internal/Observable").Observable<import("C:/github/jest-schematic/node_modules/@angular-devkit/schematics/src/tree/interface").Tree>' is not assignable to type 'import("C:/github/jest-schematic/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Observable").Observable<import("C:/github/jest-schematic/node_modules/@angular-devkit/schematics/src/tree/interface").Tree>'.
      Types of property 'source' are incompatible.
        Type 'import("C:/github/jest-schematic/node_modules/rxjs/internal/Observable").Observable<any>' is not assignable to type 'import("C:/github/jest-schematic/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Observable").Observable<any>'.
          Types of property 'operator' are incompatible.
            Type 'import("C:/github/jest-schematic/node_modules/rxjs/internal/Operator").Operator<any, any>' is not assignable to type 'import("C:/github/jest-schematic/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Operator").Operator<any, any>'.
              Types of property 'call' are incompatible.
                Type '(subscriber: import("C:/github/jest-schematic/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("C:/github/jest-schematic/node_modules/rxjs/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("C:/github/jest-schematic/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("C:/github/jest-schematic/node_modules/@angular-devkit/core/node_modules/rxjs/internal/types").TeardownLogic'.
                  Types of parameters 'subscriber' and 'subscriber' are incompatible.
                    Property '_parentOrParents' is missing in type 'Subscriber<any>' but required in type 'Subscriber<any>'.

which is due to rxjs version incompatibilities between 6.3.3 and 6.5.3. So lock to 6.3.x.

@angular-devkit/[email protected] and @angular-devkit/[email protected] picks
rxjs 6.3.3. When running

$ git clone https://github.com/briebug/jest-schematic
$ cd jest-schematic/
$ npm install

version 6.5.5 of rxjs is chosen, and those are not compatible[1], so
lock rxjs version to 6.3.x.

[1] Building fails with the essensial part of the error being:

Type
'import(".../jest-schematic/node_modules/rxjs/internal/Observable")
.Observable<import(".../jest-schematic/node_modules/@angular-devkit/schematics/src/tree/interface").Tree>'
is not assignable to type
'import(".../jest-schematic/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Observable")
.Observable<import(".../jest-schematic/node_modules/@angular-devkit/schematics/src/tree/interface").Tree>'.
@schuchard schuchard mentioned this pull request Oct 1, 2019
@schuchard
Copy link
Collaborator

Hi @hlovdal, thanks for reporting. This should be resolved in the latest 2.0.0 release and on master. If you're still seeing issues please reopen. Thanks.

@schuchard schuchard closed this Oct 1, 2019
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.

2 participants