@wtf/project-docs 2.3.1 → 3.0.0

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 (374) hide show
  1. package/api/.generated +15 -13
  2. package/api/@wtf/project-astro/README.md +42 -25
  3. package/api/@wtf/project-astro/config/README.md +9 -1
  4. package/api/@wtf/project-astro/config/functions/baseConfig.md +10 -6
  5. package/api/@wtf/project-astro/config/functions/baseOf.md +5 -5
  6. package/api/@wtf/project-astro/config/functions/siteOf.md +5 -5
  7. package/api/@wtf/project-astro/config/type-aliases/BaseOptions.md +21 -19
  8. package/api/@wtf/project-astro/config/type-aliases/Env.md +3 -3
  9. package/api/@wtf/project-astro/errors/classes/BrokenLinksError.md +5 -5
  10. package/api/@wtf/project-astro/errors/classes/InvalidRedirectError.md +6 -6
  11. package/api/@wtf/project-astro/errors/classes/RedirectedLinksError.md +5 -5
  12. package/api/@wtf/project-astro/errors/classes/SiteError.md +4 -4
  13. package/api/@wtf/project-astro/index/README.md +3 -1
  14. package/api/@wtf/project-astro/index/type-aliases/AstroPlatform.md +15 -0
  15. package/api/@wtf/project-astro/index/type-aliases/BrokenLink.md +3 -3
  16. package/api/@wtf/project-astro/index/type-aliases/IgnoredLine.md +4 -4
  17. package/api/@wtf/project-astro/index/type-aliases/RedirectInput.md +2 -2
  18. package/api/@wtf/project-astro/index/type-aliases/RedirectMatch.md +3 -3
  19. package/api/@wtf/project-astro/index/type-aliases/RedirectRule.md +5 -5
  20. package/api/@wtf/project-astro/index/type-aliases/RedirectStatus.md +1 -1
  21. package/api/@wtf/project-astro/index/type-aliases/RedirectedLink.md +2 -2
  22. package/api/@wtf/project-astro/index/type-aliases/Redirects.md +3 -3
  23. package/api/@wtf/project-astro/links/README.md +4 -0
  24. package/api/@wtf/project-astro/links/functions/brokenLinksIn.md +1 -1
  25. package/api/@wtf/project-astro/links/functions/links.md +15 -6
  26. package/api/@wtf/project-astro/links/functions/redirectedLinksIn.md +1 -1
  27. package/api/@wtf/project-astro/links/type-aliases/LinksOptions.md +23 -0
  28. package/api/@wtf/project-astro/links/variables/LINKS.md +1 -1
  29. package/api/@wtf/project-astro/pages/functions/fixSearchUrlsIn.md +1 -1
  30. package/api/@wtf/project-astro/pages/functions/moveConflictingPages.md +1 -1
  31. package/api/@wtf/project-astro/pages/functions/pages.md +9 -6
  32. package/api/@wtf/project-astro/pages/functions/prefixedLocaleOf.md +1 -1
  33. package/api/@wtf/project-astro/pages/functions/redirectBaseToLocaleIn.md +1 -1
  34. package/api/@wtf/project-astro/pages/functions/slashFolderLinksIn.md +1 -1
  35. package/api/@wtf/project-astro/pages/type-aliases/I18n.md +1 -1
  36. package/api/@wtf/project-astro/pages/type-aliases/PagesOptions.md +2 -2
  37. package/api/@wtf/project-astro/pages/variables/PAGES.md +1 -1
  38. package/api/@wtf/project-astro/preview/README.md +7 -4
  39. package/api/@wtf/project-astro/preview/functions/files.md +1 -1
  40. package/api/@wtf/project-astro/preview/functions/listen.md +1 -1
  41. package/api/@wtf/project-astro/preview/functions/notFound.md +1 -1
  42. package/api/@wtf/project-astro/preview/functions/pagesOf.md +1 -1
  43. package/api/@wtf/project-astro/preview/functions/previewOf.md +6 -5
  44. package/api/@wtf/project-astro/preview/type-aliases/FilesOptions.md +2 -2
  45. package/api/@wtf/project-astro/preview/type-aliases/Handler.md +1 -1
  46. package/api/@wtf/project-astro/preview/type-aliases/ListenOptions.md +4 -4
  47. package/api/@wtf/project-astro/preview/type-aliases/Listening.md +5 -5
  48. package/api/@wtf/project-astro/preview/type-aliases/Pages.md +3 -3
  49. package/api/@wtf/project-astro/preview/type-aliases/Preview.md +4 -4
  50. package/api/@wtf/project-astro/preview/type-aliases/PreviewOptions.md +8 -7
  51. package/api/@wtf/project-astro/redirects/functions/formatRedirects.md +1 -1
  52. package/api/@wtf/project-astro/redirects/functions/matchRedirect.md +1 -1
  53. package/api/@wtf/project-astro/redirects/functions/parseRedirects.md +1 -1
  54. package/api/@wtf/project-astro/redirects/variables/MAX_PARTS.md +1 -1
  55. package/api/@wtf/project-astro/redirects/variables/MAX_RULES.md +1 -1
  56. package/api/@wtf/project-astro/redirects/variables/MAX_SIZE.md +1 -1
  57. package/api/@wtf/project-astro/schema/README.md +7 -3
  58. package/api/@wtf/project-astro/schema/functions/astroSchemaWith.md +3 -3
  59. package/api/@wtf/project-astro/schema/type-aliases/AstroSection.md +11 -0
  60. package/api/@wtf/project-astro/schema/type-aliases/JsonSchema.md +12 -12
  61. package/api/@wtf/project-astro/schema/type-aliases/OptionsSchema.md +1 -1
  62. package/api/@wtf/project-astro/schema/variables/astroProperties.md +4 -3
  63. package/api/@wtf/project-astro/schema/variables/astroSchema.md +5 -5
  64. package/api/@wtf/project-config/README.md +40 -26
  65. package/api/@wtf/project-config/define/functions/defineConfig.md +1 -1
  66. package/api/@wtf/project-config/env/README.md +2 -2
  67. package/api/@wtf/project-config/env/functions/envNameOf.md +1 -1
  68. package/api/@wtf/project-config/env/functions/envPrefixOf.md +1 -1
  69. package/api/@wtf/project-config/env/functions/jsonSchemaOf.md +1 -1
  70. package/api/@wtf/project-config/env/functions/variablesOf.md +1 -1
  71. package/api/@wtf/project-config/env/functions/withEnvironment.md +1 -1
  72. package/api/@wtf/project-config/env/type-aliases/Environment.md +1 -1
  73. package/api/@wtf/project-config/env/type-aliases/EnvironmentValue.md +3 -3
  74. package/api/@wtf/project-config/env/type-aliases/WithEnvironment.md +3 -3
  75. package/api/@wtf/project-config/errors/classes/ConfigError.md +4 -4
  76. package/api/@wtf/project-config/errors/classes/ConfigFileMismatchError.md +6 -6
  77. package/api/@wtf/project-config/errors/classes/ConfigInCodeError.md +5 -5
  78. package/api/@wtf/project-config/errors/classes/ConfigPathError.md +5 -5
  79. package/api/@wtf/project-config/errors/classes/EnvPlaceholderUnsetError.md +6 -6
  80. package/api/@wtf/project-config/errors/classes/InvalidConfigFileError.md +5 -5
  81. package/api/@wtf/project-config/errors/classes/InvalidSectionError.md +7 -7
  82. package/api/@wtf/project-config/errors/classes/NamedError.md +12 -12
  83. package/api/@wtf/project-config/errors/classes/NoConfigFileError.md +5 -5
  84. package/api/@wtf/project-config/errors/classes/NoConfigValueError.md +6 -6
  85. package/api/@wtf/project-config/errors/classes/SyncConfigInCodeError.md +5 -5
  86. package/api/@wtf/project-config/errors/classes/SyncSchemaError.md +5 -5
  87. package/api/@wtf/project-config/errors/classes/UnwritableConfigFileError.md +5 -5
  88. package/api/@wtf/project-config/errors/type-aliases/NamedErrorCode.md +1 -1
  89. package/api/@wtf/project-config/errors/type-aliases/NamedErrorDetails.md +9 -9
  90. package/api/@wtf/project-config/index/type-aliases/ConfigDefaults.md +3 -3
  91. package/api/@wtf/project-config/index/type-aliases/ConfigEnvironment.md +4 -4
  92. package/api/@wtf/project-config/index/type-aliases/ConfigIssue.md +3 -3
  93. package/api/@wtf/project-config/index/type-aliases/ConfigNames.md +4 -4
  94. package/api/@wtf/project-config/index/type-aliases/ConfigPath.md +1 -1
  95. package/api/@wtf/project-config/index/type-aliases/ConfigPlatform.md +3 -3
  96. package/api/@wtf/project-config/index/type-aliases/ConfigSection.md +1 -1
  97. package/api/@wtf/project-config/index/type-aliases/ConfigSource.md +3 -3
  98. package/api/@wtf/project-config/index/type-aliases/ConfigSyncPlatform.md +5 -5
  99. package/api/@wtf/project-config/index/type-aliases/ConfigWrite.md +10 -10
  100. package/api/@wtf/project-config/index/type-aliases/ImportModule.md +1 -1
  101. package/api/@wtf/project-config/index/type-aliases/JsonSchema.md +1 -1
  102. package/api/@wtf/project-config/index/type-aliases/LocatedConfig.md +4 -4
  103. package/api/@wtf/project-config/index/type-aliases/NamespaceConfig.md +2 -2
  104. package/api/@wtf/project-config/index/type-aliases/ResolvedConfig.md +9 -9
  105. package/api/@wtf/project-config/index/type-aliases/SectionSchema.md +1 -1
  106. package/api/@wtf/project-config/index/type-aliases/SectionsOf.md +1 -1
  107. package/api/@wtf/project-config/index/type-aliases/SyncFiles.md +3 -3
  108. package/api/@wtf/project-config/index/type-aliases/ValidateSection.md +1 -1
  109. package/api/@wtf/project-config/load/README.md +12 -5
  110. package/api/@wtf/project-config/load/functions/ignoredWarning.md +1 -1
  111. package/api/@wtf/project-config/load/functions/importFileModule.md +1 -1
  112. package/api/@wtf/project-config/load/functions/loadConfig.md +10 -11
  113. package/api/@wtf/project-config/load/functions/loadConfigSync.md +4 -4
  114. package/api/@wtf/project-config/load/type-aliases/LoadLayers.md +5 -5
  115. package/api/@wtf/project-config/load/type-aliases/LoadOptions.md +4 -3
  116. package/api/@wtf/project-config/load/type-aliases/LoadPlatform.md +15 -0
  117. package/api/@wtf/project-config/load/type-aliases/LoadSyncOptions.md +8 -2
  118. package/api/@wtf/project-config/load/type-aliases/LoadSyncPlatform.md +19 -0
  119. package/api/@wtf/project-config/locate/README.md +5 -2
  120. package/api/@wtf/project-config/locate/functions/configFilesOf.md +1 -1
  121. package/api/@wtf/project-config/locate/functions/configNamesOf.md +1 -1
  122. package/api/@wtf/project-config/locate/functions/jsonFilesOf.md +1 -1
  123. package/api/@wtf/project-config/locate/functions/locateConfig.md +1 -1
  124. package/api/@wtf/project-config/locate/functions/locateConfigSync.md +1 -1
  125. package/api/@wtf/project-config/locate/functions/projectRootOf.md +1 -1
  126. package/api/@wtf/project-config/locate/functions/projectRootOfSync.md +1 -1
  127. package/api/@wtf/project-config/locate/type-aliases/LocateNames.md +2 -2
  128. package/api/@wtf/project-config/locate/type-aliases/LocateOptions.md +2 -2
  129. package/api/@wtf/project-config/locate/type-aliases/LocateSyncOptions.md +2 -2
  130. package/api/@wtf/project-config/locate/type-aliases/NamespaceNames.md +2 -2
  131. package/api/@wtf/project-config/locate/variables/DEFAULT_NAMESPACE.md +1 -1
  132. package/api/@wtf/project-config/named/functions/factoryOf.md +1 -1
  133. package/api/@wtf/project-config/named/functions/namedSchema.md +1 -1
  134. package/api/@wtf/project-config/named/functions/namedSetSchema.md +1 -1
  135. package/api/@wtf/project-config/named/functions/resolveNamed.md +1 -1
  136. package/api/@wtf/project-config/named/functions/resolveNamedSet.md +1 -1
  137. package/api/@wtf/project-config/named/type-aliases/LoadModule.md +1 -1
  138. package/api/@wtf/project-config/named/type-aliases/ModuleReference.md +3 -3
  139. package/api/@wtf/project-config/named/type-aliases/NamedCheckOptions.md +5 -5
  140. package/api/@wtf/project-config/named/type-aliases/NamedEntries.md +1 -1
  141. package/api/@wtf/project-config/named/type-aliases/NamedFactory.md +1 -1
  142. package/api/@wtf/project-config/named/type-aliases/NamedOptions.md +1 -1
  143. package/api/@wtf/project-config/named/type-aliases/NamedReference.md +1 -1
  144. package/api/@wtf/project-config/named/type-aliases/NamedResolveOptions.md +3 -3
  145. package/api/@wtf/project-config/named/type-aliases/NamedSchema.md +1 -1
  146. package/api/@wtf/project-config/named/type-aliases/NamedSchemaOptions.md +4 -4
  147. package/api/@wtf/project-config/named/type-aliases/NamedSet.md +1 -1
  148. package/api/@wtf/project-config/named/type-aliases/NamedSetOptions.md +2 -2
  149. package/api/@wtf/project-config/named/type-aliases/NamedSetSchemaOptions.md +3 -3
  150. package/api/@wtf/project-config/named/type-aliases/NamedSets.md +1 -1
  151. package/api/@wtf/project-config/named/type-aliases/NamedUse.md +1 -1
  152. package/api/@wtf/project-config/node/README.md +13 -16
  153. package/api/@wtf/project-config/node/functions/nodeLoadModule.md +7 -7
  154. package/api/@wtf/project-config/node/functions/nodeSyncPlatform.md +12 -5
  155. package/api/@wtf/project-config/path/functions/configPathOf.md +1 -1
  156. package/api/@wtf/project-config/path/functions/textOfConfigPath.md +1 -1
  157. package/api/@wtf/project-config/path/functions/valueAt.md +1 -1
  158. package/api/@wtf/project-config/placeholder/functions/expandPlaceholders.md +1 -1
  159. package/api/@wtf/project-config/placeholder/functions/expandString.md +1 -1
  160. package/api/@wtf/project-config/schema/functions/namespaceSchema.md +1 -1
  161. package/api/@wtf/project-config/schema/functions/sectionIdOf.md +1 -1
  162. package/api/@wtf/project-config/schema/type-aliases/NamespaceSchemaOptions.md +3 -3
  163. package/api/@wtf/project-config/schema/variables/JSON_SCHEMA_DRAFT.md +1 -1
  164. package/api/@wtf/project-config/section/README.md +7 -3
  165. package/api/@wtf/project-config/section/functions/issuesOf.md +1 -1
  166. package/api/@wtf/project-config/section/functions/issuesOfSync.md +1 -1
  167. package/api/@wtf/project-config/section/functions/mergeSection.md +1 -1
  168. package/api/@wtf/project-config/section/functions/sectionOf.md +6 -6
  169. package/api/@wtf/project-config/section/functions/sectionOfSync.md +1 -1
  170. package/api/@wtf/project-config/section/type-aliases/Checked.md +3 -3
  171. package/api/@wtf/project-config/write/README.md +5 -4
  172. package/api/@wtf/project-config/write/functions/setConfigValue.md +1 -1
  173. package/api/@wtf/project-config/write/functions/unsetConfigValue.md +1 -1
  174. package/api/@wtf/project-config/write/type-aliases/WriteOptions.md +2 -2
  175. package/api/@wtf/project-oxfmt/README.md +5 -2
  176. package/api/@wtf/project-oxfmt/config/functions/oxfmtConfig.md +1 -1
  177. package/api/@wtf/project-oxfmt/config/type-aliases/OxfmtOptions.md +1 -1
  178. package/api/@wtf/project-oxfmt/config/variables/OXFMT_DEFAULTS.md +6 -6
  179. package/api/@wtf/project-oxfmt/config/variables/default.md +1 -1
  180. package/api/@wtf/project-oxfmt/schema/variables/oxfmtSchema.md +1 -1
  181. package/api/@wtf/project-oxlint/README.md +5 -2
  182. package/api/@wtf/project-oxlint/config/functions/oxlintConfig.md +1 -1
  183. package/api/@wtf/project-oxlint/config/type-aliases/OxlintOptions.md +1 -1
  184. package/api/@wtf/project-oxlint/config/variables/OXLINT_DEFAULTS.md +17 -17
  185. package/api/@wtf/project-oxlint/config/variables/default.md +1 -1
  186. package/api/@wtf/project-oxlint/schema/variables/oxlintSchema.md +1 -1
  187. package/api/@wtf/project-resolve/condition/variables/SOURCE_CONDITION.md +1 -1
  188. package/api/@wtf/project-resolve/env/functions/isHook.md +1 -1
  189. package/api/@wtf/project-resolve/env/functions/optionsWithoutHook.md +1 -1
  190. package/api/@wtf/project-resolve/env/functions/withoutHook.md +1 -1
  191. package/api/@wtf/project-resolve/env/type-aliases/Env.md +1 -1
  192. package/api/@wtf/project-resolve/errors/classes/ResolveError.md +4 -4
  193. package/api/@wtf/project-resolve/errors/classes/UnreadableWorkspaceError.md +6 -6
  194. package/api/@wtf/project-resolve/errors/classes/WorkspaceError.md +5 -5
  195. package/api/@wtf/project-resolve/hooks/functions/candidatesOf.md +1 -1
  196. package/api/@wtf/project-resolve/hooks/functions/sourcesHookOf.md +1 -1
  197. package/api/@wtf/project-resolve/hooks/functions/sourcesOf.md +1 -1
  198. package/api/@wtf/project-resolve/hooks/variables/resolveTypeScript.md +1 -1
  199. package/api/@wtf/project-resolve/node/functions/nodePlatform.md +5 -5
  200. package/api/@wtf/project-resolve/register/variables/REGISTERED.md +1 -1
  201. package/api/@wtf/project-resolve/workspace/functions/filesOf.md +1 -1
  202. package/api/@wtf/project-resolve/workspace/functions/packagesOf.md +1 -1
  203. package/api/@wtf/project-resolve/workspace/functions/workspaceAt.md +1 -1
  204. package/api/@wtf/project-resolve/workspace/functions/workspaceOf.md +1 -1
  205. package/api/@wtf/project-resolve/workspace/functions/workspaceRootAbove.md +1 -1
  206. package/api/@wtf/project-resolve/workspace/functions/workspaceRootOf.md +1 -1
  207. package/api/@wtf/project-resolve/workspace/type-aliases/Agent.md +1 -1
  208. package/api/@wtf/project-resolve/workspace/type-aliases/DirectoryEntry.md +4 -4
  209. package/api/@wtf/project-resolve/workspace/type-aliases/FileContents.md +3 -3
  210. package/api/@wtf/project-resolve/workspace/type-aliases/PackageManager.md +4 -4
  211. package/api/@wtf/project-resolve/workspace/type-aliases/PackageManagerName.md +1 -1
  212. package/api/@wtf/project-resolve/workspace/type-aliases/ProcessWorkspaceOptions.md +1 -1
  213. package/api/@wtf/project-resolve/workspace/type-aliases/Workspace.md +5 -5
  214. package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceDirectoryHandle.md +6 -6
  215. package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceFileHandle.md +3 -3
  216. package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceFiles.md +6 -6
  217. package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceOptions.md +2 -2
  218. package/api/@wtf/project-resolve/workspace/type-aliases/WorkspacePackage.md +4 -4
  219. package/api/@wtf/project-resolve/workspace/type-aliases/WorkspacePaths.md +7 -7
  220. package/api/@wtf/project-typedoc/README.md +17 -3
  221. package/api/@wtf/project-typedoc/config/README.md +20 -4
  222. package/api/@wtf/project-typedoc/config/functions/gitRevisionOf.md +6 -6
  223. package/api/@wtf/project-typedoc/config/functions/typedocConfig.md +5 -5
  224. package/api/@wtf/project-typedoc/config/type-aliases/RevisionSources.md +7 -7
  225. package/api/@wtf/project-typedoc/config/type-aliases/TypedocConfig.md +1 -1
  226. package/api/@wtf/project-typedoc/config/type-aliases/TypedocOptions.md +8 -6
  227. package/api/@wtf/project-typedoc/config/type-aliases/TypedocPlatform.md +18 -0
  228. package/api/@wtf/project-typedoc/plugins/README.md +0 -1
  229. package/api/@wtf/project-typedoc/plugins/functions/cleanGeneratedMarkdown.md +1 -1
  230. package/api/@wtf/project-typedoc/plugins/functions/linkTrackedSources.md +2 -2
  231. package/api/@wtf/project-typedoc/plugins/functions/preventMediaFiles.md +1 -1
  232. package/api/@wtf/project-typedoc/plugins/type-aliases/CleanGeneratedMarkdownOptions.md +15 -3
  233. package/api/@wtf/project-typedoc/plugins/type-aliases/LinkTrackedSourcesOptions.md +9 -9
  234. package/api/@wtf/project-typedoc/plugins/type-aliases/PreventMediaFilesOptions.md +23 -3
  235. package/api/@wtf/project-typedoc/plugins/type-aliases/TypedocPlugin.md +1 -1
  236. package/api/@wtf/project-typedoc/schema/README.md +11 -2
  237. package/api/@wtf/project-typedoc/schema/type-aliases/TypedocSection.md +19 -0
  238. package/api/@wtf/project-typedoc/schema/variables/typedocSchema.md +6 -5
  239. package/api/@wtf/project-vite/README.md +20 -11
  240. package/api/@wtf/project-vite/config/README.md +11 -4
  241. package/api/@wtf/project-vite/config/functions/baseConfig.md +14 -9
  242. package/api/@wtf/project-vite/config/functions/buildsSite.md +1 -1
  243. package/api/@wtf/project-vite/config/functions/compress.md +1 -1
  244. package/api/@wtf/project-vite/config/functions/conditionsOf.md +8 -7
  245. package/api/@wtf/project-vite/config/functions/fromDist.md +22 -0
  246. package/api/@wtf/project-vite/config/type-aliases/BaseOptions.md +15 -2
  247. package/api/@wtf/project-vite/config/type-aliases/CompressOptions.md +4 -4
  248. package/api/@wtf/project-vite/config/variables/CLIENT_CONDITIONS.md +1 -1
  249. package/api/@wtf/project-vite/config/variables/COMPRESSIBLE.md +1 -1
  250. package/api/@wtf/project-vite/config/variables/THRESHOLD.md +1 -1
  251. package/api/@wtf/project-vite/schema/README.md +10 -3
  252. package/api/@wtf/project-vite/schema/type-aliases/ViteSection.md +11 -0
  253. package/api/@wtf/project-vite/schema/variables/viteSchema.md +5 -4
  254. package/api/@wtf/project-vitest/README.md +34 -16
  255. package/api/@wtf/project-vitest/browser/README.md +2 -1
  256. package/api/@wtf/project-vitest/browser/functions/browserConfig.md +6 -6
  257. package/api/@wtf/project-vitest/browser/functions/browserRootConfig.md +2 -2
  258. package/api/@wtf/project-vitest/browser/type-aliases/BrowserOptions.md +8 -6
  259. package/api/@wtf/project-vitest/config/README.md +17 -1
  260. package/api/@wtf/project-vitest/config/functions/fromDist.md +22 -0
  261. package/api/@wtf/project-vitest/config/functions/integrationConfig.md +2 -2
  262. package/api/@wtf/project-vitest/config/functions/packageConfig.md +17 -10
  263. package/api/@wtf/project-vitest/config/functions/rootConfig.md +5 -2
  264. package/api/@wtf/project-vitest/config/type-aliases/PackageOptions.md +18 -0
  265. package/api/@wtf/project-vitest/config/type-aliases/RootConfigOptions.md +2 -2
  266. package/api/@wtf/project-vitest/config/type-aliases/RootOptions.md +32 -7
  267. package/api/@wtf/project-vitest/config/type-aliases/VitestPlatform.md +26 -0
  268. package/api/@wtf/project-vitest/config/variables/GUARD_TIMEOUT.md +1 -1
  269. package/api/@wtf/project-vitest/config/variables/integration.md +10 -10
  270. package/api/@wtf/project-vitest/process/README.md +3 -3
  271. package/api/@wtf/project-vitest/process/functions/childEnv.md +6 -6
  272. package/api/@wtf/project-vitest/process/type-aliases/Env.md +1 -1
  273. package/api/@wtf/project-vitest/schema/README.md +14 -3
  274. package/api/@wtf/project-vitest/schema/type-aliases/VitestSection.md +12 -0
  275. package/api/@wtf/project-vitest/schema/variables/vitestSchema.md +6 -5
  276. package/api/@wtf/project-vitest/storybook/functions/storybookConfig.md +6 -4
  277. package/api/@wtf/project-vitest/storybook/type-aliases/StorybookOptions.md +3 -3
  278. package/api/@wtf/project-wpt/README.md +27 -19
  279. package/api/@wtf/project-wpt/builtins/functions/builtins.md +1 -1
  280. package/api/@wtf/project-wpt/builtins/functions/intrinsics.md +1 -1
  281. package/api/@wtf/project-wpt/checkout/README.md +3 -2
  282. package/api/@wtf/project-wpt/checkout/functions/checkoutFolderOf.md +1 -1
  283. package/api/@wtf/project-wpt/checkout/functions/checkoutTests.md +1 -1
  284. package/api/@wtf/project-wpt/checkout/functions/checkoutWpt.md +1 -1
  285. package/api/@wtf/project-wpt/checkout/functions/execOf.md +28 -0
  286. package/api/@wtf/project-wpt/checkout/functions/fileOf.md +1 -1
  287. package/api/@wtf/project-wpt/checkout/type-aliases/CheckedOutTests.md +3 -3
  288. package/api/@wtf/project-wpt/checkout/type-aliases/CheckoutOptions.md +12 -12
  289. package/api/@wtf/project-wpt/checkout/type-aliases/CheckoutTestsOptions.md +2 -2
  290. package/api/@wtf/project-wpt/checkout/variables/HARNESS.md +1 -1
  291. package/api/@wtf/project-wpt/checkout/variables/REWRITES.md +1 -1
  292. package/api/@wtf/project-wpt/checkout/variables/WPT_REPOSITORY.md +1 -1
  293. package/api/@wtf/project-wpt/errors/classes/HarnessFailedError.md +4 -4
  294. package/api/@wtf/project-wpt/errors/classes/InvalidCommitError.md +4 -4
  295. package/api/@wtf/project-wpt/errors/classes/InvalidExpectationsError.md +4 -4
  296. package/api/@wtf/project-wpt/errors/classes/NoSuiteError.md +4 -4
  297. package/api/@wtf/project-wpt/errors/classes/NotInWptError.md +5 -5
  298. package/api/@wtf/project-wpt/errors/classes/StaleExpectationError.md +4 -4
  299. package/api/@wtf/project-wpt/errors/classes/SubtestFailedError.md +4 -4
  300. package/api/@wtf/project-wpt/errors/classes/UnexpectedPassError.md +4 -4
  301. package/api/@wtf/project-wpt/errors/classes/WptError.md +4 -4
  302. package/api/@wtf/project-wpt/errors/classes/WptFetchError.md +4 -4
  303. package/api/@wtf/project-wpt/expectations/functions/checkHarness.md +1 -1
  304. package/api/@wtf/project-wpt/expectations/functions/checkSubtest.md +1 -1
  305. package/api/@wtf/project-wpt/expectations/functions/expectationOf.md +1 -1
  306. package/api/@wtf/project-wpt/expectations/functions/expectationsIssues.md +1 -1
  307. package/api/@wtf/project-wpt/expectations/functions/readExpectations.md +6 -4
  308. package/api/@wtf/project-wpt/expectations/functions/staleOf.md +1 -1
  309. package/api/@wtf/project-wpt/expectations/type-aliases/ReadExpectations.md +3 -3
  310. package/api/@wtf/project-wpt/index/README.md +2 -5
  311. package/api/@wtf/project-wpt/index/type-aliases/CreateRealm.md +1 -1
  312. package/api/@wtf/project-wpt/index/type-aliases/Exec.md +3 -3
  313. package/api/@wtf/project-wpt/index/type-aliases/Expectations.md +1 -1
  314. package/api/@wtf/project-wpt/index/type-aliases/FileExpectation.md +4 -4
  315. package/api/@wtf/project-wpt/index/type-aliases/FileResult.md +4 -4
  316. package/api/@wtf/project-wpt/index/type-aliases/Globals.md +1 -1
  317. package/api/@wtf/project-wpt/index/type-aliases/HarnessResult.md +4 -4
  318. package/api/@wtf/project-wpt/index/type-aliases/HarnessStatus.md +1 -1
  319. package/api/@wtf/project-wpt/index/type-aliases/HoldRejections.md +1 -1
  320. package/api/@wtf/project-wpt/index/type-aliases/Realm.md +3 -3
  321. package/api/@wtf/project-wpt/index/type-aliases/SubtestResult.md +5 -5
  322. package/api/@wtf/project-wpt/index/type-aliases/SubtestStatus.md +1 -1
  323. package/api/@wtf/project-wpt/index/type-aliases/WptFile.md +3 -3
  324. package/api/@wtf/project-wpt/index/type-aliases/WptFiles.md +9 -9
  325. package/api/@wtf/project-wpt/index/type-aliases/WptPaths.md +4 -4
  326. package/api/@wtf/project-wpt/index/type-aliases/WptPlatform.md +10 -60
  327. package/api/@wtf/project-wpt/index/type-aliases/WptSystem.md +8 -8
  328. package/api/@wtf/project-wpt/index/type-aliases/WptTest.md +3 -3
  329. package/api/@wtf/project-wpt/meta/functions/idOf.md +1 -1
  330. package/api/@wtf/project-wpt/meta/functions/metaOf.md +1 -1
  331. package/api/@wtf/project-wpt/meta/functions/runsOutsideWindow.md +1 -1
  332. package/api/@wtf/project-wpt/meta/functions/scriptPathsOf.md +1 -1
  333. package/api/@wtf/project-wpt/meta/functions/testsOf.md +1 -1
  334. package/api/@wtf/project-wpt/meta/type-aliases/Meta.md +6 -6
  335. package/api/@wtf/project-wpt/node/README.md +16 -8
  336. package/api/@wtf/project-wpt/node/functions/nodeSystem.md +9 -3
  337. package/api/@wtf/project-wpt/node/type-aliases/NodeSystemPlatform.md +12 -0
  338. package/api/@wtf/project-wpt/node/variables/nodeFiles.md +1 -1
  339. package/api/@wtf/project-wpt/node/variables/nodeRealm.md +1 -1
  340. package/api/@wtf/project-wpt/node/variables/nodeRejections.md +1 -1
  341. package/api/@wtf/project-wpt/run/functions/runTest.md +1 -1
  342. package/api/@wtf/project-wpt/run/type-aliases/RunOptions.md +10 -9
  343. package/api/@wtf/project-wpt/run/type-aliases/RunPlatform.md +3 -3
  344. package/api/@wtf/project-wpt/run/variables/LONG_TIMEOUT.md +1 -1
  345. package/api/@wtf/project-wpt/run/variables/TIMEOUT.md +1 -1
  346. package/api/@wtf/project-wpt/run/variables/WPT_ORIGIN.md +1 -1
  347. package/api/@wtf/project-wpt/schema/README.md +6 -3
  348. package/api/@wtf/project-wpt/schema/type-aliases/WptConfig.md +2 -2
  349. package/api/@wtf/project-wpt/schema/type-aliases/WptSuiteConfig.md +2 -2
  350. package/api/@wtf/project-wpt/schema/variables/wptSchema.md +1 -1
  351. package/api/@wtf/project-wpt/suite/README.md +6 -2
  352. package/api/@wtf/project-wpt/suite/functions/wptSuite.md +1 -1
  353. package/api/@wtf/project-wpt/suite/type-aliases/WptSuiteOptions.md +8 -8
  354. package/api/llms.txt +8 -3
  355. package/guides/astro.md +48 -23
  356. package/guides/config.md +38 -13
  357. package/guides/getting-started.md +8 -2
  358. package/guides/presets.md +11 -2
  359. package/guides/vite.md +20 -10
  360. package/guides/vitest.md +54 -27
  361. package/package.json +7 -7
  362. package/api/@wtf/project-config/node/functions/loadConfig.md +0 -24
  363. package/api/@wtf/project-config/node/functions/loadConfigSync.md +0 -24
  364. package/api/@wtf/project-config/node/functions/nodeConfigPlatform.md +0 -16
  365. package/api/@wtf/project-typedoc/config/variables/nodeRun.md +0 -33
  366. package/api/@wtf/project-typedoc/plugins/type-aliases/Run.md +0 -25
  367. package/api/@wtf/project-vite/config/variables/FROM_DIST.md +0 -11
  368. package/api/@wtf/project-vitest/config/variables/FROM_DIST.md +0 -11
  369. package/api/@wtf/project-wpt/index/type-aliases/ClearTimeout.md +0 -21
  370. package/api/@wtf/project-wpt/index/type-aliases/Env.md +0 -11
  371. package/api/@wtf/project-wpt/index/type-aliases/Performance.md +0 -35
  372. package/api/@wtf/project-wpt/index/type-aliases/SetTimeout.md +0 -22
  373. package/api/@wtf/project-wpt/node/functions/nodePlatform.md +0 -18
  374. package/api/@wtf/project-wpt/node/variables/nodeExec.md +0 -11
@@ -56,7 +56,10 @@ You run `test` from the source, with nothing built; run `test:dist` on the build
56
56
  [testing guide](testing.md) says why, and gives the pair for browser and integration tests.
57
57
 
58
58
  Each package's tsconfig.json extends the strict config, and its tsconfig.test.json adds the test
59
- config on top. Each package's vitest.config.ts is `packageConfig()`; the root's is `rootConfig()`:
59
+ config on top. Each package's vitest.config.ts is `packageConfig({ platform })`; the root's is
60
+ `rootConfig({ platform, argv })`. A config file is the entry point: it builds Node's platform, of
61
+ `@wtf/platform-node` and `@wtf/platform-fs-node`, dev dependencies of the root, and gives it, and
62
+ the root's the arguments of the process; no preset reads the process itself:
60
63
 
61
64
  ```json
62
65
  {
@@ -68,9 +71,12 @@ config on top. Each package's vitest.config.ts is `packageConfig()`; the root's
68
71
 
69
72
  ```ts
70
73
  // vitest.config.ts, at the root
74
+ import { nodeStorage } from '@wtf/platform-fs-node/storage'
75
+ import { nodePlatform } from '@wtf/platform-node/platform'
71
76
  import { rootConfig } from '@wtf/project-vitest/config'
72
77
 
73
- export default rootConfig()
78
+ const platform = nodePlatform({ fetch, storage: nodeStorage() })
79
+ export default rootConfig({ platform, argv: process.argv })
74
80
  ```
75
81
 
76
82
  ```ts
package/guides/presets.md CHANGED
@@ -81,12 +81,17 @@ which the config file loads and spreads in: see [Configuration](config.md).
81
81
  `typedocConfig()` of `@wtf/project-typedoc/config` is the config for a docs package,
82
82
  `packages/docs`. It writes the reference of the workspace's packages as markdown in `api/`, with an
83
83
  `llms.txt` built from the package's `llms-template.md`. Each source links to its file in your
84
- repository, and any warning fails the build.
84
+ repository, and any warning fails the build. The config file is the entry point: it builds the
85
+ platform, Node's here, whose `spawn` runs git, and gives it, with the arguments of the process.
85
86
 
86
87
  ```ts
88
+ import { nodeStorage } from '@wtf/platform-fs-node/storage'
89
+ import { nodePlatform } from '@wtf/platform-node/platform'
87
90
  import { typedocConfig } from '@wtf/project-typedoc/config'
88
91
 
89
92
  export default typedocConfig({
93
+ platform: nodePlatform({ fetch, storage: nodeStorage() }),
94
+ argv: process.argv,
90
95
  docs: import.meta.url,
91
96
  repository: 'https://gitlab.com/wetryfun/project/project',
92
97
  entryPoints: ['../core', '../cli']
@@ -95,7 +100,7 @@ export default typedocConfig({
95
100
 
96
101
  The revision each source links to is the first of these that applies:
97
102
 
98
- 1. `--gitRevision <ref>`, passed to `typedoc`;
103
+ 1. `--gitRevision <ref>`, passed to `typedoc`, of the `argv` you give;
99
104
  2. the commit of HEAD;
100
105
  3. in a repo with no commit yet, its branch; outside git, `main`.
101
106
 
@@ -105,6 +110,8 @@ TypeDoc's application or a module by its name: they run after the preset's, and
105
110
  typedoc-plugin-llms-txt and typedoc-plugin-markdown. TypeDoc and its two plugins are peers.
106
111
 
107
112
  ```ts
113
+ import { nodeStorage } from '@wtf/platform-fs-node/storage'
114
+ import { nodePlatform } from '@wtf/platform-node/platform'
108
115
  import { typedocConfig } from '@wtf/project-typedoc/config'
109
116
  import type { TypedocPlugin } from '@wtf/project-typedoc/plugins'
110
117
 
@@ -114,6 +121,8 @@ const notice: TypedocPlugin = (app) => {
114
121
  }
115
122
 
116
123
  export default typedocConfig({
124
+ platform: nodePlatform({ fetch, storage: nodeStorage() }),
125
+ argv: process.argv,
117
126
  docs: import.meta.url,
118
127
  repository: 'https://gitlab.com/wetryfun/project/project',
119
128
  entryPoints: ['../core'],
package/guides/vite.md CHANGED
@@ -4,20 +4,22 @@ This guide shows you how to start every Vite config in a workspace from one base
4
4
  a test and a build all resolve the workspace the same way, and how a site's build ships compressed
5
5
  copies that a static host can serve.
6
6
 
7
- `@wtf/project-vite/config` holds the base Vite config of a workspace, `baseConfig()`. Every Vite
8
- config starts from it: an app's vite.config, a Storybook's `viteFinal`, and each Vitest config
9
- (the configs of `@wtf/project-vitest` start from it themselves).
7
+ `@wtf/project-vite/config` holds the base Vite config of a workspace, `baseConfig({ platform })`.
8
+ Every Vite config starts from it: an app's vite.config, a Storybook's `viteFinal`, and each Vitest
9
+ config (the configs of `@wtf/project-vitest` start from it themselves). It reads the environment
10
+ of the platform it is given, and nothing of the process: the config file, its entry point, builds
11
+ the platform, as `nodePlatform()` of `@wtf/platform-node/platform` makes Node's.
10
12
 
11
13
  | Export of `./config` | What it is |
12
14
  | -------------------- | -------------------------------------------------------------------------------------------------------------- |
13
- | `baseConfig` | The base config, made of the two layers below: `mergeConfig(baseConfig(), yours)` |
15
+ | `baseConfig` | The base config, made of the two layers below: `mergeConfig(baseConfig({ platform }), yours)` |
14
16
  | `compress` | The plugin that writes brotli and gzip copies in a site's build; `baseConfig` adds it unless `compress: false` |
15
17
  | `conditionsOf` | The resolve conditions of a run: `@wtf/source` first, when reading from source |
16
18
  | `buildsSite` | Whether a run is a site's build: `vite build`, with no library (`build.lib`) and no server (`build.ssr`) |
17
19
  | `CLIENT_CONDITIONS` | Vite's own conditions for browser modules, which come after `@wtf/source` |
18
20
  | `COMPRESSIBLE` | The extensions of the files a site's build compresses: text, and WebAssembly |
19
21
  | `THRESHOLD` | The smallest file that gets compressed, 1024 bytes |
20
- | `FROM_DIST` | Whether the run reads the packages from their build (`TEST_FROM=dist`) |
22
+ | `fromDist` | Whether the run reads the packages from their build, of an environment: `fromDist(env)`, `TEST_FROM=dist` |
21
23
 
22
24
  ## What the base sets
23
25
 
@@ -26,7 +28,8 @@ Every command shares this, whether a dev server, a test or a build:
26
28
  - `resolve.conditions`: `@wtf/source`, then Vite's own (`module`, `browser`,
27
29
  `development|production`). A workspace package resolves to its TypeScript through the
28
30
  `@wtf/source` condition of its export map (`SOURCE_CONDITION` of
29
- `@wtf/project-resolve/condition`), with nothing built first. With `TEST_FROM=dist`, as
31
+ `@wtf/project-resolve/condition`), with nothing built first. With `TEST_FROM=dist` in the
32
+ platform's `env`, as
30
33
  `test:dist` and `test:browser:dist` run, there is no `@wtf/source`, and a package resolves the
