Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [14, 12, 10, 8, 6]
steps:
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Run Tests
run: npm test
- if: matrix.node-version == 14
name: Generate coverage file
run: npm run test:ci > coverage.lcov
- if: matrix.node-version == 14
name: Send coverage info to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.lcov
24 changes: 24 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: NPM Publish
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- name: Setup Node.js 14
uses: actions/setup-node@v2-beta
with:
node-version: 14
check-latest: true
registry-url: https://registry.npmjs.org/
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Run Tests
run: npm test
- name: Publish Package to NPM Registry
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_SECRET}}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ package-lock.json
yarn.lock
/es
/lib
/index.js
validator.js
validator.min.js
index.js
4 changes: 0 additions & 4 deletions .nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,5 @@
],
"include": [
"src/**/*.js"
],
"exclude": [
"validator.js",
"lib/**/*.js"
]
}
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

610 changes: 305 additions & 305 deletions CHANGELOG.md

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# validator.js

[![NPM version][npm-image]][npm-url]
[![Build Status](https://travis-ci.org/validatorjs/validator.js.svg?branch=master)](https://travis-ci.org/validatorjs/validator.js)
[![codecov](https://codecov.io/gh/validatorjs/validator.js/branch/master/graph/badge.svg)](https://codecov.io/gh/validatorjs/validator.js)
[![CI][ci-image]][ci-url]
[![Coverage][codecov-image]][codecov-url]
[![Downloads][downloads-image]][npm-url]
[![Backers on Open Collective](https://opencollective.com/validatorjs/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/validatorjs/sponsors/badge.svg)](#sponsors)
Expand Down Expand Up @@ -183,7 +183,7 @@ Sanitizer | Description

### XSS Sanitization

XSS sanitization was removed from the library in [2d5d6999](https://github.com/chriso/validator.js/commit/2d5d6999541add350fb396ef02dc42ca3215049e).
XSS sanitization was removed from the library in [2d5d6999](https://github.com/validatorjs/validator.js/commit/2d5d6999541add350fb396ef02dc42ca3215049e).

For an alternative, have a look at Yahoo's [xss-filters library](https://github.com/yahoo/xss-filters) or at [DOMPurify](https://github.com/cure53/DOMPurify).

Expand Down Expand Up @@ -253,8 +253,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[npm-url]: https://npmjs.org/package/validator
[npm-image]: http://img.shields.io/npm/v/validator.svg

[travis-url]: https://travis-ci.org/chriso/validator.js
[travis-image]: http://img.shields.io/travis/chriso/validator.js.svg
[codecov-url]: https://codecov.io/gh/validatorjs/validator.js
[codecov-image]: https://codecov.io/gh/validatorjs/validator.js/branch/master/graph/badge.svg

[ci-url]: https://github.com/validatorjs/validator.js/actions?query=workflow%3ACI
[ci-image]: https://github.com/validatorjs/validator.js/workflows/CI/badge.svg?branch=master

[amd]: http://requirejs.org/docs/whyamd.html
[bower]: http://bower.io/
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "validator-js",
"main": "validator.js",
"homepage": "https://github.com/chriso/validator.js",
"homepage": "https://github.com/validatorjs/validator.js",
"authors": [
"Chris O'Hara <[email protected]>"
],
Expand Down
Loading