35 Commits

Author SHA1 Message Date
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
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
1e23b7e61f
fix(jsdoc-core): mock fs correctly in config tests 2023-09-02 15:04:49 -07: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
8c6aad8440
chore: add license headers, and a CI check for their presence 2023-01-08 16:11:38 -08:00
Jeff Williams
e3ac8e1670
refactor: migrate task runners to Hereby 2023-01-07 20:46:11 -08:00
Jeff Williams
5178661c1c chore: move jsdoc/env to @jsdoc/core.env 2022-11-03 14:36:42 -07:00
Jeff Williams
41ac86129b chore(deps): update Jasmine; add missing deps
We can't update Jasmine past 3.99.0 until we've done away with our `require()`-hacking shenanigans.
2022-09-02 12:34:26 -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
08eacf078b fix(@jsdoc/core): capitalize Dependencies 2021-09-26 11:30: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
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
7b931f5baa nit(jsdoc-core): test existence of @jsdoc/core.util 2019-12-07 17:08:17 -08:00
Jeff Williams
3eaa696a4d fix(jsdoc-core): ensure that yaml module can be loaded 2019-12-01 15:52:10 -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