31
34
  way a consumer resolves it: to its build.
32
35
 
@@ -46,8 +49,8 @@ A static host such as GitLab Pages compresses nothing as it serves. It serves a
46
49
  `.gz` in its place, to a browser that accepts it, only when that copy is there. Without them, a
47
50
  Storybook or an app with megabytes of script crosses the network uncompressed.
48
51
 
49
- Tune it with `baseConfig({ compress: { threshold, extensions, encodings } })`, or turn it off with
50
- `baseConfig({ compress: false })`, for a site no static host serves.
52
+ Tune it with `baseConfig({ platform, compress: { threshold, extensions, encodings } })`, or turn
53
+ it off with `baseConfig({ platform, compress: false })`, for a site no static host serves.
51
54
 
52
55
  ### Compress what Vite did not write
53
56
 
@@ -62,6 +65,8 @@ An app's vite.config starts from the base and adds its own settings:
62
65
 
63
66
  ```ts
64
67
  // vite.config.ts
68
+ import { nodeStorage } from '@wtf/platform-fs-node/storage'
69
+ import { nodePlatform } from '@wtf/platform-node/platform'
65
70
  import { defineConfig, mergeConfig, type PluginOption } from 'vite'
66
71
 
67
72
  import { baseConfig } from '@wtf/project-vite/config'
@@ -69,7 +74,8 @@ import { baseConfig } from '@wtf/project-vite/config'
69
74
  // The app's own plugins, as `react()` of @vitejs/plugin-react.
70
75
  declare const react: () => PluginOption
71
76
 
72
- export default defineConfig(mergeConfig(baseConfig(), { plugins: [react()] }))
77
+ const platform = nodePlatform({ fetch, storage: nodeStorage() })
78
+ export default defineConfig(mergeConfig(baseConfig({ platform }), { plugins: [react()] }))
73
79
  ```
