Skip to content

Deprecate distdir in favor of distDir in runable.config.ts #98

Description

@domutala

Description

Rename the distdir configuration option to distDir in runable.config.ts to follow the camelCase convention used by Runable configuration options.

The existing distdir option should remain temporarily supported for backward compatibility, but must be marked as deprecated.

export default defineRunableConfig({
  // Deprecated
  distdir: '.output',

  // Recommended
  distDir: '.output',
})

Expected behavior

When distdir is used:

  • Runable should continue to support it.
  • A deprecation warning should be displayed.
  • distDir should be used internally as the canonical option.
  • If both distDir and distdir are provided, distDir should take precedence.

Example warning:

[runable] `distdir` is deprecated and will be removed in a future version. Use `distDir` instead.

TypeScript

Mark distdir as deprecated so IDEs can surface the migration directly:

interface RunableConfig {
  distDir?: string

  /**
   * @deprecated Use `distDir` instead.
   */
  distdir?: string
}

Migration

Before:

export default defineRunableConfig({
  distdir: '.output',
})

After:

export default defineRunableConfig({
  distDir: '.runable',
})

Acceptance criteria

  • Add distDir to the Runable configuration.
  • Keep distdir working for backward compatibility.
  • Mark distdir as deprecated in TypeScript types.
  • Emit a deprecation warning when distdir is used.
  • Give distDir precedence when both options are provided.
  • Replace internal usages of distdir with distDir.
  • Update documentation and examples to use distDir.
  • Add a changeset documenting the deprecation.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions