@tsrx/content-mapper 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -212,13 +212,23 @@ compiler's `package.json`, and lists those files as `watchedFiles`.
212
212
 
213
213
  ### Dependencies
214
214
 
215
- The mapper bundles `@tsrx/typescript-plugin`'s compiler resolution and transform
216
- (`src/transform.js`, `consumer-compiler.js`, `tsconfig-resolution.js`) and keeps
217
- classic `typescript` as a peer dependency: the tsconfig readers use
218
- `readJsonConfigFile`, `convertToObject`, `parseJsonSourceFileConfigFileContent`
219
- and `resolveModuleName` from the TypeScript 5 API for `extends` and JSONC
220
- handling. The native compiler never loads the mapper's copy of TypeScript, so this
221
- is an explicit, versioned dependency rather than a claim of independence.
215
+ The mapper has no dependency on `typescript`, classic or native: it reads tsconfig
216
+ files and resolves compiler packages with its own code, and `tests/mapper.test.js`
217
+ and `tests/package.test.js` run the shipped bundles with the `typescript` package
218
+ forbidden to keep it that way.
219
+
220
+ `@tsrx/typescript-plugin` is a devDependency only. The bundles inline its compiler
221
+ resolution and transform (`src/transform.js`, `language.js`,
222
+ `consumer-compiler.js`, `package-resolution.js`, `tsconfig-resolution.js`,
223
+ `config-host.js`, `jsonc.js`) together with the third-party modules those pull in
224
+ (`@volar/language-core`, `resolve-pkg-maps`), because the plugin publishes only
225
+ its `dist` and pulls the classic Volar stack into anything that depends on it.
226
+ `@tsrx/core` appears in JSDoc types only; the TSRX target compiler itself is
227
+ resolved from the project at run time.
228
+
229
+ `jsonc-parser` is the one runtime dependency: its UMD entry requires its
230
+ `./impl/*` files at run time, which a bundle cannot follow, so it stays external
231
+ and installs next to the package.
222
232
 
223
233
  ### Native TypeScript binary
224
234
 
@@ -280,8 +290,12 @@ pnpm test --project content-mapper
280
290
  - `src/rpc.js` (`run_mapper_server`, `redirect_console_to_stderr`) is the stdio
281
291
  transport and `src/mapper.js` (`create_tsrx_content_mapper`) the protocol
282
292
  implementation. Both are exported (`@tsrx/content-mapper/rpc`,
283
- `@tsrx/content-mapper/mapper`) so a host that ships its own copy of the mapper
284
- can start it from its own bundled entry file.
293
+ `@tsrx/content-mapper/mapper`), with `src/protocol.js`
294
+ (`@tsrx/content-mapper/protocol`), so a host that ships its own copy of the
295
+ mapper can start it from its own bundled entry file. The exports resolve to the
296
+ bundles in `dist/` (built with `dist/server.js`), never to `src/`: the source
297
+ imports `@tsrx/typescript-plugin/src/*`, which that package does not publish and
298
+ which is not a dependency of this one.
285
299
 
286
300
  `MAPPING.md` is the inventory of every mapping site in the shared transform and
287
301
  the span kind and feature bits each one becomes.