Skip to content

Conversation

@smorimoto
Copy link
Collaborator

Closes #1140

@smorimoto smorimoto added the enhancement New feature or request label Mar 26, 2025
@changeset-bot
Copy link

changeset-bot bot commented Mar 26, 2025

🦋 Changeset detected

Latest commit: f5a5f76

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
swagger-typescript-api Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@smorimoto smorimoto changed the title Refactor custom config loading to use c12 for better config management Use c12 for wider configuration file format support Mar 26, 2025
@smorimoto smorimoto requested a review from Copilot March 26, 2025 13:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors custom configuration loading by replacing the URL-based import and logging with the loadConfig function from the c12 package, enabling support for a wider configuration file format.

  • Replace URL-based custom configuration loading with c12's loadConfig.
  • Remove now-unused dependencies (node:url and consola).
  • Update the changeset file to document the minor version update for swagger-typescript-api.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
index.ts Refactored configuration loading by using c12’s loadConfig.
.changeset/fancy-actors-wait.md Updated changeset with a minor version bump and descriptive text.
Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (1)

index.ts:335

  • Ensure that loadConfig returns an object with a valid 'config' property before spreading it. Consider adding a check or a default value to handle cases where custom configuration may be absent.
      ...customConfig.config,

@smorimoto smorimoto merged commit ea1df18 into main Mar 26, 2025
5 checks passed
@smorimoto smorimoto deleted the c12 branch March 26, 2025 13:44
@github-actions github-actions bot mentioned this pull request Mar 26, 2025
@smorimoto smorimoto linked an issue Mar 26, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use c12 as configuration loader Using a TypeScript Configuration File

2 participants