This repository was archived by the owner on Apr 16, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 11Javascript Module Formats Change History
22========================================
33
4- @ NEXT @
4+ 0.1.0 (2014-03-17)
55------------------
66
7+ * Adding linting for ` pretest ` and ` npm run lint ` .
8+ * [ PR #6 ] improving ES modules detection by using RegExp.
79* [ PR #5 ] Switch ` detect ` to ` detect(src) ` .
810* [ PR #4 ] improving cjs detection, including export instance detection.
911
Original file line number Diff line number Diff line change @@ -98,12 +98,12 @@ function extract(src) {
9898 }
9999 } finally {
100100 // very dummy detection process for CommonJS modules
101- if ( typeof context . module . exports === 'function'
102- || typeof context . exports === 'function'
103- || Object . keys ( context . module . exports ) . length > 0
104- || Object . keys ( context . exports ) . length > 0
105- || Object . getPrototypeOf ( context . module . exports )
106- || Object . getPrototypeOf ( context . exports ) ) {
101+ if ( typeof context . module . exports === 'function' ||
102+ typeof context . exports === 'function' ||
103+ Object . keys ( context . module . exports ) . length > 0 ||
104+ Object . keys ( context . exports ) . length > 0 ||
105+ Object . getPrototypeOf ( context . module . exports ) ||
106+ Object . getPrototypeOf ( context . exports ) ) {
107107 mods . push ( { type : 'cjs' } ) ;
108108 }
109109 }
Original file line number Diff line number Diff line change 11{
22 "name" : " js-module-formats" ,
3- "version" : " 0.0.2 " ,
3+ "version" : " 0.1.0 " ,
44 "description" : " Detect different types of JavaScript modules formats" ,
55 "homepage" : " https://github.com/yahoo/js-module-formats" ,
66 "main" : " index" ,
2525 "mocha" : " *" ,
2626 "mockery" : " *" ,
2727 "xunit-file" : " *" ,
28- "glob" : " ^3.2.9"
28+ "glob" : " ^3.2.9" ,
29+ "jshint" : " ^2.4.4"
2930 },
3031 "scripts" : {
32+ "lint" : " ./node_modules/.bin/jshint index.js" ,
33+ "pretest" : " ./node_modules/.bin/jshint index.js" ,
3134 "test" : " ./node_modules/istanbul/lib/cli.js cover -- ./node_modules/.bin/_mocha test/*.js --reporter spec"
3235 },
3336 "author" : {
You can’t perform that action at this time.
0 commit comments