diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index fc2eff3a7..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,45 +0,0 @@ -workflows: - version: 2 - node-multi-build: - jobs: - - node-v6 - - node-v8 - - node-v10 - -version: 2 -jobs: - node-base: &node-base - docker: - - image: node - steps: - - checkout - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-{{ .Branch }} - - yarn-packages-master - - yarn-packages- - - run: - name: Install dependencies - command: yarn --frozen-lockfile - - run: - name: Test - command: yarn test-ci - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - node_modules/ - node-v6: - <<: *node-base - docker: - - image: node:6 - node-v8: - <<: *node-base - docker: - - image: node:8 - node-v10: - <<: *node-base - docker: - - image: node:10 diff --git a/.editorconfig b/.editorconfig index 443b276cc..597e75449 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,4 @@ -[**.js] +[*.{js,css}] indent_style = space indent_size = 2 trim_trailing_whitespace = true diff --git a/.eslintrc b/.eslintrc index 10e1dc860..2bf300124 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,8 +1,8 @@ { "root": true, - "parser": "babel-eslint", "parserOptions": { - "sourceType": "module" + "sourceType": "module", + "ecmaVersion": 2020 }, "rules": { "no-var": 2, @@ -26,10 +26,7 @@ "no-shadow": 0, "no-undef": 2 }, - "extends": [ - "eslint:recommended", - "prettier" - ], + "extends": ["eslint:recommended", "prettier"], "env": { "node": true, "es6": true diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..bb236c12d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/en/code-security/dependabot + +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + - package-ecosystem: npm + directory: / + schedule: + interval: weekly diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..db650acb4 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,41 @@ +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: '0 0 1 * *' + workflow_dispatch: + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript-typescript' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + queries: +security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 000000000..2d8e7a62f --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,29 @@ +# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run test-ci diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..d4a43dd13 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm run pre-commit diff --git a/.npmignore b/.npmignore index 7895e9330..7c3ebf56a 100644 --- a/.npmignore +++ b/.npmignore @@ -7,3 +7,9 @@ circle.yml coverage __tests__ +.circleci +.github +.prettierignore +.prettierrc +CODE_OF_CONDUCT.md +ISSUE_TEMPLATE.md diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..d826961de --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +__tests__/fixture diff --git a/.prettierrc b/.prettierrc index 544138be4..b0a179d48 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,3 +1,5 @@ { - "singleQuote": true + "singleQuote": true, + "trailingComma": "none", + "arrowParens": "avoid" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e3bbc621..dd16f8756 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,316 @@ -# Change Log +# Changelog All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [14.0.3](https://github.com/documentationjs/documentation/compare/v14.0.1...v14.0.3) (2024-01-30) + + +### Bug Fixes + +* **exported:** respect `parse-extension` & `require-extension` ([#1484](https://github.com/documentationjs/documentation/issues/1484)) ([798fa10](https://github.com/documentationjs/documentation/commit/798fa10595d7523032ac187ae9c8aa943c15e8da)), closes [#1272](https://github.com/documentationjs/documentation/issues/1272) [#1258](https://github.com/documentationjs/documentation/issues/1258) +* fix GFM markdown output ([#1553](https://github.com/documentationjs/documentation/issues/1553)) ([1cc2f98](https://github.com/documentationjs/documentation/commit/1cc2f984315fc5aaf898c64d8e1eb2b4e70cd482)) + +### [14.0.2](https://github.com/documentationjs/documentation/compare/v14.0.1...v14.0.2) (2023-05-19) + + +### Bug Fixes + +* **exported:** respect `parse-extension` & `require-extension` ([#1484](https://github.com/documentationjs/documentation/issues/1484)) ([798fa10](https://github.com/documentationjs/documentation/commit/798fa10595d7523032ac187ae9c8aa943c15e8da)), closes [#1272](https://github.com/documentationjs/documentation/issues/1272) [#1258](https://github.com/documentationjs/documentation/issues/1258) + +## [14.0.1](https://github.com/documentationjs/documentation/compare/v14.0.0...v14.0.1) (2022-12-14) + +### Improvements +* chore: upgrade git-url-parse to 13.1.0 to fix vulnerabilities [#1565](https://github.com/documentationjs/documentation/pull/1565) + +## [14.0.0](https://github.com/documentationjs/documentation/compare/v14.0.0-alpha.1...v14.0.0) (2022-08-19) + +## [14.0.0-alpha.1](https://github.com/documentationjs/documentation/compare/v14.0.0-alpha.0...v14.0.0-alpha.1) (2022-08-07) + + +### Features + +* :sparkles: update Babel, copy list of plugins from Prettier ([3f187d7](https://github.com/documentationjs/documentation/commit/3f187d73132c6667a9140bd491c5f703c1f37c40)) + +## [14.0.0-alpha.0](https://github.com/documentationjs/documentation/compare/v13.2.5...v14.0.0-alpha.0) (2022-08-05) + + +### ⚠ BREAKING CHANGES + +* all Extensions should contains '.' so that mean if you have just 'ts' then need to convert to '.ts' +* external parameter was removed +Migration plan propose to move all external resources to input usages +Motivation: packages has many inputs which describe in package.json +so that mean need each time to parse all package.json of external resources to understand which entry point need to pick. +But it is base on guesses because entry point may could not contains a documentation and the best way to handle it manually. +* The serve parameter was removed, you can use any other tools which could be refresh and store your html site +The private parameter has removed, use a access +* documentation.js will now require node 14 or later. + +### Bug Fixes + +* add micromark dependencies fixed [#1381](https://github.com/documentationjs/documentation/issues/1381) ([3ba8165](https://github.com/documentationjs/documentation/commit/3ba81659d7db5d9393fa083287d91db93d6aab5e)) +* add TS and TSX as default extensions fixed [#1377](https://github.com/documentationjs/documentation/issues/1377) ([f0cb1c0](https://github.com/documentationjs/documentation/commit/f0cb1c0bb1d97228c7baab453e50e5dbe283ea46)) +* external was removed as prefer of input usages ([e3c59d7](https://github.com/documentationjs/documentation/commit/e3c59d77e4e3cf6e5fabab7c0d853a06a77f6288)) +* html report, it is return html if output is not defined ([0975871](https://github.com/documentationjs/documentation/commit/0975871b34b8cc0af74e0aebb43f2727e0ab9960)) +* remove private parameter, use access (BREAKING CHANGES) ([874069c](https://github.com/documentationjs/documentation/commit/874069c0b3647dad413667f61d05f6d39992995d)) +* The server parameter deprecated and will be remove in next Major version fixed [#1413](https://github.com/documentationjs/documentation/issues/1413) ([810e08b](https://github.com/documentationjs/documentation/commit/810e08b6fdb1076a1758bff831a9f42890f0f25f)) +* use process.cwd vs `.` which can fail ([4cc70a5](https://github.com/documentationjs/documentation/commit/4cc70a5aed0c233cdcc72077733f9da8450be386)) + + +* replace module-deps-sortable on own implementation to control how parse files ([abb781a](https://github.com/documentationjs/documentation/commit/abb781a69ac69423da11346f62d7064382bb7b74)) +* Update Node minimum version to 14 ([fc0bb3c](https://github.com/documentationjs/documentation/commit/fc0bb3cd885b9577e6f1f6935e15d4ec24f89114)) + +### [13.2.5](https://github.com/documentationjs/documentation/compare/v13.2.4...v13.2.5) (2021-04-24) + + +### Bug Fixes + +* add gfm format for remark fixed [#1374](https://github.com/documentationjs/documentation/issues/1374) ([#1375](https://github.com/documentationjs/documentation/issues/1375)) ([6b5bc25](https://github.com/documentationjs/documentation/commit/6b5bc2548db23fdab3fd8d29ac1aeedea7ad3a47)) +* jsx should be included for tsx files but not for ts fixed [#1359](https://github.com/documentationjs/documentation/issues/1359) ([#1373](https://github.com/documentationjs/documentation/issues/1373)) ([00d434f](https://github.com/documentationjs/documentation/commit/00d434f8576969b00d53a20efebb52a880acf350)) + +### [13.2.4](https://github.com/documentationjs/documentation/compare/v13.2.3...v13.2.4) (2021-04-21) + + +### Bug Fixes + +* add support Vue 3 fixed [#1339](https://github.com/documentationjs/documentation/issues/1339) ([#1372](https://github.com/documentationjs/documentation/issues/1372)) ([cd7d123](https://github.com/documentationjs/documentation/commit/cd7d12366cc499ae8d40a64905354c3479f802f6)) + +### [13.2.3](https://github.com/documentationjs/documentation/compare/v13.2.2...v13.2.3) (2021-04-20) + +### [13.2.2](https://github.com/documentationjs/documentation/compare/v13.2.1...v13.2.2) (2021-04-20) + + +### Bug Fixes + +* [@see](https://github.com/see) tags incorrectly formatted in markdown output fixed [#1337](https://github.com/documentationjs/documentation/issues/1337) ([5d8d450](https://github.com/documentationjs/documentation/commit/5d8d4504d52a5bb0a0432bf399bbd82d9e5ea7fc)) + +### [13.2.1](https://github.com/documentationjs/documentation/compare/v13.2.0...v13.2.1) (2021-04-06) + +## [13.2.0](https://github.com/documentationjs/documentation/compare/v13.1.1...v13.2.0) (2021-03-13) + + +### Features + +* Support import.meta ([d449e7c](https://github.com/documentationjs/documentation/commit/d449e7c3ca0abb7379ea4159b0ef0281059077eb)), closes [#1345](https://github.com/documentationjs/documentation/issues/1345) + +### [13.1.1](https://github.com/documentationjs/documentation/compare/v13.1.0...v13.1.1) (2021-01-19) + +## [13.1.0](https://github.com/documentationjs/documentation/compare/v13.0.2...v13.1.0) (2020-10-24) + + +### Features + +* Add event members to md output ([#1336](https://github.com/documentationjs/documentation/issues/1336)) ([bc3233f](https://github.com/documentationjs/documentation/commit/bc3233fe7e414e65756cf50450ebad069e37506a)) + +### [13.0.2](https://github.com/documentationjs/documentation/compare/v13.0.1...v13.0.2) (2020-07-02) + + +### Bug Fixes + +* Additional safety around detecting functions in HTML output ([a8b6ce1](https://github.com/documentationjs/documentation/commit/a8b6ce144ea380ad21ba99f03574f6258be10666)) + +### [13.0.1](https://github.com/documentationjs/documentation/compare/v13.0.0...v13.0.1) (2020-06-04) + + +### Bug Fixes + +* 🐛 Error with flow opaque type and readme command ([78db9a4](https://github.com/documentationjs/documentation/commit/78db9a443a65bbe8ff202083351655e0cfa60004)), closes [#1322](https://github.com/documentationjs/documentation/issues/1322) +* 🐛 Fixes an issue when using object spread and $Exact ([106945c](https://github.com/documentationjs/documentation/commit/106945c6354f0b70335adf737c7b7fa296952cc3)), closes [#1324](https://github.com/documentationjs/documentation/issues/1324) + + +# [13.0.0](https://github.com/documentationjs/documentation/compare/v12.3.0...v13.0.0) (2020-05-09) + + +### Chores + +* Update Node minimum version to 10 ([45a5257](https://github.com/documentationjs/documentation/commit/45a5257)) + + +### BREAKING CHANGES + +* documentation.js will now require node 10 or later. + + + + +# [12.3.0](https://github.com/documentationjs/documentation/compare/v12.2.0...v12.3.0) (2020-04-07) + + +### Features + +* upgrade babel dependencies ([d0ec029](https://github.com/documentationjs/documentation/commit/d0ec029)) + + + + +# [12.2.0](https://github.com/documentationjs/documentation/compare/v12.1.4...v12.2.0) (2020-03-31) + + +### Features + +* support for the [@see](https://github.com/see) tag in Markdown & HTML ([48bb7a2](https://github.com/documentationjs/documentation/commit/48bb7a2)) + + + + +## [12.1.4](https://github.com/documentationjs/documentation/compare/v12.1.3...v12.1.4) (2019-11-15) + + + + +## [12.1.3](https://github.com/documentationjs/documentation/compare/v12.1.2...v12.1.3) (2019-11-04) + + +### Bug Fixes + +* upgrade git-url-parse to fix a parsing issue ([#1296](https://github.com/documentationjs/documentation/issues/1296)) ([344e804](https://github.com/documentationjs/documentation/commit/344e804)) + + + + +## [12.1.2](https://github.com/documentationjs/documentation/compare/v12.1.1...v12.1.2) (2019-09-09) + + +### Bug Fixes + +* check for empty diff ([#1273](https://github.com/documentationjs/documentation/issues/1273)) ([3e0958b](https://github.com/documentationjs/documentation/commit/3e0958b)) + + + + +## [12.1.1](https://github.com/documentationjs/documentation/compare/v12.1.0...v12.1.1) (2019-08-01) + + +### Bug Fixes + +* Git submodule support for repo names with a dot ([#1271](https://github.com/documentationjs/documentation/issues/1271)) ([27a29be](https://github.com/documentationjs/documentation/commit/27a29be)) + + + + +# [12.1.0](https://github.com/documentationjs/documentation/compare/v12.0.3...v12.1.0) (2019-07-31) + + +### Features + +* Add git submodules support to github linking ([#1270](https://github.com/documentationjs/documentation/issues/1270)) ([ec36b41](https://github.com/documentationjs/documentation/commit/ec36b41)) + + + + +## [12.0.3](https://github.com/documentationjs/documentation/compare/v12.0.2...v12.0.3) (2019-07-22) + + +### Bug Fixes + +* Allow skipped array arguments in destructuring. Fixes [#1247](https://github.com/documentationjs/documentation/issues/1247) ([#1266](https://github.com/documentationjs/documentation/issues/1266)) ([f9039e9](https://github.com/documentationjs/documentation/commit/f9039e9)) + + + + +## [12.0.2](https://github.com/documentationjs/documentation/compare/v12.0.1...v12.0.2) (2019-07-16) + + + + +## [12.0.1](https://github.com/documentationjs/documentation/compare/v12.0.0...v12.0.1) (2019-07-10) + + +### Bug Fixes + +* Crash when called with no inputs. yargs now variadic positional arguments undefined instead of [] ([821a15e](https://github.com/documentationjs/documentation/commit/821a15e)) + + + + +# [12.0.0](https://github.com/documentationjs/documentation/compare/v11.0.1...v12.0.0) (2019-07-10) + + +* Formatted with Prettier ([8f36e75](https://github.com/documentationjs/documentation/commit/8f36e75)) + + +### BREAKING CHANGES + +* The next release will require Node 8 + + + + +## [11.0.1](https://github.com/documentationjs/documentation/compare/v11.0.0...v11.0.1) (2019-06-12) + + +### Bug Fixes + +* toc with children getting displayed as "note" ([#1253](https://github.com/documentationjs/documentation/issues/1253)) ([14298bb](https://github.com/documentationjs/documentation/commit/14298bb)) + + + + +# [11.0.0](https://github.com/documentationjs/documentation/compare/v10.1.0...v11.0.0) (2019-05-08) + + +### Bug Fixes + +* Fix parsing of optional parameters with annotations ([ca17de5](https://github.com/documentationjs/documentation/commit/ca17de5)) + + +### Features + +* Enable all parser plugins ([fa1b0b5](https://github.com/documentationjs/documentation/commit/fa1b0b5)) +* Support exportNamespaceFrom in parser ([8fa141d](https://github.com/documentationjs/documentation/commit/8fa141d)) + + +### BREAKING CHANGES + +* this removes support for legacy decorators, because +in one place we had legacy and in another we didn't. + + + + +# [10.1.0](https://github.com/documentationjs/documentation/compare/v10.0.0...v10.1.0) (2019-04-25) + + +### Features + +* TypeScript support & inference ([3773e02](https://github.com/documentationjs/documentation/commit/3773e02)) + + + + +# [10.0.0](https://github.com/documentationjs/documentation/compare/v10.0.0-alpha.0...v10.0.0) (2019-04-18) + + +### Features + +* Add flow inference for generators ([7947e97](https://github.com/documentationjs/documentation/commit/7947e97)) +* Support async functions ([d31c3b7](https://github.com/documentationjs/documentation/commit/d31c3b7)) +* Support classPrivateProperties in parser ([64ef671](https://github.com/documentationjs/documentation/commit/64ef671)), closes [#1216](https://github.com/documentationjs/documentation/issues/1216) +* Support generator functions ([8e3cd47](https://github.com/documentationjs/documentation/commit/8e3cd47)) + + + + +# [10.0.0-alpha.0](https://github.com/documentationjs/documentation/compare/v9.3.1...v10.0.0-alpha.0) (2019-03-12) + + +### Features + +* Support custom babel config ([#1205](https://github.com/documentationjs/documentation/issues/1205)) ([746d0a9](https://github.com/documentationjs/documentation/commit/746d0a9)) + + +### BREAKING CHANGES + +* this may change babel configuration loading, and is a +major change to the documentation.js approach to Babel. + + + + +## [9.3.1](https://github.com/documentationjs/documentation/compare/v9.3.0...v9.3.1) (2019-03-12) + + + # [9.3.0](https://github.com/documentationjs/documentation/compare/v9.2.1...v9.3.0) (2019-02-27) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 65c05c574..c06638aef 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,22 +1,76 @@ -# Contributor Code of Conduct +# Contributor Covenant Code of Conduct -As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. +## Our Pledge -We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to make participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment -* Publishing other's private information, such as physical or electronic addresses, without explicit permission -* Other unethical or unprofessional conduct. +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when +an individual is representing the project or its community in public spaces. +Examples of representing a project or community include using an official +project e-mail address, posting via an official social media account, or acting +as an appointed representative at an online or offline event. Representation of +a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team. All complaints will be reviewed and +investigated and will result in a response that is deemed necessary and appropriate +to the circumstances. The project team is obligated to maintain confidentiality with +regard to the reporter of an incident. Further details of specific enforcement +policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team. +## Attribution -This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. +[homepage]: https://www.contributor-covenant.org -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) \ No newline at end of file +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ba29318f7..2169a477e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,8 +38,7 @@ before merge. Release process: * Confirm that `master` passes CI tests -* Bump version in `package.json` -* Run `npm run changelog` -* Add updated CHANGELOG.md to master +* Run `npm run release` or in case it's a prerelease you'd run i.e. `npm run release -- --prerelease alpha` + * It will automatically update the version in package.json and make a git tag. * Push commits * npm publish diff --git a/LICENSE b/LICENSE index e9b9b142d..4a5ddc55b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ ISC License -Copyright (c) 2015, documentationjs <> +Copyright (c) 2025, documentationjs <> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -38,3 +38,15 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------------------- + +Contains sections of prettier + +Copyright © James Long and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 05540f054..90f636934 100644 --- a/README.md +++ b/README.md @@ -9,33 +9,32 @@ [](https://circleci.com/gh/documentationjs/documentation/tree/master) [](http://badge.fury.io/js/documentation) [](https://gitter.im/documentationjs/documentation?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[](https://david-dm.org/documentationjs/documentation) [](http://inch-ci.org/github/documentationjs/documentation) [:date: Current maintenance status](https://github.com/documentationjs/documentation/wiki/Current-maintenance-status) -* Supports modern JavaScript: ES5, ES2017, JSX, Vue and [Flow](https://flow.org/) type annotations. -* Infers parameters, types, membership, and more. Write less documentation: let the computer write it for you. -* Integrates with GitHub to link directly from documentation to the code it refers to. -* Customizable output: HTML, JSON, Markdown, and more +- Supports modern JavaScript: ES5, ES2017, JSX, Vue and [Flow](https://flow.org/) type annotations. +- Infers parameters, types, membership, and more. Write less documentation: let the computer write it for you. +- Integrates with GitHub to link directly from documentation to the code it refers to. +- Customizable output: HTML, JSON, Markdown, and more ## Examples -- [HTML output with default template](https://documentation.js.org/html-example/) -- [Markdown](https://github.com/documentationjs/documentation/blob/master/docs/NODE_API.md) -- [JSON](https://documentation.js.org/html-example/index.json) +- [HTML output with default template](https://documentation.js.org/html-example/) +- [Markdown](https://github.com/documentationjs/documentation/blob/master/docs/NODE_API.md) +- [JSON](https://documentation.js.org/html-example/index.json) ## Documentation -- [Getting Started](docs/GETTING_STARTED.md): start here -- [Usage](docs/USAGE.md): how to use documentation.js -- [Recipes](docs/RECIPES.md): tricks for writing effective JSDoc docs -- [Node API](docs/NODE_API.md): documentation.js's self-generated documentation -- [Configuring documentation.js](docs/CONFIG.md) -- [FAQ](docs/FAQ.md) -- [Troubleshooting](docs/TROUBLESHOOTING.md) -- [Theming](docs/THEMING.md): tips for theming documentation output in HTML -- [See also](https://github.com/documentationjs/documentation/wiki/See-also): a list of projects similar to documentation.js +- [Getting Started](docs/GETTING_STARTED.md): start here +- [Usage](docs/USAGE.md): how to use documentation.js +- [Recipes](docs/RECIPES.md): tricks for writing effective JSDoc docs +- [Node API](docs/NODE_API.md): documentation.js's self-generated documentation +- [Configuring documentation.js](docs/CONFIG.md) +- [FAQ](docs/FAQ.md) +- [Troubleshooting](docs/TROUBLESHOOTING.md) +- [Theming](docs/THEMING.md): tips for theming documentation output in HTML +- [See also](https://github.com/documentationjs/documentation/wiki/See-also): a list of projects similar to documentation.js ## User Guide @@ -46,7 +45,7 @@ $ npm install -g documentation ``` This installs a command called `documentation` in your path, that you can -point at [JSDoc](http://usejsdoc.org/)-annotated source code to generate +point at [JSDoc](https://jsdoc.app/about-getting-started.html)-annotated source code to generate human-readable documentation. First, run `documentation` with the `--help` option for help: @@ -56,18 +55,12 @@ Usage: # generate markdown docs for index.js and files it references documentation build index.js -f md -# generate html docs for all files in src -documentation build src/** -f html -o docs +# generate html docs for all files in src, and include links to source files in github +documentation build src/** -f html --github -o docs # document index.js, ignoring any files it requires or imports documentation build index.js -f md --shallow -# build and serve HTML docs for app.js -documentation serve app.js - -# build, serve, and live-update HTML docs for app.js -documentation serve --watch app.js - # validate JSDoc syntax in util.js documentation lint util.js @@ -77,8 +70,10 @@ documentation readme index.js --section=API # build docs for all values exported by index.js documentation build --document-exported index.js +# build html docs for a TypeScript project +documentation build index.ts --parse-extension ts -f html -o docs + Commands: - serve [input..] generate, update, and display HTML documentation build [input..] build documentation lint [input..] check for common style and uniformity mistakes readme [input..] inject documentation into your README.md @@ -94,9 +89,9 @@ _We have plenty of [issues](https://github.com/documentationjs/documentation/issues) that we'd love help with._ -- Robust and complete `JSDoc` support, including typedefs. -- Strong support for HTML and Markdown output -- Documentation coverage, statistics, and validation +- Robust and complete `JSDoc` support, including typedefs. +- Strong support for HTML and Markdown output +- Documentation coverage, statistics, and validation documentation is an OPEN Open Source Project. This means that: diff --git a/__tests__/__snapshots__/bin-readme.js.snap b/__tests__/__snapshots__/bin-readme.js.snap index f82e9545f..6ce3ce9da 100644 --- a/__tests__/__snapshots__/bin-readme.js.snap +++ b/__tests__/__snapshots__/bin-readme.js.snap @@ -9,10 +9,10 @@ exports[`readme autodetection of different filenames updates readme.markdown 1`] ### Table of Contents -- [foo](#foo) - - [Parameters](#parameters) -- [bar](#bar) - - [Parameters](#parameters-1) +* [foo](#foo) + * [Parameters](#parameters) +* [bar](#bar) + * [Parameters](#parameters-1) ## foo @@ -20,9 +20,9 @@ A function with documentation. ### Parameters -- \`a\` {string} blah +* \`a\` {string} blah -Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** answer +Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global\\\\_Objects/Number)** answer ## bar @@ -30,7 +30,7 @@ A second function with docs ### Parameters -- \`b\` +* \`b\` # Another section " @@ -45,10 +45,10 @@ exports[`readme command --readme-file 1`] = ` ### Table of Contents -- [foo](#foo) - - [Parameters](#parameters) -- [bar](#bar) - - [Parameters](#parameters-1) +* [foo](#foo) + * [Parameters](#parameters) +* [bar](#bar) + * [Parameters](#parameters-1) ## foo @@ -56,9 +56,9 @@ A function with documentation. ### Parameters -- \`a\` {string} blah +* \`a\` {string} blah -Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** answer +Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global\\\\_Objects/Number)** answer ## bar @@ -66,7 +66,7 @@ A second function with docs ### Parameters -- \`b\` +* \`b\` # Another section " @@ -81,10 +81,10 @@ exports[`readme command updates README.md 1`] = ` ### Table of Contents -- [foo](#foo) - - [Parameters](#parameters) -- [bar](#bar) - - [Parameters](#parameters-1) +* [foo](#foo) + * [Parameters](#parameters) +* [bar](#bar) + * [Parameters](#parameters-1) ## foo @@ -92,9 +92,9 @@ A function with documentation. ### Parameters -- \`a\` {string} blah +* \`a\` {string} blah -Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** answer +Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global\\\\_Objects/Number)** answer ## bar @@ -102,7 +102,7 @@ A second function with docs ### Parameters -- \`b\` +* \`b\` # Another section " diff --git a/__tests__/__snapshots__/bin.js.snap b/__tests__/__snapshots__/bin.js.snap index 7d7219631..ca6d4bbb8 100644 --- a/__tests__/__snapshots__/bin.js.snap +++ b/__tests__/__snapshots__/bin.js.snap @@ -2,16 +2,16 @@ exports[`--config 1`] = ` " - +
- +A function that triggers the case where the autolinker doesn't find the referenced class type
- -This method takes a Buffer object that will be linked to nodejs.org
- - - @@ -601,6 +576,10 @@ the referenced class type + + + + @@ -620,10 +599,7 @@ the referenced class typeThis method takes an array of buffers and counts them
- - - @@ -665,11 +641,13 @@ the referenced class type + +var k = new Klass(); -k.isArrayOfBuffers();+
var k = new Klass(); +k.isArrayOfBuffers();@@ -678,6 +656,8 @@ k.isArrayOfBuffers(); + + @@ -697,10 +677,7 @@ k.isArrayOfBuffers();
A magic number that identifies this Klass.
- -Get this Klass's foo
- -this shows you how to getFoo
-var x = foo.getFoo();
+ var x = foo.getFoo();@@ -797,6 +777,8 @@ k.isArrayOfBuffers(); + + @@ -816,10 +798,7 @@ k.isArrayOfBuffers();
A function with an options parameter
- - - @@ -898,6 +877,10 @@ k.isArrayOfBuffers(); + + + + @@ -917,10 +900,7 @@ k.isArrayOfBuffers();A function with a deep options parameter
- -Klass event
- -a typedef with nested properties
- -Rest property function
- - - - + @@ -1266,8 +1255,13 @@ like a klass + + + + +I am the container of stream types
+This is Foobar +must have a distinct id from Foo.bar
- - -This is bar
- - -I am the container of stream types
+ +I am a passthrough stream that belongs to customStreams
+ +Col 1 | +Col 2 | +Col 3 | +
---|---|---|
Dat 1 | +Dat 2 | +Dat 3 | +
Dat 4 | +Dat 5 | +Dat 6 | +