@visulima/tsconfig 3.0.0-alpha.1 → 3.0.0-alpha.11
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 +167 -0
- package/LICENSE.md +1 -1
- package/dist/index.js +1 -1
- package/dist/packem_shared/findTsConfig-QzVKvyBN.js +1 -0
- package/dist/packem_shared/implicitBaseUrlSymbol-CI4Y92iF.js +1 -0
- package/dist/read-tsconfig.d.ts +1 -1
- package/package.json +6 -6
- package/dist/packem_shared/findTsConfig-CIJKFGq0.js +0 -1
- package/dist/packem_shared/implicitBaseUrlSymbol-CMaKZ6En.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,170 @@
|
|
|
1
|
+
## @visulima/tsconfig [3.0.0-alpha.11](https://github.com/visulima/visulima/compare/@visulima/tsconfig@3.0.0-alpha.10...@visulima/tsconfig@3.0.0-alpha.11) (2026-04-22)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* Remove JSR configuration generation script and generated jsr.json files ([#616](https://github.com/visulima/visulima/issues/616)) ([533744b](https://github.com/visulima/visulima/commit/533744b103b74896941db5b727173e617a27a63b))
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Dependencies
|
|
9
|
+
|
|
10
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.12
|
|
11
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.10
|
|
12
|
+
|
|
13
|
+
## @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)
|
|
14
|
+
|
|
15
|
+
### Miscellaneous Chores
|
|
16
|
+
|
|
17
|
+
* jsr.json update and lock file ([73fce38](https://github.com/visulima/visulima/commit/73fce38c7cb4603f3fffb88609b1b18e2feb4937))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Dependencies
|
|
21
|
+
|
|
22
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.11
|
|
23
|
+
|
|
24
|
+
## @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)
|
|
25
|
+
|
|
26
|
+
### Miscellaneous Chores
|
|
27
|
+
|
|
28
|
+
* update the jsr.json ([864ab7e](https://github.com/visulima/visulima/commit/864ab7e71c4b5ae82f64792d1ae8debfea2c539b))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Dependencies
|
|
32
|
+
|
|
33
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.10
|
|
34
|
+
|
|
35
|
+
## @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)
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* **tooling:** resolve eslint and formatting issues ([399d292](https://github.com/visulima/visulima/commit/399d29282be5b29bb26b4e5b24d45e2a6cdeeca3))
|
|
40
|
+
* **tsconfig:** relax no-unsafe-* for tests and untyped external deps ([1e63952](https://github.com/visulima/visulima/commit/1e63952c41ff76e450ba4ca5aba6ddf7229c65b3))
|
|
41
|
+
* **tsconfig:** suppress sonarjs/deprecation for baseUrl handling ([431ae96](https://github.com/visulima/visulima/commit/431ae96bdd025a052bde8291918b1593f972efa1))
|
|
42
|
+
|
|
43
|
+
### Miscellaneous Chores
|
|
44
|
+
|
|
45
|
+
* bump engines.node to ^22.14.0 || >=24.10.0 ([c3d0931](https://github.com/visulima/visulima/commit/c3d0931d1504e4f21ebf50ea680cfa7ce4ba15ce))
|
|
46
|
+
* fixed jsr.json ([5d85e51](https://github.com/visulima/visulima/commit/5d85e5179de38e284ec433b14d77c71a1619c8d6))
|
|
47
|
+
* **tsconfig:** apply pending changes ([d7ddb14](https://github.com/visulima/visulima/commit/d7ddb14293c1a140e818dd1b314caeba68db66da))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Dependencies
|
|
51
|
+
|
|
52
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.9
|
|
53
|
+
|
|
54
|
+
## @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)
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* **tsconfig:** add node types and fix implicit any parameter ([1744d82](https://github.com/visulima/visulima/commit/1744d82a07fca03f2e6ff660b918e9b2623acf69))
|
|
59
|
+
* **tsconfig:** add TypeScript 6.0 compatibility for implicit compiler defaults ([19de98f](https://github.com/visulima/visulima/commit/19de98f2640c143c6f5e84eda214c84584cf980c))
|
|
60
|
+
* **tsconfig:** align parsing with get-tsconfig for files/include, path inheritance, and TS 6.0 ([0c9d4be](https://github.com/visulima/visulima/commit/0c9d4be347f6ee4212dbe98026a7cd1d465bc2de))
|
|
61
|
+
* **tsconfig:** properly fix eslint errors in code ([95a2142](https://github.com/visulima/visulima/commit/95a2142f816f9ae0d50caaf235a71f9d03ab71cf))
|
|
62
|
+
* **tsconfig:** remove remaining eslint suppressions with proper code fixes ([57a45bb](https://github.com/visulima/visulima/commit/57a45bbc4e00e1c688a12367dc734c1553a17a6a))
|
|
63
|
+
* **tsconfig:** resolve eslint errors ([5848320](https://github.com/visulima/visulima/commit/5848320dc88a6080cf507eda724f57f9a6800434))
|
|
64
|
+
|
|
65
|
+
### Miscellaneous Chores
|
|
66
|
+
|
|
67
|
+
* **tooling:** remove empty dependency objects from package.json ([dc52a23](https://github.com/visulima/visulima/commit/dc52a23bc1e2d36f4ec71ca67506bf6861a02929))
|
|
68
|
+
* **tsconfig:** add tsconfig.eslint.json for type-aware linting ([2c01b30](https://github.com/visulima/visulima/commit/2c01b30e740cdbf75f96317053fd78a56fb2ccc9))
|
|
69
|
+
* **tsconfig:** apply prettier formatting ([85f32f5](https://github.com/visulima/visulima/commit/85f32f5f072edef750a4ff41d8b25918d26a4641))
|
|
70
|
+
* **tsconfig:** migrate .prettierrc.cjs to prettier.config.js ([bbf2a3b](https://github.com/visulima/visulima/commit/bbf2a3b0f6e23ea39dfeb583b0d100a407c8adaf))
|
|
71
|
+
* **tsconfig:** sort fixture package.json fields ([370c336](https://github.com/visulima/visulima/commit/370c336d2e1331fe05d2231d92a2b3b456c77620))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### Dependencies
|
|
75
|
+
|
|
76
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.7
|
|
77
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.8
|
|
78
|
+
|
|
79
|
+
## @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)
|
|
80
|
+
|
|
81
|
+
### Features
|
|
82
|
+
|
|
83
|
+
* **web:** auto-generate packages page from workspace metadata ([623e520](https://github.com/visulima/visulima/commit/623e5207693a7fe720f5f2f179593a3654c880e3))
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Dependencies
|
|
87
|
+
|
|
88
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.6
|
|
89
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.7
|
|
90
|
+
|
|
91
|
+
## @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)
|
|
92
|
+
|
|
93
|
+
### Bug Fixes
|
|
94
|
+
|
|
95
|
+
* **tsconfig:** use workspace:* for internal [@visulima](https://github.com/visulima) deps ([420ce4a](https://github.com/visulima/visulima/commit/420ce4a0c075f78520fb9434ea83c9b6e301b571))
|
|
96
|
+
* **web:** improve build setup with incremental stats caching and prod install ([fe33e75](https://github.com/visulima/visulima/commit/fe33e75827586779b4b3a0c6d57b39f889ee6207))
|
|
97
|
+
|
|
98
|
+
### Miscellaneous Chores
|
|
99
|
+
|
|
100
|
+
* **tsconfig:** migrate deps to pnpm catalogs ([ab6e375](https://github.com/visulima/visulima/commit/ab6e37535ba3a575d0d0ddeee72560d8e560bccc))
|
|
101
|
+
* **tsconfig:** update dependencies ([bf73f34](https://github.com/visulima/visulima/commit/bf73f340b2059d0bf74d836154d7e3a65a8e2c0a))
|
|
102
|
+
* visulima website ([#591](https://github.com/visulima/visulima/issues/591)) ([59ab2e2](https://github.com/visulima/visulima/commit/59ab2e2befb03e51cd2088956f83d9b87de6d033))
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Dependencies
|
|
106
|
+
|
|
107
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.5
|
|
108
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.6
|
|
109
|
+
|
|
110
|
+
## @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)
|
|
111
|
+
|
|
112
|
+
### Bug Fixes
|
|
113
|
+
|
|
114
|
+
* **tsconfig:** update packem to 2.0.0-alpha.54 ([2f9b2ae](https://github.com/visulima/visulima/commit/2f9b2aea84a455f65ec6d682231876d5c5070159))
|
|
115
|
+
|
|
116
|
+
### Documentation
|
|
117
|
+
|
|
118
|
+
* **humanizer,html,iso-locale,package,tsconfig:** add comprehensive Fumadocs documentation ([19781ce](https://github.com/visulima/visulima/commit/19781ce5d27605971a9f2fdf0a99863effd98091))
|
|
119
|
+
|
|
120
|
+
### Miscellaneous Chores
|
|
121
|
+
|
|
122
|
+
* **tooling:** update dependencies ([7f6f9d3](https://github.com/visulima/visulima/commit/7f6f9d3c41b170c53659ab34b79ceb23e4e9660a))
|
|
123
|
+
* **tsconfig:** update dependencies ([3388495](https://github.com/visulima/visulima/commit/3388495a99235637506dc8b2958e26b625db36f1))
|
|
124
|
+
* **tsconfig:** update dependencies ([7697d4b](https://github.com/visulima/visulima/commit/7697d4b4fa7153ab4a6bb93af68e35da7946df89))
|
|
125
|
+
* update lock file maintenance ([d83e716](https://github.com/visulima/visulima/commit/d83e71697b75d24704185b66bb521a934d2db02d))
|
|
126
|
+
* year update ([47f4105](https://github.com/visulima/visulima/commit/47f410596ce7190cfea36a073db32e0cec50bbcd))
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
### Dependencies
|
|
130
|
+
|
|
131
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.4
|
|
132
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.5
|
|
133
|
+
|
|
134
|
+
## @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)
|
|
135
|
+
|
|
136
|
+
### Bug Fixes
|
|
137
|
+
|
|
138
|
+
* **tsconfig:** update package files ([f1bb598](https://github.com/visulima/visulima/commit/f1bb5982e370fac9caffd76a73645e51c6ab1704))
|
|
139
|
+
|
|
140
|
+
### Miscellaneous Chores
|
|
141
|
+
|
|
142
|
+
* fixed project.json names and schema path ([964722f](https://github.com/visulima/visulima/commit/964722f691db205c7edb9aa6db29e849a647500b))
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### Dependencies
|
|
146
|
+
|
|
147
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.3
|
|
148
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.4
|
|
149
|
+
|
|
150
|
+
## @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)
|
|
151
|
+
|
|
152
|
+
### Bug Fixes
|
|
153
|
+
|
|
154
|
+
* update package OG images across multiple packages ([f08e4dd](https://github.com/visulima/visulima/commit/f08e4dd2b105ccb29c8412020a9c2be36d6c1e9e))
|
|
155
|
+
|
|
156
|
+
### Miscellaneous Chores
|
|
157
|
+
|
|
158
|
+
* update configuration files and add new package listing script ([3d918ef](https://github.com/visulima/visulima/commit/3d918efd53772430b53b026de6401bdedbe7ea3a))
|
|
159
|
+
* update logo assets and README references ([a673e68](https://github.com/visulima/visulima/commit/a673e68c62937e61bd3231df7bb4cb01695aea71))
|
|
160
|
+
* update package dependencies and improve configuration ([4ed22d6](https://github.com/visulima/visulima/commit/4ed22d6511aa8150dcd4ba7b9dccf05dbe2d6adc))
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### Dependencies
|
|
164
|
+
|
|
165
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.2
|
|
166
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.3
|
|
167
|
+
|
|
1
168
|
## @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)
|
|
2
169
|
|
|
3
170
|
### ⚠ BREAKING CHANGES
|
package/LICENSE.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{findTsConfig as f,findTsConfigSync as r}from"./packem_shared/findTsConfig-
|
|
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};
|
package/dist/read-tsconfig.d.ts
CHANGED
|
@@ -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": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.11",
|
|
4
4
|
"description": "Find and/or parse the tsconfig.json file from a directory path.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"CHANGELOG.md"
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"
|
|
54
|
-
"@visulima/
|
|
55
|
-
"@visulima/path": "3.0.0-alpha.2",
|
|
53
|
+
"@visulima/fs": "5.0.0-alpha.12",
|
|
54
|
+
"@visulima/path": "3.0.0-alpha.10",
|
|
56
55
|
"jsonc-parser": "^3.3.1",
|
|
57
|
-
"resolve-pkg-maps": "^1.0.0"
|
|
56
|
+
"resolve-pkg-maps": "^1.0.0",
|
|
57
|
+
"type-fest": "5.6.0"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
|
-
"node": "
|
|
60
|
+
"node": "^22.14.0 || >=24.10.0"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|
|
63
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};
|