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

Update Typescript. #382

Merged
merged 1 commit into from
Oct 12, 2020
Merged

Update Typescript. #382

merged 1 commit into from
Oct 12, 2020

Conversation

OleksiiZubko
Copy link
Collaborator

@OleksiiZubko OleksiiZubko commented Oct 11, 2020

This CR updates Typescript to version 4.0.3,
@types/node to version 14.11.8,
ts-node to version 9.0.0

Also, because of changes in Typescript 3.9.0
(microsoft/TypeScript#32264)
the testing becoming failing.

The testing (sinon) library uses for stubbing dependencies
the enumerable properties of objects.

We do not able to use that way if we need to stub some dependency
in tests with Typescript 3.9+ versions.

The right way is about refactoring code
(adding dependency injection, for example), but it's a huge task.

For resolving that problem, we use the 'tslib 1.13.0' helper module
and compile for testing the code with included helpers from that lib.

It's at least a working solution until a better way is found.

Resolves: OLPEDGE-2315
Signed-off-by: Oleksii Zubko [email protected]

@codecov-io
Copy link

codecov-io commented Oct 11, 2020

Codecov Report

Merging #382 into master will increase coverage by 0.0050%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff                @@
##             master       #382        +/-   ##
================================================
+ Coverage   88.0933%   88.0983%   +0.0050%     
================================================
  Files            71         72         +1     
  Lines          2402       2403         +1     
  Branches        264        264                
================================================
+ Hits           2116       2117         +1     
  Misses          161        161                
  Partials        125        125                
Impacted Files Coverage Δ
...re/olp-sdk-dataservice-read/lib/DownloadManager.ts 100.0000% <0.0000%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2715a0...c4c6134. Read the comment docs.

This CR updates Typescript to version 4.0.3,
@types/node to version 14.11.8,
ts-node to version 9.0.0

Also, because of changes in Typescript 3.9.0
(microsoft/TypeScript#32264)
the testing becoming failing.

The testing (sinon) library uses for stubbing dependencies
the enumerable properties of objects.

We do not able to use that way if we need to stub some dependency
in tests  with Typescript 3.9+ versions.

The right way is about refactoring code
(adding dependency injection, for example), but it's a huge task.

Fo resolving that problem, we use the 'tslib 1.13.0' helper module
and compile for testing the code with included helpers from that lib.

It's at least a working solution until a better way is found.

Resolves: OLPEDGE-2315

Signed-off-by: Oleksii Zubko <[email protected]>
@OleksiiZubko OleksiiZubko merged commit 9cd32c2 into master Oct 12, 2020
@OleksiiZubko OleksiiZubko deleted the task/olpedge-2315 branch October 12, 2020 08:01
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.

3 participants