@ttsc/unplugin 0.34.0 → 0.34.2

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.
Files changed (262) hide show
  1. package/README.md +1 -0
  2. package/lib/api.js +4 -0
  3. package/lib/api.js.map +1 -1
  4. package/lib/api.mjs +2 -0
  5. package/lib/api.mjs.map +1 -1
  6. package/lib/core/bridge/TtscProjectRecord.d.cts +4 -1
  7. package/lib/core/bridge/TtscProjectRecord.d.mts +4 -1
  8. package/lib/core/bridge/TtscProjectRecord.d.ts +4 -1
  9. package/lib/core/bridge/projectRecordArgumentsMatch.d.cts +18 -0
  10. package/lib/core/bridge/projectRecordArgumentsMatch.d.mts +18 -0
  11. package/lib/core/bridge/projectRecordArgumentsMatch.d.ts +18 -0
  12. package/lib/core/bridge/projectRecordArgumentsMatch.js +36 -0
  13. package/lib/core/bridge/projectRecordArgumentsMatch.js.map +1 -0
  14. package/lib/core/bridge/projectRecordArgumentsMatch.mjs +34 -0
  15. package/lib/core/bridge/projectRecordArgumentsMatch.mjs.map +1 -0
  16. package/lib/core/bridge/projectRecordMoved.d.cts +14 -12
  17. package/lib/core/bridge/projectRecordMoved.d.mts +14 -12
  18. package/lib/core/bridge/projectRecordMoved.d.ts +14 -12
  19. package/lib/core/bridge/projectRecordMoved.js +17 -12
  20. package/lib/core/bridge/projectRecordMoved.js.map +1 -1
  21. package/lib/core/bridge/projectRecordMoved.mjs +17 -12
  22. package/lib/core/bridge/projectRecordMoved.mjs.map +1 -1
  23. package/lib/core/bridge/readProjectRecordFile.d.cts +4 -3
  24. package/lib/core/bridge/readProjectRecordFile.d.mts +4 -3
  25. package/lib/core/bridge/readProjectRecordFile.d.ts +4 -3
  26. package/lib/core/bridge/readProjectRecordFile.js +26 -3
  27. package/lib/core/bridge/readProjectRecordFile.js.map +1 -1
  28. package/lib/core/bridge/readProjectRecordFile.mjs +26 -3
  29. package/lib/core/bridge/readProjectRecordFile.mjs.map +1 -1
  30. package/lib/core/bridge/refreshProjectRecordFile.d.cts +3 -2
  31. package/lib/core/bridge/refreshProjectRecordFile.d.mts +3 -2
  32. package/lib/core/bridge/refreshProjectRecordFile.d.ts +3 -2
  33. package/lib/core/bridge/refreshProjectRecordFile.js +9 -3
  34. package/lib/core/bridge/refreshProjectRecordFile.js.map +1 -1
  35. package/lib/core/bridge/refreshProjectRecordFile.mjs +9 -3
  36. package/lib/core/bridge/refreshProjectRecordFile.mjs.map +1 -1
  37. package/lib/core/bridge/refreshProjectRecordFiles.d.cts +1 -1
  38. package/lib/core/bridge/refreshProjectRecordFiles.d.mts +1 -1
  39. package/lib/core/bridge/refreshProjectRecordFiles.d.ts +1 -1
  40. package/lib/core/bridge/refreshProjectRecordFiles.js +2 -2
  41. package/lib/core/bridge/refreshProjectRecordFiles.js.map +1 -1
  42. package/lib/core/bridge/refreshProjectRecordFiles.mjs +2 -2
  43. package/lib/core/bridge/refreshProjectRecordFiles.mjs.map +1 -1
  44. package/lib/core/index.d.cts +2 -0
  45. package/lib/core/index.d.mts +2 -0
  46. package/lib/core/index.d.ts +2 -0
  47. package/lib/core/index.js +4 -0
  48. package/lib/core/index.js.map +1 -1
  49. package/lib/core/index.mjs +2 -0
  50. package/lib/core/index.mjs.map +1 -1
  51. package/lib/core/next/next.js +5 -2
  52. package/lib/core/next/next.js.map +1 -1
  53. package/lib/core/next/next.mjs +5 -2
  54. package/lib/core/next/next.mjs.map +1 -1
  55. package/lib/core/options/ResolvedTtscUnpluginOptions.d.cts +2 -0
  56. package/lib/core/options/ResolvedTtscUnpluginOptions.d.mts +2 -0
  57. package/lib/core/options/ResolvedTtscUnpluginOptions.d.ts +2 -0
  58. package/lib/core/options/TtscUnpluginOptions.d.cts +8 -0
  59. package/lib/core/options/TtscUnpluginOptions.d.mts +8 -0
  60. package/lib/core/options/TtscUnpluginOptions.d.ts +8 -0
  61. package/lib/core/options/resolveOptions.d.cts +4 -3
  62. package/lib/core/options/resolveOptions.d.mts +4 -3
  63. package/lib/core/options/resolveOptions.d.ts +4 -3
  64. package/lib/core/options/resolveOptions.js +5 -3
  65. package/lib/core/options/resolveOptions.js.map +1 -1
  66. package/lib/core/options/resolveOptions.mjs +5 -3
  67. package/lib/core/options/resolveOptions.mjs.map +1 -1
  68. package/lib/core/rollup/rollupDeliveryOptions.d.cts +6 -6
  69. package/lib/core/rollup/rollupDeliveryOptions.d.mts +6 -6
  70. package/lib/core/rollup/rollupDeliveryOptions.d.ts +6 -6
  71. package/lib/core/rollup/rollupDeliveryOptions.js +9 -6
  72. package/lib/core/rollup/rollupDeliveryOptions.js.map +1 -1
  73. package/lib/core/rollup/rollupDeliveryOptions.mjs +9 -6
  74. package/lib/core/rollup/rollupDeliveryOptions.mjs.map +1 -1
  75. package/lib/core/transform/cache/TRANSFORM_CACHE_MEMBERSHIP_POLICIES.d.cts +10 -0
  76. package/lib/core/transform/cache/TRANSFORM_CACHE_MEMBERSHIP_POLICIES.d.mts +10 -0
  77. package/lib/core/transform/cache/TRANSFORM_CACHE_MEMBERSHIP_POLICIES.d.ts +10 -0
  78. package/lib/core/transform/cache/TRANSFORM_CACHE_MEMBERSHIP_POLICIES.js +13 -0
  79. package/lib/core/transform/cache/TRANSFORM_CACHE_MEMBERSHIP_POLICIES.js.map +1 -0
  80. package/lib/core/transform/cache/TRANSFORM_CACHE_MEMBERSHIP_POLICIES.mjs +11 -0
  81. package/lib/core/transform/cache/TRANSFORM_CACHE_MEMBERSHIP_POLICIES.mjs.map +1 -0
  82. package/lib/core/transform/cache/TtscCachedProjectTransform.d.cts +6 -0
  83. package/lib/core/transform/cache/TtscCachedProjectTransform.d.mts +6 -0
  84. package/lib/core/transform/cache/TtscCachedProjectTransform.d.ts +6 -0
  85. package/lib/core/transform/cache/createTransformCacheKey.d.cts +11 -8
  86. package/lib/core/transform/cache/createTransformCacheKey.d.mts +11 -8
  87. package/lib/core/transform/cache/createTransformCacheKey.d.ts +11 -8
  88. package/lib/core/transform/cache/createTransformCacheKey.js +11 -8
  89. package/lib/core/transform/cache/createTransformCacheKey.js.map +1 -1
  90. package/lib/core/transform/cache/createTransformCacheKey.mjs +11 -8
  91. package/lib/core/transform/cache/createTransformCacheKey.mjs.map +1 -1
  92. package/lib/core/transform/generation/TtscCompilerMembershipHint.d.cts +20 -0
  93. package/lib/core/transform/generation/TtscCompilerMembershipHint.d.mts +20 -0
  94. package/lib/core/transform/generation/TtscCompilerMembershipHint.d.ts +20 -0
  95. package/lib/core/transform/generation/applyCompilerMembership.d.cts +15 -0
  96. package/lib/core/transform/generation/applyCompilerMembership.d.mts +15 -0
  97. package/lib/core/transform/generation/applyCompilerMembership.d.ts +15 -0
  98. package/lib/core/transform/generation/applyCompilerMembership.js +41 -0
  99. package/lib/core/transform/generation/applyCompilerMembership.js.map +1 -0
  100. package/lib/core/transform/generation/applyCompilerMembership.mjs +39 -0
  101. package/lib/core/transform/generation/applyCompilerMembership.mjs.map +1 -0
  102. package/lib/core/transform/generation/captureTransformGeneration.d.cts +7 -0
  103. package/lib/core/transform/generation/captureTransformGeneration.d.mts +7 -0
  104. package/lib/core/transform/generation/captureTransformGeneration.d.ts +7 -0
  105. package/lib/core/transform/generation/captureTransformGeneration.js +20 -7
  106. package/lib/core/transform/generation/captureTransformGeneration.js.map +1 -1
  107. package/lib/core/transform/generation/captureTransformGeneration.mjs +20 -7
  108. package/lib/core/transform/generation/captureTransformGeneration.mjs.map +1 -1
  109. package/lib/core/transform/generation/onlyLearnedCompileFacts.d.cts +5 -5
  110. package/lib/core/transform/generation/onlyLearnedCompileFacts.d.mts +5 -5
  111. package/lib/core/transform/generation/onlyLearnedCompileFacts.d.ts +5 -5
  112. package/lib/core/transform/generation/onlyLearnedCompileFacts.js +7 -5
  113. package/lib/core/transform/generation/onlyLearnedCompileFacts.js.map +1 -1
  114. package/lib/core/transform/generation/onlyLearnedCompileFacts.mjs +7 -5
  115. package/lib/core/transform/generation/onlyLearnedCompileFacts.mjs.map +1 -1
  116. package/lib/core/transform/generation/primeCompilerMembership.d.cts +22 -0
  117. package/lib/core/transform/generation/primeCompilerMembership.d.mts +22 -0
  118. package/lib/core/transform/generation/primeCompilerMembership.d.ts +22 -0
  119. package/lib/core/transform/generation/primeCompilerMembership.js +32 -0
  120. package/lib/core/transform/generation/primeCompilerMembership.js.map +1 -0
  121. package/lib/core/transform/generation/primeCompilerMembership.mjs +30 -0
  122. package/lib/core/transform/generation/primeCompilerMembership.mjs.map +1 -0
  123. package/lib/core/transform/generation/selectReportedMembershipPolicy.d.cts +7 -7
  124. package/lib/core/transform/generation/selectReportedMembershipPolicy.d.mts +7 -7
  125. package/lib/core/transform/generation/selectReportedMembershipPolicy.d.ts +7 -7
  126. package/lib/core/transform/generation/selectReportedMembershipPolicy.js +43 -9
  127. package/lib/core/transform/generation/selectReportedMembershipPolicy.js.map +1 -1
  128. package/lib/core/transform/generation/selectReportedMembershipPolicy.mjs +43 -9
  129. package/lib/core/transform/generation/selectReportedMembershipPolicy.mjs.map +1 -1
  130. package/lib/core/transform/generation/transformProject.d.cts +7 -0
  131. package/lib/core/transform/generation/transformProject.d.mts +7 -0
  132. package/lib/core/transform/generation/transformProject.d.ts +7 -0
  133. package/lib/core/transform/generation/transformProject.js +3 -0
  134. package/lib/core/transform/generation/transformProject.js.map +1 -1
  135. package/lib/core/transform/generation/transformProject.mjs +3 -0
  136. package/lib/core/transform/generation/transformProject.mjs.map +1 -1
  137. package/lib/core/transform/project/isPossibleProgramFileName.d.cts +13 -11
  138. package/lib/core/transform/project/isPossibleProgramFileName.d.mts +13 -11
  139. package/lib/core/transform/project/isPossibleProgramFileName.d.ts +13 -11
  140. package/lib/core/transform/project/isPossibleProgramFileName.js +21 -13
  141. package/lib/core/transform/project/isPossibleProgramFileName.js.map +1 -1
  142. package/lib/core/transform/project/isPossibleProgramFileName.mjs +21 -13
  143. package/lib/core/transform/project/isPossibleProgramFileName.mjs.map +1 -1
  144. package/lib/core/transform/session/sharedCompileIdentity.d.cts +8 -5
  145. package/lib/core/transform/session/sharedCompileIdentity.d.mts +8 -5
  146. package/lib/core/transform/session/sharedCompileIdentity.d.ts +8 -5
  147. package/lib/core/transform/session/sharedCompileIdentity.js +8 -5
  148. package/lib/core/transform/session/sharedCompileIdentity.js.map +1 -1
  149. package/lib/core/transform/session/sharedCompileIdentity.mjs +8 -5
  150. package/lib/core/transform/session/sharedCompileIdentity.mjs.map +1 -1
  151. package/lib/core/transform/transformTtsc.js +18 -0
  152. package/lib/core/transform/transformTtsc.js.map +1 -1
  153. package/lib/core/transform/transformTtsc.mjs +18 -0
  154. package/lib/core/transform/transformTtsc.mjs.map +1 -1
  155. package/lib/core/transform/tsconfig/TtscCompilerArgumentsWitness.d.cts +19 -0
  156. package/lib/core/transform/tsconfig/TtscCompilerArgumentsWitness.d.mts +19 -0
  157. package/lib/core/transform/tsconfig/TtscCompilerArgumentsWitness.d.ts +19 -0
  158. package/lib/core/transform/tsconfig/captureCompilerArguments.d.cts +14 -0
  159. package/lib/core/transform/tsconfig/captureCompilerArguments.d.mts +14 -0
  160. package/lib/core/transform/tsconfig/captureCompilerArguments.d.ts +14 -0
  161. package/lib/core/transform/tsconfig/captureCompilerArguments.js +26 -0
  162. package/lib/core/transform/tsconfig/captureCompilerArguments.js.map +1 -0
  163. package/lib/core/transform/tsconfig/captureCompilerArguments.mjs +24 -0
  164. package/lib/core/transform/tsconfig/captureCompilerArguments.mjs.map +1 -0
  165. package/lib/core/transform/tsconfig/compilerEnvironmentIdentity.d.cts +13 -0
  166. package/lib/core/transform/tsconfig/compilerEnvironmentIdentity.d.mts +13 -0
  167. package/lib/core/transform/tsconfig/compilerEnvironmentIdentity.d.ts +13 -0
  168. package/lib/core/transform/tsconfig/compilerEnvironmentIdentity.js +23 -0
  169. package/lib/core/transform/tsconfig/compilerEnvironmentIdentity.js.map +1 -0
  170. package/lib/core/transform/tsconfig/compilerEnvironmentIdentity.mjs +21 -0
  171. package/lib/core/transform/tsconfig/compilerEnvironmentIdentity.mjs.map +1 -0
  172. package/lib/core/transform/tsconfig/resolveCompilerEnvironment.d.cts +17 -0
  173. package/lib/core/transform/tsconfig/resolveCompilerEnvironment.d.mts +17 -0
  174. package/lib/core/transform/tsconfig/resolveCompilerEnvironment.d.ts +17 -0
  175. package/lib/core/transform/tsconfig/resolveCompilerEnvironment.js +57 -0
  176. package/lib/core/transform/tsconfig/resolveCompilerEnvironment.js.map +1 -0
  177. package/lib/core/transform/tsconfig/resolveCompilerEnvironment.mjs +55 -0
  178. package/lib/core/transform/tsconfig/resolveCompilerEnvironment.mjs.map +1 -0
  179. package/lib/core/transform/tsconfig/transformScratchEnvironment.d.cts +6 -6
  180. package/lib/core/transform/tsconfig/transformScratchEnvironment.d.mts +6 -6
  181. package/lib/core/transform/tsconfig/transformScratchEnvironment.d.ts +6 -6
  182. package/lib/core/transform/tsconfig/transformScratchEnvironment.js +7 -7
  183. package/lib/core/transform/tsconfig/transformScratchEnvironment.js.map +1 -1
  184. package/lib/core/transform/tsconfig/transformScratchEnvironment.mjs +7 -7
  185. package/lib/core/transform/tsconfig/transformScratchEnvironment.mjs.map +1 -1
  186. package/lib/core/transform/watch/notifyProjectRecord.js +3 -0
  187. package/lib/core/transform/watch/notifyProjectRecord.js.map +1 -1
  188. package/lib/core/transform/watch/notifyProjectRecord.mjs +3 -0
  189. package/lib/core/transform/watch/notifyProjectRecord.mjs.map +1 -1
  190. package/lib/core/tsconfig/ITtscProjectMembershipPolicy.d.cts +14 -1
  191. package/lib/core/tsconfig/ITtscProjectMembershipPolicy.d.mts +14 -1
  192. package/lib/core/tsconfig/ITtscProjectMembershipPolicy.d.ts +14 -1
  193. package/lib/core/tsconfig/mergeMembershipPolicyOverlay.d.cts +4 -3
  194. package/lib/core/tsconfig/mergeMembershipPolicyOverlay.d.mts +4 -3
  195. package/lib/core/tsconfig/mergeMembershipPolicyOverlay.d.ts +4 -3
  196. package/lib/core/tsconfig/mergeMembershipPolicyOverlay.js +36 -6
  197. package/lib/core/tsconfig/mergeMembershipPolicyOverlay.js.map +1 -1
  198. package/lib/core/tsconfig/mergeMembershipPolicyOverlay.mjs +36 -6
  199. package/lib/core/tsconfig/mergeMembershipPolicyOverlay.mjs.map +1 -1
  200. package/lib/core/tsconfig/readProjectMembershipPolicy.d.cts +3 -2
  201. package/lib/core/tsconfig/readProjectMembershipPolicy.d.mts +3 -2
  202. package/lib/core/tsconfig/readProjectMembershipPolicy.d.ts +3 -2
  203. package/lib/core/tsconfig/readProjectMembershipPolicy.js +49 -15
  204. package/lib/core/tsconfig/readProjectMembershipPolicy.js.map +1 -1
  205. package/lib/core/tsconfig/readProjectMembershipPolicy.mjs +49 -15
  206. package/lib/core/tsconfig/readProjectMembershipPolicy.mjs.map +1 -1
  207. package/lib/core/tsconfig/resolveMembershipInputExtensions.d.cts +16 -0
  208. package/lib/core/tsconfig/resolveMembershipInputExtensions.d.mts +16 -0
  209. package/lib/core/tsconfig/resolveMembershipInputExtensions.d.ts +16 -0
  210. package/lib/core/tsconfig/resolveMembershipInputExtensions.js +45 -0
  211. package/lib/core/tsconfig/resolveMembershipInputExtensions.js.map +1 -0
  212. package/lib/core/tsconfig/resolveMembershipInputExtensions.mjs +43 -0
  213. package/lib/core/tsconfig/resolveMembershipInputExtensions.mjs.map +1 -0
  214. package/lib/core/turbopack/turbopack.d.cts +2 -2
  215. package/lib/core/turbopack/turbopack.d.mts +2 -2
  216. package/lib/core/turbopack/turbopack.d.ts +2 -2
  217. package/lib/core/turbopack/turbopack.js +15 -7
  218. package/lib/core/turbopack/turbopack.js.map +1 -1
  219. package/lib/core/turbopack/turbopack.mjs +15 -7
  220. package/lib/core/turbopack/turbopack.mjs.map +1 -1
  221. package/lib/core/unplugin.js +21 -8
  222. package/lib/core/unplugin.js.map +1 -1
  223. package/lib/core/unplugin.mjs +21 -8
  224. package/lib/core/unplugin.mjs.map +1 -1
  225. package/package.json +3 -3
  226. package/src/core/bridge/TtscProjectRecord.ts +4 -1
  227. package/src/core/bridge/projectRecordArgumentsMatch.ts +37 -0
  228. package/src/core/bridge/projectRecordMoved.ts +17 -11
  229. package/src/core/bridge/readProjectRecordFile.ts +39 -3
  230. package/src/core/bridge/refreshProjectRecordFile.ts +9 -2
  231. package/src/core/bridge/refreshProjectRecordFiles.ts +7 -1
  232. package/src/core/index.ts +2 -0
  233. package/src/core/next/next.ts +18 -2
  234. package/src/core/options/ResolvedTtscUnpluginOptions.ts +3 -0
  235. package/src/core/options/TtscUnpluginOptions.ts +9 -0
  236. package/src/core/options/resolveOptions.ts +5 -3
  237. package/src/core/rollup/rollupDeliveryOptions.ts +9 -5
  238. package/src/core/transform/cache/TRANSFORM_CACHE_MEMBERSHIP_POLICIES.ts +14 -0
  239. package/src/core/transform/cache/TtscCachedProjectTransform.ts +7 -0
  240. package/src/core/transform/cache/createTransformCacheKey.ts +13 -8
  241. package/src/core/transform/generation/TtscCompilerMembershipHint.ts +24 -0
  242. package/src/core/transform/generation/applyCompilerMembership.ts +44 -0
  243. package/src/core/transform/generation/captureTransformGeneration.ts +43 -10
  244. package/src/core/transform/generation/onlyLearnedCompileFacts.ts +7 -5
  245. package/src/core/transform/generation/primeCompilerMembership.ts +39 -0
  246. package/src/core/transform/generation/selectReportedMembershipPolicy.ts +59 -13
  247. package/src/core/transform/generation/transformProject.ts +12 -0
  248. package/src/core/transform/project/isPossibleProgramFileName.ts +28 -15
  249. package/src/core/transform/session/sharedCompileIdentity.ts +10 -5
  250. package/src/core/transform/transformTtsc.ts +21 -0
  251. package/src/core/transform/tsconfig/TtscCompilerArgumentsWitness.ts +19 -0
  252. package/src/core/transform/tsconfig/captureCompilerArguments.ts +25 -0
  253. package/src/core/transform/tsconfig/compilerEnvironmentIdentity.ts +20 -0
  254. package/src/core/transform/tsconfig/resolveCompilerEnvironment.ts +61 -0
  255. package/src/core/transform/tsconfig/transformScratchEnvironment.ts +7 -6
  256. package/src/core/transform/watch/notifyProjectRecord.ts +3 -0
  257. package/src/core/tsconfig/ITtscProjectMembershipPolicy.ts +15 -1
  258. package/src/core/tsconfig/mergeMembershipPolicyOverlay.ts +31 -6
  259. package/src/core/tsconfig/readProjectMembershipPolicy.ts +61 -17
  260. package/src/core/tsconfig/resolveMembershipInputExtensions.ts +45 -0
  261. package/src/core/turbopack/turbopack.ts +27 -7
  262. package/src/core/unplugin.ts +34 -9
@@ -39,6 +39,8 @@ export interface ResolvedTtscUnpluginOptions {
39
39
  precompile?: readonly string[];
40
40
  /** Compiler-options overlay applied on top of the discovered tsconfig. */
41
41
  compilerOptions: TtscUnpluginCompilerOptionsJson;
42
+ /** Explicit invocation permission; omission retains inherited arguments. */
43
+ runExternalCode?: boolean;
42
44
  /**
43
45
  * Resolved plugin list; mirrors the semantics of
44
46
  * `TtscUnpluginOptions.plugins`.
@@ -39,6 +39,8 @@ export interface ResolvedTtscUnpluginOptions {
39
39
  precompile?: readonly string[];
40
40
  /** Compiler-options overlay applied on top of the discovered tsconfig. */
41
41
  compilerOptions: TtscUnpluginCompilerOptionsJson;
42
+ /** Explicit invocation permission; omission retains inherited arguments. */
43
+ runExternalCode?: boolean;
42
44
  /**
43
45
  * Resolved plugin list; mirrors the semantics of
44
46
  * `TtscUnpluginOptions.plugins`.
@@ -39,6 +39,8 @@ export interface ResolvedTtscUnpluginOptions {
39
39
  precompile?: readonly string[];
40
40
  /** Compiler-options overlay applied on top of the discovered tsconfig. */
41
41
  compilerOptions: TtscUnpluginCompilerOptionsJson;
42
+ /** Explicit invocation permission; omission retains inherited arguments. */
43
+ runExternalCode?: boolean;
42
44
  /**
43
45
  * Resolved plugin list; mirrors the semantics of
44
46
  * `TtscUnpluginOptions.plugins`.
@@ -63,6 +63,14 @@ export interface TtscUnpluginOptions {
63
63
  * the explicit plugin override.
64
64
  */
65
65
  compilerOptions?: TtscUnpluginCompilerOptionsJson;
66
+ /**
67
+ * Allow the selected TypeScript 7.1 compiler to execute content mappers.
68
+ *
69
+ * This invocation's explicit value overrides inherited `TTSC_TSGO_ARGS`
70
+ * permission without changing `process.env`. Omission retains inherited
71
+ * arguments. TypeScript 7.0 rejects this option's compiler flag.
72
+ */
73
+ runExternalCode?: boolean;
66
74
  /**
67
75
  * `ttsc` plugin entries.
68
76
  *
@@ -63,6 +63,14 @@ export interface TtscUnpluginOptions {
63
63
  * the explicit plugin override.
64
64
  */
65
65
  compilerOptions?: TtscUnpluginCompilerOptionsJson;
66
+ /**
67
+ * Allow the selected TypeScript 7.1 compiler to execute content mappers.
68
+ *
69
+ * This invocation's explicit value overrides inherited `TTSC_TSGO_ARGS`
70
+ * permission without changing `process.env`. Omission retains inherited
71
+ * arguments. TypeScript 7.0 rejects this option's compiler flag.
72
+ */
73
+ runExternalCode?: boolean;
66
74
  /**
67
75
  * `ttsc` plugin entries.
68
76
  *
@@ -63,6 +63,14 @@ export interface TtscUnpluginOptions {
63
63
  * the explicit plugin override.
64
64
  */
65
65
  compilerOptions?: TtscUnpluginCompilerOptionsJson;
66
+ /**
67
+ * Allow the selected TypeScript 7.1 compiler to execute content mappers.
68
+ *
69
+ * This invocation's explicit value overrides inherited `TTSC_TSGO_ARGS`
70
+ * permission without changing `process.env`. Omission retains inherited
71
+ * arguments. TypeScript 7.0 rejects this option's compiler flag.
72
+ */
73
+ runExternalCode?: boolean;
66
74
  /**
67
75
  * `ttsc` plugin entries.
68
76
  *
@@ -3,9 +3,10 @@ import type { TtscUnpluginOptions } from "./TtscUnpluginOptions.cjs";
3
3
  /**
4
4
  * Normalise raw user-supplied options into {@link ResolvedTtscUnpluginOptions}.
5
5
  *
6
- * Merges provided values with defaults. The `plugins` field uses an explicit
7
- * `"plugins" in options` presence check rather than a falsy guard so that
8
- * `plugins: false` (disable all plugins) is preserved as-is.
6
+ * Merges provided values with defaults, preserving an explicit false mapper
7
+ * permission. The `plugins` field uses an explicit `"plugins" in options`
8
+ * presence check rather than a falsy guard so that `plugins: false` (disable
9
+ * all plugins) is preserved as-is.
9
10
  *
10
11
  * @evidence contracts/common.md#principled-implementation
11
12
  * Nullish defaults normalize the overlay and project; a presence check
@@ -3,9 +3,10 @@ import type { TtscUnpluginOptions } from "./TtscUnpluginOptions.mjs";
3
3
  /**
4
4
  * Normalise raw user-supplied options into {@link ResolvedTtscUnpluginOptions}.
5
5
  *
6
- * Merges provided values with defaults. The `plugins` field uses an explicit
7
- * `"plugins" in options` presence check rather than a falsy guard so that
8
- * `plugins: false` (disable all plugins) is preserved as-is.
6
+ * Merges provided values with defaults, preserving an explicit false mapper
7
+ * permission. The `plugins` field uses an explicit `"plugins" in options`
8
+ * presence check rather than a falsy guard so that `plugins: false` (disable
9
+ * all plugins) is preserved as-is.
9
10
  *
10
11
  * @evidence contracts/common.md#principled-implementation
11
12
  * Nullish defaults normalize the overlay and project; a presence check
@@ -3,9 +3,10 @@ import type { TtscUnpluginOptions } from "./TtscUnpluginOptions";
3
3
  /**
4
4
  * Normalise raw user-supplied options into {@link ResolvedTtscUnpluginOptions}.
5
5
  *
6
- * Merges provided values with defaults. The `plugins` field uses an explicit
7
- * `"plugins" in options` presence check rather than a falsy guard so that
8
- * `plugins: false` (disable all plugins) is preserved as-is.
6
+ * Merges provided values with defaults, preserving an explicit false mapper
7
+ * permission. The `plugins` field uses an explicit `"plugins" in options`
8
+ * presence check rather than a falsy guard so that `plugins: false` (disable
9
+ * all plugins) is preserved as-is.
9
10
  *
10
11
  * @evidence contracts/common.md#principled-implementation
11
12
  * Nullish defaults normalize the overlay and project; a presence check
@@ -8,9 +8,10 @@ const defaultOptions = {
8
8
  /**
9
9
  * Normalise raw user-supplied options into {@link ResolvedTtscUnpluginOptions}.
10
10
  *
11
- * Merges provided values with defaults. The `plugins` field uses an explicit
12
- * `"plugins" in options` presence check rather than a falsy guard so that
13
- * `plugins: false` (disable all plugins) is preserved as-is.
11
+ * Merges provided values with defaults, preserving an explicit false mapper
12
+ * permission. The `plugins` field uses an explicit `"plugins" in options`
13
+ * presence check rather than a falsy guard so that `plugins: false` (disable
14
+ * all plugins) is preserved as-is.
14
15
  *
15
16
  * @evidence contracts/common.md#principled-implementation
16
17
  * Nullish defaults normalize the overlay and project; a presence check
@@ -42,6 +43,7 @@ function resolveOptions(options = {}) {
42
43
  return {
43
44
  precompile: options.precompile === undefined ? undefined : [...options.precompile],
44
45
  compilerOptions: { ...(options.compilerOptions ?? {}) },
46
+ runExternalCode: options.runExternalCode,
45
47
  plugins: "plugins" in options ? options.plugins : defaultOptions.plugins,
46
48
  project: options.project ?? defaultOptions.project,
47
49
  projectRoot: options.projectRoot ?? defaultOptions.projectRoot,
@@ -1 +1 @@
1
- {"version":3,"file":"resolveOptions.js","sources":["../../../src/core/options/resolveOptions.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA,MAAM,cAAc,GAAgC;AAClD,IACA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,WAAW,EAAE,SAAS;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;AACG,SAAU,cAAc,CAC5B,OAAA,GAA+B,EAAE,EAAA;IAEjC,OAAO;AACL,QAAA,UAAU,EACR,OAAO,CAAC,UAAU,KAAK,SAAS,GAAG,SAAS,GAAG,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;QACxE,eAAe,EAAE,EAAE,IAAI,OAAO,CAAC,eAAe,IAAI,EAAE,CAAC,EAAE;AACvD,QAAA,OAAO,EAAE,SAAS,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC,OAAO;AACxE,QAAA,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO;AAClD,QAAA,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,cAAc,CAAC,WAAW;KAC/D;AACH;;;;"}
1
+ {"version":3,"file":"resolveOptions.js","sources":["../../../src/core/options/resolveOptions.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA,MAAM,cAAc,GAAgC;AAClD,IACA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,WAAW,EAAE,SAAS;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;AACG,SAAU,cAAc,CAC5B,OAAA,GAA+B,EAAE,EAAA;IAEjC,OAAO;AACL,QAAA,UAAU,EACR,OAAO,CAAC,UAAU,KAAK,SAAS,GAAG,SAAS,GAAG,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;QACxE,eAAe,EAAE,EAAE,IAAI,OAAO,CAAC,eAAe,IAAI,EAAE,CAAC,EAAE;QACvD,eAAe,EAAE,OAAO,CAAC,eAAe;AACxC,QAAA,OAAO,EAAE,SAAS,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC,OAAO;AACxE,QAAA,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO;AAClD,QAAA,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,cAAc,CAAC,WAAW;KAC/D;AACH;;;;"}
@@ -6,9 +6,10 @@ const defaultOptions = {
6
6
  /**
7
7
  * Normalise raw user-supplied options into {@link ResolvedTtscUnpluginOptions}.
8
8
  *
9
- * Merges provided values with defaults. The `plugins` field uses an explicit
10
- * `"plugins" in options` presence check rather than a falsy guard so that
11
- * `plugins: false` (disable all plugins) is preserved as-is.
9
+ * Merges provided values with defaults, preserving an explicit false mapper
10
+ * permission. The `plugins` field uses an explicit `"plugins" in options`
11
+ * presence check rather than a falsy guard so that `plugins: false` (disable
12
+ * all plugins) is preserved as-is.
12
13
  *
13
14
  * @evidence contracts/common.md#principled-implementation
14
15
  * Nullish defaults normalize the overlay and project; a presence check
@@ -40,6 +41,7 @@ function resolveOptions(options = {}) {
40
41
  return {
41
42
  precompile: options.precompile === undefined ? undefined : [...options.precompile],
42
43
  compilerOptions: { ...(options.compilerOptions ?? {}) },
44
+ runExternalCode: options.runExternalCode,
43
45
  plugins: "plugins" in options ? options.plugins : defaultOptions.plugins,
44
46
  project: options.project ?? defaultOptions.project,
45
47
  projectRoot: options.projectRoot ?? defaultOptions.projectRoot,
@@ -1 +1 @@
1
- {"version":3,"file":"resolveOptions.mjs","sources":["../../../src/core/options/resolveOptions.ts"],"sourcesContent":[null],"names":[],"mappings":"AAGA,MAAM,cAAc,GAAgC;AAClD,IACA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,WAAW,EAAE,SAAS;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;AACG,SAAU,cAAc,CAC5B,OAAA,GAA+B,EAAE,EAAA;IAEjC,OAAO;AACL,QAAA,UAAU,EACR,OAAO,CAAC,UAAU,KAAK,SAAS,GAAG,SAAS,GAAG,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;QACxE,eAAe,EAAE,EAAE,IAAI,OAAO,CAAC,eAAe,IAAI,EAAE,CAAC,EAAE;AACvD,QAAA,OAAO,EAAE,SAAS,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC,OAAO;AACxE,QAAA,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO;AAClD,QAAA,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,cAAc,CAAC,WAAW;KAC/D;AACH;;;;"}
1
+ {"version":3,"file":"resolveOptions.mjs","sources":["../../../src/core/options/resolveOptions.ts"],"sourcesContent":[null],"names":[],"mappings":"AAGA,MAAM,cAAc,GAAgC;AAClD,IACA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,WAAW,EAAE,SAAS;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;AACG,SAAU,cAAc,CAC5B,OAAA,GAA+B,EAAE,EAAA;IAEjC,OAAO;AACL,QAAA,UAAU,EACR,OAAO,CAAC,UAAU,KAAK,SAAS,GAAG,SAAS,GAAG,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;QACxE,eAAe,EAAE,EAAE,IAAI,OAAO,CAAC,eAAe,IAAI,EAAE,CAAC,EAAE;QACvD,eAAe,EAAE,OAAO,CAAC,eAAe;AACxC,QAAA,OAAO,EAAE,SAAS,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC,OAAO;AACxE,QAAA,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO;AAClD,QAAA,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,cAAc,CAAC,WAAW;KAC/D;AACH;;;;"}
@@ -4,11 +4,11 @@ import type { ResolvedTtscUnpluginOptions } from "../options/ResolvedTtscUnplugi
4
4
  * the module carries into Rollup's cache (`TtscRollupDelivery`).
5
5
  *
6
6
  * The identity records alias mappings, compiler overlay, plugin payloads and
7
- * configured project and source-root selection. Tsconfig input state is
8
- * represented separately by the delivery's project record. A configured project
9
- * resolves under the same native cwd rule as explicit selection; it is not
10
- * canonicalized to a physical alias or made process-independent across
11
- * different cwd spellings.
7
+ * configured project/source-root selection and effective compiler argument
8
+ * transport. Tsconfig input state is represented separately by the delivery's
9
+ * project record. A configured project resolves under the same native cwd rule
10
+ * as explicit selection; it is not canonicalized to a physical alias or made
11
+ * process-independent across different cwd spellings.
12
12
  *
13
13
  * Compiler options, plugin payloads and alias mappings preserve their actual
14
14
  * JSON order. Their consumers can observe declaration order; the host cannot
@@ -33,4 +33,4 @@ import type { ResolvedTtscUnpluginOptions } from "../options/ResolvedTtscUnplugi
33
33
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources
34
34
  * Acquires no handle, timer or retained state of its own.
35
35
  */
36
- export declare function rollupDeliveryOptions(options: ResolvedTtscUnpluginOptions, aliasPaths: Record<string, string[]>): string;
36
+ export declare function rollupDeliveryOptions(options: ResolvedTtscUnpluginOptions, aliasPaths: Record<string, string[]>, compilerEnvironment?: NodeJS.ProcessEnv): string;
@@ -4,11 +4,11 @@ import type { ResolvedTtscUnpluginOptions } from "../options/ResolvedTtscUnplugi
4
4
  * the module carries into Rollup's cache (`TtscRollupDelivery`).
5
5
  *
6
6
  * The identity records alias mappings, compiler overlay, plugin payloads and
7
- * configured project and source-root selection. Tsconfig input state is
8
- * represented separately by the delivery's project record. A configured project
9
- * resolves under the same native cwd rule as explicit selection; it is not
10
- * canonicalized to a physical alias or made process-independent across
11
- * different cwd spellings.
7
+ * configured project/source-root selection and effective compiler argument
8
+ * transport. Tsconfig input state is represented separately by the delivery's
9
+ * project record. A configured project resolves under the same native cwd rule
10
+ * as explicit selection; it is not canonicalized to a physical alias or made
11
+ * process-independent across different cwd spellings.
12
12
  *
13
13
  * Compiler options, plugin payloads and alias mappings preserve their actual
14
14
  * JSON order. Their consumers can observe declaration order; the host cannot
@@ -33,4 +33,4 @@ import type { ResolvedTtscUnpluginOptions } from "../options/ResolvedTtscUnplugi
33
33
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources
34
34
  * Acquires no handle, timer or retained state of its own.
35
35
  */
36
- export declare function rollupDeliveryOptions(options: ResolvedTtscUnpluginOptions, aliasPaths: Record<string, string[]>): string;
36
+ export declare function rollupDeliveryOptions(options: ResolvedTtscUnpluginOptions, aliasPaths: Record<string, string[]>, compilerEnvironment?: NodeJS.ProcessEnv): string;
@@ -4,11 +4,11 @@ import type { ResolvedTtscUnpluginOptions } from "../options/ResolvedTtscUnplugi
4
4
  * the module carries into Rollup's cache (`TtscRollupDelivery`).
5
5
  *
6
6
  * The identity records alias mappings, compiler overlay, plugin payloads and
7
- * configured project and source-root selection. Tsconfig input state is
8
- * represented separately by the delivery's project record. A configured project
9
- * resolves under the same native cwd rule as explicit selection; it is not
10
- * canonicalized to a physical alias or made process-independent across
11
- * different cwd spellings.
7
+ * configured project/source-root selection and effective compiler argument
8
+ * transport. Tsconfig input state is represented separately by the delivery's
9
+ * project record. A configured project resolves under the same native cwd rule
10
+ * as explicit selection; it is not canonicalized to a physical alias or made
11
+ * process-independent across different cwd spellings.
12
12
  *
13
13
  * Compiler options, plugin payloads and alias mappings preserve their actual
14
14
  * JSON order. Their consumers can observe declaration order; the host cannot
@@ -33,4 +33,4 @@ import type { ResolvedTtscUnpluginOptions } from "../options/ResolvedTtscUnplugi
33
33
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources
34
34
  * Acquires no handle, timer or retained state of its own.
35
35
  */
36
- export declare function rollupDeliveryOptions(options: ResolvedTtscUnpluginOptions, aliasPaths: Record<string, string[]>): string;
36
+ export declare function rollupDeliveryOptions(options: ResolvedTtscUnpluginOptions, aliasPaths: Record<string, string[]>, compilerEnvironment?: NodeJS.ProcessEnv): string;
@@ -1,6 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var path = require('node:path');
4
+ var compilerEnvironmentIdentity = require('../transform/tsconfig/compilerEnvironmentIdentity.js');
5
+ var resolveCompilerEnvironment = require('../transform/tsconfig/resolveCompilerEnvironment.js');
4
6
  var hashText = require('../transform/utils/hashText.js');
5
7
  var stableStringify = require('../transform/utils/stableStringify.js');
6
8
 
@@ -9,11 +11,11 @@ var stableStringify = require('../transform/utils/stableStringify.js');
9
11
  * the module carries into Rollup's cache (`TtscRollupDelivery`).
10
12
  *
11
13
  * The identity records alias mappings, compiler overlay, plugin payloads and
12
- * configured project and source-root selection. Tsconfig input state is
13
- * represented separately by the delivery's project record. A configured project
14
- * resolves under the same native cwd rule as explicit selection; it is not
15
- * canonicalized to a physical alias or made process-independent across
16
- * different cwd spellings.
14
+ * configured project/source-root selection and effective compiler argument
15
+ * transport. Tsconfig input state is represented separately by the delivery's
16
+ * project record. A configured project resolves under the same native cwd rule
17
+ * as explicit selection; it is not canonicalized to a physical alias or made
18
+ * process-independent across different cwd spellings.
17
19
  *
18
20
  * Compiler options, plugin payloads and alias mappings preserve their actual
19
21
  * JSON order. Their consumers can observe declaration order; the host cannot
@@ -38,10 +40,11 @@ var stableStringify = require('../transform/utils/stableStringify.js');
38
40
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources
39
41
  * Acquires no handle, timer or retained state of its own.
40
42
  */
41
- function rollupDeliveryOptions(options, aliasPaths) {
43
+ function rollupDeliveryOptions(options, aliasPaths, compilerEnvironment = resolveCompilerEnvironment.resolveCompilerEnvironment(options.runExternalCode)) {
42
44
  return hashText.hashText(stableStringify.stableStringify({
43
45
  aliasPaths: JSON.stringify(aliasPaths),
44
46
  compilerOptions: JSON.stringify(options.compilerOptions),
47
+ compilerEnvironment: compilerEnvironmentIdentity.compilerEnvironmentIdentity(compilerEnvironment),
45
48
  plugins: JSON.stringify(options.plugins),
46
49
  project: options.project === undefined ? null : path.resolve(options.project),
47
50
  projectRoot: options.projectRoot === undefined
@@ -1 +1 @@
1
- {"version":3,"file":"rollupDeliveryOptions.js","sources":["../../../src/core/rollup/rollupDeliveryOptions.ts"],"sourcesContent":[null],"names":["hashText","stableStringify"],"mappings":";;;;;;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;AACG,SAAU,qBAAqB,CACnC,OAAoC,EACpC,UAAoC,EAAA;IAEpC,OAAOA,iBAAQ,CACbC,+BAAe,CAAC;AACd,QAAA,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;QACtC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;QACxD,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;QACxC,OAAO,EACL,OAAO,CAAC,OAAO,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;AACtE,QAAA,WAAW,EACT,OAAO,CAAC,WAAW,KAAK;AACtB,cAAE;cACA,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC;AACxC,KAAA,CAAC,CACH;AACH;;;;"}
1
+ {"version":3,"file":"rollupDeliveryOptions.js","sources":["../../../src/core/rollup/rollupDeliveryOptions.ts"],"sourcesContent":[null],"names":["resolveCompilerEnvironment","hashText","stableStringify","compilerEnvironmentIdentity"],"mappings":";;;;;;;;AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;AACG,SAAU,qBAAqB,CACnC,OAAoC,EACpC,UAAoC,EACpC,mBAAmB,GAAGA,qDAA0B,CAAC,OAAO,CAAC,eAAe,CAAC,EAAA;IAEzE,OAAOC,iBAAQ,CACbC,+BAAe,CAAC;AACd,QAAA,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;QACtC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;AACxD,QAAA,mBAAmB,EAAEC,uDAA2B,CAAC,mBAAmB,CAAC;QACrE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;QACxC,OAAO,EACL,OAAO,CAAC,OAAO,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;AACtE,QAAA,WAAW,EACT,OAAO,CAAC,WAAW,KAAK;AACtB,cAAE;cACA,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC;AACxC,KAAA,CAAC,CACH;AACH;;;;"}
@@ -1,4 +1,6 @@
1
1
  import path from 'node:path';
2
+ import { compilerEnvironmentIdentity } from '../transform/tsconfig/compilerEnvironmentIdentity.mjs';
3
+ import { resolveCompilerEnvironment } from '../transform/tsconfig/resolveCompilerEnvironment.mjs';
2
4
  import { hashText } from '../transform/utils/hashText.mjs';
3
5
  import { stableStringify } from '../transform/utils/stableStringify.mjs';
4
6
 
@@ -7,11 +9,11 @@ import { stableStringify } from '../transform/utils/stableStringify.mjs';
7
9
  * the module carries into Rollup's cache (`TtscRollupDelivery`).
8
10
  *
9
11
  * The identity records alias mappings, compiler overlay, plugin payloads and
10
- * configured project and source-root selection. Tsconfig input state is
11
- * represented separately by the delivery's project record. A configured project
12
- * resolves under the same native cwd rule as explicit selection; it is not
13
- * canonicalized to a physical alias or made process-independent across
14
- * different cwd spellings.
12
+ * configured project/source-root selection and effective compiler argument
13
+ * transport. Tsconfig input state is represented separately by the delivery's
14
+ * project record. A configured project resolves under the same native cwd rule
15
+ * as explicit selection; it is not canonicalized to a physical alias or made
16
+ * process-independent across different cwd spellings.
15
17
  *
16
18
  * Compiler options, plugin payloads and alias mappings preserve their actual
17
19
  * JSON order. Their consumers can observe declaration order; the host cannot
@@ -36,10 +38,11 @@ import { stableStringify } from '../transform/utils/stableStringify.mjs';
36
38
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources
37
39
  * Acquires no handle, timer or retained state of its own.
38
40
  */
39
- function rollupDeliveryOptions(options, aliasPaths) {
41
+ function rollupDeliveryOptions(options, aliasPaths, compilerEnvironment = resolveCompilerEnvironment(options.runExternalCode)) {
40
42
  return hashText(stableStringify({
41
43
  aliasPaths: JSON.stringify(aliasPaths),
42
44
  compilerOptions: JSON.stringify(options.compilerOptions),
45
+ compilerEnvironment: compilerEnvironmentIdentity(compilerEnvironment),
43
46
  plugins: JSON.stringify(options.plugins),
44
47
  project: options.project === undefined ? null : path.resolve(options.project),
45
48
  projectRoot: options.projectRoot === undefined
@@ -1 +1 @@
1
- {"version":3,"file":"rollupDeliveryOptions.mjs","sources":["../../../src/core/rollup/rollupDeliveryOptions.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;AACG,SAAU,qBAAqB,CACnC,OAAoC,EACpC,UAAoC,EAAA;IAEpC,OAAO,QAAQ,CACb,eAAe,CAAC;AACd,QAAA,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;QACtC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;QACxD,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;QACxC,OAAO,EACL,OAAO,CAAC,OAAO,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;AACtE,QAAA,WAAW,EACT,OAAO,CAAC,WAAW,KAAK;AACtB,cAAE;cACA,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC;AACxC,KAAA,CAAC,CACH;AACH;;;;"}
1
+ {"version":3,"file":"rollupDeliveryOptions.mjs","sources":["../../../src/core/rollup/rollupDeliveryOptions.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;AACG,SAAU,qBAAqB,CACnC,OAAoC,EACpC,UAAoC,EACpC,mBAAmB,GAAG,0BAA0B,CAAC,OAAO,CAAC,eAAe,CAAC,EAAA;IAEzE,OAAO,QAAQ,CACb,eAAe,CAAC;AACd,QAAA,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;QACtC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;AACxD,QAAA,mBAAmB,EAAE,2BAA2B,CAAC,mBAAmB,CAAC;QACrE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;QACxC,OAAO,EACL,OAAO,CAAC,OAAO,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;AACtE,QAAA,WAAW,EACT,OAAO,CAAC,WAAW,KAAK;AACtB,cAAE;cACA,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC;AACxC,KAAA,CAAC,CACH;AACH;;;;"}
@@ -0,0 +1,10 @@
1
+ import type { TtscCompilerMembershipHint } from "../generation/TtscCompilerMembershipHint.cjs";
2
+ import type { TtscTransformCache } from "./TtscTransformCache.cjs";
3
+ /**
4
+ * Qualified native root hint per invocation key, retained across generation
5
+ * disposal. Its config-policy basis must match before priming a new walk;
6
+ * neither the match nor report proves current filesystem state. Entries live
7
+ * until the cache is collected; distinct invocation keys and their path bytes
8
+ * have no independent cap.
9
+ */
10
+ export declare const TRANSFORM_CACHE_MEMBERSHIP_POLICIES: WeakMap<TtscTransformCache, Map<string, TtscCompilerMembershipHint>>;
@@ -0,0 +1,10 @@
1
+ import type { TtscCompilerMembershipHint } from "../generation/TtscCompilerMembershipHint.mjs";
2
+ import type { TtscTransformCache } from "./TtscTransformCache.mjs";
3
+ /**
4
+ * Qualified native root hint per invocation key, retained across generation
5
+ * disposal. Its config-policy basis must match before priming a new walk;
6
+ * neither the match nor report proves current filesystem state. Entries live
7
+ * until the cache is collected; distinct invocation keys and their path bytes
8
+ * have no independent cap.
9
+ */
10
+ export declare const TRANSFORM_CACHE_MEMBERSHIP_POLICIES: WeakMap<TtscTransformCache, Map<string, TtscCompilerMembershipHint>>;
@@ -0,0 +1,10 @@
1
+ import type { TtscCompilerMembershipHint } from "../generation/TtscCompilerMembershipHint";
2
+ import type { TtscTransformCache } from "./TtscTransformCache";
3
+ /**
4
+ * Qualified native root hint per invocation key, retained across generation
5
+ * disposal. Its config-policy basis must match before priming a new walk;
6
+ * neither the match nor report proves current filesystem state. Entries live
7
+ * until the cache is collected; distinct invocation keys and their path bytes
8
+ * have no independent cap.
9
+ */
10
+ export declare const TRANSFORM_CACHE_MEMBERSHIP_POLICIES: WeakMap<TtscTransformCache, Map<string, TtscCompilerMembershipHint>>;
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Qualified native root hint per invocation key, retained across generation
5
+ * disposal. Its config-policy basis must match before priming a new walk;
6
+ * neither the match nor report proves current filesystem state. Entries live
7
+ * until the cache is collected; distinct invocation keys and their path bytes
8
+ * have no independent cap.
9
+ */
10
+ const TRANSFORM_CACHE_MEMBERSHIP_POLICIES = new WeakMap();
11
+
12
+ exports.TRANSFORM_CACHE_MEMBERSHIP_POLICIES = TRANSFORM_CACHE_MEMBERSHIP_POLICIES;
13
+ //# sourceMappingURL=TRANSFORM_CACHE_MEMBERSHIP_POLICIES.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TRANSFORM_CACHE_MEMBERSHIP_POLICIES.js","sources":["../../../../src/core/transform/cache/TRANSFORM_CACHE_MEMBERSHIP_POLICIES.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAGA;;;;;;AAMG;AACI,MAAM,mCAAmC,GAAG,IAAI,OAAO;;;;"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Qualified native root hint per invocation key, retained across generation
3
+ * disposal. Its config-policy basis must match before priming a new walk;
4
+ * neither the match nor report proves current filesystem state. Entries live
5
+ * until the cache is collected; distinct invocation keys and their path bytes
6
+ * have no independent cap.
7
+ */
8
+ const TRANSFORM_CACHE_MEMBERSHIP_POLICIES = new WeakMap();
9
+
10
+ export { TRANSFORM_CACHE_MEMBERSHIP_POLICIES };
11
+ //# sourceMappingURL=TRANSFORM_CACHE_MEMBERSHIP_POLICIES.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TRANSFORM_CACHE_MEMBERSHIP_POLICIES.mjs","sources":["../../../../src/core/transform/cache/TRANSFORM_CACHE_MEMBERSHIP_POLICIES.ts"],"sourcesContent":[null],"names":[],"mappings":"AAGA;;;;;;AAMG;AACI,MAAM,mCAAmC,GAAG,IAAI,OAAO;;;;"}
@@ -1,7 +1,9 @@
1
1
  import type { ITtscCompilerTransformation } from "ttsc";
2
2
  import type { ITtscProjectMembershipPolicy } from "../../tsconfig/ITtscProjectMembershipPolicy.cjs";
3
+ import type { TtscCompilerMembershipHint } from "../generation/TtscCompilerMembershipHint.cjs";
3
4
  import type { TtscProjectDirectorySnapshot } from "../project/TtscProjectDirectorySnapshot.cjs";
4
5
  import type { TtscProjectMutationTracker } from "../tracker/TtscProjectMutationTracker.cjs";
6
+ import type { TtscCompilerArgumentsWitness } from "../tsconfig/TtscCompilerArgumentsWitness.cjs";
5
7
  import type { TtscHostInputValidation } from "../validation/TtscHostInputValidation.cjs";
6
8
  /**
7
9
  * A single entry in the project transform cache.
@@ -40,6 +42,10 @@ import type { TtscHostInputValidation } from "../validation/TtscHostInputValidat
40
42
  * retained state at runtime.
41
43
  */
42
44
  export interface TtscCachedProjectTransform {
45
+ /** Native settings learned under this capture's validated config-policy basis. */
46
+ compilerMembership?: TtscCompilerMembershipHint;
47
+ /** Actual captured invocation, retained for persisted host-cache proofs. */
48
+ compilerArguments?: TtscCompilerArgumentsWitness;
43
49
  /** Predicate-preserving compiler proofs for external candidate spellings. */
44
50
  externalInputObservations?: Record<string, ITtscCompilerTransformation.IInputObservation>;
45
51
  /**
@@ -1,7 +1,9 @@
1
1
  import type { ITtscCompilerTransformation } from "ttsc";
2
2
  import type { ITtscProjectMembershipPolicy } from "../../tsconfig/ITtscProjectMembershipPolicy.mjs";
3
+ import type { TtscCompilerMembershipHint } from "../generation/TtscCompilerMembershipHint.mjs";
3
4
  import type { TtscProjectDirectorySnapshot } from "../project/TtscProjectDirectorySnapshot.mjs";
4
5
  import type { TtscProjectMutationTracker } from "../tracker/TtscProjectMutationTracker.mjs";
6
+ import type { TtscCompilerArgumentsWitness } from "../tsconfig/TtscCompilerArgumentsWitness.mjs";
5
7
  import type { TtscHostInputValidation } from "../validation/TtscHostInputValidation.mjs";
6
8
  /**
7
9
  * A single entry in the project transform cache.
@@ -40,6 +42,10 @@ import type { TtscHostInputValidation } from "../validation/TtscHostInputValidat
40
42
  * retained state at runtime.
41
43
  */
42
44
  export interface TtscCachedProjectTransform {
45
+ /** Native settings learned under this capture's validated config-policy basis. */
46
+ compilerMembership?: TtscCompilerMembershipHint;
47
+ /** Actual captured invocation, retained for persisted host-cache proofs. */
48
+ compilerArguments?: TtscCompilerArgumentsWitness;
43
49
  /** Predicate-preserving compiler proofs for external candidate spellings. */
44
50
  externalInputObservations?: Record<string, ITtscCompilerTransformation.IInputObservation>;
45
51
  /**
@@ -1,7 +1,9 @@
1
1
  import type { ITtscCompilerTransformation } from "ttsc";
2
2
  import type { ITtscProjectMembershipPolicy } from "../../tsconfig/ITtscProjectMembershipPolicy";
3
+ import type { TtscCompilerMembershipHint } from "../generation/TtscCompilerMembershipHint";
3
4
  import type { TtscProjectDirectorySnapshot } from "../project/TtscProjectDirectorySnapshot";
4
5
  import type { TtscProjectMutationTracker } from "../tracker/TtscProjectMutationTracker";
6
+ import type { TtscCompilerArgumentsWitness } from "../tsconfig/TtscCompilerArgumentsWitness";
5
7
  import type { TtscHostInputValidation } from "../validation/TtscHostInputValidation";
6
8
  /**
7
9
  * A single entry in the project transform cache.
@@ -40,6 +42,10 @@ import type { TtscHostInputValidation } from "../validation/TtscHostInputValidat
40
42
  * retained state at runtime.
41
43
  */
42
44
  export interface TtscCachedProjectTransform {
45
+ /** Native settings learned under this capture's validated config-policy basis. */
46
+ compilerMembership?: TtscCompilerMembershipHint;
47
+ /** Actual captured invocation, retained for persisted host-cache proofs. */
48
+ compilerArguments?: TtscCompilerArgumentsWitness;
43
49
  /** Predicate-preserving compiler proofs for external candidate spellings. */
44
50
  externalInputObservations?: Record<string, ITtscCompilerTransformation.IInputObservation>;
45
51
  /**
@@ -4,13 +4,14 @@ import type { ResolvedTtscUnpluginOptions } from "../../options/ResolvedTtscUnpl
4
4
  *
5
5
  * The declared compile configuration is represented by: the selected tsconfig's
6
6
  * filesystem identity, common source-root identity, compiler overlay, plugin
7
- * list, and translated aliases. Two adapter configurations that have different
8
- * supported JSON representations therefore receive different keys; native
9
- * spellings resolving to one config identity may share a key. A key does not
10
- * encode current filesystem content or prove freshness. Compiler overlays,
11
- * plugin payloads and alias mappings retain their JSON declaration order: tied
12
- * compiler path patterns and arbitrary plugin payloads can observe it. Only the
13
- * host-owned outer manifest is serialized with sorted keys.
7
+ * list, effective compiler argument transport, and translated aliases. Two
8
+ * adapter configurations that have different supported JSON representations
9
+ * therefore receive different keys; native spellings resolving to one config
10
+ * identity may share a key. A key does not encode current filesystem content or
11
+ * prove freshness. Compiler overlays, plugin payloads and alias mappings retain
12
+ * their JSON declaration order: tied compiler path patterns and arbitrary
13
+ * plugin payloads can observe it. Only the host-owned outer manifest is
14
+ * serialized with sorted keys.
14
15
  *
15
16
  * @evidence contracts/common.md#principled-implementation Native config and source-root identities plus actual JSON representations of compiler overlays, plugin payloads and alias mappings distinguish requested compiles, retaining declaration order that path-pattern ties or plugins can observe.
16
17
  * @evidence contracts/common.md#clear-and-simple-design Existing path identity and stable JSON encoding define the key; filesystem state remains the generation validator's responsibility.
@@ -19,7 +20,7 @@ import type { ResolvedTtscUnpluginOptions } from "../../options/ResolvedTtscUnpl
19
20
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Returns a string and retains nothing.
20
21
  * @evidence contracts/performance.md#efficient-algorithms
21
22
  * Three payload serializations preserve supported JSON order; the outer
22
- * five-field manifest sorts only its fixed keys and serializes their text
23
+ * fixed-field manifest sorts only its own keys and serializes their text
23
24
  * again, with escaping/output space proportional to the payload text.
24
25
  * One path-identity transaction for config and root observes uncached native
25
26
  * aliases, ancestors and directory case policy; that work is not constant
@@ -37,6 +38,8 @@ import type { ResolvedTtscUnpluginOptions } from "../../options/ResolvedTtscUnpl
37
38
  export declare function createTransformCacheKey(props: {
38
39
  aliasPaths: Record<string, string[]>;
39
40
  compilerOptions: Record<string, unknown>;
41
+ /** Effective compiler argument snapshot selected before cache lookup. */
42
+ compilerEnvironment?: NodeJS.ProcessEnv;
40
43
  plugins?: ResolvedTtscUnpluginOptions["plugins"];
41
44
  /** Common source root; omission defaults to the config directory. */
42
45
  projectRoot?: string;
@@ -4,13 +4,14 @@ import type { ResolvedTtscUnpluginOptions } from "../../options/ResolvedTtscUnpl
4
4
  *
5
5
  * The declared compile configuration is represented by: the selected tsconfig's
6
6
  * filesystem identity, common source-root identity, compiler overlay, plugin
7
- * list, and translated aliases. Two adapter configurations that have different
8
- * supported JSON representations therefore receive different keys; native
9
- * spellings resolving to one config identity may share a key. A key does not
10
- * encode current filesystem content or prove freshness. Compiler overlays,
11
- * plugin payloads and alias mappings retain their JSON declaration order: tied
12
- * compiler path patterns and arbitrary plugin payloads can observe it. Only the
13
- * host-owned outer manifest is serialized with sorted keys.
7
+ * list, effective compiler argument transport, and translated aliases. Two
8
+ * adapter configurations that have different supported JSON representations
9
+ * therefore receive different keys; native spellings resolving to one config
10
+ * identity may share a key. A key does not encode current filesystem content or
11
+ * prove freshness. Compiler overlays, plugin payloads and alias mappings retain
12
+ * their JSON declaration order: tied compiler path patterns and arbitrary
13
+ * plugin payloads can observe it. Only the host-owned outer manifest is
14
+ * serialized with sorted keys.
14
15
  *
15
16
  * @evidence contracts/common.md#principled-implementation Native config and source-root identities plus actual JSON representations of compiler overlays, plugin payloads and alias mappings distinguish requested compiles, retaining declaration order that path-pattern ties or plugins can observe.
16
17
  * @evidence contracts/common.md#clear-and-simple-design Existing path identity and stable JSON encoding define the key; filesystem state remains the generation validator's responsibility.
@@ -19,7 +20,7 @@ import type { ResolvedTtscUnpluginOptions } from "../../options/ResolvedTtscUnpl
19
20
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Returns a string and retains nothing.
20
21
  * @evidence contracts/performance.md#efficient-algorithms
21
22
  * Three payload serializations preserve supported JSON order; the outer
22
- * five-field manifest sorts only its fixed keys and serializes their text
23
+ * fixed-field manifest sorts only its own keys and serializes their text
23
24
  * again, with escaping/output space proportional to the payload text.
24
25
  * One path-identity transaction for config and root observes uncached native
25
26
  * aliases, ancestors and directory case policy; that work is not constant
@@ -37,6 +38,8 @@ import type { ResolvedTtscUnpluginOptions } from "../../options/ResolvedTtscUnpl
37
38
  export declare function createTransformCacheKey(props: {
38
39
  aliasPaths: Record<string, string[]>;
39
40
  compilerOptions: Record<string, unknown>;
41
+ /** Effective compiler argument snapshot selected before cache lookup. */
42
+ compilerEnvironment?: NodeJS.ProcessEnv;
40
43
  plugins?: ResolvedTtscUnpluginOptions["plugins"];
41
44
  /** Common source root; omission defaults to the config directory. */
42
45
  projectRoot?: string;
@@ -4,13 +4,14 @@ import type { ResolvedTtscUnpluginOptions } from "../../options/ResolvedTtscUnpl
4
4
  *
5
5
  * The declared compile configuration is represented by: the selected tsconfig's
6
6
  * filesystem identity, common source-root identity, compiler overlay, plugin
7
- * list, and translated aliases. Two adapter configurations that have different
8
- * supported JSON representations therefore receive different keys; native
9
- * spellings resolving to one config identity may share a key. A key does not
10
- * encode current filesystem content or prove freshness. Compiler overlays,
11
- * plugin payloads and alias mappings retain their JSON declaration order: tied
12
- * compiler path patterns and arbitrary plugin payloads can observe it. Only the
13
- * host-owned outer manifest is serialized with sorted keys.
7
+ * list, effective compiler argument transport, and translated aliases. Two
8
+ * adapter configurations that have different supported JSON representations
9
+ * therefore receive different keys; native spellings resolving to one config
10
+ * identity may share a key. A key does not encode current filesystem content or
11
+ * prove freshness. Compiler overlays, plugin payloads and alias mappings retain
12
+ * their JSON declaration order: tied compiler path patterns and arbitrary
13
+ * plugin payloads can observe it. Only the host-owned outer manifest is
14
+ * serialized with sorted keys.
14
15
  *
15
16
  * @evidence contracts/common.md#principled-implementation Native config and source-root identities plus actual JSON representations of compiler overlays, plugin payloads and alias mappings distinguish requested compiles, retaining declaration order that path-pattern ties or plugins can observe.
16
17
  * @evidence contracts/common.md#clear-and-simple-design Existing path identity and stable JSON encoding define the key; filesystem state remains the generation validator's responsibility.
@@ -19,7 +20,7 @@ import type { ResolvedTtscUnpluginOptions } from "../../options/ResolvedTtscUnpl
19
20
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Returns a string and retains nothing.
20
21
  * @evidence contracts/performance.md#efficient-algorithms
21
22
  * Three payload serializations preserve supported JSON order; the outer
22
- * five-field manifest sorts only its fixed keys and serializes their text
23
+ * fixed-field manifest sorts only its own keys and serializes their text
23
24
  * again, with escaping/output space proportional to the payload text.
24
25
  * One path-identity transaction for config and root observes uncached native
25
26
  * aliases, ancestors and directory case policy; that work is not constant
@@ -37,6 +38,8 @@ import type { ResolvedTtscUnpluginOptions } from "../../options/ResolvedTtscUnpl
37
38
  export declare function createTransformCacheKey(props: {
38
39
  aliasPaths: Record<string, string[]>;
39
40
  compilerOptions: Record<string, unknown>;
41
+ /** Effective compiler argument snapshot selected before cache lookup. */
42
+ compilerEnvironment?: NodeJS.ProcessEnv;
40
43
  plugins?: ResolvedTtscUnpluginOptions["plugins"];
41
44
  /** Common source root; omission defaults to the config directory. */
42
45
  projectRoot?: string;