mkdocstrings-typescript 0.0.0__tar.gz → 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. mkdocstrings_typescript-0.1.0/CHANGELOG.md +47 -0
  2. mkdocstrings_typescript-0.1.0/CODE_OF_CONDUCT.md +84 -0
  3. mkdocstrings_typescript-0.1.0/CONTRIBUTING.md +120 -0
  4. mkdocstrings_typescript-0.1.0/LICENSE +15 -0
  5. mkdocstrings_typescript-0.1.0/PKG-INFO +124 -0
  6. mkdocstrings_typescript-0.1.0/README.md +90 -0
  7. mkdocstrings_typescript-0.1.0/config/coverage.ini +25 -0
  8. mkdocstrings_typescript-0.1.0/config/git-changelog.toml +9 -0
  9. mkdocstrings_typescript-0.1.0/config/mypy.ini +7 -0
  10. mkdocstrings_typescript-0.1.0/config/pytest.ini +14 -0
  11. mkdocstrings_typescript-0.1.0/config/ruff.toml +91 -0
  12. mkdocstrings_typescript-0.1.0/config/vscode/launch.json +57 -0
  13. mkdocstrings_typescript-0.1.0/config/vscode/settings.json +33 -0
  14. mkdocstrings_typescript-0.1.0/config/vscode/tasks.json +97 -0
  15. mkdocstrings_typescript-0.1.0/docs/.overrides/main.html +20 -0
  16. mkdocstrings_typescript-0.1.0/docs/.overrides/partials/comments.html +57 -0
  17. mkdocstrings_typescript-0.1.0/docs/.overrides/partials/path-item.html +22 -0
  18. mkdocstrings_typescript-0.1.0/docs/changelog.md +5 -0
  19. mkdocstrings_typescript-0.1.0/docs/code_of_conduct.md +5 -0
  20. mkdocstrings_typescript-0.1.0/docs/contributing.md +5 -0
  21. mkdocstrings_typescript-0.1.0/docs/credits.md +9 -0
  22. mkdocstrings_typescript-0.1.0/docs/css/insiders.css +124 -0
  23. mkdocstrings_typescript-0.1.0/docs/css/material.css +26 -0
  24. mkdocstrings_typescript-0.1.0/docs/css/mkdocstrings.css +72 -0
  25. mkdocstrings_typescript-0.1.0/docs/index.md +7 -0
  26. mkdocstrings_typescript-0.1.0/docs/insiders/changelog.md +7 -0
  27. mkdocstrings_typescript-0.1.0/docs/insiders/goals.yml +16 -0
  28. mkdocstrings_typescript-0.1.0/docs/insiders/index.md +160 -0
  29. mkdocstrings_typescript-0.1.0/docs/insiders/installation.md +67 -0
  30. mkdocstrings_typescript-0.1.0/docs/js/feedback.js +14 -0
  31. mkdocstrings_typescript-0.1.0/docs/js/insiders.js +74 -0
  32. mkdocstrings_typescript-0.1.0/docs/license.md +11 -0
  33. mkdocstrings_typescript-0.1.0/docs/reference/api.md +7 -0
  34. mkdocstrings_typescript-0.1.0/docs/usage/configuration/general.md +30 -0
  35. mkdocstrings_typescript-0.1.0/docs/usage/configuration/headings.md +272 -0
  36. mkdocstrings_typescript-0.1.0/docs/usage/configuration/index.md +32 -0
  37. mkdocstrings_typescript-0.1.0/docs/usage/customization.md +202 -0
  38. mkdocstrings_typescript-0.1.0/docs/usage/index.md +72 -0
  39. mkdocstrings_typescript-0.1.0/duties.py +257 -0
  40. mkdocstrings_typescript-0.1.0/mkdocs.yml +199 -0
  41. mkdocstrings_typescript-0.1.0/pyproject.toml +122 -0
  42. mkdocstrings_typescript-0.1.0/scripts/gen_credits.py +179 -0
  43. mkdocstrings_typescript-0.1.0/scripts/get_version.py +26 -0
  44. mkdocstrings_typescript-0.1.0/scripts/griffe_extensions.py +46 -0
  45. mkdocstrings_typescript-0.1.0/scripts/insiders.py +173 -0
  46. mkdocstrings_typescript-0.1.0/scripts/make +1 -0
  47. mkdocstrings_typescript-0.1.0/scripts/make.py +189 -0
  48. mkdocstrings_typescript-0.1.0/scripts/mkdocs_hooks.py +46 -0
  49. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/__init__.py +18 -0
  50. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/_internal/__init__.py +0 -0
  51. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/_internal/config.py +206 -0
  52. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/_internal/debug.py +107 -0
  53. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/_internal/handler.py +172 -0
  54. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/py.typed +0 -0
  55. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/accessor.html.jinja +76 -0
  56. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/call_signature.html.jinja +14 -0
  57. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/children.html.jinja +29 -0
  58. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/class.html.jinja +67 -0
  59. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/constructor.html.jinja +67 -0
  60. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/constructor_signature.html.jinja +76 -0
  61. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/data.html.jinja +60 -0
  62. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/dispatch.html.jinja +94 -0
  63. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/enum.html.jinja +67 -0
  64. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/enum_member.html.jinja +62 -0
  65. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/function.html.jinja +76 -0
  66. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/interface.html.jinja +67 -0
  67. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/method.html.jinja +67 -0
  68. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/module.html.jinja +67 -0
  69. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/namespace.html.jinja +67 -0
  70. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/project.html.jinja +67 -0
  71. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/property.html.jinja +67 -0
  72. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/reference.html.jinja +3 -0
  73. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/type.html.jinja +62 -0
  74. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/type_alias.html.jinja +67 -0
  75. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/_base/variable.html.jinja +67 -0
  76. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/accessor.html.jinja +1 -0
  77. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/call_signature.html.jinja +1 -0
  78. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/children.html.jinja +1 -0
  79. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/class.html.jinja +1 -0
  80. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/constructor.html.jinja +1 -0
  81. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/constructor_signature.html.jinja +1 -0
  82. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/data.html.jinja +1 -0
  83. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/dispatch.html.jinja +1 -0
  84. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/enum.html.jinja +1 -0
  85. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/enum_member.html.jinja +1 -0
  86. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/function.html.jinja +1 -0
  87. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/interface.html.jinja +1 -0
  88. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/method.html.jinja +1 -0
  89. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/module.html.jinja +1 -0
  90. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/namespace.html.jinja +1 -0
  91. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/project.html.jinja +1 -0
  92. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/property.html.jinja +1 -0
  93. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/reference.html.jinja +1 -0
  94. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/style.css +275 -0
  95. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/type.html.jinja +1 -0
  96. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/type_alias.html.jinja +1 -0
  97. mkdocstrings_typescript-0.1.0/src/mkdocstrings_handlers/typescript/templates/material/variable.html.jinja +1 -0
  98. mkdocstrings_typescript-0.1.0/tests/__init__.py +1 -0
  99. mkdocstrings_typescript-0.1.0/tests/conftest.py +98 -0
  100. mkdocstrings_typescript-0.1.0/tests/test_api.py +189 -0
  101. mkdocstrings_typescript-0.1.0/tests/test_themes.py +41 -0
  102. mkdocstrings-typescript-0.0.0/PKG-INFO +0 -15
  103. mkdocstrings-typescript-0.0.0/README.md +0 -6
  104. mkdocstrings-typescript-0.0.0/mkdocstrings_typescript.egg-info/PKG-INFO +0 -15
  105. mkdocstrings-typescript-0.0.0/mkdocstrings_typescript.egg-info/SOURCES.txt +0 -6
  106. mkdocstrings-typescript-0.0.0/mkdocstrings_typescript.egg-info/dependency_links.txt +0 -1
  107. mkdocstrings-typescript-0.0.0/mkdocstrings_typescript.egg-info/top_level.txt +0 -1
  108. mkdocstrings-typescript-0.0.0/pyproject.toml +0 -8
  109. mkdocstrings-typescript-0.0.0/setup.cfg +0 -4
@@ -0,0 +1,47 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
+
8
+ <!-- insertion marker -->
9
+ ## [0.1.0](https://github.com/mkdocstrings/typescript/releases/tag/0.1.0) - 2025-03-24
10
+
11
+ <small>[Compare with 0.0.1](https://github.com/mkdocstrings/typescript/compare/0.0.1...0.1.0)</small>
12
+
13
+ **The project gets released to everyone!**
14
+
15
+ ### Build
16
+
17
+ - Depend on griffe-typedoc 0.1 ([7d09f9a](https://github.com/mkdocstrings/typescript/commit/7d09f9a380a844296739e7eaad3554095af0400a) by Timothée Mazzucotelli).
18
+ - Require Python 3.10 minimum ([1e5c521](https://github.com/mkdocstrings/typescript/commit/1e5c52140635bbd32d03aeaf7da6badeedef29c8) by Timothée Mazzucotelli).
19
+ - Depend on mkdocstrings 0.28.3 ([c5bf04e](https://github.com/mkdocstrings/typescript/commit/c5bf04e063f12a0cf94e8164af29b9b986acb887) by Timothée Mazzucotelli).
20
+
21
+ ### Features
22
+
23
+ - Declare and use symbols for all kinds of objects ([a2392aa](https://github.com/mkdocstrings/typescript/commit/a2392aaa8db99b468d70b7280584b96eb12c7ad9) by Timothée Mazzucotelli).
24
+ - Support specifying an object path ([9b32feb](https://github.com/mkdocstrings/typescript/commit/9b32febbe0ad880eae3117d631db481ff344d16f) by Timothée Mazzucotelli). [Issue-22](https://github.com/mkdocstrings/typescript/issues/22)
25
+ - Pass symbol map to `markdown` method of objects, to allow generating autorefs ([3324c2a](https://github.com/mkdocstrings/typescript/commit/3324c2adc62be8e44106f89169822e360d64c35e) by Timothée Mazzucotelli). [Issue-5](https://github.com/mkdocstrings/typescript/issues/5)
26
+ - Suffix templates with jinja extension, add templates for enum, enum member, class and constructor ([49fcd56](https://github.com/mkdocstrings/typescript/commit/49fcd566b6d4e74f2bd4681829181be69f8edd05) by Timothée Mazzucotelli). [Issue-3](https://github.com/mkdocstrings/typescript/issues/3), [Issue-4](https://github.com/mkdocstrings/typescript/issues/4)
27
+ - Generate project with gh:mkdocstrings/handler-template Copier template ([79a9244](https://github.com/mkdocstrings/typescript/commit/79a924496d190642e58d127f8b29640c81041c3f) by Timothée Mazzucotelli).
28
+
29
+ ### Bug Fixes
30
+
31
+ - Add templates for projects ([9648248](https://github.com/mkdocstrings/typescript/commit/9648248efac8d1b0ecccce6bdec5e7882eaabdc8) by Timothée Mazzucotelli).
32
+ - Add templates for namespaces ([277af0f](https://github.com/mkdocstrings/typescript/commit/277af0f7deab48c1d492e8e109c25a978bb43434) by Timothée Mazzucotelli). [Issue-mkdocstrings/typescript#16](https://github.com/mkdocstrings/typescript/issues/16)
33
+ - Add templates for accessors ([57405cb](https://github.com/mkdocstrings/typescript/commit/57405cba0a2652cf21acdb89865cee29fbfff0ca) by Timothée Mazzucotelli). [Issue-13](https://github.com/mkdocstrings/typescript/issues/13)
34
+ - Collect project anyway, not just its children ([3895e88](https://github.com/mkdocstrings/typescript/commit/3895e8812a731d075e5fbba4c771ecaebaa6af65) by Timothée Mazzucotelli). [Issue-2](https://github.com/mkdocstrings/typescript/issues/2)
35
+
36
+ ### Code Refactoring
37
+
38
+ - Import from top-level mkdocstrings module ([a16da56](https://github.com/mkdocstrings/typescript/commit/a16da568a1d0cbd3d3099b62569211086a071313) by Timothée Mazzucotelli).
39
+ - Improve support for signatures rendering (wip) ([bcbc314](https://github.com/mkdocstrings/typescript/commit/bcbc314203c6b9da24ca46a3db1536a61cffb3f3) by Timothée Mazzucotelli).
40
+
41
+ ## [0.0.1](https://github.com/mkdocstrings/typescript/releases/tag/0.0.1) - 2024-05-08
42
+
43
+ <small>[Compare with first commit](https://github.com/mkdocstrings/typescript/compare/00cd6f133945a103d9e71cc6b413c0738a07f9d1...0.0.1)</small>
44
+
45
+ ### Build
46
+
47
+ - Release no-op version ([04dfa30](https://github.com/mkdocstrings/typescript/commit/04dfa30942014a113806f9ad5981718a620a6532) by Timothée Mazzucotelli).
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or advances of any kind
22
+ * Trolling, insulting or derogatory comments, and personal or political attacks
23
+ * Public or private harassment
24
+ * Publishing others' private information, such as a physical or email address, without their explicit permission
25
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
26
+
27
+ ## Enforcement Responsibilities
28
+
29
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ Community leaders 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, and will communicate reasons for moderation decisions when appropriate.
32
+
33
+ ## Scope
34
+
35
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36
+
37
+ ## Enforcement
38
+
39
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at dev@pawamoy.fr. All complaints will be reviewed and investigated promptly and fairly.
40
+
41
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42
+
43
+ ## Enforcement Guidelines
44
+
45
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46
+
47
+ ### 1. Correction
48
+
49
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50
+
51
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52
+
53
+ ### 2. Warning
54
+
55
+ **Community Impact**: A violation through a single incident or series of actions.
56
+
57
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58
+
59
+ ### 3. Temporary Ban
60
+
61
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62
+
63
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64
+
65
+ ### 4. Permanent Ban
66
+
67
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68
+
69
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
70
+
71
+ ## Attribution
72
+
73
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
74
+
75
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
76
+
77
+ For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
78
+
79
+ [homepage]: https://www.contributor-covenant.org
80
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
81
+ [Mozilla CoC]: https://github.com/mozilla/diversity
82
+ [FAQ]: https://www.contributor-covenant.org/faq
83
+ [translations]: https://www.contributor-covenant.org/translations
84
+
@@ -0,0 +1,120 @@
1
+ # Contributing
2
+
3
+ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
4
+
5
+ ## Environment setup
6
+
7
+ Nothing easier!
8
+
9
+ Fork and clone the repository, then:
10
+
11
+ ```bash
12
+ cd typescript
13
+ make setup
14
+ ```
15
+
16
+ > NOTE: If it fails for some reason, you'll need to install [uv](https://github.com/astral-sh/uv) manually.
17
+ >
18
+ > You can install it with:
19
+ >
20
+ > ```bash
21
+ > curl -LsSf https://astral.sh/uv/install.sh | sh
22
+ > ```
23
+ >
24
+ > Now you can try running `make setup` again, or simply `uv sync`.
25
+
26
+ You now have the dependencies installed.
27
+
28
+ Run `make help` to see all the available actions!
29
+
30
+ ## Tasks
31
+
32
+ The entry-point to run commands and tasks is the `make` Python script, located in the `scripts` directory. Try running `make` to show the available commands and tasks. The *commands* do not need the Python dependencies to be installed,
33
+ while the *tasks* do. The cross-platform tasks are written in Python, thanks to [duty](https://github.com/pawamoy/duty).
34
+
35
+ If you work in VSCode, we provide [an action to configure VSCode](https://pawamoy.github.io/copier-uv/work/#vscode-setup) for the project.
36
+
37
+ ## Development
38
+
39
+ As usual:
40
+
41
+ 1. create a new branch: `git switch -c feature-or-bugfix-name`
42
+ 1. edit the code and/or the documentation
43
+
44
+ **Before committing:**
45
+
46
+ 1. run `make format` to auto-format the code
47
+ 1. run `make check` to check everything (fix any warning)
48
+ 1. run `make test` to run the tests (fix any issue)
49
+ 1. if you updated the documentation or the project dependencies:
50
+ 1. run `make docs`
51
+ 1. go to http://localhost:8000 and check that everything looks good
52
+ 1. follow our [commit message convention](#commit-message-convention)
53
+
54
+ If you are unsure about how to fix or ignore a warning, just let the continuous integration fail, and we will help you during review.
55
+
56
+ Don't bother updating the changelog, we will take care of this.
57
+
58
+ ## Commit message convention
59
+
60
+ Commit messages must follow our convention based on the [Angular style](https://gist.github.com/stephenparish/9941e89d80e2bc58a153#format-of-the-commit-message) or the [Karma convention](https://karma-runner.github.io/4.0/dev/git-commit-msg.html):
61
+
62
+ ```
63
+ <type>[(scope)]: Subject
64
+
65
+ [Body]
66
+ ```
67
+
68
+ **Subject and body must be valid Markdown.** Subject must have proper casing (uppercase for first letter if it makes sense), but no dot at the end, and no punctuation in general.
69
+
70
+ Scope and body are optional. Type can be:
71
+
72
+ - `build`: About packaging, building wheels, etc.
73
+ - `chore`: About packaging or repo/files management.
74
+ - `ci`: About Continuous Integration.
75
+ - `deps`: Dependencies update.
76
+ - `docs`: About documentation.
77
+ - `feat`: New feature.
78
+ - `fix`: Bug fix.
79
+ - `perf`: About performance.
80
+ - `refactor`: Changes that are not features or bug fixes.
81
+ - `style`: A change in code style/format.
82
+ - `tests`: About tests.
83
+
84
+ If you write a body, please add trailers at the end (for example issues and PR references, or co-authors), without relying on GitHub's flavored Markdown:
85
+
86
+ ```
87
+ Body.
88
+
89
+ Issue #10: https://github.com/namespace/project/issues/10
90
+ Related to PR namespace/other-project#15: https://github.com/namespace/other-project/pull/15
91
+ ```
92
+
93
+ These "trailers" must appear at the end of the body, without any blank lines between them. The trailer title can contain any character except colons `:`. We expect a full URI for each trailer, not just GitHub autolinks (for example, full GitHub URLs for commits and issues, not the hash or the #issue-number).
94
+
95
+ We do not enforce a line length on commit messages summary and body, but please avoid very long summaries, and very long lines in the body, unless they are part of code blocks that must not be wrapped.
96
+
97
+ ## Pull requests guidelines
98
+
99
+ Link to any related issue in the Pull Request message.
100
+
101
+ During the review, we recommend using fixups:
102
+
103
+ ```bash
104
+ # SHA is the SHA of the commit you want to fix
105
+ git commit --fixup=SHA
106
+ ```
107
+
108
+ Once all the changes are approved, you can squash your commits:
109
+
110
+ ```bash
111
+ git rebase -i --autosquash main
112
+ ```
113
+
114
+ And force-push:
115
+
116
+ ```bash
117
+ git push -f
118
+ ```
119
+
120
+ If this seems all too complicated, you can push or force-push each new commit, and we will squash them ourselves if needed, before merging.
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2023, Timothée Mazzucotelli
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.4
2
+ Name: mkdocstrings-typescript
3
+ Version: 0.1.0
4
+ Summary: A Typescript handler for mkdocstrings.
5
+ Author-Email: =?utf-8?q?Timoth=C3=A9e_Mazzucotelli?= <dev@pawamoy.fr>
6
+ License-Expression: ISC
7
+ License-File: LICENSE
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Topic :: Documentation
19
+ Classifier: Topic :: Software Development
20
+ Classifier: Topic :: Utilities
21
+ Classifier: Typing :: Typed
22
+ Project-URL: Homepage, https://mkdocstrings.github.io/typescript
23
+ Project-URL: Documentation, https://mkdocstrings.github.io/typescript
24
+ Project-URL: Changelog, https://mkdocstrings.github.io/typescript/changelog
25
+ Project-URL: Repository, https://github.com/mkdocstrings/typescript
26
+ Project-URL: Issues, https://github.com/mkdocstrings/typescript/issues
27
+ Project-URL: Discussions, https://github.com/mkdocstrings/typescript/discussions
28
+ Project-URL: Gitter, https://gitter.im/mkdocstrings/typescript
29
+ Project-URL: Funding, https://github.com/sponsors/pawamoy
30
+ Requires-Python: >=3.10
31
+ Requires-Dist: mkdocstrings>=0.28.3
32
+ Requires-Dist: griffe-typedoc>=0.1
33
+ Description-Content-Type: text/markdown
34
+
35
+ # mkdocstrings-typescript
36
+
37
+ [![ci](https://github.com/mkdocstrings/typescript/workflows/ci/badge.svg)](https://github.com/mkdocstrings/typescript/actions?query=workflow%3Aci)
38
+ [![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://mkdocstrings.github.io/typescript/)
39
+ [![pypi version](https://img.shields.io/pypi/v/mkdocstrings-typescript.svg)](https://pypi.org/project/mkdocstrings-typescript/)
40
+ [![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#typescript:gitter.im)
41
+
42
+ A Typescript handler for mkdocstrings.
43
+
44
+ WARNING: **Still in prototyping phase!**
45
+ Feedback is welcome.
46
+
47
+ ## Installation
48
+
49
+ ```bash
50
+ pip install mkdocstrings-typescript
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ Add these [TypeDoc](https://typedoc.org/) configuration files to your repository:
56
+
57
+ ```tree hl_lines="4 5"
58
+ ./
59
+ src/
60
+ package1/
61
+ typedoc.base.json
62
+ typedoc.json
63
+ ```
64
+
65
+ ```json title="typedoc.base.json"
66
+ {
67
+ "$schema": "https://typedoc.org/schema.json",
68
+ "includeVersion": true
69
+ }
70
+ ```
71
+
72
+ ```json title="typedoc.json"
73
+ {
74
+ "extends": ["./typedoc.base.json"],
75
+ "entryPointStrategy": "packages",
76
+ "entryPoints": ["./src/*"]
77
+ }
78
+ ```
79
+
80
+ Update the entrypoints to match your file layout so that TypeDoc can find your packages. See [TypeDoc's configuration documentation](https://typedoc.org/options/configuration/).
81
+
82
+ Then in each of your package, add this TypeDoc configuration file:
83
+
84
+ ```tree hl_lines="4"
85
+ ./
86
+ src/
87
+ package1/
88
+ typedoc.json
89
+ typedoc.base.json
90
+ typedoc.json
91
+ ```
92
+
93
+ ```json title="typedoc.json"
94
+ {
95
+ "extends": ["../../typedoc.base.json"],
96
+ "entryPointStrategy": "expand",
97
+ "entryPoints": ["src/index.d.ts"]
98
+ }
99
+ ```
100
+
101
+ Again, update entrypoints to match your file and package layout. See [TypeDoc's configuration documentation](https://typedoc.org/options/configuration/).
102
+
103
+ **Your packages must be built for TypeDoc to work.**
104
+
105
+ You are now able to use the TypeScript handler to inject API docs in your Markdown pages by referencing package names:
106
+
107
+ ```md
108
+ ::: @owner/packageName
109
+ handler: typescript
110
+ ```
111
+
112
+ You can set the Typescript handler as default handler:
113
+
114
+ ```yaml
115
+ plugins:
116
+ - mkdocstrings:
117
+ default_handler: typescript
118
+ ```
119
+
120
+ By setting it as default handler you can omit it when injecting documentation:
121
+
122
+ ```md
123
+ ::: @owner/packageName
124
+ ```
@@ -0,0 +1,90 @@
1
+ # mkdocstrings-typescript
2
+
3
+ [![ci](https://github.com/mkdocstrings/typescript/workflows/ci/badge.svg)](https://github.com/mkdocstrings/typescript/actions?query=workflow%3Aci)
4
+ [![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://mkdocstrings.github.io/typescript/)
5
+ [![pypi version](https://img.shields.io/pypi/v/mkdocstrings-typescript.svg)](https://pypi.org/project/mkdocstrings-typescript/)
6
+ [![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#typescript:gitter.im)
7
+
8
+ A Typescript handler for mkdocstrings.
9
+
10
+ WARNING: **Still in prototyping phase!**
11
+ Feedback is welcome.
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ pip install mkdocstrings-typescript
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ Add these [TypeDoc](https://typedoc.org/) configuration files to your repository:
22
+
23
+ ```tree hl_lines="4 5"
24
+ ./
25
+ src/
26
+ package1/
27
+ typedoc.base.json
28
+ typedoc.json
29
+ ```
30
+
31
+ ```json title="typedoc.base.json"
32
+ {
33
+ "$schema": "https://typedoc.org/schema.json",
34
+ "includeVersion": true
35
+ }
36
+ ```
37
+
38
+ ```json title="typedoc.json"
39
+ {
40
+ "extends": ["./typedoc.base.json"],
41
+ "entryPointStrategy": "packages",
42
+ "entryPoints": ["./src/*"]
43
+ }
44
+ ```
45
+
46
+ Update the entrypoints to match your file layout so that TypeDoc can find your packages. See [TypeDoc's configuration documentation](https://typedoc.org/options/configuration/).
47
+
48
+ Then in each of your package, add this TypeDoc configuration file:
49
+
50
+ ```tree hl_lines="4"
51
+ ./
52
+ src/
53
+ package1/
54
+ typedoc.json
55
+ typedoc.base.json
56
+ typedoc.json
57
+ ```
58
+
59
+ ```json title="typedoc.json"
60
+ {
61
+ "extends": ["../../typedoc.base.json"],
62
+ "entryPointStrategy": "expand",
63
+ "entryPoints": ["src/index.d.ts"]
64
+ }
65
+ ```
66
+
67
+ Again, update entrypoints to match your file and package layout. See [TypeDoc's configuration documentation](https://typedoc.org/options/configuration/).
68
+
69
+ **Your packages must be built for TypeDoc to work.**
70
+
71
+ You are now able to use the TypeScript handler to inject API docs in your Markdown pages by referencing package names:
72
+
73
+ ```md
74
+ ::: @owner/packageName
75
+ handler: typescript
76
+ ```
77
+
78
+ You can set the Typescript handler as default handler:
79
+
80
+ ```yaml
81
+ plugins:
82
+ - mkdocstrings:
83
+ default_handler: typescript
84
+ ```
85
+
86
+ By setting it as default handler you can omit it when injecting documentation:
87
+
88
+ ```md
89
+ ::: @owner/packageName
90
+ ```
@@ -0,0 +1,25 @@
1
+ [coverage:run]
2
+ branch = true
3
+ parallel = true
4
+ source =
5
+ src/
6
+ tests/
7
+
8
+ [coverage:paths]
9
+ equivalent =
10
+ src/
11
+ .venv/lib/*/site-packages/
12
+ .venvs/*/lib/*/site-packages/
13
+
14
+ [coverage:report]
15
+ precision = 2
16
+ omit =
17
+ src/*/__init__.py
18
+ src/*/__main__.py
19
+ tests/__init__.py
20
+ exclude_lines =
21
+ pragma: no cover
22
+ if TYPE_CHECKING
23
+
24
+ [coverage:json]
25
+ output = htmlcov/coverage.json
@@ -0,0 +1,9 @@
1
+ bump = "auto"
2
+ convention = "angular"
3
+ in-place = true
4
+ output = "CHANGELOG.md"
5
+ parse-refs = false
6
+ parse-trailers = true
7
+ sections = ["build", "deps", "feat", "fix", "refactor"]
8
+ template = "keepachangelog"
9
+ versioning = "pep440"
@@ -0,0 +1,7 @@
1
+ [mypy]
2
+ ignore_missing_imports = true
3
+ exclude = tests/fixtures/
4
+ warn_unused_ignores = true
5
+ show_error_codes = true
6
+ namespace_packages = true
7
+ explicit_package_bases = true
@@ -0,0 +1,14 @@
1
+ [pytest]
2
+ python_files =
3
+ test_*.py
4
+ addopts =
5
+ --cov
6
+ --cov-config config/coverage.ini
7
+ testpaths =
8
+ tests
9
+
10
+ # action:message_regex:warning_class:module_regex:line
11
+ filterwarnings =
12
+ error
13
+ # TODO: remove once pytest-xdist 4 is released
14
+ ignore:.*rsyncdir:DeprecationWarning:xdist
@@ -0,0 +1,91 @@
1
+ target-version = "py39"
2
+ line-length = 120
3
+
4
+ [lint]
5
+ exclude = [
6
+ "tests/fixtures/*.py",
7
+ ]
8
+ select = [
9
+ "A", "ANN", "ARG",
10
+ "B", "BLE",
11
+ "C", "C4",
12
+ "COM",
13
+ "D", "DTZ",
14
+ "E", "ERA", "EXE",
15
+ "F", "FBT",
16
+ "G",
17
+ "I", "ICN", "INP", "ISC",
18
+ "N",
19
+ "PGH", "PIE", "PL", "PLC", "PLE", "PLR", "PLW", "PT", "PYI",
20
+ "Q",
21
+ "RUF", "RSE", "RET",
22
+ "S", "SIM", "SLF",
23
+ "T", "T10", "T20", "TCH", "TID", "TRY",
24
+ "UP",
25
+ "W",
26
+ "YTT",
27
+ ]
28
+ ignore = [
29
+ "A001", # Variable is shadowing a Python builtin
30
+ "ANN101", # Missing type annotation for self
31
+ "ANN102", # Missing type annotation for cls
32
+ "ANN204", # Missing return type annotation for special method __str__
33
+ "ANN401", # Dynamically typed expressions (typing.Any) are disallowed
34
+ "ARG005", # Unused lambda argument
35
+ "C901", # Too complex
36
+ "D105", # Missing docstring in magic method
37
+ "D417", # Missing argument description in the docstring
38
+ "E501", # Line too long
39
+ "ERA001", # Commented out code
40
+ "G004", # Logging statement uses f-string
41
+ "PLR0911", # Too many return statements
42
+ "PLR0912", # Too many branches
43
+ "PLR0913", # Too many arguments to function call
44
+ "PLR0915", # Too many statements
45
+ "SLF001", # Private member accessed
46
+ "TRY003", # Avoid specifying long messages outside the exception class
47
+ ]
48
+
49
+ [lint.per-file-ignores]
50
+ "src/**/cli.py" = [
51
+ "T201", # Print statement
52
+ ]
53
+ "src/*/debug.py" = [
54
+ "T201", # Print statement
55
+ ]
56
+ "!src/*/*.py" = [
57
+ "D100", # Missing docstring in public module
58
+ ]
59
+ "!src/**.py" = [
60
+ "D101", # Missing docstring in public class
61
+ "D103", # Missing docstring in public function
62
+ ]
63
+ "scripts/*.py" = [
64
+ "INP001", # File is part of an implicit namespace package
65
+ "T201", # Print statement
66
+ ]
67
+ "tests/**.py" = [
68
+ "ARG005", # Unused lambda argument
69
+ "FBT001", # Boolean positional arg in function definition
70
+ "PLR2004", # Magic value used in comparison
71
+ "S101", # Use of assert detected
72
+ ]
73
+
74
+ [lint.flake8-quotes]
75
+ docstring-quotes = "double"
76
+
77
+ [lint.flake8-tidy-imports]
78
+ ban-relative-imports = "all"
79
+
80
+ [lint.isort]
81
+ known-first-party = ["mkdocstrings_handlers.typescript"]
82
+
83
+ [lint.pydocstyle]
84
+ convention = "google"
85
+
86
+ [format]
87
+ exclude = [
88
+ "tests/fixtures/*.py",
89
+ ]
90
+ docstring-code-format = true
91
+ docstring-code-line-length = 80