Skip to content

パスの先頭部分を置き換える機能の追加#131

Merged
omochi merged 3 commits intomainfrom
path-alias
Jun 16, 2025
Merged

パスの先頭部分を置き換える機能の追加#131
omochi merged 3 commits intomainfrom
path-alias

Conversation

@omochi
Copy link
Owner

@omochi omochi commented Jun 1, 2025

の機能を PackageGenerator から利用できるインターフェースを提供する

テストコードを追加したかったが、
assertGenerate はフルスペックのリアルなコード生成を行なっていないため、
import文をひとまとめで ".." に逃げていて、
これの生成部分をちゃんと触るのが難しかったので見送った。

Package.swift Outdated
.package(url: "https://github.com/omochi/SwiftTypeReader.git", from: "3.0.0"),
// .package(path: "../SwiftTypeReader"),
.package(url: "https://github.com/omochi/TypeScriptAST.git", from: "2.0.1"),
.package(url: "https://github.com/omochi/TypeScriptAST.git", branch: "path-alias"),
Copy link
Owner Author

Choose a reason for hiding this comment

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

ここがまだドラフト

@omochi omochi changed the title [DNM] パスエイリアスの対応 パスの先頭部分を置き換える機能の追加 Jun 15, 2025

import PackageDescription

let isLocalDevelopment = false
Copy link
Owner Author

Choose a reason for hiding this comment

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

開発中にたびたび書き換えが生じて大変なので、仕組みを入れておく

outputDirectory: URL,
typeScriptExtension: String = "ts"
typeScriptExtension: String = "ts",
pathPrefixReplacements: PathPrefixReplacements = []
Copy link
Owner Author

Choose a reason for hiding this comment

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

これが追加された

@omochi omochi marked this pull request as ready for review June 15, 2025 13:29
@omochi omochi requested a review from sidepelican June 15, 2025 13:29
Copy link
Collaborator

@sidepelican sidepelican left a comment

Choose a reason for hiding this comment

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

シンプルな変更で良さそうです。

@omochi
Copy link
Owner Author

omochi commented Jun 16, 2025

確認ありがとうございました

@omochi omochi merged commit 9a92de4 into main Jun 16, 2025
1 check passed
@omochi omochi deleted the path-alias branch June 16, 2025 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants