Skip to content

Public TS: rename FileOptions to CompileFileOptions for intent clarity (breaking — target v0.5.0) #222

Description

@dean0x

Background

packages/mds/src/types.ts:117 exports a type named FileOptions. The reviewer noted (70% confidence) that this name is ambiguous — it could apply to any file operation — while the actual type corresponds to compileFile-specific options. CompileFileOptions is the intent-clear name.

Ledger ID: #52 (consistency-packages/mds/src/types.ts:117-fileoptions_naming)
File: packages/mds/src/types.ts:117
Originating reviewer: Consistency

Problem

  • FileOptions is exported as a public TypeScript type on the @mdscript/mds package.
  • Renaming it is a breaking change for any consumer who imports it by name.
  • The reviewer rated this 70% and explicitly called it "pure churn on a breaking release with no correctness benefit."

Why deferred from PR #196

Renaming a public TypeScript type export breaks every consumer's import statement. It was not appropriate as a pre-publish last-minute change on a breaking release where the rename itself adds no correctness value.

Proposed change

In v0.5.0 (the next breaking release):

  1. Add FileOptions = CompileFileOptions as a deprecated type alias.
  2. Export CompileFileOptions as the canonical name.
  3. Remove FileOptions alias in v0.6.0 (or at the next opportunity, with a CHANGELOG Removed entry).

Alternatively, if the team decides the rename is not worth the churn, document FileOptions in JSDoc with a note explaining the naming.

Acceptance Criteria

  • CompileFileOptions is the canonical exported name
  • FileOptions is either removed (breaking, v0.5.0) or kept as a deprecated alias
  • CHANGELOG records the rename under Removed or Deprecated
  • JSDoc on CompileFileOptions explains what file operation it applies to

Deferred from: PR #196
Target: v0.5.0 (next breaking release)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ecosystemBindings, packages, and integrationsjavascriptPull requests that update javascript codetech-debtTechnical debt

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions