google / intermock

Mocking library to create mock objects with fake data for TypeScript interfaces
https://google.github.io/intermock/
Apache License 2.0
1.14k stars 71 forks source link

Update all dependencies to latest #42

Open jasco opened 4 years ago

jasco commented 4 years ago

This updates all the project dependencies to latest, including porting to Typescript 4.

All the tests and ci pass.

When reviewing, note in particular the destructuring immutable copy that was added in intermock.ts at line 334. The Typescript fields are now declared readonly so this somewhat complicated casting and destructuring approach, which basically should mirror what was there previously, was used to do a deep copy-update.

google-cla[bot] commented 4 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

jasco commented 4 years ago

@googlebot I signed it!

ryanmcdermott commented 4 years ago

From a cursory glance this looks great! I'll scrutinize a little deeper in the coming week. For better and worse, I rely solely on the unit tests rather than insights from real-world usage due to its still limited prevalence in the wild. All that to say, I may write a few new unit tests to see if there's anything this might have missed with changes in TS 4.

This leads me to conjecture that it might be time to make this a major version release. For the most part, the tool has been stable in terms of new PRs, after all it's been over a year since its launch. Some new features get added and new language constructs are handled, but by and large this feels fairly concrete. A major version release will provide the greatest benefit in changes such as this PR where the underlying TS target is upgraded.

What are your thoughts regarding this 1.0.0 major version idea?

jasco commented 4 years ago

Based on the possibility that the dependency changes might represent a breaking change for some, the major version idea makes a lot of sense. As far as a 1.0.0 release, in my very limited exploration (I just found this project yesterday), I have seen a few rough edges (possibly user errors) that might ideally be working in a 1.0 release.

The most notably problems:

An aside,

jasco commented 4 years ago

I added a issue for the first case I mentioned above, #43.

A correction regarding the second case above, it seems like I may have encountered two cases. Most of the cases I observed were actually cases where the object was declared in another file, like the first issue. The other case was when a type alias was referenced even when declared in the same file. I added this second variant as issue #44.

developer239 commented 3 years ago

@jasco @ryanmcdermott Is anyone going t merge this? Also is the issue with empty objects fixed? This library seems promising but right now the types are not generated correctly - in most cases - so it is also useless.

I could maybe help if you create an issue and describe at least roughly where the problem is. 🙂

EliazTray commented 3 years ago

Any update now?