diff --git a/CHANGELOG.md b/CHANGELOG.md index 48776f4..5693735 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to the "svelte-intellisense" extension will be documented in Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. +## [4.1.0] 19.02.2021 + +- 🎉 **[Misc]** Update the ReadMe by [@soft-decay](https://github.com/soft-decay). +- ✔ **[Added]** Implement support of imported types parsing, f.ex. `@type {import('../typings.d.ts').ExternalTypeClass}`. In order to do this, new field `importPath` introduced to `JSDocType`, in the name property now it returns imported class name, f.ex.: `ExternalTypeClass`. +- 🛠 **[Fixed]** Complete fix of [Issue #1](https://github.com/alexprey/sveltedoc-parser/issues/1): Support parsing event names from top-level constant objects with accessing to their properties by naming strings. Introduce the new issue [Issue #48](https://github.com/alexprey/sveltedoc-parser/issues/48) about supporting parse of event names by external references. +- 🛠 **[Fixed]** Fix the [Issue #47](https://github.com/alexprey/sveltedoc-parser/issues/48), now all comments in markup are parsed correctly and attached to required items in document. Support JSDoc comment markup parsing in all places where comment can be used. +- 🛠 **[Fixed]** Fix the [Issue #61](https://github.com/alexprey/sveltedoc-parser/issues/61), now slot parameter items enrich with all detailed information that was parsed from markup comment. +- 🛠 **[Fixed]** Spec: add the module definition typings to `typings.d.ts` file. +- 🛠 **[Fixed]** Fix some edge-cases in script parsing logic. +- 🛠 **[Tech]** Refactor internal parser logic to make it easy to introduce new features, moves forward to TS support! ;) +- 🔥 **[Breaking]** Spec: change the `SvelteSlotParameter` definition, to support `name`, `description`, `type` fields, instead of many not relevant fields that was inherited from `ISvelteItem` interface. +- 🔥 **[Breaking]** Spec: change the `SvelteSlotItem` definition, to improve consistency: + - Rename `parameters` property to `params` to be most likely the same as `SvelteMethodItem`. Old field still available until 5.* release. + +Thanks a lot [@soft-decay](https://github.com/soft-decay) for contributing in this release! + ## [4.0.0] 25.01.2021 - 🛠 **[Fixed]** Fix [Issue #42](https://github.com/alexprey/sveltedoc-parser/issues/42) diff --git a/README.md b/README.md index 8c3fdd0..73c9cbd 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Generate a JSON documentation for a Svelte file. ## Table of Contents - [Changelog](#changelog) + - [[4.1.0] 19.02.2021](#410-19022021) - [[4.0.0] 25.01.2021](#400-25012021) - [Install](#install) - [Features](#features) @@ -27,6 +28,22 @@ Generate a JSON documentation for a Svelte file. ## Changelog +### [4.1.0] 19.02.2021 + +- 🎉 **[Misc]** Update the ReadMe by [@soft-decay](https://github.com/soft-decay). +- ✔ **[Added]** Implement support of imported types parsing, f.ex. `@type {import('../typings.d.ts').ExternalTypeClass}`. In order to do this, new field `importPath` introduced to `JSDocType`, in the name property now it returns imported class name, f.ex.: `ExternalTypeClass`. +- 🛠 **[Fixed]** Complete fix of [Issue #1](https://github.com/alexprey/sveltedoc-parser/issues/1): Support parsing event names from top-level constant objects with accessing to their properties by naming strings. Introduce the new issue [Issue #48](https://github.com/alexprey/sveltedoc-parser/issues/48) about supporting parse of event names by external references. +- 🛠 **[Fixed]** Fix the [Issue #47](https://github.com/alexprey/sveltedoc-parser/issues/48), now all comments in markup are parsed correctly and attached to required items in document. Support JSDoc comment markup parsing in all places where comment can be used. +- 🛠 **[Fixed]** Fix the [Issue #61](https://github.com/alexprey/sveltedoc-parser/issues/61), now slot parameter items enrich with all detailed information that was parsed from markup comment. +- 🛠 **[Fixed]** Spec: add the module definition typings to `typings.d.ts` file. +- 🛠 **[Fixed]** Fix some edge-cases in script parsing logic. +- 🛠 **[Tech]** Refactor internal parser logic to make it easy to introduce new features, moves forward to TS support! ;) +- 🔥 **[Breaking]** Spec: change the `SvelteSlotParameter` definition, to support `name`, `description`, `type` fields, instead of many not relevant fields that was inherited from `ISvelteItem` interface. +- 🔥 **[Breaking]** Spec: change the `SvelteSlotItem` definition, to improve consistency: + - Rename `parameters` property to `params` to be most likely the same as `SvelteMethodItem`. Old field still available until 5.* release. + +Thanks a lot [@soft-decay](https://github.com/soft-decay) for contributing in this release! + ### [4.0.0] 25.01.2021 - 🛠 **[Fixed]** Fix [Issue #42](https://github.com/alexprey/sveltedoc-parser/issues/42) @@ -207,7 +224,7 @@ Found a new issue? Please contribute and write a detailed description [here](htt Author [Alexey Mulyukin](https://github.com/alexprey) -Based on [Vuedoc Parser](https://gitlab.com/vuedoc/parser) +Inspired by [Vuedoc Parser](https://gitlab.com/vuedoc/parser) ## License diff --git a/examples/Alert.json b/examples/Alert.json index 35500c4..0f54c10 100644 --- a/examples/Alert.json +++ b/examples/Alert.json @@ -86,10 +86,10 @@ ], "slots": [ { - "name": "default", - "description": "The internal content of the alert block.", + "keywords": [], "visibility": "public", - "parameters": [] + "description": "The internal content of the alert block.", + "name": "default" } ], "refs": [] diff --git a/examples/Button.json b/examples/Button.json index 0b7a393..48459ef 100644 --- a/examples/Button.json +++ b/examples/Button.json @@ -180,13 +180,13 @@ ], "events": [ { + "keywords": [], + "visibility": "public", + "description": "", "name": "click", "parent": "button", "modificators": [], - "locations": null, - "visibility": "public", - "description": "", - "keywords": [] + "locations": null } ], "slots": [], diff --git a/examples/SlotList.json b/examples/SlotList.json index 90c4623..2496094 100644 --- a/examples/SlotList.json +++ b/examples/SlotList.json @@ -25,21 +25,45 @@ "events": [], "slots": [ { - "name": "default", - "description": "Render the one item markup based on data passed in slot property.\n @param {GenericListItem} prop The item of the list that should be rendered.", + "keywords": [ + { + "name": "param", + "description": "{GenericListItem} prop The item of the list that should be rendered." + } + ], "visibility": "public", + "description": "Render the one item markup based on data passed in slot property.", + "name": "default", + "params": [ + { + "type": { + "kind": "type", + "text": "GenericListItem", + "type": "GenericListItem" + }, + "name": "prop", + "description": "The item of the list that should be rendered.", + "optional": false + } + ], "parameters": [ { + "type": { + "kind": "type", + "text": "GenericListItem", + "type": "GenericListItem" + }, "name": "prop", - "visibility": "public" + "description": "The item of the list that should be rendered.", + "optional": false } ] }, { - "name": "empty", - "description": null, + "keywords": [], "visibility": "public", - "parameters": [] + "description": "", + "name": "empty" } ], "refs": [] diff --git a/package.json b/package.json index f4310eb..ca1692d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sveltedoc-parser", - "version": "4.0.1", + "version": "4.1.0", "description": "Generate a JSON documentation for a Svelte file", "main": "index.js", "types": "./typings.d.ts",