@visulima/tsconfig 2.1.3 → 3.0.0-alpha.10

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,180 @@
1
+ ## @visulima/tsconfig [3.0.0-alpha.10](https://github.com/visulima/visulima/compare/@visulima/tsconfig@3.0.0-alpha.9...@visulima/tsconfig@3.0.0-alpha.10) (2026-04-21)
2
+
3
+ ### Miscellaneous Chores
4
+
5
+ * jsr.json update and lock file ([73fce38](https://github.com/visulima/visulima/commit/73fce38c7cb4603f3fffb88609b1b18e2feb4937))
6
+
7
+
8
+ ### Dependencies
9
+
10
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.11
11
+
12
+ ## @visulima/tsconfig [3.0.0-alpha.9](https://github.com/visulima/visulima/compare/@visulima/tsconfig@3.0.0-alpha.8...@visulima/tsconfig@3.0.0-alpha.9) (2026-04-21)
13
+
14
+ ### Miscellaneous Chores
15
+
16
+ * update the jsr.json ([864ab7e](https://github.com/visulima/visulima/commit/864ab7e71c4b5ae82f64792d1ae8debfea2c539b))
17
+
18
+
19
+ ### Dependencies
20
+
21
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.10
22
+
23
+ ## @visulima/tsconfig [3.0.0-alpha.8](https://github.com/visulima/visulima/compare/@visulima/tsconfig@3.0.0-alpha.7...@visulima/tsconfig@3.0.0-alpha.8) (2026-04-21)
24
+
25
+ ### Bug Fixes
26
+
27
+ * **tooling:** resolve eslint and formatting issues ([399d292](https://github.com/visulima/visulima/commit/399d29282be5b29bb26b4e5b24d45e2a6cdeeca3))
28
+ * **tsconfig:** relax no-unsafe-* for tests and untyped external deps ([1e63952](https://github.com/visulima/visulima/commit/1e63952c41ff76e450ba4ca5aba6ddf7229c65b3))
29
+ * **tsconfig:** suppress sonarjs/deprecation for baseUrl handling ([431ae96](https://github.com/visulima/visulima/commit/431ae96bdd025a052bde8291918b1593f972efa1))
30
+
31
+ ### Miscellaneous Chores
32
+
33
+ * bump engines.node to ^22.14.0 || >=24.10.0 ([c3d0931](https://github.com/visulima/visulima/commit/c3d0931d1504e4f21ebf50ea680cfa7ce4ba15ce))
34
+ * fixed jsr.json ([5d85e51](https://github.com/visulima/visulima/commit/5d85e5179de38e284ec433b14d77c71a1619c8d6))
35
+ * **tsconfig:** apply pending changes ([d7ddb14](https://github.com/visulima/visulima/commit/d7ddb14293c1a140e818dd1b314caeba68db66da))
36
+
37
+
38
+ ### Dependencies
39
+
40
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.9
41
+
42
+ ## @visulima/tsconfig [3.0.0-alpha.7](https://github.com/visulima/visulima/compare/@visulima/tsconfig@3.0.0-alpha.6...@visulima/tsconfig@3.0.0-alpha.7) (2026-04-08)
43
+
44
+ ### Bug Fixes
45
+
46
+ * **tsconfig:** add node types and fix implicit any parameter ([1744d82](https://github.com/visulima/visulima/commit/1744d82a07fca03f2e6ff660b918e9b2623acf69))
47
+ * **tsconfig:** add TypeScript 6.0 compatibility for implicit compiler defaults ([19de98f](https://github.com/visulima/visulima/commit/19de98f2640c143c6f5e84eda214c84584cf980c))
48
+ * **tsconfig:** align parsing with get-tsconfig for files/include, path inheritance, and TS 6.0 ([0c9d4be](https://github.com/visulima/visulima/commit/0c9d4be347f6ee4212dbe98026a7cd1d465bc2de))
49
+ * **tsconfig:** properly fix eslint errors in code ([95a2142](https://github.com/visulima/visulima/commit/95a2142f816f9ae0d50caaf235a71f9d03ab71cf))
50
+ * **tsconfig:** remove remaining eslint suppressions with proper code fixes ([57a45bb](https://github.com/visulima/visulima/commit/57a45bbc4e00e1c688a12367dc734c1553a17a6a))
51
+ * **tsconfig:** resolve eslint errors ([5848320](https://github.com/visulima/visulima/commit/5848320dc88a6080cf507eda724f57f9a6800434))
52
+
53
+ ### Miscellaneous Chores
54
+
55
+ * **tooling:** remove empty dependency objects from package.json ([dc52a23](https://github.com/visulima/visulima/commit/dc52a23bc1e2d36f4ec71ca67506bf6861a02929))
56
+ * **tsconfig:** add tsconfig.eslint.json for type-aware linting ([2c01b30](https://github.com/visulima/visulima/commit/2c01b30e740cdbf75f96317053fd78a56fb2ccc9))
57
+ * **tsconfig:** apply prettier formatting ([85f32f5](https://github.com/visulima/visulima/commit/85f32f5f072edef750a4ff41d8b25918d26a4641))
58
+ * **tsconfig:** migrate .prettierrc.cjs to prettier.config.js ([bbf2a3b](https://github.com/visulima/visulima/commit/bbf2a3b0f6e23ea39dfeb583b0d100a407c8adaf))
59
+ * **tsconfig:** sort fixture package.json fields ([370c336](https://github.com/visulima/visulima/commit/370c336d2e1331fe05d2231d92a2b3b456c77620))
60
+
61
+
62
+ ### Dependencies
63
+
64
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.7
65
+ * **@visulima/path:** upgraded to 3.0.0-alpha.8
66
+
67
+ ## @visulima/tsconfig [3.0.0-alpha.6](https://github.com/visulima/visulima/compare/@visulima/tsconfig@3.0.0-alpha.5...@visulima/tsconfig@3.0.0-alpha.6) (2026-03-26)
68
+
69
+ ### Features
70
+
71
+ * **web:** auto-generate packages page from workspace metadata ([623e520](https://github.com/visulima/visulima/commit/623e5207693a7fe720f5f2f179593a3654c880e3))
72
+
73
+
74
+ ### Dependencies
75
+
76
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.6
77
+ * **@visulima/path:** upgraded to 3.0.0-alpha.7
78
+
79
+ ## @visulima/tsconfig [3.0.0-alpha.5](https://github.com/visulima/visulima/compare/@visulima/tsconfig@3.0.0-alpha.4...@visulima/tsconfig@3.0.0-alpha.5) (2026-03-26)
80
+
81
+ ### Bug Fixes
82
+
83
+ * **tsconfig:** use workspace:* for internal [@visulima](https://github.com/visulima) deps ([420ce4a](https://github.com/visulima/visulima/commit/420ce4a0c075f78520fb9434ea83c9b6e301b571))
84
+ * **web:** improve build setup with incremental stats caching and prod install ([fe33e75](https://github.com/visulima/visulima/commit/fe33e75827586779b4b3a0c6d57b39f889ee6207))
85
+
86
+ ### Miscellaneous Chores
87
+
88
+ * **tsconfig:** migrate deps to pnpm catalogs ([ab6e375](https://github.com/visulima/visulima/commit/ab6e37535ba3a575d0d0ddeee72560d8e560bccc))
89
+ * **tsconfig:** update dependencies ([bf73f34](https://github.com/visulima/visulima/commit/bf73f340b2059d0bf74d836154d7e3a65a8e2c0a))
90
+ * visulima website ([#591](https://github.com/visulima/visulima/issues/591)) ([59ab2e2](https://github.com/visulima/visulima/commit/59ab2e2befb03e51cd2088956f83d9b87de6d033))
91
+
92
+
93
+ ### Dependencies
94
+
95
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.5
96
+ * **@visulima/path:** upgraded to 3.0.0-alpha.6
97
+
98
+ ## @visulima/tsconfig [3.0.0-alpha.4](https://github.com/visulima/visulima/compare/@visulima/tsconfig@3.0.0-alpha.3...@visulima/tsconfig@3.0.0-alpha.4) (2026-03-06)
99
+
100
+ ### Bug Fixes
101
+
102
+ * **tsconfig:** update packem to 2.0.0-alpha.54 ([2f9b2ae](https://github.com/visulima/visulima/commit/2f9b2aea84a455f65ec6d682231876d5c5070159))
103
+
104
+ ### Documentation
105
+
106
+ * **humanizer,html,iso-locale,package,tsconfig:** add comprehensive Fumadocs documentation ([19781ce](https://github.com/visulima/visulima/commit/19781ce5d27605971a9f2fdf0a99863effd98091))
107
+
108
+ ### Miscellaneous Chores
109
+
110
+ * **tooling:** update dependencies ([7f6f9d3](https://github.com/visulima/visulima/commit/7f6f9d3c41b170c53659ab34b79ceb23e4e9660a))
111
+ * **tsconfig:** update dependencies ([3388495](https://github.com/visulima/visulima/commit/3388495a99235637506dc8b2958e26b625db36f1))
112
+ * **tsconfig:** update dependencies ([7697d4b](https://github.com/visulima/visulima/commit/7697d4b4fa7153ab4a6bb93af68e35da7946df89))
113
+ * update lock file maintenance ([d83e716](https://github.com/visulima/visulima/commit/d83e71697b75d24704185b66bb521a934d2db02d))
114
+ * year update ([47f4105](https://github.com/visulima/visulima/commit/47f410596ce7190cfea36a073db32e0cec50bbcd))
115
+
116
+
117
+ ### Dependencies
118
+
119
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.4
120
+ * **@visulima/path:** upgraded to 3.0.0-alpha.5
121
+
122
+ ## @visulima/tsconfig [3.0.0-alpha.3](https://github.com/visulima/visulima/compare/@visulima/tsconfig@3.0.0-alpha.2...@visulima/tsconfig@3.0.0-alpha.3) (2025-12-27)
123
+
124
+ ### Bug Fixes
125
+
126
+ * **tsconfig:** update package files ([f1bb598](https://github.com/visulima/visulima/commit/f1bb5982e370fac9caffd76a73645e51c6ab1704))
127
+
128
+ ### Miscellaneous Chores
129
+
130
+ * fixed project.json names and schema path ([964722f](https://github.com/visulima/visulima/commit/964722f691db205c7edb9aa6db29e849a647500b))
131
+
132
+
133
+ ### Dependencies
134
+
135
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.3
136
+ * **@visulima/path:** upgraded to 3.0.0-alpha.4
137
+
138
+ ## @visulima/tsconfig [3.0.0-alpha.2](https://github.com/visulima/visulima/compare/@visulima/tsconfig@3.0.0-alpha.1...@visulima/tsconfig@3.0.0-alpha.2) (2025-12-11)
139
+
140
+ ### Bug Fixes
141
+
142
+ * update package OG images across multiple packages ([f08e4dd](https://github.com/visulima/visulima/commit/f08e4dd2b105ccb29c8412020a9c2be36d6c1e9e))
143
+
144
+ ### Miscellaneous Chores
145
+
146
+ * update configuration files and add new package listing script ([3d918ef](https://github.com/visulima/visulima/commit/3d918efd53772430b53b026de6401bdedbe7ea3a))
147
+ * update logo assets and README references ([a673e68](https://github.com/visulima/visulima/commit/a673e68c62937e61bd3231df7bb4cb01695aea71))
148
+ * update package dependencies and improve configuration ([4ed22d6](https://github.com/visulima/visulima/commit/4ed22d6511aa8150dcd4ba7b9dccf05dbe2d6adc))
149
+
150
+
151
+ ### Dependencies
152
+
153
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.2
154
+ * **@visulima/path:** upgraded to 3.0.0-alpha.3
155
+
156
+ ## @visulima/tsconfig [3.0.0-alpha.1](https://github.com/visulima/visulima/compare/@visulima/tsconfig@2.1.3...@visulima/tsconfig@3.0.0-alpha.1) (2025-12-07)
157
+
158
+ ### ⚠ BREAKING CHANGES
159
+
160
+ * change min node version to 22.13
161
+
162
+ ### Bug Fixes
163
+
164
+ * add new package image, fixed readme rendering on npm, fixed building of packages ([b790ba2](https://github.com/visulima/visulima/commit/b790ba253ea07fef83528fd822a678facf021b5f))
165
+ * update Node.js engine version requirement to >=22.13 in multiple package.json files for improved compatibility ([b828e9a](https://github.com/visulima/visulima/commit/b828e9aeaebfc798eecddccd90e6ec7560c6d36a))
166
+
167
+ ### Miscellaneous Chores
168
+
169
+ * moved all packages into groups ([0615e9d](https://github.com/visulima/visulima/commit/0615e9d14a8a886e11da529ce150cf31ca973c10))
170
+ * update @anolilab/semantic-release-pnpm and @anolilab/semantic-release-preset to versions 3.2.2 and 12.1.2 across multiple package.json files for improved compatibility ([3921626](https://github.com/visulima/visulima/commit/3921626141fe5da398749bf0ba675f1596f18afb))
171
+ * update dependencies across multiple packages to improve compatibility and performance, including upgrading `@anolilab/semantic-release-pnpm` and `@anolilab/semantic-release-preset` to versions 3.2.0 and 12.1.0 respectively, and updating `react`, `react-dom`, and `next` versions to 19.2.1 and 16.0.7 in various package.json files ([aee8fcd](https://github.com/visulima/visulima/commit/aee8fcd796ae9b8d055903260e7150996ea9f53d))
172
+
173
+
174
+ ### Dependencies
175
+
176
+ * **@visulima/fs:** upgraded to 5.0.0-alpha.1
177
+
1
178
  ## @visulima/tsconfig [2.1.3](https://github.com/visulima/visulima/compare/@visulima/tsconfig@2.1.2...@visulima/tsconfig@2.1.3) (2025-11-19)
2
179
 
3
180
  ### Miscellaneous Chores
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 visulima
3
+ Copyright (c) 2026 visulima
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,21 +1,24 @@
1
- <div align="center">
2
- <h3>visulima tsconfig</h3>
3
- <p>
4
- Find and / or parse the tsconfig.json file from a directory path, this package is built on top of
1
+ <!-- START_PACKAGE_OG_IMAGE_PLACEHOLDER -->
5
2
 
6
- [@visulima/fs](https://github.com/visulima/visulima/tree/main/packages/fs),
7
- [@visulima/path](https://github.com/visulima/visulima/tree/main/packages/path),
8
- [jsonc-parser](https://github.com/microsoft/node-jsonc-parser) and
9
- [resolve-pkg-maps](https://github.com/privatenumber/resolve-pkg-maps)
3
+ <a href="https://www.anolilab.com/open-source" align="center">
10
4
 
11
- </p>
12
- </div>
5
+ <img src="__assets__/package-og.svg" alt="tsconfig" />
6
+
7
+ </a>
8
+
9
+ <h3 align="center">Find and/or parse the tsconfig.json file from a directory path.</h3>
10
+
11
+ <!-- END_PACKAGE_OG_IMAGE_PLACEHOLDER -->
13
12
 
14
13
  <br />
15
14
 
16
15
  <div align="center">
17
16
 
18
- [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url]
17
+ [![typescript-image][typescript-badge]][typescript-url]
18
+ [![mit licence][license-badge]][license]
19
+ [![npm downloads][npm-downloads-badge]][npm-downloads]
20
+ [![Chat][chat-badge]][chat]
21
+ [![PRs Welcome][prs-welcome-badge]][prs-welcome]
19
22
 
20
23
  </div>
21
24
 
@@ -546,14 +549,23 @@ If you would like to help take a look at the [list of issues](https://github.com
546
549
  - [Daniel Bannert](https://github.com/prisis)
547
550
  - [All Contributors](https://github.com/visulima/visulima/graphs/contributors)
548
551
 
552
+ ## Made with ❤️ at Anolilab
553
+
554
+ This is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. [Anolilab](https://www.anolilab.com/open-source) is a Development and AI Studio. Contact us at [hello@anolilab.com](mailto:hello@anolilab.com) if you need any help with these technologies or just want to say hi!
555
+
549
556
  ## License
550
557
 
551
- The visulima tsconfig is open-sourced software licensed under the [MIT][license-url]
558
+ The visulima tsconfig is open-sourced software licensed under the [MIT][license]
552
559
 
553
- [typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
560
+ <!-- badges -->
554
561
 
555
- [typescript-url]: https://www.typescriptlang.org/ "TypeScript" "typescript"
556
- [license-image]: https://img.shields.io/npm/l/@visulima/tsconfig?color=blueviolet&style=for-the-badge
557
- [license-url]: LICENSE.md "license"
558
- [npm-image]: https://img.shields.io/npm/v/@visulima/tsconfig/latest.svg?style=for-the-badge&logo=npm
559
- [npm-url]: https://www.npmjs.com/package/@visulima/tsconfig/v/latest "npm"
562
+ [license-badge]: https://img.shields.io/npm/l/@visulima/tsconfig?style=for-the-badge
563
+ [license]: https://github.com/visulima/visulima/blob/main/LICENSE
564
+ [npm-downloads-badge]: https://img.shields.io/npm/dm/@visulima/tsconfig?style=for-the-badge
565
+ [npm-downloads]: https://www.npmjs.com/package/@visulima/tsconfig
566
+ [prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
567
+ [prs-welcome]: https://github.com/visulima/visulima/blob/main/.github/CONTRIBUTING.md
568
+ [chat-badge]: https://img.shields.io/discord/932323359193186354.svg?style=for-the-badge
569
+ [chat]: https://discord.gg/TtFJY8xkFK
570
+ [typescript-badge]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
571
+ [typescript-url]: https://www.typescriptlang.org/
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{findTsConfig as f,findTsConfigSync as r}from"./packem_shared/findTsConfig-CIJKFGq0.js";import{implicitBaseUrlSymbol as e,readTsConfig as s}from"./packem_shared/implicitBaseUrlSymbol-CMaKZ6En.js";import{writeTsConfig as g,writeTsConfigSync as m}from"./packem_shared/writeTsConfig-0IO4xPZJ.js";export{f as findTsConfig,r as findTsConfigSync,e as implicitBaseUrlSymbol,s as readTsConfig,g as writeTsConfig,m as writeTsConfigSync};
1
+ import{findTsConfig as f,findTsConfigSync as r}from"./packem_shared/findTsConfig-QzVKvyBN.js";import{implicitBaseUrlSymbol as e,readTsConfig as s}from"./packem_shared/implicitBaseUrlSymbol-CI4Y92iF.js";import{writeTsConfig as g,writeTsConfigSync as m}from"./packem_shared/writeTsConfig-0IO4xPZJ.js";export{f as findTsConfig,r as findTsConfigSync,e as implicitBaseUrlSymbol,s as readTsConfig,g as writeTsConfig,m as writeTsConfigSync};
@@ -0,0 +1 @@
1
+ var h=Object.defineProperty;var f=(t,o)=>h(t,"name",{value:o,configurable:!0});import{findUp as s,findUpSync as r}from"@visulima/fs";import{NotFoundError as a}from"@visulima/fs/error";import{readTsConfig as p}from"./implicitBaseUrlSymbol-CI4Y92iF.js";var d=Object.defineProperty,l=f((t,o)=>d(t,"name",{value:o,configurable:!0}),"f");const g=new Map,w=l(async(t,o={})=>{const n=o.configFileName??"tsconfig.json";let c=await s(n,{...t&&{cwd:t},type:"file"});if(c??=await s("jsconfig.json",{...t&&{cwd:t},type:"file"}),!c)throw new a(`No such file or directory, for '${n}' or 'jsconfig.json' found.`);const i=o.cache&&typeof o.cache!="boolean"?o.cache:g;if(o.cache&&i.has(c))return i.get(c);const e={config:p(c,{tscCompatible:o.tscCompatible}),path:c};return o.cache&&i.set(c,e),e},"findTsConfig"),C=l((t,o={})=>{const n=o.configFileName??"tsconfig.json";let c=r(n,{...t&&{cwd:t},type:"file"});if(c??=r("jsconfig.json",{...t&&{cwd:t},type:"file"}),!c)throw new a(`No such file or directory, for '${n}' or 'jsconfig.json' found.`);const i=o.cache&&typeof o.cache!="boolean"?o.cache:g;if(o.cache&&i.has(c))return i.get(c);const e={config:p(c,{tscCompatible:o.tscCompatible}),path:c};return o.cache&&i.set(c,e),e},"findTsConfigSync");export{w as findTsConfig,C as findTsConfigSync};
@@ -0,0 +1 @@
1
+ var U=Object.defineProperty;var C=(o,s)=>U(o,"name",{value:s,configurable:!0});import{createRequire as T}from"node:module";import{readFileSync as W,isAccessibleSync as O,findUpSync as N}from"@visulima/fs";import{NotFoundError as q}from"@visulima/fs/error";import{join as u,resolve as w,isAbsolute as A,toNamespacedPath as z,relative as x,normalize as k,dirname as P}from"@visulima/path";import{isRelative as V}from"@visulima/path/utils";import{parse as _}from"jsonc-parser";import{resolveExports as H}from"resolve-pkg-maps";const B=T(import.meta.url),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,E=C(o=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[s,i]=y.versions.node.split(".").map(Number);if(s>22||s===22&&i>=3||s===20&&i>=16)return y.getBuiltinModule(o)}return B(o)},"__cjs_getBuiltinModule"),{statSync:D}=E("node:fs"),G=E("node:module");var K=Object.defineProperty,R=C((o,s)=>K(o,"name",{value:s,configurable:!0}),"d");const Q=R(o=>_(W(o,{buffer:!1})),"readJsonc"),X=R(()=>{const{findPnpApi:o}=G;return o?.(process.cwd())},"getPnpApi"),j=R((o,s,i,e)=>{const l=`resolveFromPackageJsonPath:${o}:${s}:${i?"yes":"no"}`;if(e?.has(l))return e.get(l);const t=Q(o);if(!t)return;let r=s||"tsconfig.json";if(!i&&t.exports)try{const[n]=H(t.exports,s,["require","types"]);r=n}catch{return!1}else!s&&t.tsconfig&&(r=t.tsconfig);return r=u(o,"..",r),e?.set(l,r),r},"resolveFromPackageJsonPath"),L="package.json",S="tsconfig.json",Y=R((o,s,i)=>{let e=o;if(o===".."&&(e=u(e,S)),o.startsWith(".")&&(e=w(s,e)),A(e)){if(O(e)){if(D(e).isFile())return e}else if(!e.endsWith(".json")){const m=`${e}.json`;if(O(m))return m}return}const[l="",...t]=o.split("/"),r=l.startsWith("@")?`${l}/${String(t.shift())}`:l,n=t.join("/"),p=X();if(p){const{resolveRequest:m}=p;try{if(r===o){const d=m(u(r,L),s);if(d){const g=j(d,n,!1,i);if(g&&O(g))return g}}else{let d;try{d=m(o,s,{extensions:[".json"]})}catch{d=m(u(o,S),s)}if(d)return d}}catch{}}const c=N(m=>{const d=u(w(m),"node_modules",r);if(O(d))return u("node_modules",r)},{cwd:s,type:"directory"});if(!c||!D(c).isDirectory())return;const a=u(c,L);if(O(a)){const m=j(a,n,!1,i);if(m===!1)return;if(m&&O(m)&&D(m).isFile())return m}const h=u(c,n),J=h.endsWith(".json");if(!J){const m=`${h}.json`;if(O(m))return m}if(O(h)){if(D(h).isDirectory()){const m=u(h,L);if(O(m)){const g=j(m,"",!0,i);if(g&&O(g))return g}const d=u(h,S);if(O(d))return d}else if(J)return h}},"resolveExtendsPath");var Z=Object.defineProperty,v=C((o,s)=>Z(o,"name",{value:s,configurable:!0}),"c");const oo=v(o=>_(W(o,{buffer:!1})),"readJsonc"),eo=v(o=>o.replaceAll("\\","/"),"slash"),b=v(o=>{const s=z(o);return V(s)?s:`./${s}`},"normalizePath"),I=["files","include","exclude"],$=v((o,s,i)=>{const e=u(s,i),l=x(o,e);return k(l)||"./"},"resolveAndRelativize"),to=v((o,s,i)=>{const e=x(o,s);if(!e)return i;const l=i.startsWith("./")?i.slice(2):i;return`${e}/${l}`},"prefixPattern"),io=v((o,s,i,e)=>{if(i.has(o))throw new Error(`Circularity detected while resolving configuration: ${o}`);i.add(o);const l=P(o),t=M(o,e,i);delete t.references;const{compilerOptions:r}=t;if(r){const{baseUrl:n}=r;n&&!n.startsWith(f)&&(r.baseUrl=$(s,l,n));const{outDir:p}=r;p&&!p.startsWith(f)&&(r.outDir=$(s,l,p))}for(const n of I){const p=t[n];p&&(t[n]=p.map(c=>c.startsWith(f)||A(c)?c:to(s,l,c)))}return t},"resolveExtends"),M=v((o,s,i=new Set)=>{let e;try{e=oo(o)??{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${o}`)}if(typeof e!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${o}`);const l=P(o);if(e.compilerOptions){const{compilerOptions:t}=e;t.paths&&!t.baseUrl&&(t[no]=l)}if(e.extends){const t=Array.isArray(e.extends)?e.extends:[e.extends];delete e.extends;const r=t.toReversed();for(let n=0;n<r.length;n++){const p=r[n],c=Y(p,l);if(!c)throw new q(`No such file or directory, for '${p}' found.`);const a=io(c,l,new Set(i),s);a.compilerOptions?.rootDir!==void 0&&!a.compilerOptions.rootDir.startsWith(f)&&(a.compilerOptions.rootDir=u(P(c),a.compilerOptions.rootDir));const h={...a,...e,compilerOptions:{...a.compilerOptions,...e.compilerOptions}};a.watchOptions&&(h.watchOptions={...a.watchOptions,...e.watchOptions}),e=h}}if(e.compilerOptions){const{compilerOptions:t}=e;for(const r of["baseUrl","rootDir"]){const n=t[r];if(n&&!n.startsWith(f)){const p=w(l,n);t[r]=b(x(l,p))}}for(const r of["outDir","declarationDir"]){let n=t[r];n&&(Array.isArray(e.exclude)||(e.exclude=["outDir","declarationDir"].map(p=>{const c=t[p];if(c)return c.startsWith(f)||A(c)?c:u(l,c)}).filter(Boolean)),n.startsWith(f)||(n=b(n)),t[r]=n)}}else e.compilerOptions={};if(e.include&&(e.include=e.include.map(t=>eo(t))),e.files&&(e.files=e.files.map(t=>t.startsWith(f)?t:b(t))),e.watchOptions){const{watchOptions:t}=e;t.excludeDirectories&&(t.excludeDirectories=t.excludeDirectories.map(r=>k(w(l,r)))),t.excludeFiles&&(t.excludeFiles=t.excludeFiles.map(r=>k(w(l,r)))),t.watchFile&&(t.watchFile=t.watchFile.toLowerCase()),t.watchDirectory&&(t.watchDirectory=t.watchDirectory.toLowerCase()),t.fallbackPolling&&(t.fallbackPolling=t.fallbackPolling.toLowerCase())}if(e.compilerOptions.lib&&(e.compilerOptions.lib=e.compilerOptions.lib.map(t=>t.toLowerCase())),e.compilerOptions.module){let t=e.compilerOptions.module.toLowerCase();t==="es2015"&&(t="es6"),e.compilerOptions.module=t}if(e.compilerOptions.target){let t=e.compilerOptions.target.toLowerCase();t==="es2015"&&(t="es6"),e.compilerOptions.target=t}if(e.compilerOptions.moduleResolution){let t=e.compilerOptions.moduleResolution.toLowerCase();t==="node"&&(t="node10"),e.compilerOptions.moduleResolution=t}return e.compilerOptions.jsx&&(e.compilerOptions.jsx=e.compilerOptions.jsx.toLowerCase()),e.compilerOptions.moduleDetection&&(e.compilerOptions.moduleDetection=e.compilerOptions.moduleDetection.toLowerCase()),e.compilerOptions.importsNotUsedAsValues&&(e.compilerOptions.importsNotUsedAsValues=e.compilerOptions.importsNotUsedAsValues.toLowerCase()),e.compilerOptions.newLine&&(e.compilerOptions.newLine=e.compilerOptions.newLine.toLowerCase()),e},"internalParseTsConfig"),F=v((o,s)=>{if(o.startsWith(f))return k(u(s,o.slice(f.length)))},"interpolateConfigDirectory"),so=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],ro=v((o,s)=>{if(o.compilerOptions===void 0)return o;if(o.compilerOptions.rewriteRelativeImportExtensions&&(o.compilerOptions.allowImportingTsExtensions??=!0),o.compilerOptions.composite&&(o.compilerOptions.declaration??=!0,o.compilerOptions.incremental??=!0),o.compilerOptions.checkJs&&(o.compilerOptions.allowJs??=!0),o.compilerOptions.verbatimModuleSyntax&&(o.compilerOptions.isolatedModules??=!0,o.compilerOptions.preserveConstEnums??=!0),["5.4","5.5","5.6","5.7","5.8","5.9","true"].includes(String(s?.tscCompatible))){if(o.compilerOptions.esModuleInterop===void 0&&(o.compilerOptions.module==="node16"||o.compilerOptions.module==="node18"||o.compilerOptions.module==="node20"||o.compilerOptions.module==="nodenext"||o.compilerOptions.module==="preserve")&&(o.compilerOptions.esModuleInterop=!0),o.compilerOptions.moduleDetection===void 0&&o.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(o.compilerOptions.module)&&(o.compilerOptions.moduleDetection="force"),o.compilerOptions.moduleResolution===void 0){let i="classic";if(o.compilerOptions.module!==void 0)switch(o.compilerOptions.module.toLocaleLowerCase()){case"commonjs":{i="node10";break}case"node16":case"node18":{i="node16";break}case"node20":{i="node16";break}case"nodenext":{i="nodenext";break}case"preserve":{i="bundler";break}}i!=="classic"&&(o.compilerOptions.moduleResolution=i)}if(o.compilerOptions.moduleResolution==="bundler"&&(o.compilerOptions.resolveJsonModule??=!0),o.compilerOptions.module&&["node20","nodenext"].includes(o.compilerOptions.module)&&(o.compilerOptions.resolveJsonModule??=!0),(o.compilerOptions.esModuleInterop||o.compilerOptions.module==="system"||o.compilerOptions.moduleResolution==="bundler")&&o.compilerOptions.allowSyntheticDefaultImports===void 0&&(o.compilerOptions.allowSyntheticDefaultImports=!0),["5.7","5.8","5.9","true"].includes(String(s?.tscCompatible))&&o.compilerOptions.moduleResolution){let i=!1;["bundler","node16","nodenext"].includes(o.compilerOptions.moduleResolution.toLocaleLowerCase())&&(i=!0),o.compilerOptions.resolvePackageJsonExports===void 0&&i&&(o.compilerOptions.resolvePackageJsonExports=!0),o.compilerOptions.resolvePackageJsonImports===void 0&&i&&(o.compilerOptions.resolvePackageJsonImports=!0)}if(o.compilerOptions.target===void 0){let i="es5";switch(o.compilerOptions.module){case"node16":case"node18":{i="es2022";break}case"node20":{i="es2023";break}case"nodenext":{i="esnext";break}}i!=="es5"&&(o.compilerOptions.target=i)}o.compilerOptions.useDefineForClassFields===void 0&&o.compilerOptions.target&&(o.compilerOptions.target.includes("es202")||o.compilerOptions.target==="esnext")&&(o.compilerOptions.useDefineForClassFields=!0)}if(["5.6","5.7","5.8","5.9","true"].includes(String(s?.tscCompatible))&&o.compilerOptions.strict&&o.compilerOptions.strictBuiltinIteratorReturn===void 0&&(o.compilerOptions.strictBuiltinIteratorReturn=!0),["5.4","5.5","5.6","5.7","5.8","5.9","true"].includes(String(s?.tscCompatible))){if(o.compilerOptions.strict&&(o.compilerOptions.noImplicitAny=o.compilerOptions.noImplicitAny??!0,o.compilerOptions.noImplicitThis=o.compilerOptions.noImplicitThis??!0,o.compilerOptions.strictNullChecks=o.compilerOptions.strictNullChecks??!0,o.compilerOptions.strictFunctionTypes=o.compilerOptions.strictFunctionTypes??!0,o.compilerOptions.strictBindCallApply=o.compilerOptions.strictBindCallApply??!0,o.compilerOptions.strictPropertyInitialization=o.compilerOptions.strictPropertyInitialization??!0,o.compilerOptions.alwaysStrict=o.compilerOptions.alwaysStrict??!0),o.compilerOptions.useDefineForClassFields===void 0&&o.compilerOptions.target){let i=!1;(o.compilerOptions.target.includes("es202")||o.compilerOptions.target==="esnext")&&(i=!0),i&&(o.compilerOptions.useDefineForClassFields=!0)}o.compilerOptions.strict&&o.compilerOptions.useUnknownInCatchVariables===void 0&&(o.compilerOptions.useUnknownInCatchVariables=!0),o.compilerOptions.isolatedModules&&(o.compilerOptions.preserveConstEnums=o.compilerOptions.preserveConstEnums??!0)}if(String(s?.tscCompatible)==="6.0"){if(o.compilerOptions.moduleDetection===void 0&&o.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(o.compilerOptions.module)&&(o.compilerOptions.moduleDetection="force"),o.compilerOptions.moduleResolution===void 0&&o.compilerOptions.module){const i=o.compilerOptions.module.toLocaleLowerCase();i==="node16"||i==="node18"||i==="node20"?o.compilerOptions.moduleResolution="node16":i==="nodenext"&&(o.compilerOptions.moduleResolution="nodenext")}if(o.compilerOptions.useDefineForClassFields===void 0&&o.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(o.compilerOptions.module)&&o.compilerOptions.target&&!o.compilerOptions.target.includes("es202")&&o.compilerOptions.target!=="esnext"&&(o.compilerOptions.useDefineForClassFields=!1),o.compilerOptions.isolatedModules&&o.compilerOptions.preserveConstEnums===void 0&&(o.compilerOptions.preserveConstEnums=!0),o.compilerOptions.resolveJsonModule===void 0){const i=o.compilerOptions.module,e=o.compilerOptions.moduleResolution?.toLocaleLowerCase();!(i!==void 0&&["node20","nodenext"].includes(i)||e==="bundler")&&e&&(o.compilerOptions.resolveJsonModule=!1)}if(o.compilerOptions.moduleResolution){const i=o.compilerOptions.moduleResolution.toLocaleLowerCase();["bundler","node16","nodenext"].includes(i)||(o.compilerOptions.resolvePackageJsonExports??=!1,o.compilerOptions.resolvePackageJsonImports??=!1)}}return o.compileOnSave===!1&&delete o.compileOnSave,o},"tsCompatibleWrapper"),f="${configDir}",no=Symbol("implicitBaseUrl"),ho=v((o,s)=>{const i=w(o),e=M(i,s),l=P(i),{compilerOptions:t}=e;if(t){for(const n of so){const p=t[n];if(p){const c=F(p,l);t[n]=c?b(x(l,c)):p}}for(const n of["rootDirs","typeRoots"]){const p=t[n];p&&(t[n]=p.map(c=>{const a=F(c,l);return a?b(x(l,a)):c}))}const{paths:r}=t;if(r){const n=Object.keys(r);for(let p=0;p<n.length;p++){const c=n[p];r[c]=r[c].map(a=>F(a,l)??a)}}t.outDir&&(t.outDir=t.outDir.replace(f,""))}for(let r=0;r<I.length;r++){const n=I[r],p=e[n];p&&(e[n]=p.map(c=>F(c,l)??c))}return ro(e,s)},"readTsConfig");export{f as configDirectoryPlaceholder,no as implicitBaseUrlSymbol,ho as readTsConfig};
@@ -6,7 +6,7 @@ export type Options = {
6
6
  * When `true`, it will make the configuration compatible with the latest TypeScript version.
7
7
  * @default undefined
8
8
  */
9
- tscCompatible?: "5.3" | "5.4" | "5.5" | "5.6" | true;
9
+ tscCompatible?: "5.3" | "5.4" | "5.5" | "5.6" | "5.7" | "5.8" | "5.9" | "6.0" | true;
10
10
  };
11
11
  export declare const configDirectoryPlaceholder: string;
12
12
  export declare const implicitBaseUrlSymbol: symbol;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/tsconfig",
3
- "version": "2.1.3",
3
+ "version": "3.0.0-alpha.10",
4
4
  "description": "Find and/or parse the tsconfig.json file from a directory path.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -18,7 +18,7 @@
18
18
  "repository": {
19
19
  "type": "git",
20
20
  "url": "git+https://github.com/visulima/visulima.git",
21
- "directory": "packages/tsconfig"
21
+ "directory": "packages/tooling/tsconfig"
22
22
  },
23
23
  "funding": [
24
24
  {
@@ -50,13 +50,14 @@
50
50
  "CHANGELOG.md"
51
51
  ],
52
52
  "dependencies": {
53
- "@visulima/fs": "4.1.0",
54
- "@visulima/path": "2.0.5",
53
+ "@visulima/fs": "5.0.0-alpha.11",
54
+ "@visulima/path": "3.0.0-alpha.9",
55
55
  "jsonc-parser": "^3.3.1",
56
- "resolve-pkg-maps": "^1.0.0"
56
+ "resolve-pkg-maps": "^1.0.0",
57
+ "type-fest": "5.6.0"
57
58
  },
58
59
  "engines": {
59
- "node": ">=20.19 <=25.x"
60
+ "node": "^22.14.0 || >=24.10.0"
60
61
  },
61
62
  "publishConfig": {
62
63
  "access": "public",
@@ -1 +0,0 @@
1
- var h=Object.defineProperty;var f=(n,o)=>h(n,"name",{value:o,configurable:!0});import{findUp as s,findUpSync as r}from"@visulima/fs";import{NotFoundError as a}from"@visulima/fs/error";import{readTsConfig as p}from"./implicitBaseUrlSymbol-CMaKZ6En.js";var d=Object.defineProperty,l=f((n,o)=>d(n,"name",{value:o,configurable:!0}),"f");const g=new Map,w=l(async(n,o={})=>{const e=o.configFileName??"tsconfig.json";let c=await s(e,{...n&&{cwd:n},type:"file"});if(c||(c=await s("jsconfig.json",{...n&&{cwd:n},type:"file"})),!c)throw new a(`No such file or directory, for '${e}' or 'jsconfig.json' found.`);const i=o.cache&&typeof o.cache!="boolean"?o.cache:g;if(o.cache&&i.has(c))return i.get(c);const t={config:p(c,{tscCompatible:o.tscCompatible}),path:c};return o.cache&&i.set(c,t),t},"findTsConfig"),C=l((n,o={})=>{const e=o.configFileName??"tsconfig.json";let c=r(e,{...n&&{cwd:n},type:"file"});if(c||(c=r("jsconfig.json",{...n&&{cwd:n},type:"file"})),!c)throw new a(`No such file or directory, for '${e}' or 'jsconfig.json' found.`);const i=o.cache&&typeof o.cache!="boolean"?o.cache:g;if(o.cache&&i.has(c))return i.get(c);const t={config:p(c,{tscCompatible:o.tscCompatible}),path:c};return o.cache&&i.set(c,t),t},"findTsConfigSync");export{w as findTsConfig,C as findTsConfigSync};
@@ -1 +0,0 @@
1
- var B=Object.defineProperty;var D=(o,r)=>B(o,"name",{value:r,configurable:!0});import{createRequire as L}from"node:module";import{readFileSync as A,isAccessibleSync as f,findUpSync as N}from"@visulima/fs";import{NotFoundError as q}from"@visulima/fs/error";import{join as m,resolve as w,isAbsolute as _,toNamespacedPath as z,dirname as I,normalize as P,relative as v}from"@visulima/path";import{isRelative as R}from"@visulima/path/utils";import{parse as T}from"jsonc-parser";import{resolveExports as G}from"resolve-pkg-maps";const M=L(import.meta.url),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,W=D(o=>{if(typeof x<"u"&&x.versions&&x.versions.node){const[r,l]=x.versions.node.split(".").map(Number);if(r>22||r===22&&l>=3||r===20&&l>=16)return x.getBuiltinModule(o)}return M(o)},"__cjs_getBuiltinModule"),{statSync:C}=W("node:fs"),V=W("node:module");var H=Object.defineProperty,S=D((o,r)=>H(o,"name",{value:r,configurable:!0}),"d$1");const K=S(o=>T(A(o,{buffer:!1})),"readJsonc"),Q=S(()=>{const{findPnpApi:o}=V;return o?.(process.cwd())},"getPnpApi"),F=S((o,r,l,e)=>{const c=`resolveFromPackageJsonPath:${o}:${r}:${l?"yes":"no"}`;if(e?.has(c))return e.get(c);const t=K(o);if(!t)return;let n=r||"tsconfig.json";if(!l&&t.exports)try{const[s]=G(t.exports,r,["require","types"]);n=s}catch{return!1}else!r&&t.tsconfig&&(n=t.tsconfig);return n=m(o,"..",n),e?.set(c,n),n},"resolveFromPackageJsonPath"),k="package.json",$="tsconfig.json",X=S((o,r,l)=>{let e=o;if(o===".."&&(e=m(e,$)),o.startsWith(".")&&(e=w(r,e)),_(e)){if(f(e)){if(C(e).isFile())return e}else if(!e.endsWith(".json")){const p=`${e}.json`;if(f(p))return p}return}const[c,...t]=o.split("/"),n=c.startsWith("@")?`${c}/${t.shift()}`:c,s=t.join("/"),i=Q();if(i){const{resolveRequest:p}=i;try{if(n===o){const u=p(m(n,k),r);if(u){const h=F(u,s,!1,l);if(h&&f(h))return h}}else{let u;try{u=p(o,r,{extensions:[".json"]})}catch{u=p(m(o,$),r)}if(u)return u}}catch{}}const a=N(p=>{const u=m(w(p),"node_modules",n);if(f(u))return m("node_modules",n)},{cwd:r,type:"directory"});if(!a||!C(a).isDirectory())return;const b=m(a,k);if(f(b)){const p=F(b,s,!1,l);if(p===!1)return;if(p&&f(p)&&C(p).isFile())return p}const O=m(a,s),E=O.endsWith(".json");if(!E){const p=`${O}.json`;if(f(p))return p}if(f(O)){if(C(O).isDirectory()){const p=m(O,k);if(f(p)){const h=F(p,"",!0,l);if(h&&f(h))return h}const u=m(O,$);if(f(u))return u}else if(E)return O}},"resolveExtendsPath");var Y=Object.defineProperty,g=D((o,r)=>Y(o,"name",{value:r,configurable:!0}),"m");const Z=g(o=>T(A(o,{buffer:!1})),"readJsonc"),y=g(o=>{const r=z(o);return R(r)?r:`./${r}`},"normalizePath"),U=["files","include","exclude"],oo=g((o,r,l,e)=>{if(l.has(o))throw new Error(`Circularity detected while resolving configuration: ${o}`);l.add(o);const c=I(o),t=J(o,e,l);delete t.references;const{compilerOptions:n}=t;if(n){const{baseUrl:s}=n;s&&!s.startsWith(d)&&(n.baseUrl=P(v(r,m(c,s)))||"./");let{outDir:i}=n;i&&(i.startsWith(d)||(i=v(r,m(c,i))),n.outDir=y(i.replace(`${d}/`,""))||"./")}for(const s of U){const i=t[s];i&&(t[s]=i.map(a=>a.startsWith(d)||_(a)?a:v(r,m(c,a))))}return t},"resolveExtends"),J=g((o,r,l=new Set)=>{let e;try{e=Z(o)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${o}`)}if(typeof e!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${o}`);const c=I(o);if(e.compilerOptions){const{compilerOptions:t}=e;t.paths&&!t.baseUrl&&(t[io]=c)}if(e.extends){const t=Array.isArray(e.extends)?e.extends:[e.extends];delete e.extends;for(const n of t.toReversed()){const s=X(n,c);if(!s)throw new q(`No such file or directory, for '${n}' found.`);const i=oo(s,c,new Set(l),r);i.compilerOptions?.rootDir!==void 0&&!i.compilerOptions.rootDir.startsWith(d)&&(i.compilerOptions.rootDir=m(I(s),i.compilerOptions.rootDir));const a={...i,...e,compilerOptions:{...i.compilerOptions,...e.compilerOptions}};i.watchOptions&&(a.watchOptions={...i.watchOptions,...e.watchOptions}),e=a}}if(e.compilerOptions){const{compilerOptions:t}=e;for(const n of["baseUrl","rootDir"]){const s=t[n];if(s&&!s.startsWith(d)){const i=w(c,s);t[n]=y(v(c,i))}}for(const n of["outDir","declarationDir"]){let s=t[n];if(s){Array.isArray(e.exclude)||(e.exclude=[]);let i=s;_(i)||(i=m(c,i)),i=i.replace(d,""),e.exclude.includes(i)||e.exclude.push(i),s.startsWith(d)||(s=y(s)),t[n]=s}}}else e.compilerOptions={};if(e.include?(e.include=e.include.map(t=>P(t)),e.files&&delete e.files):e.files&&(e.files=e.files.map(t=>t.startsWith(d)?t:y(t))),e.watchOptions){const{watchOptions:t}=e;t.excludeDirectories&&(t.excludeDirectories=t.excludeDirectories.map(n=>w(c,n)))}return e.compilerOptions?.lib&&(e.compilerOptions.lib=e.compilerOptions.lib.map(t=>t.toLowerCase())),e.compilerOptions.module&&(e.compilerOptions.module=e.compilerOptions.module.toLowerCase()),e.compilerOptions.target&&(e.compilerOptions.target=e.compilerOptions.target.toLowerCase()),e},"internalParseTsConfig"),j=g((o,r)=>{if(o.startsWith(d))return P(m(r,o.slice(d.length)))},"interpolateConfigDirectory"),eo=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],to=g((o,r)=>{if(o.compilerOptions===void 0)return o;if(o.compilerOptions.rewriteRelativeImportExtensions&&(o.compilerOptions.allowImportingTsExtensions??=!0),["5.4","5.5","5.6","5.7","5.8","5.9","true"].includes(String(r?.tscCompatible))){if(o.compilerOptions.esModuleInterop===void 0&&(o.compilerOptions.module==="node16"||o.compilerOptions.module==="nodenext"||o.compilerOptions.module==="preserve")&&(o.compilerOptions.esModuleInterop=!0),o?.compilerOptions.moduleDetection===void 0&&o.compilerOptions.module&&["node16","nodenext"].includes(o.compilerOptions.module)&&(o.compilerOptions.moduleDetection="force"),o.compilerOptions.moduleResolution===void 0){let l="classic";if(o.compilerOptions.module!==void 0)switch((o.compilerOptions?.module).toLocaleLowerCase()){case"commonjs":{l="node10";break}case"node16":{l="node16";break}case"nodenext":{l="nodenext";break}case"preserve":{l="bundler";break}}l!=="classic"&&(o.compilerOptions.moduleResolution=l)}if(o.compilerOptions.moduleResolution==="bundler"&&(o.compilerOptions.resolveJsonModule=!0),(o.compilerOptions.esModuleInterop||o.compilerOptions.module==="system"||o.compilerOptions.moduleResolution==="bundler")&&o.compilerOptions.allowSyntheticDefaultImports===void 0&&(o.compilerOptions.allowSyntheticDefaultImports=!0),["5.7","5.8","5.9","true"].includes(String(r?.tscCompatible))&&o.compilerOptions.moduleResolution){let l=!1;["bundler","node16","nodenext"].includes(o.compilerOptions.moduleResolution.toLocaleLowerCase())&&(l=!0),o.compilerOptions.resolvePackageJsonExports===void 0&&l&&(o.compilerOptions.resolvePackageJsonExports=!0),o.compilerOptions.resolvePackageJsonImports===void 0&&l&&(o.compilerOptions.resolvePackageJsonImports=!0)}if(o.compilerOptions.target===void 0){let l="es5";o.compilerOptions.module==="node16"?l="es2022":o.compilerOptions.module==="nodenext"&&(l="esnext"),l!=="es5"&&(o.compilerOptions.target=l)}o.compilerOptions.useDefineForClassFields===void 0&&o.compilerOptions.target&&(o.compilerOptions.target.includes("es202")||o.compilerOptions.target==="esnext")&&(o.compilerOptions.useDefineForClassFields=!0)}if(["5.6","5.7","5.8","5.9","true"].includes(String(r?.tscCompatible))&&o.compilerOptions.strict&&o.compilerOptions.strictBuiltinIteratorReturn===void 0&&(o.compilerOptions.strictBuiltinIteratorReturn=!0),["5.4","5.5","5.6","5.7","5.8","5.9","true"].includes(String(r?.tscCompatible))){if(o.compilerOptions.strict&&(o.compilerOptions.noImplicitAny=o.compilerOptions.noImplicitAny??!0,o.compilerOptions.noImplicitThis=o.compilerOptions.noImplicitThis??!0,o.compilerOptions.strictNullChecks=o.compilerOptions.strictNullChecks??!0,o.compilerOptions.strictFunctionTypes=o.compilerOptions.strictFunctionTypes??!0,o.compilerOptions.strictBindCallApply=o.compilerOptions.strictBindCallApply??!0,o.compilerOptions.strictPropertyInitialization=o.compilerOptions.strictPropertyInitialization??!0,o.compilerOptions.alwaysStrict=o.compilerOptions.alwaysStrict??!0),o.compilerOptions.useDefineForClassFields===void 0&&o.compilerOptions.target){let l=!1;(o.compilerOptions.target.includes("es202")||o.compilerOptions.target==="esnext")&&(l=!0),l&&(o.compilerOptions.useDefineForClassFields=!0)}o.compilerOptions.strict&&o.compilerOptions.useUnknownInCatchVariables===void 0&&(o.compilerOptions.useUnknownInCatchVariables=!0),o.compilerOptions.isolatedModules&&(o.compilerOptions.preserveConstEnums=o.compilerOptions.preserveConstEnums??!0)}return o.compileOnSave===!1&&delete o.compileOnSave,o},"tsCompatibleWrapper"),d="${configDir}",io=Symbol("implicitBaseUrl"),uo=g((o,r)=>{const l=w(o),e=J(l,r),c=I(l),{compilerOptions:t}=e;if(t){for(const s of eo){const i=t[s];if(i){const a=j(i,c);t[s]=a?y(v(c,a)):i}}for(const s of["rootDirs","typeRoots"]){const i=t[s];i&&(t[s]=i.map(a=>{const b=j(a,c);return b?y(v(c,b)):a}))}const{paths:n}=t;if(n)for(const s of Object.keys(n))n[s]=n[s].map(i=>j(i,c)??i);t.outDir&&(t.outDir=t.outDir.replace(d,""))}for(const n of U){const s=e[n];s&&(e[n]=s.map(i=>j(i,c)||(n==="files"&&R(i)?i:n==="include"&&R(i)?m(c,i):P(i))))}return to(e,r)},"readTsConfig");export{d as configDirectoryPlaceholder,io as implicitBaseUrlSymbol,uo as readTsConfig};