From 8c6a2e7c759dfb97a9cd59a9dfbab02a94da44ce Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 20:54:35 -0400 Subject: [PATCH] chore(deps): update dependency ts-morph to v23 (#90) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![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) | [`16.0.0` -> `23.0.0`](https://renovatebot.com/diffs/npm/ts-morph/16.0.0/23.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/ts-morph/23.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/ts-morph/23.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/ts-morph/16.0.0/23.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/ts-morph/16.0.0/23.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
dsherret/ts-morph (ts-morph) ### [`v23.0.0`](https://togithub.com/dsherret/ts-morph/releases/tag/23.0.0) [Compare Source](https://togithub.com/dsherret/ts-morph/compare/22.0.0...23.0.0) #### What's Changed - feat: ts 5.5 by [@​dsherret](https://togithub.com/dsherret) in [https://github.com/dsherret/ts-morph/pull/1545](https://togithub.com/dsherret/ts-morph/pull/1545) - feat: Type.prototype.isBigInt and isBigIntLiteral by [@​dsherret](https://togithub.com/dsherret) in [https://github.com/dsherret/ts-morph/pull/1546](https://togithub.com/dsherret/ts-morph/pull/1546) - fix: handle removeDefaultImport with type only import by [@​dsherret](https://togithub.com/dsherret) in [https://github.com/dsherret/ts-morph/pull/1547](https://togithub.com/dsherret/ts-morph/pull/1547) Now available on JSR for use in Deno: https://jsr.io/[@​ts-morph/ts-morph](https://togithub.com/ts-morph/ts-morph) **Full Changelog**: https://github.com/dsherret/ts-morph/compare/22.0.0...23.0.0 ### [`v22.0.0`](https://togithub.com/dsherret/ts-morph/releases/tag/22.0.0) [Compare Source](https://togithub.com/dsherret/ts-morph/compare/21.0.1...22.0.0) #### What's Changed - feat(BREAKING): upgrade to TypeScript 5.4 by [@​dsherret](https://togithub.com/dsherret) in [https://github.com/dsherret/ts-morph/pull/1516](https://togithub.com/dsherret/ts-morph/pull/1516) - fix(BREAKING): `Node.prototype.forgetDescendants()` no longer returns self by [@​dsherret](https://togithub.com/dsherret) in [https://github.com/dsherret/ts-morph/pull/1515](https://togithub.com/dsherret/ts-morph/pull/1515) - feat: `Type.prototype.isAssignableTo` by [@​dsherret](https://togithub.com/dsherret) in [https://github.com/dsherret/ts-morph/pull/1517](https://togithub.com/dsherret/ts-morph/pull/1517) - feat: `TypeChecker.prototype.resolveName` by [@​dsherret](https://togithub.com/dsherret) in [https://github.com/dsherret/ts-morph/pull/1518](https://togithub.com/dsherret/ts-morph/pull/1518) - fix: MethodDeclarationStructure should write an asterisk isGenerator = true by [@​ajvincent](https://togithub.com/ajvincent) in [https://github.com/dsherret/ts-morph/pull/1502](https://togithub.com/dsherret/ts-morph/pull/1502) - docs: fix typo in adding-source-files.md by [@​ilirbeqirii](https://togithub.com/ilirbeqirii) in [https://github.com/dsherret/ts-morph/pull/1490](https://togithub.com/dsherret/ts-morph/pull/1490) - feat: ClassDeclarationStructure - support static blocks by [@​dsherret](https://togithub.com/dsherret) in [https://github.com/dsherret/ts-morph/pull/1520](https://togithub.com/dsherret/ts-morph/pull/1520) ##### CodeBlockWriter 13.0.1 People may have been working around these bugs in the past: - `.quote()` - should include newline on newline ([https://github.com/dsherret/code-block-writer/pull/47](https://togithub.com/dsherret/code-block-writer/pull/47)) - `.quote()` - escape characters were not always being escaped ([https://github.com/dsherret/code-block-writer/pull/46](https://togithub.com/dsherret/code-block-writer/pull/46)) #### New Contributors - [@​ilirbeqirii](https://togithub.com/ilirbeqirii) made their first contribution in [https://github.com/dsherret/ts-morph/pull/1490](https://togithub.com/dsherret/ts-morph/pull/1490) **Full Changelog**: https://github.com/dsherret/ts-morph/compare/21.0.1...22.0.0 ### [`v21.0.1`](https://togithub.com/dsherret/ts-morph/releases/tag/21.0.1) [Compare Source](https://togithub.com/dsherret/ts-morph/compare/21.0.0...21.0.1) I forgot to run a code generation script to update some code for the 21.0.0 release and only realized after. This release fixes that and also reduces the chance of that happening in the future. For 21.0.0 release notes, see https://github.com/dsherret/ts-morph/releases/tag/21.0.0 **Full Changelog**: https://github.com/dsherret/ts-morph/compare/21.0.0...21.0.1 ### [`v21.0.0`](https://togithub.com/dsherret/ts-morph/releases/tag/21.0.0) [Compare Source](https://togithub.com/dsherret/ts-morph/compare/20.0.0...21.0.0) #### What's Changed - feat: `ProjectOptions::defaultCompilerOptions` by [@​wojpawlik](https://togithub.com/wojpawlik) in [https://github.com/dsherret/ts-morph/pull/1460](https://togithub.com/dsherret/ts-morph/pull/1460) - feat: TypeScript 5.3 [https://github.com/dsherret/ts-morph/pull/1476](https://togithub.com/dsherret/ts-morph/pull/1476) - feat: add interface and type literal getters & setters by [@​ajvincent](https://togithub.com/ajvincent) in [https://github.com/dsherret/ts-morph/pull/1473](https://togithub.com/dsherret/ts-morph/pull/1473) - feat: add wrapped method for `getShorthandAssignmentValueSymbol` to `TypeChecker`. add convenience method for getting the value symbol on `ShorthandPropertyAssignment`. by [@​kronodeus](https://togithub.com/kronodeus) in [https://github.com/dsherret/ts-morph/pull/1456](https://togithub.com/dsherret/ts-morph/pull/1456) - perf: use path.exists functions that don't throw internally when not exists [https://github.com/dsherret/ts-morph/pull/1478](https://togithub.com/dsherret/ts-morph/pull/1478) ##### Breaking Changes - Upgraded to TS 5.3 - Underlying `@ts-morph/common` file system methods return undefined instead of throwing when not exists (for perf). - Private fields are actually private (default build requires private fields). #### New Contributors - [@​ajvincent](https://togithub.com/ajvincent) made their first contribution in [https://github.com/dsherret/ts-morph/pull/1473](https://togithub.com/dsherret/ts-morph/pull/1473) **Full Changelog**: https://github.com/dsherret/ts-morph/compare/20.0.0...21.0.0 ### [`v20.0.0`](https://togithub.com/dsherret/ts-morph/releases/tag/20.0.0) [Compare Source](https://togithub.com/dsherret/ts-morph/compare/19.0.0...20.0.0) #### What's Changed - feat: upgrade to TypeScript 5.2 by [@​dsherret](https://togithub.com/dsherret) in [https://github.com/dsherret/ts-morph/pull/1450](https://togithub.com/dsherret/ts-morph/pull/1450) - fix: support dynamic type imports in getReferencedSourceFiles() by [@​lo1tuma](https://togithub.com/lo1tuma) in [https://github.com/dsherret/ts-morph/pull/1436](https://togithub.com/dsherret/ts-morph/pull/1436) #### New Contributors - [@​lo1tuma](https://togithub.com/lo1tuma) made their first contribution in [https://github.com/dsherret/ts-morph/pull/1436](https://togithub.com/dsherret/ts-morph/pull/1436) - [@​kronodeus](https://togithub.com/kronodeus) made their first contribution in [https://github.com/dsherret/ts-morph/pull/1455](https://togithub.com/dsherret/ts-morph/pull/1455) **Full Changelog**: https://github.com/dsherret/ts-morph/compare/19.0.0...20.0.0 ### [`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 [@​scarf005](https://togithub.com/scarf005) in [https://github.com/dsherret/ts-morph/pull/1411](https://togithub.com/dsherret/ts-morph/pull/1411) - feat: improve typing of `Type` by [@​odiak](https://togithub.com/odiak) in [https://github.com/dsherret/ts-morph/pull/1408](https://togithub.com/dsherret/ts-morph/pull/1408) - feat: add IsVoid method to `Type` by [@​giuseppelt](https://togithub.com/giuseppelt) in [https://github.com/dsherret/ts-morph/pull/1398](https://togithub.com/dsherret/ts-morph/pull/1398) - feat: add JSDocable to ExportAssignment by [@​giuseppelt](https://togithub.com/giuseppelt) in [https://github.com/dsherret/ts-morph/pull/1397](https://togithub.com/dsherret/ts-morph/pull/1397) - feat: upgrade to TS 5.1 by [@​dsherret](https://togithub.com/dsherret) in [https://github.com/dsherret/ts-morph/pull/1415](https://togithub.com/dsherret/ts-morph/pull/1415) - fix: allow `.tranform` to work with Nodes from another parsed source file by [@​ivanhofer](https://togithub.com/ivanhofer) in [https://github.com/dsherret/ts-morph/pull/1417](https://togithub.com/dsherret/ts-morph/pull/1417) ##### New Contributors - [@​scarf005](https://togithub.com/scarf005) made their first contribution in [https://github.com/dsherret/ts-morph/pull/1411](https://togithub.com/dsherret/ts-morph/pull/1411) - [@​odiak](https://togithub.com/odiak) made their first contribution in [https://github.com/dsherret/ts-morph/pull/1408](https://togithub.com/dsherret/ts-morph/pull/1408) - [@​giuseppelt](https://togithub.com/giuseppelt) made their first contribution in [https://github.com/dsherret/ts-morph/pull/1398](https://togithub.com/dsherret/ts-morph/pull/1398) - [@​ivanhofer](https://togithub.com/ivanhofer) made their first contribution in [https://github.com/dsherret/ts-morph/pull/1417](https://togithub.com/dsherret/ts-morph/pull/1417) **Full Changelog**: https://github.com/dsherret/ts-morph/compare/18.0.0...19.0.0 ### [`v18.0.0`](https://togithub.com/dsherret/ts-morph/releases/tag/18.0.0) [Compare Source](https://togithub.com/dsherret/ts-morph/compare/17.0.1...18.0.0) #### What's Changed - docs: update transforms example to use factory by [@​tobyhede](https://togithub.com/tobyhede) in [https://github.com/dsherret/ts-morph/pull/1386](https://togithub.com/dsherret/ts-morph/pull/1386) - fix: allow setType on binding patterns by [@​jquense](https://togithub.com/jquense) in [https://github.com/dsherret/ts-morph/pull/1380](https://togithub.com/dsherret/ts-morph/pull/1380) - feat: upgrade to TypeScript 5.0.2 by [@​dsherret](https://togithub.com/dsherret) in [https://github.com/dsherret/ts-morph/pull/1390](https://togithub.com/dsherret/ts-morph/pull/1390) BREAKING CHANGE: Upgraded to TypeScript 5.0.2 #### New Contributors - [@​tobyhede](https://togithub.com/tobyhede) made their first contribution in [https://github.com/dsherret/ts-morph/pull/1386](https://togithub.com/dsherret/ts-morph/pull/1386) - [@​jquense](https://togithub.com/jquense) made their first contribution in [https://github.com/dsherret/ts-morph/pull/1380](https://togithub.com/dsherret/ts-morph/pull/1380) **Full Changelog**: https://github.com/dsherret/ts-morph/compare/17.0.1...18.0.0 ### [`v17.0.1`](https://togithub.com/dsherret/ts-morph/releases/tag/17.0.1) [Compare Source](https://togithub.com/dsherret/ts-morph/compare/17.0.0...17.0.1) - fix: revert rollup from v3 to v2 to fix build (`esModuleInterop: true` had no effect) [#​1358](https://togithub.com/dsherret/ts-morph/issues/1358) ### [`v17.0.0`](https://togithub.com/dsherret/ts-morph/releases/tag/17.0.0) [Compare Source](https://togithub.com/dsherret/ts-morph/compare/16.0.0...17.0.0) ##### Bug Fixes - getOverloads for a class method should take into account if static ([#​1337](https://togithub.com/dsherret/ts-morph/issues/1337)) ([f927d01](https://togithub.com/dsherret/ts-morph/commit/f927d01)), closes [#​1298](https://togithub.com/dsherret/ts-morph/issues/1298) - ImportEqualsDeclaration should be exportable ([#​1336](https://togithub.com/dsherret/ts-morph/issues/1336)) ([7680bae](https://togithub.com/dsherret/ts-morph/commit/7680bae)) - named import/export specifier structures were missing isTypeOnly ([#​1347](https://togithub.com/dsherret/ts-morph/issues/1347)) ([6b88a0b](https://togithub.com/dsherret/ts-morph/commit/6b88a0b)) ##### Features - allow providing custom error messages to `OrThrow` methods ([#​1327](https://togithub.com/dsherret/ts-morph/issues/1327)) ([05916d3](https://togithub.com/dsherret/ts-morph/commit/05916d3)) - Thanks [@​jantimon](https://togithub.com/jantimon)! - upgrade to TS 4.9 ([#​1354](https://togithub.com/dsherret/ts-morph/issues/1354)) ([e334437](https://togithub.com/dsherret/ts-morph/commit/e334437)) ##### BREAKING CHANGES - Upgraded to TS 4.9
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **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 was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/mmkal/expect-type). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Misha Kaletsky --- package.json | 2 +- pnpm-lock.yaml | 83 ++++++-------------------- test/__snapshots__/errors.test.ts.snap | 18 +++--- test/errors.test.ts | 7 +-- 4 files changed, 30 insertions(+), 80 deletions(-) diff --git a/package.json b/package.json index de6835c..1042873 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "np": "^10.0.0", "pkg-pr-new": "0.0.20", "strip-ansi": "7.1.0", - "ts-morph": "16.0.0", + "ts-morph": "23.0.0", "typescript": "5.5.4", "vitest": "^2.0.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 00877ef..fa2b065 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,8 +30,8 @@ importers: specifier: 7.1.0 version: 7.1.0 ts-morph: - specifier: 16.0.0 - version: 16.0.0 + specifier: 23.0.0 + version: 23.0.0 typescript: specifier: 5.5.4 version: 5.5.4 @@ -615,8 +615,8 @@ packages: resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} engines: {node: '>=10'} - '@ts-morph/common@0.17.0': - resolution: {integrity: sha512-RMSSvSfs9kb0VzkvQ2NWobwnj7TxCA9vI/IjR9bDHqgAyVbu2T0DN4wiKVqomyDWqO7dPr/tErSfq7urQ1Q37g==} + '@ts-morph/common@0.24.0': + resolution: {integrity: sha512-c1xMmNHWpNselmpIqursHeOHHBTIsJLbB+NuovbTTRCNiTLEr/U9dbJ8qy0jd/O2x5pc3seWuOUN5R2IoOTp8A==} '@types/dedent@0.7.0': resolution: {integrity: sha512-EGlKlgMhnLt/cM4DbUSafFdrkeJoC9Mvnj0PUCU7tFmTjMjNRT957kXCx0wYm3JuEq4o4ZsS5vG+NlkM2DMd2A==} @@ -1100,10 +1100,6 @@ packages: brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -1249,8 +1245,8 @@ packages: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} - code-block-writer@11.0.3: - resolution: {integrity: sha512-NiujjUFB4SwScJq2bwbYUtXbZhBSlY6vYzm++3Q6oC+U+injTqfPYFK8wS9COOmb2lueqp0ZRB4nK1VYeHgNyw==} + code-block-writer@13.0.2: + resolution: {integrity: sha512-XfXzAGiStXSmCIwrkdfvc7FS5Dtj8yelCtyOf2p2skCAfvLd6zu0rGzuS9NSCO3bq1JKpFZ7tbKdKlcd5occQA==} code-point-at@1.1.0: resolution: {integrity: sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==} @@ -1754,10 +1750,6 @@ packages: fast-diff@1.2.0: resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} - fast-glob@3.2.12: - resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} - engines: {node: '>=8.6.0'} - fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -1790,10 +1782,6 @@ packages: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} - fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -2516,10 +2504,6 @@ packages: micromark@2.11.4: resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} - micromatch@4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} - engines: {node: '>=8.6'} - micromatch@4.0.7: resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} engines: {node: '>=8.6'} @@ -2547,10 +2531,6 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - minimatch@5.1.0: - resolution: {integrity: sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==} - engines: {node: '>=10'} - minimatch@9.0.3: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} @@ -2566,8 +2546,8 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} - mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + mkdirp@3.0.1: + resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} engines: {node: '>=10'} hasBin: true @@ -3325,8 +3305,8 @@ packages: ts-expose-internals-conditionally@1.0.0-empty.0: resolution: {integrity: sha512-F8m9NOF6ZhdOClDVdlM8gj3fDCav4ZIFSs/EI3ksQbAAXVSCN/Jh5OCJDDZWBuBy9psFc6jULGDlPwjMYMhJDw==} - ts-morph@16.0.0: - resolution: {integrity: sha512-jGNF0GVpFj0orFw55LTsQxVYEUOCWBAbR5Ls7fTYE5pQsbW18ssTb/6UXx/GYAEjS+DQTp8VoTw0vqYMiaaQuw==} + ts-morph@23.0.0: + resolution: {integrity: sha512-FcvFx7a9E8TUe6T3ShihXJLiJOiqyafzFKUO4aqIHDUCIvADdGNShcbc2W5PMr3LerXRv7mafvFZ9lRENxJmug==} tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} @@ -4202,11 +4182,11 @@ snapshots: '@sindresorhus/is@4.6.0': {} - '@ts-morph/common@0.17.0': + '@ts-morph/common@0.24.0': dependencies: - fast-glob: 3.2.12 - minimatch: 5.1.0 - mkdirp: 1.0.4 + fast-glob: 3.3.2 + minimatch: 9.0.5 + mkdirp: 3.0.1 path-browserify: 1.0.1 '@types/dedent@0.7.0': {} @@ -4825,10 +4805,6 @@ snapshots: dependencies: balanced-match: 1.0.2 - braces@3.0.2: - dependencies: - fill-range: 7.0.1 - braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -4970,7 +4946,7 @@ snapshots: clone@1.0.4: {} - code-block-writer@11.0.3: {} + code-block-writer@13.0.2: {} code-point-at@1.1.0: {} @@ -5666,14 +5642,6 @@ snapshots: fast-diff@1.2.0: {} - fast-glob@3.2.12: - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.5 - fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -5709,10 +5677,6 @@ snapshots: dependencies: flat-cache: 3.0.4 - fill-range@7.0.1: - dependencies: - to-regex-range: 5.0.1 - fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -6444,11 +6408,6 @@ snapshots: transitivePeerDependencies: - supports-color - micromatch@4.0.5: - dependencies: - braces: 3.0.2 - picomatch: 2.3.1 - micromatch@4.0.7: dependencies: braces: 3.0.3 @@ -6468,10 +6427,6 @@ snapshots: dependencies: brace-expansion: 1.1.11 - minimatch@5.1.0: - dependencies: - brace-expansion: 2.0.1 - minimatch@9.0.3: dependencies: brace-expansion: 2.0.1 @@ -6484,7 +6439,7 @@ snapshots: minipass@7.1.2: {} - mkdirp@1.0.4: {} + mkdirp@3.0.1: {} mlly@1.7.1: dependencies: @@ -7323,10 +7278,10 @@ snapshots: ts-expose-internals-conditionally@1.0.0-empty.0: {} - ts-morph@16.0.0: + ts-morph@23.0.0: dependencies: - '@ts-morph/common': 0.17.0 - code-block-writer: 11.0.3 + '@ts-morph/common': 0.24.0 + code-block-writer: 13.0.2 tsconfig-paths@3.15.0: dependencies: diff --git a/test/__snapshots__/errors.test.ts.snap b/test/__snapshots__/errors.test.ts.snap index 8fbf7ee..4a4a494 100644 --- a/test/__snapshots__/errors.test.ts.snap +++ b/test/__snapshots__/errors.test.ts.snap @@ -179,7 +179,7 @@ test/usage.test.ts:999:999 - error TS2344: Type '{ a: number; }' does not satisf test/usage.test.ts:999:999 - error TS2554: Expected 1 arguments, but got 0. 999 expectTypeOf<{a?: number}>().toEqualTypeOf<{a: number | undefined}>() - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~ src/index.ts:999:999 999 ...MISMATCH: MismatchArgs, true> @@ -201,7 +201,7 @@ test/usage.test.ts:999:999 - error TS2344: Type '{ a: {}; }' does not satisfy th test/usage.test.ts:999:999 - error TS2554: Expected 1 arguments, but got 0. 999 expectTypeOf().toEqualTypeOf() - ~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~ src/index.ts:999:999 999 ...MISMATCH: MismatchArgs, true> @@ -210,7 +210,7 @@ test/usage.test.ts:999:999 - error TS2554: Expected 1 arguments, but got 0. test/usage.test.ts:999:999 - error TS2554: Expected 1 arguments, but got 0. 999 expectTypeOf().toEqualTypeOf() - ~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~ src/index.ts:999:999 999 ...MISMATCH: MismatchArgs, true> @@ -219,7 +219,7 @@ test/usage.test.ts:999:999 - error TS2554: Expected 1 arguments, but got 0. test/usage.test.ts:999:999 - error TS2554: Expected 1 arguments, but got 0. 999 expectTypeOf().toEqualTypeOf() - ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~ src/index.ts:999:999 999 ...MISMATCH: MismatchArgs, true> @@ -228,7 +228,7 @@ test/usage.test.ts:999:999 - error TS2554: Expected 1 arguments, but got 0. test/usage.test.ts:999:999 - error TS2554: Expected 1 arguments, but got 0. 999 expectTypeOf<{a: 1} & {b: 2}>().toEqualTypeOf<{a: 1; b: 2}>() - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~ src/index.ts:999:999 999 ...MISMATCH: MismatchArgs, true> @@ -237,7 +237,7 @@ test/usage.test.ts:999:999 - error TS2554: Expected 1 arguments, but got 0. test/usage.test.ts:999:999 - error TS2554: Expected 1 arguments, but got 0. 999 expectTypeOf<{a: {b: 1} & {c: 1}}>().toEqualTypeOf<{a: {b: 1; c: 1}}>() - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~ src/index.ts:999:999 999 ...MISMATCH: MismatchArgs, true> @@ -254,11 +254,7 @@ test/usage.test.ts:999:999 - error TS2344: Type '() => () => () => () => 2' does test/usage.test.ts:999:999 - error TS2554: Expected 1 arguments, but got 0. 999 expectTypeOf<() => () => () => () => {a: 1} & {b: 2}>().toEqualTypeOf< - ~~~~~~~~~~~~~~ -999 () => () => () => () => {a: 1; b: 2} - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -999 >() - ~~~~~ + ~~~~~~~~~~~~~ src/index.ts:999:999 999 ...MISMATCH: MismatchArgs, true> diff --git a/test/errors.test.ts b/test/errors.test.ts index b18ee30..f7edda6 100644 --- a/test/errors.test.ts +++ b/test/errors.test.ts @@ -15,11 +15,10 @@ test('toEqualTypeOf<...>() error message', async () => { test('toEqualTypeOf(...) error message', async () => { expect(tsErrors(`expectTypeOf({a: 1}).toEqualTypeOf({a: 'one'})`)).toMatchInlineSnapshot(` - "test/test.ts:999:999 - error TS2345: Argument of type '{ a: string; }' is not assignable to parameter of type 'Mismatch'. - Object literal may only specify known properties, and 'a' does not exist in type 'Mismatch'. + "test/test.ts:999:999 - error TS2353: Object literal may only specify known properties, and 'a' does not exist in type 'Mismatch'. 999 expectTypeOf({a: 1}).toEqualTypeOf({a: 'one'}) - ~~~~~~~~" + ~" `) }) @@ -61,7 +60,7 @@ test('toEqualTypeOf special types', async () => { test/test.ts:999:999 - error TS2554: Expected 1 arguments, but got 0. 999 expectTypeOf<{a: 1}>().toEqualTypeOf<{a: never}>() - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~ src/index.ts:999:999 999 ...MISMATCH: MismatchArgs, true>