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

feat: Faker.ts initial #6

Merged
merged 25 commits into from Jan 28, 2021
Merged

feat: Faker.ts initial #6

merged 25 commits into from Jan 28, 2021

Conversation

omermorad
Copy link
Owner

@omermorad omermorad commented Jan 23, 2021

This is the very first code of the project

omermorad and others added 15 commits January 15, 2021 16:11
Co-authored-by: Idanpt <idan.ptichi@naturalint.com>
* test(fixture-factory, class-processor): first commit of unit tests - fixture-factory,class-processor

* test(class-processor, primitive-value-handler): class processor, primitive values tests added

* test: refactored tests

Co-authored-by: amit.wagner <wagner.amit@gmail.com>
* refactor: naming

* refactor(FML): mega refactor

* refactor(handlers): logics and more handlers

* fix(primitives): throw an error when type mismatch

* fix(circularity): remove ciruclarity protection because reflect-metadata protection

* test(handlers): added unit test for callback handler

* test(handlers): add enum unit test and fix callback one

* test(handlers): add some more tests for handlers

* refactor(naming): changed some names

* test: more coverage and renaming

* chore(release-settings): change startegy to work with v-* and not with master

* test(reflector): add class reflector test coverage

* test: added integration test, increased coverage
@omermorad omermorad changed the title feat: faker.ts feat: faker.ts initial package Jan 23, 2021
@omermorad omermorad requested a review from idanpt January 23, 2021 15:34
@omermorad omermorad changed the title feat: faker.ts initial package feat: Faker.ts initial Jan 23, 2021

const { count, type } = value;

if (PrimitiveHandlerAbstract.PRIMITIVES.includes(type.name)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is wired.
why do we have primitive handling in MultiClassValueHandler ?

if (typeof value !== 'undefined') {
if (MultiClassValueHandler.isTypeValue(propertyDto as PropertyDto<MultiClass>)) {
throw new Error(
'Type mismatch. Properties decorated with @Fixture({ type: ClassType }) must be typed as array (e.g. prop: string[])'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this error belong to PrimitiveValueHandler? why do we have ClassType here?

@codecov-io
Copy link

codecov-io commented Jan 25, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@4633310). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             master        #6   +/-   ##
==========================================
  Coverage          ?   100.00%           
==========================================
  Files             ?        13           
  Lines             ?       206           
  Branches          ?        24           
==========================================
  Hits              ?       206           
  Misses            ?         0           
  Partials          ?         0           

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 4633310...5682bb4. Read the comment docs.

* refactor: renames and add second phase todos

* fix: add 'unknown' overlap to property dto

Co-authored-by: Idanpt <idan.ptichi@naturalint.com>
Co-authored-by: Omer Morad <omer.moradd@gmail.com>
@omermorad omermorad merged commit 714fc05 into master Jan 28, 2021
omermorad pushed a commit that referenced this pull request Feb 1, 2021
# 1.0.0 (2021-02-01)

### Bug Fixes

* **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1))

### Features

* alpha release ([#12](#12)) ([5682bb4](5682bb4))
* faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8)
omermorad pushed a commit that referenced this pull request Feb 1, 2021
# 1.0.0-alpha.1 (2021-02-01)

### Bug Fixes

* **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1))

### Features

* alpha release ([#12](#12)) ([5682bb4](5682bb4))
* faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8)
omermorad pushed a commit that referenced this pull request Feb 1, 2021
# 1.0.0-alpha.1 (2021-02-01)

### Bug Fixes

* **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1))

### Features

* alpha release ([#12](#12)) ([5682bb4](5682bb4))
* faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8)
omermorad pushed a commit that referenced this pull request Feb 1, 2021
# 1.0.0-alpha.1 (2021-02-01)

### Bug Fixes

* **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1))

### Features

* alpha release ([#12](#12)) ([5682bb4](5682bb4))
* faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8)
omermorad pushed a commit that referenced this pull request Feb 1, 2021
# 1.0.0-alpha.1 (2021-02-01)

### Bug Fixes

* **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1))

### Features

