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

Change type of revision to a number #1217

Merged
merged 1 commit into from
Oct 9, 2021

Conversation

rowanc1
Copy link
Contributor

@rowanc1 rowanc1 commented Oct 8, 2021

I just worked through a bug that I didn't realize that revision in document properties had to be a number. I have changed the TypeScript to only allow numbers, which I think is clearer. This made the word doc angry when it was opened if there is arbitrary string in there.

image

The code change is backwards compatible as we cast this to a string before writing to XML. However, this will require people to unquote their revision numbers if they are using typescript.

@codecov-commenter
Copy link

Codecov Report

Merging #1217 (47099d0) into master (abbd620) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1217   +/-   ##
=======================================
  Coverage   99.30%   99.30%           
=======================================
  Files         314      314           
  Lines        3600     3600           
  Branches      454      454           
=======================================
  Hits         3575     3575           
  Misses         24       24           
  Partials        1        1           
Impacted Files Coverage Δ
src/file/core-properties/properties.ts 100.00% <100.00%> (ø)
src/file/file.ts 90.15% <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 abbd620...47099d0. Read the comment docs.

@rowanc1
Copy link
Contributor Author

rowanc1 commented Oct 8, 2021

There could be another check in here to ensure that options.revision >= 0, negative numbers in there also complain.

@dolanmiu dolanmiu merged commit 49694a5 into dolanmiu:master Oct 9, 2021
@rowanc1 rowanc1 deleted the feat/revision branch October 11, 2021 21:55
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.

None yet

3 participants