336 Commits

Author SHA1 Message Date
Jeff Williams
8f1d892fbf ensure that filenames do not start with an underscore (#758)
Squashed commit of the following:

commit 11da3dbe026fb0c76d619f0295a195d1f012462e
Author: Jeff Williams <jeffrey.l.williams@gmail.com>
Date:   Fri Nov 7 14:42:02 2014 -0800

    add test for #758

commit f3e001d549c5e0e69e50b231f375da92f3e8f688
Merge: df1f4bd d551131
Author: Jeff Williams <jeffrey.l.williams@gmail.com>
Date:   Fri Nov 7 14:32:30 2014 -0800

    Merge remote-tracking branch 'danorton/patch-1' into 758

commit d5511316468eb93f852c51fab5eec380bcfee4b4
Author: Daniel Norton <daniel@danielnorton.com>
Date:   Wed Sep 3 17:00:49 2014 -0500

    Prevent filenames beginning with underscore

    A lot of related software (most notably github.io and the default configuration of jsdoc itself) ignores files with names that begin with an underscore, but the makeUniqueFilename() creates such filenames when the incoming filename is blank. This patch modifies makeUniqueFilename() to insert the ASCII letter "X" before empty filenames or filenames that begin with an underscore.
2014-11-07 14:42:16 -08:00
Jeff Williams
df1f4bda22 treat foo="bar" as a non-optional version of [foo="bar"] (#791) 2014-11-06 20:51:13 -08:00
Jeff Williams
d17ecfd8ec remove cruft from Tag objects 2014-11-06 20:28:34 -08:00
Jeff Williams
bfddc53034 Merge pull request #802 from cdparks/fallback-to-regex
Falling back to regex solution for default value when value is malformed
2014-11-06 08:49:40 -08:00
Christopher D. Parks
768a61c630 Falling back to regex solution for default value when value is malformed
Added the following tests which fail without the patch and pass with it:
    1) should fail gracefully when the default value has an unmatched bracket
    2) should fail gracefully when the default value has an unmatched quote
2014-11-05 18:01:55 -08:00
Jeff Williams
5cff804eac detab 2014-11-05 16:56:25 -08:00
Jeff Williams
06acc6697a optionally scan tutorials directory recursively (#712)
Squashed commit of the following:

commit 5be2cb3103521d2ca1a14c24d4ccd776c1f2a5d9
Author: Jeff Williams <jeffrey.l.williams@gmail.com>
Date:   Mon Nov 3 14:29:29 2014 -0800

    make tutorials respect the --recurse option; refactor modules to facilitate testing; improve tests

commit 9af57751385439ceee3fac8f698a747a745c7c2b
Merge: 5399745 97a8ab0
Author: Jeff Williams <jeffrey.l.williams@gmail.com>
Date:   Sat Nov 1 19:00:43 2014 -0700

    Merge remote-tracking branch 'koalazak/master' into 712

    Conflicts:
    	lib/jsdoc/opts/args.js

commit 97a8ab000b567c220525cc179c2f45b626236933
Author: zak <zak@ultra>
Date:   Mon Jul 21 15:28:20 2014 -0300

    Removed command-line option -U to recursive. Now is default. Added tests.

commit a79c9c9dac4eeb784e3f22b1da073c2af5b014cc
Author: zak <zak@ultra>
Date:   Thu Jul 17 13:28:38 2014 -0300

    Recurse 5 levels

commit 349d10e528d6ba797fd745e31e1e358ddcf26857
Author: koalazak <facu@Cacahuate.local>
Date:   Wed Jul 16 22:30:41 2014 -0300

    Travis CI ready ready

commit ffde2bf4bdc2bd0ba2daa20a58540e4a2dd099e8
Author: koalazak <facu@Cacahuate.local>
Date:   Wed Jul 16 22:22:56 2014 -0300

    Travis CI ready

commit 3e439151fb58d530abe294f1cc499e5fab7b8fe8
Author: koalazak <facu@Cacahuate.local>
Date:   Wed Jul 16 21:47:22 2014 -0300

    Optionally scan tutorials directory recursively

    I do not want to have a directory of tutorials. I need to have the
    tutorials distributed throughout the project. I have one in each
    "package" folder.
2014-11-03 14:30:21 -08:00
Jeff Williams
5399745a97 allow default values for parameters to contain brackets (#640)
Squashed commit of the following:

commit 5363a9850f1279c1ea5f916455899479aca71261
Author: Jeff Williams <jeffrey.l.williams@gmail.com>
Date:   Sat Nov 1 15:13:33 2014 -0700

    DRY out; delint; remove unused capture group

commit e3066068f91ba5f2c920cb5389eae15ac70f45aa
Author: Christopher D. Parks <christopher.daniel.parks@gmail.com>
Date:   Fri Apr 25 16:32:20 2014 -0700

    Add missing semi-colon caught by eslint

commit 7bd864eecba67df99bae7b338685bf6cf31e2516
Author: Christopher D. Parks <christopher.daniel.parks@gmail.com>
Date:   Fri Apr 25 16:14:12 2014 -0700

    Adding tests for fix #640

    Without the fix, we get the following when running ./jsdoc -T
        Failures:

        jsdoc/name splitName

          1) should allow default values to have brackets
          Message:
            Expected '[path=["home",' to be '[path=["home", "user"]]'.
          Stacktrace:
            undefined

          2) should allow default values to have brackets
          Message:
            Expected '"user"]] - Path split into components' to be 'Path split into components'.
          Stacktrace:
            undefined

          3) should allow default values to have brackets inside strings
          Message:
            Expected '[path=["Unmatched' to be '[path=["Unmatched begin: ["]]'.
          Stacktrace:
            undefined

          4) should allow default values to have brackets inside strings
          Message:
            Expected 'begin: ["]] - Path split into components' to be 'Path split into components'.
          Stacktrace:
            undefined

        Finished in 5.704 seconds
        870 tests, 2331 assertions, 4 failures

    These tests pass with the fix

