Jeff Williams
c076b5d8f1
docs: add and improve JSDoc comments
...
Plus some minor refactoring.
2025-09-28 12:53:50 -07:00
Jeff Williams
153b899c2e
refactor(jsdoc-core): remove obsolete getter and method
2025-02-11 21:22:49 -08:00
Jeff Williams
42f73299c7
docs: improve code comments
...
Plus some very minor code cleanup.
2024-12-16 22:03:35 -08:00
Jeff Williams
428ddcf521
refactor: create @jsdoc/name package to break dependency cycles
...
Tons of stuff depends on these methods; in contrast, these methods don't depend on any other JSDoc packages.
2024-12-15 15:08:06 -08:00
Jeff Williams
fdf8f6b481
refactor: use env instead of deps
2024-12-07 21:02:01 -08:00
Jeff Williams
3652d69bc5
refactor: rename Dictionary.fromConfig() to Dictionary.fromEnv()
2024-12-07 14:30:05 -08:00
Jeff Williams
f7d5fa77b0
fix: use a special longname for a non-default export in an ES2015 module
...
Previously, we used `exports.NAME`, which was both incorrect and confusing.
2024-05-11 17:42:04 -07:00
Jeff Williams
575f0dccc8
fix: use a special longname for an ES2015 module's default export
...
Previously, we used `module.exports`, which is both incorrect and confusing.
2024-05-11 12:07:56 -07:00
Jeff Williams
cee9fbf914
refactor: move tag initialization out of runCommand()
2024-02-21 13:50:06 -08:00
Jeff Williams
4fcaf793f6
feat(jsdoc-core): move parseSourceFiles() to public API
2024-01-12 19:26:16 -08:00
Jeff Williams
301a3a4e5d
feat(jsdoc-core): move generateDocs() to public API
2024-01-01 20:02:32 -08:00
Jeff Williams
aa49b841bb
fix(jsdoc-core): extract the correct basename for scoped modules, and when a namespace is present
2023-12-30 14:34:38 -08:00
Jeff Williams
638a89a204
feat(jsdoc-core): move source-file scanning to public API
2023-12-29 11:51:34 -08:00
Jeff Williams
865b9faa1e
feat(jsdoc-core): add Api class
...
Starting point for a public API for JSDoc.
2023-12-27 12:46:21 -08:00
Jeff Williams
5b11762b35
refactor(jsdoc-core): rename default config object
2023-12-27 12:09:18 -08:00
Jeff Williams
02e82eaaa4
fix: use the correct name and longname for class-private methods and properties
2023-12-19 12:47:15 -08:00
Jeff Williams
45c497e192
refactor: simplify dependency management
...
It turns out that JSDoc's dependency-injection needs are pretty simple; we mostly just need to pass around some data, plus some logging functions. That means the previous solution was overengineered, even though it was still pretty lightweight.
Now we just put everything in the `Env` object and pass that around instead.
2023-12-10 15:05:35 -08:00
Jeff Williams
f31388c188
refactor: move some Env-related code around
2023-12-09 20:15:49 -08:00
Jeff Williams
48148e120d
refactor: convert env to a class
...
Because we now share `env` by passing it around, not by relying on the module cache.
2023-12-09 10:18:17 -08:00
Jeff Williams
a82263f925
refactor: make config loading asynchronous
...
Workaround for https://github.com/tschaub/mock-fs/issues/377 , which causes `fs.readFileSync()` to fail on Node.js >=20.5.0.
Fixes #2097 .
2023-12-03 15:42:56 -08:00
Jeff Williams
5e4f999497
refactor: don't use deprecated RegExp.$1...$9 properties
...
Plus some miscellaneous cleanup.
2023-10-11 16:40:23 -07:00
Jeff Williams
0e866cb18e
fix: remove leftover exports
2023-03-08 15:52:52 -08:00
Jeff Williams
c04508f295
refactor: migrate to ES modules
2023-02-28 20:12:24 -08:00
Jeff Williams
cfc4ba0610
refactor: move plugins and plugin loader to different packages
2023-02-20 11:43:12 -08:00
Jeff Williams
6a5b88cb5a
feat: use globs, not regexes, to specify source files
...
Glob expressions are easier than regexes to write correctly; they're often easier to read as well. We support all of the syntax in https://github.com/mrmlnc/fast-glob#pattern-syntax , which should provide more than enough flexibility for JSDoc users.
Related change: If a `package.json` or `README.md` file gets picked up as one of your source files, we no longer assume that it should be incorporated into the generated docs. Instead, you must specify the file explicitly with the `-P` flag (for `package.json`) or the `-R` flag (for `README.md`).
2023-01-22 17:32:17 -08:00
Jeff Williams
0ca411969e
refactor: move doclet module to @jsdoc/doclet
2023-01-16 12:09:50 -08:00
Jeff Williams
333522a2cd
chore: Object.prototype.hasOwnProperty.call -> Object.hasOwn
2023-01-08 22:11:12 -08:00
Jeff Williams
8c6aad8440
chore: add license headers, and a CI check for their presence
2023-01-08 16:11:38 -08:00
Jeff Williams
5178661c1c
chore: move jsdoc/env to @jsdoc/core.env
2022-11-03 14:36:42 -07:00
Jeff Williams
004ce7392c
refactor(jsdoc-core): make Dependencies#reset accept a string
2021-10-22 10:09:32 -07:00
Jeff Williams
ad2cfd70ef
feature(jsdoc-core): allow dependencies to be reset
2021-10-22 10:03:35 -07:00
Jeff Williams
29b64a4638
feature(@jsdoc/core): make the dependency provider more flexible
...
You can now register classes and factory functions, either as singletons or not.
2021-10-21 17:35:30 -07:00
Jeff Williams
ba74ec1d4f
refactor(@jsdoc/core): replace yaioc with bottlejs
...
`bottlejs` does what we need and is much more widely used.
Also, `bottlejs` doesn't do all the magic name extraction that `yaioc` does. That means less logic to reproduce in this facade if we change the underlying dependency later.
2021-09-27 14:38:16 -07:00
Jeff Williams
c0244402dd
refactor(@jsdoc/core): don't export a default container for dependencies
...
We need to ensure that the container is passed into any code that needs it. If you're testing a template, and it lives in a different directory than JSDoc itself, relying on a shared default container won't work.
2021-09-26 10:25:09 -07:00
Jeff Williams
b850fa14b9
feature(@jsdoc/core): add simple inversion of control (IoC) tool
...
Currently unused. Intended to be used for JSDoc core dependencies that must be available everywhere, such as the config and the event bus.
2021-09-26 09:54:42 -07:00
Jeff Williams
1305499207
chore: use Prettier to format source files
2021-09-19 13:20:31 -07:00
Jeff Williams
548dc55174
refactor(jsdoc-core): move syntax to new @jsdoc/parse package
2020-12-24 15:25:49 -08:00
Jeff Williams
df319bc3d1
refactor(jsdoc-core): add Syntax to @jsdoc/core
2020-12-24 15:07:47 -08:00
Jeff Williams
81df42f593
fix(jsdoc-core): restore old behavior of toParts()
2020-05-25 11:29:17 -07:00
Jeff Williams
df145057c3
refactor: extract jsdoc/name to @jsdoc/core.name; rename methods/enums
...
BREAKING CHANGE: `jsdoc/name` is gone; its replacement, `@jsdoc/core.name`, has different method/enum names.
2020-01-01 16:51:19 -08:00
Jeff Williams
a0f8d178aa
refactor: extract most of @jsdoc/core into @jsdoc/util
...
BREAKING CHANGE: Most modules in `@jsdoc/core` have moved.
2019-12-31 14:40:14 -08:00
Jeff Williams
c5ec05b7f3
refactor(jsdoc-core): fold event bus into @jsdoc/core
2019-12-08 18:42:41 -08:00
Jeff Williams
0fa28300b2
refactor: reorganize @jsdoc/core
...
Also creates a new package, `@jsdoc/cli`.
BREAKING CHANGE: Methods in `@jsdoc/core` moved around.
2019-12-08 18:30:58 -08:00
Jeff Williams
840352f192
feat(jsdoc-core): add @jsdoc/core.util.fs.lsSync
2019-12-08 14:06:44 -08:00
Jeff Williams
c6d3dea475
fix(jsdoc-core): use the cosmiconfig 6.x API
2019-12-01 11:43:18 -08:00
Jeff Williams
5d9bc0f637
move code to @jsdoc/core; remove bespoke argument-parsing code
2019-09-08 19:34:48 -07:00
Jeff Williams
a291608954
add @jsdoc/core package
2019-07-28 15:14:16 -07:00