Skip to content

Commit

Permalink
Merge pull request #469 from shimataro/develop
Browse files Browse the repository at this point in the history
version 3.0.0-rc.6
  • Loading branch information
shimataro committed Jun 11, 2020
2 parents dcc1f48 + dc4d032 commit e912efb
Show file tree
Hide file tree
Showing 14 changed files with 492 additions and 480 deletions.
48 changes: 27 additions & 21 deletions .github/workflows/verify-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@ jobs:
strategy:
matrix:
os:
- windows-latest
- macos-latest
- ubuntu-latest
- windows-2019
- macos-10.15
- ubuntu-16.04
- ubuntu-18.04
- ubuntu-20.04
nodejs:
- "4.0.0"
- "6.0.0"
- "8.0.0"
- "10.0.0"
- "12.0.0"
- "14.0.0"
fail-fast: false
steps:
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install Node.js v12
- name: Install Node.js for build
uses: actions/setup-node@v1
with:
node-version: 12
Expand Down Expand Up @@ -66,26 +69,25 @@ jobs:
strategy:
matrix:
os:
- windows-latest
- macos-latest
- ubuntu-latest
- windows-2019
- macos-10.15
- ubuntu-16.04
- ubuntu-18.04
- ubuntu-20.04
nodejs:
- "8.5.0"
- "8.6.0"
- "10.0.0"
- "12.0.0" # loads CommonJS
- "14.0.0" # loads CommonJS
exclude:
- os: windows-latest # On Windows, v8.5.0 causes ERR_INVALID_PROTOCOL; https://github.com/nodejs/node/issues/15374
- os: windows-2019 # On Windows, v8.5.0 causes ERR_INVALID_PROTOCOL; https://github.com/nodejs/node/issues/15374
nodejs: "8.5.0"
- os: macos-latest
nodejs: "8.6.0"
- os: ubuntu-latest
nodejs: "8.6.0"
fail-fast: false
steps:
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install Node.js v12
- name: Install Node.js for build
uses: actions/setup-node@v1
with:
node-version: 12
Expand Down Expand Up @@ -126,16 +128,18 @@ jobs:
strategy:
matrix:
os:
- windows-latest
- macos-latest
- ubuntu-latest
- windows-2019
- macos-10.15
- ubuntu-16.04
- ubuntu-18.04
- ubuntu-20.04
nodejs:
- "13.2.0"
fail-fast: false
steps:
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install Node.js v12
- name: Install Node.js for build
uses: actions/setup-node@v1
with:
node-version: 12
Expand Down Expand Up @@ -176,16 +180,18 @@ jobs:
strategy:
matrix:
os:
- windows-latest
- macos-latest
- ubuntu-latest
- windows-2019
- macos-10.15
- ubuntu-16.04
- ubuntu-18.04
- ubuntu-20.04
deno:
- "1.0.0"
fail-fast: false
steps:
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install Node.js v12
- name: Install Node.js for build
uses: actions/setup-node@v1
with:
node-version: 12
Expand Down
2 changes: 1 addition & 1 deletion .markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ MD024: # no-duplicate-heading
MD029: # ol-prefix
style: one
MD035: # hr-style
style: "==="
style: "- - -"
MD048: # code-fence-style
style: backtick
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [3.0.0-rc.6] - 2020-06-11

### Fixed

* ❌CEIL_RZ ⭕CEIL_RI (Round towards Infinity)

## [3.0.0-rc.5] - 2020-05-17

### Fixed
Expand Down Expand Up @@ -465,7 +471,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

* First release.

[Unreleased]: https://github.com/shimataro/value-schema/compare/v3.0.0-rc.5...HEAD
[Unreleased]: https://github.com/shimataro/value-schema/compare/v3.0.0-rc.6...HEAD
[3.0.0-rc.6]: https://github.com/shimataro/value-schema/compare/v3.0.0-rc.5...v3.0.0-rc.6
[3.0.0-rc.5]: https://github.com/shimataro/value-schema/compare/v3.0.0-rc.4...v3.0.0-rc.5
[3.0.0-rc.4]: https://github.com/shimataro/value-schema/compare/v3.0.0-rc.3...v3.0.0-rc.4
[3.0.0-rc.3]: https://github.com/shimataro/value-schema/compare/v3.0.0-rc.2...v3.0.0-rc.3
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ supports [Node.js](https://nodejs.org/) and [Deno](https://deno.land/)
* [object](#object)
* [Changelog](#changelog)

===
- - -

## Introduction

Expand Down Expand Up @@ -995,14 +995,14 @@ Limits an input value to integer.
|-----|-----------|
|`NUMBER.INTEGER.NO` (`0`) / `false`|does not limit to integer|
|`NUMBER.INTEGER.YES` (`1`) / `true`|limits to integer, but does not round|
|`NUMBER.INTEGER.FLOOR` (`2`)|rounds down toward infinity|
|`NUMBER.INTEGER.FLOOR_RZ` (`3`)|rounds down toward zero|
|`NUMBER.INTEGER.CEIL` (`4`)|rounds up toward infinity|
|`NUMBER.INTEGER.CEIL_RZ` (`5`)|rounds up toward zero|
|`NUMBER.INTEGER.HALF_UP` (`6`)|rounds half up toward infinity|
|`NUMBER.INTEGER.HALF_UP_RZ` (`7`)|rounds half up toward zero|
|`NUMBER.INTEGER.HALF_DOWN` (`8`)|rounds half down toward infinity|
|`NUMBER.INTEGER.HALF_DOWN_RZ` (`9`)|rounds half down toward zero|
|`NUMBER.INTEGER.FLOOR` (`2`)|rounds towards −∞|
|`NUMBER.INTEGER.FLOOR_RZ` (`3`)|rounds towards 0|
|`NUMBER.INTEGER.CEIL` (`4`)|rounds towards +∞|
|`NUMBER.INTEGER.CEIL_RI` (`5`)|rounds towards ∞|
|`NUMBER.INTEGER.HALF_UP` (`6`)|rounds half towards +∞|
|`NUMBER.INTEGER.HALF_UP_RZ` (`7`)|rounds half towards 0|
|`NUMBER.INTEGER.HALF_DOWN` (`8`)|rounds half towards −∞|
|`NUMBER.INTEGER.HALF_DOWN_RZ` (`9`)|rounds half towards 0|

```javascript
// should be adjusted
Expand All @@ -1028,10 +1028,10 @@ assert.strictEqual(
vs.number({integer: vs.NUMBER.INTEGER.CEIL}).applyTo(-3.14),
-3);
assert.strictEqual(
vs.number({integer: vs.NUMBER.INTEGER.CEIL_RZ}).applyTo(3.14),
vs.number({integer: vs.NUMBER.INTEGER.CEIL_RI}).applyTo(3.14),
4);
assert.strictEqual(
vs.number({integer: vs.NUMBER.INTEGER.CEIL_RZ}).applyTo(-3.14),
vs.number({integer: vs.NUMBER.INTEGER.CEIL_RI}).applyTo(-3.14),
-4);
assert.strictEqual(
vs.number({integer: vs.NUMBER.INTEGER.HALF_UP}).applyTo(3.49),
Expand Down

0 comments on commit e912efb

Please sign in to comment.