74
80
 
75
81
  `mergeConfig` appends lists, so the app's plugins come after the base's, and any conditions it
@@ -82,6 +88,8 @@ own settings:
82
88
 
83
89
  ```ts
84
90
  // .storybook/main.ts
91
+ import { nodeStorage } from '@wtf/platform-fs-node/storage'
92
+ import { nodePlatform } from '@wtf/platform-node/platform'
85
93
  import { mergeConfig, type InlineConfig } from 'vite'
86
94
 
87
95
  import { baseConfig } from '@wtf/project-vite/config'
@@ -92,9 +100,11 @@ type StorybookConfig = {
92
100
  viteFinal: (vite: InlineConfig) => InlineConfig
93
101
  }
94
102
 
103
+ const platform = nodePlatform({ fetch, storage: nodeStorage() })
104
+
95
105
  const config: StorybookConfig = {
96
106
  stories: ['../stories/**/*.stories.tsx'],
97
- viteFinal: (vite) => mergeConfig(mergeConfig(vite, baseConfig()), { plugins: [] })
107
+ viteFinal: (vite) => mergeConfig(mergeConfig(vite, baseConfig({ platform })), { plugins: [] })
98
108
  }
99
109
 
100
110
  export default config
package/guides/vitest.md CHANGED
@@ -14,14 +14,22 @@ and `playwright` if it has browser tests. Each is named by one exact version, th
14
14
  its own code imports it: see the [Vite guide](vite.md#which-vite-and-which-vitest).
15
15
 
16
16
  ```ts
17
+ import { nodeStorage } from '@wtf/platform-fs-node/storage'
18
+ import { nodePlatform } from '@wtf/platform-node/platform'
17
19
  import { packageConfig } from '@wtf/project-vitest/config'
18
20
 
19
- // A package's vitest.config.ts gives only what differs.
20
- export default packageConfig({ include: ['test/**/*.test.{ts,tsx}'] })
21
+ // A package's vitest.config.ts builds the platform, and gives only what differs.
22
+ const platform = nodePlatform({ fetch, storage: nodeStorage() })
23
+ export default packageConfig({ platform, include: ['test/**/*.test.{ts,tsx}'] })
21
24
  ```
22
25
 
23
- `packageConfig(test, config)` takes test options, each over its own default, and optionally a Vite
24
- config, which it merges into its own the way Vite's `mergeConfig` does: your aliases first, so
26
+ Each config takes the platform it is of, and reads nothing of the process itself: the config file
27
+ is the entry point, and builds it, as `nodePlatform()` of `@wtf/platform-node/platform` makes
28
+ Node's. A config reads `CI` and `TEST_FROM` of the platform's `env`, and the workspace of its
29
+ working folder, `dirs.cwd`, by its `navigator.storage` and `path`.
30
+
31
+ `packageConfig({ platform, ...test }, config)` takes the platform and test options, each over its
32
+ own default, and optionally a Vite config, which it merges into its own the way Vite's `mergeConfig` does: your aliases first, so
25
33
  they win, and your other lists after its own, as for `server.fs.allow` or
26
34
  `test.server.deps.inline`. Every config of the package (`packageConfig`, `rootConfig`,
27
35
  `integrationConfig`, `browserConfig`, `browserRootConfig` and `storybookConfig`) returns a
@@ -29,10 +37,13 @@ promise, because it reads the workspace through the platform's file system handl
29
37
  a config file's default export, and a test of a config awaits it too.
30
38
 
31
39
  ```ts
40
+ import { nodeStorage } from '@wtf/platform-fs-node/storage'
41
+ import { nodePlatform } from '@wtf/platform-node/platform'
32
42
  import { packageConfig } from '@wtf/project-vitest/config'
33
43
 
44
+ const platform = nodePlatform({ fetch, storage: nodeStorage() })
34
45
  export default packageConfig(
35
- { include: ['test/**/*.test.{ts,tsx}'], environment: 'jsdom' },
46
+ { platform, include: ['test/**/*.test.{ts,tsx}'], environment: 'jsdom' },
36
47
  { resolve: { dedupe: ['react'] } }
37
48
  )
38
49
  ```
@@ -80,10 +91,14 @@ root, the same as a run of every project.
80
91
 
81
92
  ## Set the options of a root config
82
93
 
83
- `rootConfig`, `integrationConfig` and `browserRootConfig` take the same options, all optional:
94
+ `rootConfig`, `integrationConfig` and `browserRootConfig` take the same options: the `platform`
95
+ and `argv`, the arguments of the process of Vitest's CLI, as `process.argv`, whose `--project`
96
+ filters the coverage reads, both required, and the rest optional:
84
97
 
85
98
  | Option | Default | What it does |
86
99
  | ------------------ | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
100
+ | `platform` | none: required | The platform the config is of: its `env`, its `dirs.cwd`, its `navigator.storage` and `path` |
101
+ | `argv` | none: required | The arguments of the process of Vitest's CLI, whose `--project` filters the coverage reads |
87
102
  | `folders` | `['packages']` | The folders that hold the packages; each package is a project |
88
103
  | `projects` | `[]` | Extra projects, after the packages' |
89
104
  | `coverage.include` | the `src` of each package in `folders` | What `--coverage` measures; a module no test loads counts as 0% |
@@ -99,9 +114,13 @@ project extends nothing from the root config (`extends: false`): it resolves on
99
114
  build plugin and each alias apply to it once.
100
115
 
101
116
  ```ts
117
+ import { nodeStorage } from '@wtf/platform-fs-node/storage'
118
+ import { nodePlatform } from '@wtf/platform-node/platform'
102
119
  import { rootConfig } from '@wtf/project-vitest/config'
103
120
 
