refactor(shared): remove unused runtime helpers and exports#10166
2 unresolved threads · Jump to file
packages/shared/src/Net.ts · Earlier revision fd0c6e2a · right 66
Original diff
@@ -63,7 +63,7 @@ export class NetService extends Context.Service<NetService, NetServiceShape>()(
"@t3tools/shared/Net/NetService",
) {}
-export const make = () => {
+const make = () => {src/Net.ts:66
Net.ts is the canonical module that owns construction of NetService, so make should stay part of its public shape (Net.NetService, Net.make, Net.layer) alongside layer. Consider keeping the export so consumers (e.g. tests or alternate layer constructors) can build the service without going through layer.
| 1 | export const make = () => { |
No longer relevant as of b74ac2585843050870808b875fdedfd05ef4695d
Restored Net.make in b74ac25. The adjacent @public comment explains the required service construction API. The expanded Knip check passes with this deliberate export retained.
packages/shared/src/schemaYaml.ts · Earlier revision d5f8565e · right 90
Original diff
@@ -89,9 +87,7 @@ export function parseYaml<E extends string>(
*
* @see {@link parseYaml} for the inverse operation
*/
-export function stringifyYaml(
- options?: YamlStringifyOptions,
-): SchemaGetter.Getter<string, unknown> {
+function stringifyYaml(options?: YamlStringifyOptions): SchemaGetter.Getter<string, unknown> {🟢 Low src/schemaYaml.ts:90
The retained examples import non-exported parseYaml and stringifyYaml, so following either documented recipe throws a module import error instead of producing a getter. Update the examples to use the exported APIs or restore those exports.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @packages/shared/src/schemaYaml.ts around line 90: |
| 2 | |
| 3 | The retained examples import non-exported `parseYaml` and `stringifyYaml`, so following either documented recipe throws a module import error instead of producing a getter. Update the examples to use the exported APIs or restore those exports. |
Fixed in 56a7d66. Removed the stale public-import examples from the private YAML getters and kept the valid exported fromYamlString example. The existing YAML suite passes all five tests and the integrated Knip gate passes.