Conversation
Previously, a basic `Parent` from `@types/unist` was used for the third parameter of a visitor (`parent`). This changes that to instead use an array of descendants in `tree` which implement the abstract `Parent` interface and can have `node` as a child. Closes GH-30. Related-to: syntax-tree/unist-util-visit-parents#11.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5 tasks
kodiakhq bot
referenced
this pull request
in X-oss-byte/Nextjs
Oct 16, 2023
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [unist-util-visit](https://togithub.com/syntax-tree/unist-util-visit) | [`2.0.3` -> `5.0.0`](https://renovatebot.com/diffs/npm/unist-util-visit/2.0.3/5.0.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>syntax-tree/unist-util-visit (unist-util-visit)</summary> ### [`v5.0.0`](https://togithub.com/syntax-tree/unist-util-visit/releases/tag/5.0.0) [Compare Source](https://togithub.com/syntax-tree/unist-util-visit/compare/4.1.2...5.0.0) ##### Change - [`4dcff31`](https://togithub.com/syntax-tree/unist-util-visit/commit/4dcff31) Update `@types/unist` **migrate**: update too - [`befc0b3`](https://togithub.com/syntax-tree/unist-util-visit/commit/befc0b3) Change to require Node.js 16 **migrate**: update too - [`b5f36de`](https://togithub.com/syntax-tree/unist-util-visit/commit/b5f36de) Change to use `export` map **migrate**: don’t use private APIs - [`89fc050`](https://togithub.com/syntax-tree/unist-util-visit/commit/89fc050) Change to remove `complex-types.d.ts` **migrate**: use main export - [`12c9ee9`](https://togithub.com/syntax-tree/unist-util-visit/commit/12c9ee9) Change to pass `undefined`, not `null` **migrate**: change `null` to `undefined` ##### Fix - [`3cb2732`](https://togithub.com/syntax-tree/unist-util-visit/commit/3cb2732) Fix performance of `InclusiveDescendant` type **Full Changelog**: syntax-tree/unist-util-visit@4.1.2...5.0.0 ### [`v4.1.2`](https://togithub.com/syntax-tree/unist-util-visit/releases/tag/4.1.2) [Compare Source](https://togithub.com/syntax-tree/unist-util-visit/compare/4.1.1...4.1.2) ##### Misc - [`332b6e0`](https://togithub.com/syntax-tree/unist-util-visit/commit/332b6e0) Add improved docs - [`754d038`](https://togithub.com/syntax-tree/unist-util-visit/commit/754d038) [`9f4813b`](https://togithub.com/syntax-tree/unist-util-visit/commit/9f4813b) Refactor code-style - [`69cbec6`](https://togithub.com/syntax-tree/unist-util-visit/commit/69cbec6) Update `tsconfig.json` **Full Changelog**: syntax-tree/unist-util-visit@4.1.1...4.1.2 ### [`v4.1.1`](https://togithub.com/syntax-tree/unist-util-visit/releases/tag/4.1.1) [Compare Source](https://togithub.com/syntax-tree/unist-util-visit/compare/4.1.0...4.1.1) - [`6742b2d`](https://togithub.com/syntax-tree/unist-util-visit/commit/6742b2d) Fix TypeScript `node16` and ESM by [@​alecmev](https://togithub.com/alecmev) in [https://github.com/syntax-tree/unist-util-visit/pull/35](https://togithub.com/syntax-tree/unist-util-visit/pull/35) - [`6789ad5`](https://togithub.com/syntax-tree/unist-util-visit/commit/6789ad5) Add improved docs - [`d190ee7`](https://togithub.com/syntax-tree/unist-util-visit/commit/d190ee7) Fix typo by [@​jangxyz](https://togithub.com/jangxyz) in [https://github.com/syntax-tree/unist-util-visit/pull/34](https://togithub.com/syntax-tree/unist-util-visit/pull/34) **Full Changelog**: syntax-tree/unist-util-visit@4.1.0...4.1.1 ### [`v4.1.0`](https://togithub.com/syntax-tree/unist-util-visit/releases/tag/4.1.0) [Compare Source](https://togithub.com/syntax-tree/unist-util-visit/compare/4.0.0...4.1.0) - [`a76200b`](https://togithub.com/syntax-tree/unist-util-visit/commit/a76200b) Add improved parent type by [@​wooorm](https://togithub.com/wooorm) in [https://github.com/syntax-tree/unist-util-visit/pull/31](https://togithub.com/syntax-tree/unist-util-visit/pull/31) **Full Changelog**: syntax-tree/unist-util-visit@4.0.0...4.1.0 ### [`v4.0.0`](https://togithub.com/syntax-tree/unist-util-visit/releases/tag/4.0.0) [Compare Source](https://togithub.com/syntax-tree/unist-util-visit/compare/3.1.0...4.0.0) - [`050fdc3`](https://togithub.com/syntax-tree/unist-util-visit/commit/050fdc3) Change types to base what `visitor` gets on `tree` (**breaking** if you use TypeScript, read commit for info) ### [`v3.1.0`](https://togithub.com/syntax-tree/unist-util-visit/releases/tag/3.1.0) [Compare Source](https://togithub.com/syntax-tree/unist-util-visit/compare/3.0.1...3.1.0) - [`5e98354`](https://togithub.com/syntax-tree/unist-util-visit/commit/5e98354) Add `VisitorResult` type ### [`v3.0.1`](https://togithub.com/syntax-tree/unist-util-visit/releases/tag/3.0.1) [Compare Source](https://togithub.com/syntax-tree/unist-util-visit/compare/3.0.0...3.0.1) - [`a14d311`](https://togithub.com/syntax-tree/unist-util-visit/commit/a14d311) Fix example to use ESM ### [`v3.0.0`](https://togithub.com/syntax-tree/unist-util-visit/releases/tag/3.0.0) [Compare Source](https://togithub.com/syntax-tree/unist-util-visit/compare/2.0.3...3.0.0) - [`ed0bccd`](https://togithub.com/syntax-tree/unist-util-visit/commit/ed0bccd) Add JSDoc based types - [`dfbcafb`](https://togithub.com/syntax-tree/unist-util-visit/commit/dfbcafb) Use ESM note: change from ~~`const visit = require('unist-util-visit')`~~ to `import {visit} from 'unist-util-visit'` </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Nextjs).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initial checklist
Description of changes
Add improved parent type
Previously, a basic
Parentfrom@types/unistwas used for the third parameter of a visitor (parent). This changes that to instead use an array of descendants intreewhich implement the abstractParentinterface and can havenodeas a child.Closes GH-30.
Related-to: syntax-tree/unist-util-visit-parents#11.
/cc @crossjs