104
121
  export default rootConfig({
122
+ platform: nodePlatform({ fetch, storage: nodeStorage() }),
123
+ argv: process.argv,
105
124
  skip: ['packages/site'],
106
125
  reportsDirectory: 'coverage/unit',
107
126
  junit: 'coverage/unit-junit.xml'
@@ -110,26 +129,26 @@ export default rootConfig({
110
129
 
111
130
  ## Start a process from a test
112
131
 
113
- `childEnv()` of `./process` returns the test's environment without the resolve hook in
114
- `NODE_OPTIONS`. A process started in a folder of its own, where the hook is not installed, would
115
- fail to start with it. `childEnv()` is `withoutHook(process.env)` of
116
- `@wtf/project-resolve/env`; a tool that starts a process outside a test calls that with the
117
- environment it is given.
132
+ `childEnv(env)` of `./process` returns the environment it is given, the test's own
133
+ `process.env`, without the resolve hook in `NODE_OPTIONS`. A process started in a folder of its
134
+ own, where the hook is not installed, would fail to start with it. `childEnv(env)` is
135
+ `withoutHook(env)` of `@wtf/project-resolve/env`; a tool that starts a process outside a test
136
+ calls that with the environment it is given.
118
137
 
119
138
  ```ts
120
139
  import { spawnSync } from 'node:child_process'
121
140
 
122
141
  import { childEnv } from '@wtf/project-vitest/process'
123
142
 
124
- spawnSync('pnpm', ['--version'], { env: childEnv() })
143
+ spawnSync('pnpm', ['--version'], { env: childEnv(process.env) })
125
144
  ```
126
145
 
127
146
  ## Run browser and integration tests
128
147
 
129
- A browser test is named `*.browser.test.{ts,tsx}`. `browserConfig()` and `browserRootConfig()` of
130
- `./browser` run them in Chromium with Playwright; both are optional peers. An integration test is
148
+ A browser test is named `*.browser.test.{ts,tsx}`. `browserConfig({ platform })` and
149
+ `browserRootConfig({ platform, argv })` of `./browser` run them in Chromium with Playwright; both are optional peers. An integration test is
131
150
  named `*.integration.test.ts`; run them with `integrationConfig()` at the root and
132
- `packageConfig({ ...integration })` in a package, one file at a time. A unit run picks up neither.
151
+ `packageConfig({ platform, ...integration })` in a package, one file at a time. A unit run picks up neither.
133
152
 
134
153
  Browser tests also run from the build, as the unit suite does with `test:dist`. The root's
135
154
  `test:browser:dist` is `TEST_FROM=dist vitest run --configLoader native --config
@@ -165,24 +184,26 @@ only for a plugin the tests need beyond those; Storybook's plugin comes after th
165
184
  applies `.storybook/preview.ts` itself, so you need no setup file for it:
166
185
 
167
186
  ```ts
168
- import { resolve } from 'node:path'
169
-
187
+ import { nodeStorage } from '@wtf/platform-fs-node/storage'
188
+ import { nodePlatform } from '@wtf/platform-node/platform'
170
189
  import { storybookConfig } from '@wtf/project-vitest/storybook'
171
190
  import type { Plugin } from 'vitest/config'
172
191
 
173
192
  declare const storybookTest: (options: { configDir: string }) => Plugin // import { storybookTest } from '@storybook/addon-vitest/vitest-plugin'
174
193
 
194
+ const platform = nodePlatform({ fetch, storage: nodeStorage() })
175
195
  export default storybookConfig({
176
- storybook: storybookTest({ configDir: resolve(import.meta.dirname, '.storybook') })
196
+ platform,
197
+ storybook: storybookTest({ configDir: platform.path.join(import.meta.dirname, '.storybook') })
177
198
  })
178
199
  ```
179
200
 
180
201
  Nothing here depends on Storybook. The repo installs `@storybook/addon-vitest` at its Storybook's
181
202
  version (one that supports Vitest 5), plus `@vitest/browser-playwright` and `playwright`, as for
182
203
  browser tests. Stories need a browser, so keep them out of `pnpm test`: the root's
183
- `rootConfig({ skip: ['packages/storybook'] })` leaves the package out, and a `test:browser` script
184
- runs it through a `vitest.browser.config.ts` of `browserRootConfig({ projects: [...] })`, in CI on
185
- the Playwright image.
204
+ `rootConfig({ platform, argv, skip: ['packages/storybook'] })` leaves the package out, and a
205
+ `test:browser` script runs it through a `vitest.browser.config.ts` of
206
+ `browserRootConfig({ platform, argv, projects: [...] })`, in CI on the Playwright image.
186
207
 
187
208
  ## Standard tests
188
209
 
@@ -194,12 +215,15 @@ globals:
194
215
 
195
216
  ```ts
196
217
  // test/encoding.wpt.test.ts
218
+ import { nodeStorage } from '@wtf/platform-fs-node/storage'
219
+ import { nodePlatform } from '@wtf/platform-node/platform'
197
220
  import { nodeSystem } from '@wtf/project-wpt/node'
198
221
  import { wptSuite } from '@wtf/project-wpt/suite'
199
222
 
200
223
  declare const MyDecoderStream: unknown // import { MyDecoderStream } from '../src/decoder.ts'
201
224
 
202
- wptSuite('encoding-streams', nodeSystem(), {
225
+ const platform = nodePlatform({ fetch, storage: nodeStorage() })
226
+ wptSuite('encoding-streams', nodeSystem(platform), {
203
227
  commit: '4ad507b28db0a636f528def9161d109fe11b93a3',
204
228
  dirs: ['encoding/streams'],
205
229
  globals: () => ({ TextDecoderStream: MyDecoderStream }),
@@ -207,9 +231,10 @@ wptSuite('encoding-streams', nodeSystem(), {
207
231
  })
208
232
  ```
209
233
 
210
- `nodeSystem()` of `@wtf/project-wpt/node` gives the suite what it takes of Node: the process's
211
- environment, timers and working folder, the disk, git, a `node:vm` context for each file, and the
212
- process's unhandled rejections.
234
+ `nodeSystem(platform)` of `@wtf/project-wpt/node` gives the suite what it takes, of the platform
235
+ the test file, its entry point, builds: its environment, timers, paths and working folder, git run
236
+ by its `spawn`; and of Node, the disk, a `node:vm` context for each file, and the process's
237
+ unhandled rejections.
213
238
 
214
239
  ### Pin the tests and choose what to fetch
215
240
 
@@ -242,7 +267,7 @@ offline. The WPT is never committed to the repo: a CI job that runs offline cach
242
267
  ### What a test file sees
243
268
 
244
269
  Each test file runs in a realm of its own; in Node that is a `node:vm` context (`nodeRealm` of
245
- `@wtf/project-wpt/node`, which `nodeSystem()` passes as `realm`). Its globals are built from
270
+ `@wtf/project-wpt/node`, which `nodeSystem(platform)` passes as `realm`). Its globals are built from
246
271
  the layers below, each over the one before; a name the repo maps to `undefined` is removed:
247
272
 
248
273
  - the language's built-ins, from the context's own realm;
@@ -303,10 +328,12 @@ To hold two implementations to one suite, such as a test double and Node's own,
303
328
  and each fails on a listed entry that passes or that it doesn't have.
304
329
 
305
330
  ```ts
331
+ import { nodeStorage } from '@wtf/platform-fs-node/storage'
332
+ import { nodePlatform } from '@wtf/platform-node/platform'
306
333
  import { nodeSystem } from '@wtf/project-wpt/node'
307
334
  import { wptSuite } from '@wtf/project-wpt/suite'
308
335
 
309
- const system = nodeSystem()
336
+ const system = nodeSystem(nodePlatform({ fetch, storage: nodeStorage() }))
310
337
  const locksSuite = { commit: '4ad507b28db0a636f528def9161d109fe11b93a3', dirs: ['web-locks'] }
311
338
 
312
339
  declare const MemoryLocks: unknown // import { MemoryLocks } from '../src/memory.ts'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wtf/project-docs",
3
- "version": "2.3.1",
3
+ "version": "3.0.0",
4
4
  "description": "Guides and API reference for the @wtf/project packages: the shared TypeScript, oxlint, oxfmt, Vite, Vitest, TypeDoc and Astro configs of a pnpm workspace, the resolve hook that runs its TypeScript from source, the runner of the Web Platform Tests, the Astro integrations that make a site serve on GitLab Pages, and the loader of a project's wtf configuration.",
5
5
  "homepage": "https://gitlab.com/wetryfun/project/project/-/tree/main/packages/project-docs",
6
6
  "bugs": {
@@ -36,16 +36,16 @@
36
36
  "typedoc": "typedoc"
37
37
  },
38
38
  "devDependencies": {
39
- "@wtf/project-astro": "2.2.1",
40
- "@wtf/project-config": "1.1.1",
39
+ "@wtf/project-astro": "3.0.0",
40
+ "@wtf/project-config": "2.0.0",
41
41
  "@wtf/project-oxfmt": "1.1.1",
42
42
  "@wtf/project-oxlint": "1.1.1",
43
43
  "@wtf/project-resolve": "1.0.0",
44
- "@wtf/project-typedoc": "1.1.1",
44
+ "@wtf/project-typedoc": "2.0.0",
45
45
  "@wtf/project-typescript": "1.0.0",
46
- "@wtf/project-vite": "1.1.1",
47
- "@wtf/project-vitest": "1.1.1",
48
- "@wtf/project-wpt": "1.1.1",
46
+ "@wtf/project-vite": "2.0.0",
47
+ "@wtf/project-vitest": "2.0.0",
48
+ "@wtf/project-wpt": "2.0.0",
49
49
  "typedoc": "0.28.20",
50
50
  "typedoc-plugin-llms-txt": "0.1.2",
51
51
  "typedoc-plugin-markdown": "4.13.1"
@@ -1,24 +0,0 @@
1
- [Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [node](../README.md) / loadConfig
2
-
3
- # Function: loadConfig()
4
-
5
- ```ts
6
- function loadConfig(folder?, options?): Promise<ResolvedConfig>;
7
- ```
8
-
9
- Defined in: [packages/project-config/src/node.ts:89](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.3.1/packages/project-config/src/node.ts#L89)
10
-
11
- The configuration of the project in `folder`, the process's working folder by default, as
12
- `loadConfig` of ./load reads it: the namespace `wtf` by default, of Node's platform and the
13
- process's environment, unless `options` gives others.
14
-
15
- ## Parameters
16
-
17
- | Parameter | Type |
18
- | ------ | ------ |
19
- | `folder` | `string` |
20
- | `options` | `Partial`\<[`LoadOptions`](../../load/type-aliases/LoadOptions.md)\> |
21
-
22
- ## Returns
23
-
24
- `Promise`\<[`ResolvedConfig`](../../index/type-aliases/ResolvedConfig.md)\>
@@ -1,24 +0,0 @@
1
- [Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [node](../README.md) / loadConfigSync
2
-
3
- # Function: loadConfigSync()
4
-
5
- ```ts
6
- function loadConfigSync(folder?, options?): ResolvedConfig;
7
- ```
8
-
9
- Defined in: [packages/project-config/src/node.ts:104](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.3.1/packages/project-config/src/node.ts#L104)
10
-
11
- The configuration of the project in `folder`, the process's working folder by default, as
12
- `loadConfigSync` of ./load reads it, of a JSON file or package.json alone: of Node's platform
13
- and the process's environment, unless `options` gives others.
14
-
15
- ## Parameters
16
-
17
- | Parameter | Type |
18
- | ------ | ------ |
19
- | `folder` | `string` |
20
- | `options` | `Partial`\<[`LoadSyncOptions`](../../load/type-aliases/LoadSyncOptions.md)\> |
21
-
22
- ## Returns
23
-
24
- [`ResolvedConfig`](../../index/type-aliases/ResolvedConfig.md)
@@ -1,16 +0,0 @@
1
- [Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [node](../README.md) / nodeConfigPlatform
2
-
3
- # Function: nodeConfigPlatform()
4
-
5
- ```ts
6
- function nodeConfigPlatform(): FilesPlatform;
7
- ```
8
-
9
- Defined in: [packages/project-config/src/node.ts:41](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.3.1/packages/project-config/src/node.ts#L41)
10
-
11
- Node's platform the configuration is read and written by: the disk from its root, its paths,
12
- and the process's working folder.
13
-
14
- ## Returns
15
-
16
- `FilesPlatform`
@@ -1,33 +0,0 @@
1
- [Documentation](../../../../README.md) / [@wtf/project-typedoc](../../README.md) / [config](../README.md) / nodeRun
2
-
3
- # Variable: nodeRun
4
-
5
- ```ts
6
- const nodeRun: Run;
7
- ```
8
-
9
- Defined in: [packages/project-typedoc/src/config.ts:77](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.3.1/packages/project-typedoc/src/config.ts#L77)
10
-
11
- Runs a command by Node, to its end: what it wrote on stdout, or `undefined` where it failed.
12
-
13
- ## Param
14
-
15
- **command**
16
-
17
- The command, as `git`.
18
-
19
- ## Param
20
-
21
- **args**
22
-
23
- Its arguments.
24
-
25
- ## Param
26
-
27
- **options**
28
-
29
- The folder it runs in, `cwd`.
30
-
31
- ## Returns
32
-
33
- What it wrote on stdout; `undefined` of a command that failed.
@@ -1,25 +0,0 @@
1
- [Documentation](../../../../README.md) / [@wtf/project-typedoc](../../README.md) / [plugins](../README.md) / Run
2
-
3
- # Type Alias: Run
4
-
5
- ```ts
6
- type Run = (command, args, options) => string | undefined;
7
- ```
8
-
9
- Defined in: [packages/project-typedoc/src/plugins.ts:24](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.3.1/packages/project-typedoc/src/plugins.ts#L24)
10
-
11
- Runs a command to its end, in the folder `cwd`: what it wrote on stdout, or `undefined` where it
12
- failed. In Node, `nodeRun` of ./config.
13
-
14
- ## Parameters
15
-
16
- | Parameter | Type |
17
- | ------ | ------ |
18
- | `command` | `string` |
19
- | `args` | readonly `string`[] |
20
- | `options` | \{ `cwd`: `string`; \} |
21
- | `options.cwd` | `string` |
22
-
23
- ## Returns
24
-
25
- `string` \| `undefined`
@@ -1,11 +0,0 @@
1
- [Documentation](../../../../README.md) / [@wtf/project-vite](../../README.md) / [config](../README.md) / FROM\_DIST
2
-
3
- # Variable: FROM\_DIST
4
-
5
- ```ts
6
- const FROM_DIST: boolean;
7
- ```
8
-
9
- Defined in: [packages/project-vite/src/config.ts:40](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.3.1/packages/project-vite/src/config.ts#L40)
10
-
11
- Whether the build is read in place of the source: `TEST_FROM=dist`, as `test:dist` runs.
@@ -1,11 +0,0 @@
1
- [Documentation](../../../../README.md) / [@wtf/project-vitest](../../README.md) / [config](../README.md) / FROM\_DIST
2
-
3
- # Variable: FROM\_DIST
4
-
5
- ```ts
6
- const FROM_DIST: boolean;
7
- ```
8
-
9
- Defined in: [packages/project-vitest/src/suite.ts:66](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.3.1/packages/project-vitest/src/suite.ts#L66)
10
-
11
- Whether the tests read the workspace's packages from what the build wrote: `TEST_FROM=dist`.
@@ -1,21 +0,0 @@
1
- [Documentation](../../../../README.md) / [@wtf/project-wpt](../../README.md) / [index](../README.md) / ClearTimeout
2
-
3
- # Type Alias: ClearTimeout
4
-
5
- ```ts
6
- type ClearTimeout = (id?) => void;
7
- ```
8
-
9
- Defined in: [packages/project-wpt/src/index.ts:21](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.3.1/packages/project-wpt/src/index.ts#L21)
10
-
11
- The HTML Standard's `clearTimeout`: stops the timer `setTimeout` gave the id of.
12
-
13
- ## Parameters
14
-
15
- | Parameter | Type |
16
- | ------ | ------ |
17
- | `id?` | `unknown` |
18
-
19
- ## Returns
20
-
21
- `void`
@@ -1,11 +0,0 @@
1
- [Documentation](../../../../README.md) / [@wtf/project-wpt](../../README.md) / [index](../README.md) / Env
2
-
3
- # Type Alias: Env
4
-
5
- ```ts
6
- type Env = Readonly<Record<string, string | undefined>>;
7
- ```
8
-
9
- Defined in: [packages/project-wpt/src/index.ts:15](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.3.1/packages/project-wpt/src/index.ts#L15)
10
-
11
- The variables of an environment, by their names, as Node's `process.env` has them.
@@ -1,35 +0,0 @@
1
- [Documentation](../../../../README.md) / [@wtf/project-wpt](../../README.md) / [index](../README.md) / Performance
2
-
3
- # Type Alias: Performance
4
-
5
- ```ts
6
- type Performance = object;
7
- ```
8
-
9
- Defined in: [packages/project-wpt/src/index.ts:24](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.3.1/packages/project-wpt/src/index.ts#L24)
10
-
11
- High Resolution Time's `performance`: the time now, from its origin.
12
-
13
- ## Properties
14
-
15
- ### timeOrigin
16
-
17
- ```ts
18
- readonly timeOrigin: number;
19
- ```
20
-
21
- Defined in: [packages/project-wpt/src/index.ts:24](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.3.1/packages/project-wpt/src/index.ts#L24)
22
-
23
- ## Methods
24
-
25
- ### now()
26
-
27
- ```ts
28
- now(): number;
29
- ```
30
-
31
- Defined in: [packages/project-wpt/src/index.ts:24](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.3.1/packages/project-wpt/src/index.ts#L24)
32
-
33
- #### Returns
34
-
35
- `number`
@@ -1,22 +0,0 @@
1
- [Documentation](../../../../README.md) / [@wtf/project-wpt](../../README.md) / [index](../README.md) / SetTimeout
2
-
3
- # Type Alias: SetTimeout
4
-
5
- ```ts
6
- type SetTimeout = (handler, timeout?) => unknown;
7
- ```
8
-
9
- Defined in: [packages/project-wpt/src/index.ts:18](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.3.1/packages/project-wpt/src/index.ts#L18)
10
-
11
- The HTML Standard's `setTimeout`, as the runner calls it.
12
-
13
- ## Parameters
14
-
15
- | Parameter | Type |
16
- | ------ | ------ |
17
- | `handler` | () => `void` |
18
- | `timeout?` | `number` |
19
-
20
- ## Returns
21
-
22
- `unknown`