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
30 changes: 30 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: 2

jobs:
test:
docker:
- image: circleci/node:12
steps:
- checkout
- run: yarn
- run: yarn test

release:
docker:
- image: circleci/node:12
steps:
- checkout
- run: yarn
- run: yarn release

workflows:
version: 2
test_and_release:
jobs:
- test
- release:
filters:
branches:
only: master
requires:
- test
58 changes: 0 additions & 58 deletions gulpfile.js

This file was deleted.

2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports.isInteger = function(value) {
};

exports.isNumber = function(value) {
return !exports.isArray(value) && !exports.isObject(value) && Number(value) === value && value % 1 !== 0;
return !exports.isArray(value) && !exports.isObject(value) && Number(value) === value;
Copy link
Author

@marcelltoth marcelltoth Sep 23, 2020

Choose a reason for hiding this comment

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

This was failing a test. It shouldn't make a difference as the only place outside of the test where this is being used is getType, and getType performs if(isInteger(x)) before it would call isNumber.

};

exports.isArray = function(value) {
Expand Down
50 changes: 32 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{
"name": "json-schema-generator",
"name": "@stoplight/json-schema-generator",
"version": "2.0.3",
"description": "JSON schema generator based on draft-v4.",
"main": "./index.js",
"directories": {
"test": "test"
"homepage": "https://github.com/stoplightio/json-schema-generator",
"bugs": "https://github.com/stoplightio/json-schema-generator/issues",
"author": "Stoplight <support@stoplight.io>",
"repository": {
"type": "git",
"url": "https://github.com/stoplightio/json-schema-generator"
},
"files": [
"bin",
"lib"
],
"main": "./lib/index.js",
"bin": {
"json-schema-generator": "./bin/cli.js"
},
"readmeFilename": "Readme.md",
"bugs": {
"url": "https://github.com/krg7880/json-schema-generator/issues"
},
"homepage": "https://github.com/krg7880/json-schema-generator",
"dependencies": {
"json-promise": "1.1.x",
"mkdirp": "0.5.x",
Expand All @@ -22,18 +25,30 @@
"request": "2.x.x"
},
"devDependencies": {
"@stoplight/scripts": "^8.2.1",
"chai": "^1.9.2",
"chai-json-schema": "^1.1.0",
"coveralls": "^2.11.2",
"gulp": "^3.8.9",
"gulp-concat": "^2.4.1",
"gulp-markdox": "^0.1.0",
"gulp-mocha": "^2.2.0",
"mocha": "^1.21.4",
"node-stubby-server-cli": "^1.0.0"
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"mocha": "^8.1.3"
},
"scripts": {
"test": "gulp"
"test": "mocha",
"release": "sl-scripts release"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"release": {
"extends": "@stoplight/scripts/release"
},
"keywords": [
"json schema",
Expand All @@ -44,6 +59,5 @@
"draft",
"v4"
],
"author": "Kirk Gordon<kirk7880@gmail.com>",
"license": "MIT"
}
}
3 changes: 1 addition & 2 deletions test/utils-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var path = require('path');
var utils = require(path.resolve(process.env.PWD + '/lib/utils'));
var utils = require('../lib/utils');
var chai = require('chai');
chai.use(require('chai-json-schema'));
var expect = chai.expect;
Expand Down
Loading