* alpha release ([#12](#12)) ([5682bb4](5682bb4))
* changelog ([a62d9c8](a62d9c8))
* faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8)
omermorad pushed a commit that referenced this pull request Feb 3, 2021
# 1.0.0-beta.1 (2021-02-03)

### Bug Fixes

* **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1))

### Code Refactoring

* **names:** change the whole project from 'fixture' into 'mock' ([3b1ba31](3b1ba31))

### Features

* alpha release ([#12](#12)) ([5682bb4](5682bb4))
* changelog ([a62d9c8](a62d9c8))
* faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8)

### BREAKING CHANGES

* **names:** Fixture is now Mock
omermorad pushed a commit that referenced this pull request Feb 4, 2021
# 1.0.0-beta.1 (2021-02-04)

### Bug Fixes

* **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1))

### Code Refactoring

* **names:** change the whole project from 'fixture' into 'mock' ([3b1ba31](3b1ba31))

### Features

* alpha release ([#12](#12)) ([5682bb4](5682bb4))
* changelog ([a62d9c8](a62d9c8))
* faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8)

### BREAKING CHANGES

* **names:** Fixture is now Mock
@omermorad
Copy link
Owner Author

🎉 This PR is included in version 1.0.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

omermorad pushed a commit that referenced this pull request Feb 5, 2021
# 1.0.0-beta.1 (2021-02-05)

### Bug Fixes

* **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1))

### Continuous Integration

* **release:** add beta as pre-release branch ([aed0c09](aed0c09))

### Features

* alpha release ([#12](#12)) ([5682bb4](5682bb4))
* faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8)

### BREAKING CHANGES

* **release:** Add 'tslib' as dependency
omermorad pushed a commit that referenced this pull request Feb 5, 2021
# 1.0.0-beta.1 (2021-02-05)

### Bug Fixes

* **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1))

### Continuous Integration

* **release:** add beta as pre-release branch ([aed0c09](aed0c09))

### Features

* **release:** release new beta version ([bda5aa7](bda5aa7))
* alpha release ([#12](#12)) ([5682bb4](5682bb4))
* faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8)

### BREAKING CHANGES

* **release:** Add 'tslib' as dependency
omermorad pushed a commit that referenced this pull request Feb 5, 2021
# 1.0.0-rc.1 (2021-02-05)

### Bug Fixes

* **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1))

### Continuous Integration

* **release:** add beta as pre-release branch ([aed0c09](aed0c09))

### Features

* **release:** release new beta version ([bda5aa7](bda5aa7))
* alpha release ([#12](#12)) ([5682bb4](5682bb4))
* faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8)

### BREAKING CHANGES

* **release:** Add 'tslib' as dependency
@omermorad
Copy link
Owner Author

🎉 This PR is included in version 1.0.0-rc.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

omermorad pushed a commit that referenced this pull request Feb 9, 2021
# 1.0.0-beta.1 (2021-02-09)

### Bug Fixes

* **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1))

### Code Refactoring

* **types:** add some new types to be more accurate ([d4eba88](d4eba88))

### Continuous Integration

* **release:** add beta as pre-release branch ([aed0c09](aed0c09))

### Features

* **release:** release new beta version ([bda5aa7](bda5aa7))
* alpha release ([#12](#12)) ([5682bb4](5682bb4))
* faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8)

### BREAKING CHANGES

* **types:** New MockedClass type
* **release:** Add 'tslib' as dependency
omermorad pushed a commit that referenced this pull request Feb 9, 2021
# 1.0.0 (2021-02-09)

### Bug Fixes

* **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1))

### Code Refactoring

* **types:** add some new types to be more accurate ([d4eba88](d4eba88))

### Continuous Integration

* **release:** add beta as pre-release branch ([aed0c09](aed0c09))

### Features

* **release:** release new beta version ([bda5aa7](bda5aa7))
* alpha release ([#12](#12)) ([5682bb4](5682bb4))
* faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8)

### BREAKING CHANGES

* **types:** New MockedClass type
* **release:** Add 'tslib' as dependency
@omermorad
Copy link
Owner Author

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants