Skip to content

Commit

Permalink
Have tsd-jsdoc generate default exports (#98)
Browse files Browse the repository at this point in the history
* Very first 'export default' generation.
Still buggy: module declaration is generated twice.

* Removal of the IExportDefaultDoclet hack.

* Code moved from _createTreeNodes() to _buildTree() for 'export default' doclets.
=> fixed: generation of 'export default' at the end of the module (and not at the beginning)
=> fixed: duplicate module declaration

* 'module.exports =' pattern management.
module2 test addition.

* module3 test addition.

* Removal of K&R style braces.
`debug()` controled by a specific `debug` option.

* Addition of debug traces.

* opts.generationStrategy option addition.
'documented' => by default
'exported' => not fully implemented, just prevents non documented doclets to be removed for the moment

* correctly write doclets at es6 class constructors
cherry-pick & merge from @HackbrettXXX's commit 312578e

* add a test case for constructors (fails currently)

* Constructor generation with documentation.
From [PR#74](#74) with fix.

* Emitter._buildTree() strengthening with full jsdoc doclets.

* First 'exported' generation strategy implementation. Still needs to be tested.

* Test additions for testing the 'exported' generation strategy.
Lots of them are not enabled yet and need to be fixed.

* (Re)named exports.

* Warning addition while waiting for [tsd-jsdoc#104](#104 resolution.

* 'export <named type>' pattern support.
Fix for 'module.exports = {name: }' pattern.

* Named exports with reference to a type of the same name.

* 'export default <named type>' pattern support (works like a lambda class would actually).

* 'export default <lambda class>' pattern support.

* 'export default <lambda function>' and 'export default <named function>' patterns support.

* 'module.exports=<lambda type>' and 'module.exports=<named type>' patterns support.

* 'module.exports.name=<lambda type>' and 'module.exports.name=<named type>' patterns support.

* 'exports.name=<lambda type>' and 'exports.name=<named type>' patterns support.

* 'module.exports={name=<lambda type>} and 'module.exports={name=<named type>}' patterns support.
Workaround needed for classes as long as issue [jsdoc#1699](jsdoc/jsdoc#1699) is not fixed.

* cyclic dependencies with 'exported' generation strategy.
Addition of 'export default {name: ...}' tests (not supported yet).

* Test class_all.js working with 'exported' generation strategy.

* Test constructors.js & enum_all.js working with 'exported' generation strategy.

* Tests function_all.js and interface_all.js working with 'exported' generation strategy.
Warn&debug improvements.

* Test namespace_all.js working with 'exported' generation strategy.

* Tests property_all.js and typedef_all.js working with 'exported' generation strategy.

* 'documented' & 'exported' test cases.
Instrumentation for jsdoc 3.5.5 vs 3.6.3 investigations.

* jsdoc@3.6.3 installation.

* jsdoc@3.6.3 fixes.

* `walk-back.d.ts` typescript declaration.

* `walk-back.d.ts`: application of "tsd-default-export" recommendations.
See: https://github.com/Alexis-ROYER/tsd-default-export/blob/master/README.md

* Corrections to @englercj’s remarks.

* Fix merge tag 'v2.5.0' into export-default
'exported' tests were not executed due to a false trailing 'r' after `generationStrategy` in `test/lib/index.ts`.

* Corrections to @englercj’s remarks.

Co-authored-by: Lukas Hollaender <lukas.hollaender@yworks.com>
  • Loading branch information
alxroyer and HackbrettXXX authored May 2, 2020
1 parent fe18a88 commit d759376
Show file tree
Hide file tree
Showing 127 changed files with 3,922 additions and 766 deletions.
242 changes: 120 additions & 122 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build": "tsc -p tsconfig.json",
"watch": "tsc -w -p tsconfig.json",
"prepare": "npm run build",
"test": "npm run build && mocha --ui tdd -r ts-node/register test/specs/**.ts"
"test": "npm run build && mocha --ui tdd -r ts-node/register --timeout 5000 --colors test/specs/**.ts"
},
"files": [
"dist/*",
Expand All @@ -29,7 +29,8 @@
"jsdoc-api": "^5.0.3",
"mocha": "^5.2.0",
"object-to-spawn-args": "^2.0.0",
"ts-node": "^7.0.1"
"ts-node": "^7.0.1",
"walk-back": "^3.0.1"
},
"peerDependencies": {
"jsdoc": "^3.6.3"
Expand Down
Loading

0 comments on commit d759376

Please sign in to comment.