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

Added dateMapper with protection against invalid value passes as valid. #192

Merged
merged 3 commits into from
Sep 27, 2021

Conversation

Siemienik
Copy link
Owner

@Siemienik Siemienik commented Sep 23, 2021

resolves: #58

This PR adds dateMapper, which transform string into Date Object:

TODO:

  1. Create file src/mappers/dateMapper.ts with function matches to type ValueMapper<Date>. Which parse value string into Date.
  2. reexport it in src/mappers/index.ts
  3. Prove that it works in unit test (some present dates, some future, some past & some invalid)
  4. Describe it on https://siemienik.com/docs/xlsx-import/#mappers : PR

@codecov
Copy link

codecov bot commented Sep 23, 2021

Codecov Report

Merging #192 (cd80ce1) into master (b552554) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #192   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           54        55    +1     
  Lines         1061      1063    +2     
  Branches       134       154   +20     
=========================================
+ Hits          1061      1063    +2     
Flag Coverage Δ
xlsx-import 100.00% <100.00%> (ø)
xlsx-renderer 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/xlsx-import/src/mappers/dateMapper.ts 100.00% <100.00%> (ø)
packages/xlsx-import/src/mappers/index.ts 100.00% <100.00%> (ø)

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 b552554...cd80ce1. Read the comment docs.

@Siemienik Siemienik changed the title Added dataMapper with protection against invalid value passes as valid. Added dateMapper with protection against invalid value passes as valid. Sep 27, 2021
@sonarcloud
Copy link

sonarcloud bot commented Sep 27, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Siemienik added a commit to Siemienik/siemienik.github.io that referenced this pull request Sep 27, 2021
Siemienik added a commit to Siemienik/siemienik.github.io that referenced this pull request Sep 27, 2021
@Siemienik Siemienik marked this pull request as ready for review September 27, 2021 19:52
@Siemienik Siemienik merged commit 2082aa3 into master Sep 27, 2021
@Siemienik Siemienik deleted the issue-58 branch September 27, 2021 19:55
@Siemienik Siemienik mentioned this pull request Sep 27, 2021
11 tasks
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.

Add dateMapper into mappers
1 participant