Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow .tranform to work with Nodes from another parsed source file #1417

Merged
merged 2 commits into from Jun 14, 2023

Conversation

ivanhofer
Copy link
Contributor

closes #1416

@ivanhofer
Copy link
Contributor Author

A test fails. Somehow the changed code breaks something with JSDoc comments. Not sure how to fix this.
The fix sometimes also outputs the code with another formatting.

Copy link
Owner

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems pretty reasonable to do actually. Just needs to fallback to using the initial source file I think.

packages/ts-morph/src/compiler/ast/common/Node.ts Outdated Show resolved Hide resolved
Copy link
Owner

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@dsherret dsherret changed the title #1416: make tranform not forget about StringLiterals fix: allow .tranform to work with Nodes from another parsed source file Jun 14, 2023
@dsherret dsherret merged commit 225ff58 into dsherret:latest Jun 14, 2023
1 check passed
diegohaz pushed a commit to ariakit/ariakit that referenced this pull request Jul 4, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ts-morph](https://togithub.com/dsherret/ts-morph) | [`18.0.0` ->
`19.0.0`](https://renovatebot.com/diffs/npm/ts-morph/18.0.0/19.0.0) |
[![age](https://badges.renovateapi.com/packages/npm/ts-morph/19.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/ts-morph/19.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/ts-morph/19.0.0/compatibility-slim/18.0.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/ts-morph/19.0.0/confidence-slim/18.0.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>dsherret/ts-morph (ts-morph)</summary>

###
[`v19.0.0`](https://togithub.com/dsherret/ts-morph/releases/tag/19.0.0)

[Compare
Source](https://togithub.com/dsherret/ts-morph/compare/18.0.0...19.0.0)

#### What's Changed

- docs: add deno installation method by
[@&#8203;scarf005](https://togithub.com/scarf005) in
[dsherret/ts-morph#1411
- feat: improve typing of `Type` by
[@&#8203;odiak](https://togithub.com/odiak) in
[dsherret/ts-morph#1408
- feat: add IsVoid method to `Type` by
[@&#8203;giuseppelt](https://togithub.com/giuseppelt) in
[dsherret/ts-morph#1398
- feat: add JSDocable to ExportAssignment by
[@&#8203;giuseppelt](https://togithub.com/giuseppelt) in
[dsherret/ts-morph#1397
- feat: upgrade to TS 5.1 by
[@&#8203;dsherret](https://togithub.com/dsherret) in
[dsherret/ts-morph#1415
- fix: allow `.tranform` to work with Nodes from another parsed source
file by [@&#8203;ivanhofer](https://togithub.com/ivanhofer) in
[dsherret/ts-morph#1417

#### New Contributors

- [@&#8203;scarf005](https://togithub.com/scarf005) made their first
contribution in
[dsherret/ts-morph#1411
- [@&#8203;odiak](https://togithub.com/odiak) made their first
contribution in
[dsherret/ts-morph#1408
- [@&#8203;giuseppelt](https://togithub.com/giuseppelt) made their first
contribution in
[dsherret/ts-morph#1398
- [@&#8203;ivanhofer](https://togithub.com/ivanhofer) made their first
contribution in
[dsherret/ts-morph#1417

**Full Changelog**:
dsherret/ts-morph@18.0.0...19.0.0

</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.

---

- [ ] <!-- rebase-check -->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/ariakit/ariakit).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNDQuMiIsInVwZGF0ZWRJblZlciI6IjM1LjE0NC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

transform looses StringLiteral nodes
2 participants