Comparing version
@@ -32,4 +32,8 @@ /* | ||
var istanbul = require('gulp-istanbul'); | ||
var bump = require('gulp-bump'); | ||
var filter = require('gulp-filter'); | ||
var git = require('gulp-git'); | ||
var tagVersion = require('gulp-tag-version'); | ||
var SRC = [ 'doctrine.js' ]; | ||
var SRC = [ 'lib/*.js' ]; | ||
@@ -50,3 +54,4 @@ var TEST = [ 'test/*.js' ]; | ||
'no-constant-condition': 0, | ||
'no-multi-spaces': 0 | ||
'no-multi-spaces': 0, | ||
'dot-notation': [2, {'allowKeywords': false}] | ||
}, | ||
@@ -82,3 +87,37 @@ 'env': { | ||
/** | ||
* Bumping version number and tagging the repository with it. | ||
* Please read http://semver.org/ | ||
* | ||
* You can use the commands | ||
* | ||
* gulp patch # makes v0.1.0 -> v0.1.1 | ||
* gulp feature # makes v0.1.1 -> v0.2.0 | ||
* gulp release # makes v0.2.1 -> v1.0.0 | ||
* | ||
* To bump the version numbers accordingly after you did a patch, | ||
* introduced a feature or made a backwards-incompatible release. | ||
*/ | ||
function inc(importance) { | ||
// get all the files to bump version in | ||
return gulp.src(['./package.json']) | ||
// bump the version number in those files | ||
.pipe(bump({type: importance})) | ||
// save it back to filesystem | ||
.pipe(gulp.dest('./')) | ||
// commit the changed version number | ||
.pipe(git.commit('Bumps package version')) | ||
// read only one file to get the version number | ||
.pipe(filter('package.json')) | ||
// **tag it in the repository** | ||
.pipe(tagVersion()); | ||
} | ||
gulp.task('patch', [ 'travis' ], function () { return inc('patch'); }); | ||
gulp.task('minor', [ 'travis' ], function () { return inc('minor'); }); | ||
gulp.task('major', [ 'travis' ], function () { return inc('major'); }); | ||
gulp.task('travis', [ 'lint', 'test' ]); | ||
gulp.task('default', [ 'travis' ]); |
@@ -5,7 +5,10 @@ { | ||
"homepage": "http://github.com/Constellation/doctrine.html", | ||
"main": "doctrine.js", | ||
"version": "0.6.2", | ||
"main": "lib/doctrine.js", | ||
"version": "0.6.3", | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"directories": { | ||
"lib": "./lib" | ||
}, | ||
"maintainers": [ | ||
@@ -23,9 +26,14 @@ { | ||
"devDependencies": { | ||
"coveralls": "^2.11.2", | ||
"gulp": "^3.8.10", | ||
"gulp-eslint": "^0.1.8", | ||
"gulp-istanbul": "^0.3.1", | ||
"gulp-bump": "^0.1.13", | ||
"gulp-eslint": "^0.5.0", | ||
"gulp-filter": "^2.0.2", | ||
"gulp-git": "^1.0.0", | ||
"gulp-istanbul": "^0.6.0", | ||
"gulp-jshint": "^1.9.0", | ||
"gulp-mocha": "^1.1.1", | ||
"gulp-mocha": "^2.0.0", | ||
"gulp-tag-version": "^1.2.1", | ||
"jshint-stylish": "^1.0.0", | ||
"should": "^4.1.0" | ||
"should": "^5.0.1" | ||
}, | ||
@@ -41,7 +49,9 @@ "licenses": [ | ||
"unit-test": "gulp test", | ||
"lint": "gulp lint" | ||
"lint": "gulp lint", | ||
"coveralls": "cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" | ||
}, | ||
"dependencies": { | ||
"esutils": "^1.1.4" | ||
"esutils": "^1.1.6", | ||
"isarray": "0.0.1" | ||
} | ||
} |
@@ -1,9 +0,12 @@ | ||
doctrine ([doctrine](http://github.com/Constellation/doctrine)) is JSDoc parser. [](http://travis-ci.org/Constellation/doctrine) | ||
doctrine ([doctrine](http://github.com/Constellation/doctrine)) is JSDoc parser. | ||
It is now used by content assist system of [Eclipse Orion](http://www.eclipse.org/orion/) ([detail](http://planetorion.org/news/2012/10/orion-1-0-release/)) | ||
[](https://travis-ci.org/Constellation/doctrine) | ||
[](https://coveralls.io/r/Constellation/doctrine?branch=master) | ||
[](https://david-dm.org/Constellation/doctrine) | ||
[](https://david-dm.org/Constellation/doctrine#info=devDependencies) | ||
[](https://gitter.im/Constellation/doctrine) | ||
Doctrine can be used in a web browser: | ||
It is now used by content assist system of [Eclipse Orion](http://www.eclipse.org/orion/) ([detail](http://planetorion.org/news/2012/10/orion-1-0-release/)). And used as JSDoc validator in [ESLint](http://eslint.org/). | ||
<script src="doctrine.js"></script> | ||
Doctrine can be used in a web browser with using browserify. | ||
or in a Node.js application via the package manager: | ||
@@ -10,0 +13,0 @@ |
@@ -28,3 +28,6 @@ /* | ||
var doctrine = require('../doctrine'); | ||
var fs = require('fs'), | ||
path = require('path'), | ||
root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), | ||
doctrine = require(root); | ||
require('should'); | ||
@@ -31,0 +34,0 @@ |
@@ -28,3 +28,6 @@ /* | ||
var doctrine = require('../doctrine'); | ||
var fs = require('fs'), | ||
path = require('path'), | ||
root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), | ||
doctrine = require(root); | ||
require('should'); | ||
@@ -31,0 +34,0 @@ |
@@ -28,10 +28,13 @@ /* | ||
var doctrine = require('../doctrine'); | ||
var assert = require('assert'); | ||
var fs = require('fs'), | ||
path = require('path'), | ||
root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), | ||
doctrine = require(root), | ||
assert = require('assert'); | ||
require('should'); | ||
// tests for the stringify function. | ||
// tests for the stringify function. | ||
// ensure that we can parse and then stringify and the results are identical | ||
describe('stringify', function () { | ||
function testStringify(text) { | ||
@@ -45,3 +48,3 @@ it (text, function() { | ||
} | ||
// simple | ||
@@ -54,3 +57,3 @@ testStringify("String"); | ||
//testStringify("?="); // Failing | ||
// rest | ||
@@ -60,3 +63,3 @@ testStringify("...string"); | ||
testStringify("...[[string]]"); | ||
// optional, nullable, nonnullable | ||
@@ -90,3 +93,3 @@ testStringify("string="); | ||
testStringify("{a:(String|Number),b,c:Array.<String>}="); | ||
// fn types | ||
@@ -93,0 +96,0 @@ testStringify("function(a)"); |
@@ -28,3 +28,6 @@ /* | ||
var doctrine = require('../doctrine'); | ||
var fs = require('fs'), | ||
path = require('path'), | ||
root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), | ||
doctrine = require(root); | ||
require('should'); | ||
@@ -31,0 +34,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
29
3.57%177
1.72%226450
-62.25%2
100%12
71.43%4992
-2.37%11
1000%+ Added
+ Added
Updated