commit 531b13893dc2c715e5cb988fdb872897547e6375
Author: Christopher D. Parks <christopher.daniel.parks@gmail.com>
Date:   Fri Apr 25 15:59:47 2014 -0700

    Fix for #640 - Allow default values for parameters to contain brackets

    Because JSDoc uses brackets to delimit default values inside the @param tag,
    default values containing brackets can get misparsed. We solve this by
    redefining splitName() in terms of splitNameMatchingBrackets() which tries
    to find the matching end bracket if the name starts with an open bracket.
    Ignores brackets inside strings. If splitNameMatchingBrackets() fails to find
    the closing bracket, we fall back to the original regex method.
2014-11-01 15:14:04 -07:00
Jeff Williams
2224bee3be do not try to normalize empty path strings
Fixes build breakage on non-Windows platforms.
2014-10-30 12:19:47 -07:00
Jeff Williams
fc2b4ad3d2 fix Windows path issues and static-file copying (#785)
- In the default template, look for the list of static file paths in the
config property `templates.default.staticFiles.include`. (You can still
use `paths` instead of `include`.)
- Handle path-normalization issues that prevented the default template
from copying user-specified static files on Windows.
- Normalize paths in `fs.toDir` so that callers get the correct path
separator on Windows.
2014-10-30 12:06:26 -07:00
Jeff Williams
a2e119a88b update ESLint dependency; enable new rules; delint 2014-10-27 12:58:32 -07:00
Jeff Williams
b28f3341a3 delint 2014-10-26 05:52:03 -07:00
Jeff Williams
e60fc3c717 prevent duplication when two parent classes have instance members with identical names (#613) 2014-10-25 11:05:56 -07:00
Jeff Williams
996c283733 handle symbol names with leading/trailing whitespace (#549) 2014-10-23 09:38:30 -07:00
Jeff Williams
58839223a9 strip module namespace from module and exports tag values (#786)
This change makes `/** @exports module:foo */` a synonym for `/** @exports foo */`.
2014-10-22 15:48:51 -07:00
Jeff Williams
5512af9677 update package schema, and add tests to validate package objects against the schema (#788) 2014-10-22 13:31:04 -07:00
Jeff Williams
53d2ed719b prevent cruft in Package objects (#787) 2014-10-22 12:22:22 -07:00
Jeff Williams
e5a3479beb fix an accidental method-signature change 2014-10-20 09:48:42 -07:00
Jeff Williams
c81ace882e extract more information from package.json files; add tests (#710) 2014-10-20 09:34:54 -07:00
Jeff Williams
c45fdaa0c3 allow any file to be used as a package or README file (#708) 2014-10-17 12:46:52 -07:00
Jeff Williams
9e699ff8a9 omit non-enumerable properties from cloned objects (#784)
Drastically improves performance in some cases (for example, when using the `--explain`/`-X` option).
2014-10-15 16:18:19 -07:00
Jeff Williams
c832f24e57 remove unused requires 2014-10-15 16:01:03 -07:00
Jeff Williams
d28d15eb72 remove unused code 2014-10-15 15:50:25 -07:00
Jeff Williams
c510b336d2 fix performance regression caused by 2eb3c46 (#784) 2014-10-15 09:38:19 -07:00
Jeff Williams
2b34c5167a clarify logic for resolving property parents 2014-10-15 08:51:37 -07:00
Jeff Williams
79a3be132c hoist requires 2014-10-14 15:21:44 -07:00
Jeff Williams
2eb3c467ee handle enums that are part of a chain of assignments (#702)
We now add the enum properties to all of the symbols in the assignment chain, rather than just the first symbol.
2014-10-12 13:47:01 -07:00
Jeff Williams
e69001d7cf correct a comment 2014-10-12 13:44:12 -07:00
Jeff Williams
68ceb33ec3 stop adding a scope property to module doclets that include an exports tag (#782) 2014-10-11 15:09:53 -07:00
Jeff Williams
bb8a66291a use enum value for global scope 2014-10-11 14:57:30 -07:00
Jeff Williams
f77984df55 fix name resolution when the exports tag is used on a pointer to the module's exports object (#404) 2014-10-11 09:58:51 -07:00
Jeff Williams
4eb86a13a2 handle object literals whose property names must be escaped in a regexp (#775) 2014-10-05 21:35:45 -07:00
Jeff Williams
df7a1e0232 do not add an exception's description and type to the parent doclet; avoid circular refs when cloning an object (#772) 2014-10-05 21:17:25 -07:00
Jeff Williams
908e5e6076 do not unescape entities in Markdown tutorials (#743) 2014-09-22 15:42:10 -07:00
Jeff Williams
73998951b1 fix exports tag when the module object is passed to an AMD function (#642)
- Do not mark the doclet for the module object as undocumented.
- Track variables (including aliases) within the parent scope, so the members are resolved against the alias instead of the name used in the code.
2014-09-19 09:01:14 -07:00
Jeff Williams
d527f3e6b0 prevent crash when a returns tag does not have a value (#751) 2014-09-05 15:30:21 -07:00
Jeff Williams
e093716ebe handle sparse arrays correctly in nodeToString (#749) 2014-09-05 15:12:57 -07:00
Jeff Williams
81d74b9b92 remove scope property from module doclets (#742) 2014-08-19 12:51:30 -07:00
Jeff Williams
2ed4a0320b if we can't find the scope for a virtual comment, set the doclet's scope to global (#684) 2014-08-18 17:32:21 -07:00
Jeff Williams
109ae920a6 correct comments 2014-08-18 16:49:46 -07:00
Jeff Williams
5d454d45be correct comment 2014-08-16 09:05:25 -07:00
Jeff Williams
b6bfcadf00 add more information to the doclet index (#725)
We now index doclets as follows:

+ all doclets by longname
+ all documented symbols by longname
+ all doclets with `borrowed` properties

By expanding the index, we reduce the number of times that `jsdoc/augment` and `jsdoc/borrow` must iterate over all doclets. As a result, large docsets are processed much more quickly.
2014-08-16 08:58:17 -07:00
Jeff Williams
46d89d169c clean up requires 2014-08-15 10:45:56 -07:00
Jeff Williams
9be79c198e refactor 2014-08-14 14:20:25 -07:00
Jeff Williams
17fb5be064 for Closure, allow the type tag to have a description (#732) 2014-08-13 21:53:11 -07:00
Jeff Williams
e8b692b334 allow the Closure version of the protected tag to specify a type (#731)
Also adds tests for the `protected` tag.
2014-08-13 17:04:47 -07:00
Jeff Williams
21e0dbad25 allow the Closure version of the private tag to specify a type (#730) 2014-08-13 15:32:51 -07:00
Jeff Williams
addee8ea7e split up the JSDoc and Closure Compiler tag definitions (#729)
A new `tags.dictionaries` config setting allows you to choose which definitions to enable.

If a tag is defined in more than one dictionary, JSDoc will use the definition from the first dictionary.
2014-08-13 13:39:14 -07:00
Jeff Williams
f9c593824f turn the dictionary module into an instantiable class 2014-08-12 16:21:37 -07:00
Jeff Williams
89237260c6 support virtual comments for overloaded symbols (#727) 2014-08-12 09:37:00 -07:00