GeezerVison is showing github.com — Consolidate native libraries into main TypeScriptParser package · s97712/TypeScriptParser@5569efc
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/ci.yml +5-5Lines changed: 5 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 32 | 32 |
| 33 | 33 | - name: Copy Native Files | 34 | 34 | run: | | 35 | | - mkdir -p TypeScriptParser.Native/runtimes/${{ matrix.rid }}/native | 36 | | - cp -r tree-sitter/dist/* TypeScriptParser.Native/runtimes/${{ matrix.rid }}/native/ | | 35 | + mkdir -p TypeScriptParser/runtimes/${{ matrix.rid }}/native | | 36 | + cp -r tree-sitter/dist/* TypeScriptParser/runtimes/${{ matrix.rid }}/native/ | 37 | 37 | echo "Files copied for ${{ matrix.rid }}:" | 38 | 38 | shell: bash | 39 | 39 |
| | 51 | 51 | - name: Debug Runtime Files Before Test | 52 | 52 | run: | | 53 | 53 | echo "=== Runtime files structure ===" | 54 | | - find ./TypeScriptParser.Native/runtimes/ -type f | | 54 | + find ./TypeScriptParser/runtimes/ -type f | 55 | 55 | | 56 | 56 | echo "=== Test output directory before testing ===" | 57 | 57 | ls -la TypeScriptParser.Tests/bin/Release/net9.0/ || echo "Test output directory not found" | | 64 | 64 | uses: actions/upload-artifact@v4 | 65 | 65 | with: | 66 | 66 | name: native-${{ matrix.rid }} | 67 | | - path: TypeScriptParser.Native/runtimes/ | | 67 | + path: TypeScriptParser/runtimes/ | 68 | 68 | retention-days: 1 | 69 | 69 |
| 70 | 70 | pack-and-publish: | | 83 | 83 | uses: actions/download-artifact@v4 | 84 | 84 | with: | 85 | 85 | pattern: native-* | 86 | | - path: TypeScriptParser.Native/runtimes/ | | 86 | + path: TypeScriptParser/runtimes/ | 87 | 87 | merge-multiple: true | 88 | 88 |
| 89 | 89 | - name: Set Version | |
Collapse file Copy file name to clipboardExpand all lines: README.md +2-3Lines changed: 2 additions & 3 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -21,8 +21,8 @@ dotnet add package TypeScriptParser | 21 | 21 |
| 22 | 22 | # 2. 复制运行时文件 | 23 | 23 | RID=$(dotnet --info | grep "RID:" | awk '{print $2}') | 24 | | -mkdir -p TypeScriptParser.Native/runtimes/$RID/native | 25 | | -cp -r tree-sitter/dist/* TypeScriptParser.Native/runtimes/$RID/native/ | | 24 | +mkdir -p TypeScriptParser/runtimes/$RID/native | | 25 | +cp -r tree-sitter/dist/* TypeScriptParser/runtimes/$RID/native/ | 26 | 26 |
| 27 | 27 | # 3. 构建和测试 | 28 | 28 | dotnet restore | @@ -40,7 +40,6 @@ dotnet test TypeScriptParser.TestPackage | 40 | 40 | ## 项目结构 | 41 | 41 |
| 42 | 42 | - [`TypeScriptParser/`](TypeScriptParser/) - 主要的.NET绑定库 | 43 | | -- [`TypeScriptParser.Native/`](TypeScriptParser.Native/) - 跨平台Native库包 | 44 | 43 | - [`TypeScriptParser.Tests/`](TypeScriptParser.Tests/) - 单元测试 | 45 | 44 |
| 46 | 45 | ## 支持平台 | |
Collapse file Copy file name to clipboardExpand all lines: TypeScriptParser.Native/README.md -24Lines changed: 0 additions & 24 deletions Collapse file Copy file name to clipboardExpand all lines: TypeScriptParser.Native/TypeScriptParser.Native.csproj -25Lines changed: 0 additions & 25 deletions Collapse file Copy file name to clipboardExpand all lines: TypeScriptParser.Native/buildTransitive/TypeScriptParser.Native.props -4Lines changed: 0 additions & 4 deletions Collapse file Copy file name to clipboardExpand all lines: TypeScriptParser.Native/buildTransitive/TypeScriptParser.Native.targets -4Lines changed: 0 additions & 4 deletions Collapse file Copy file name to clipboardExpand all lines: TypeScriptParser.Tests/TypeScriptParser.Tests.csproj +2-4Lines changed: 2 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 21 | 21 | <Using Include="Xunit" /> | 22 | 22 | </ItemGroup> | 23 | 23 |
| 24 | | - | 25 | | - | 26 | 24 | <ItemGroup> | 27 | 25 | <ProjectReference Include="..\TypeScriptParser\TypeScriptParser.csproj" /> | 28 | 26 | </ItemGroup> | 29 | 27 |
| 30 | 28 | <!-- 导入Native库构建目标 - 必须在项目末尾 --> | 31 | | - <Import Project="..\TypeScriptParser.Native\build\TypeScriptParser.Native.targets" | 32 | | - Condition="Exists('..\TypeScriptParser.Native\build\TypeScriptParser.Native.targets')" /> | | 29 | + <Import Project="..\TypeScriptParser\build\TypeScriptParser.targets" | | 30 | + Condition="Exists('..\TypeScriptParser\build\TypeScriptParser.targets')" /> | 33 | 31 |
| 34 | 32 |
| 35 | 33 | <!-- Native libraries now managed automatically via NuGet packages --> | |
Collapse file Copy file name to clipboardExpand all lines: TypeScriptParser.sln -2Lines changed: 0 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,8 +7,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypeScriptParser", "TypeScr | 7 | 7 | EndProject | 8 | 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypeScriptParser.Tests", "TypeScriptParser.Tests\TypeScriptParser.Tests.csproj", "{7DA70DA9-2885-4377-A2C8-F38A635AE7D7}" | 9 | 9 | EndProject | 10 | | -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypeScriptParser.Native", "TypeScriptParser.Native\TypeScriptParser.Native.csproj", "{5A4230C7-D8EE-4C93-89BA-6B05B03E32EF}" | 11 | | -EndProject | 12 | 10 | Global | 13 | 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 14 | 12 | Debug|Any CPU = Debug|Any CPU | |
Collapse file Copy file name to clipboardExpand all lines: TypeScriptParser/README.md -4Lines changed: 0 additions & 4 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -146,10 +146,6 @@ if (root.has_error()) | 146 | 146 | - .NET 9.0 或更高版本 | 147 | 147 | - 支持的平台:Windows (x64), Linux (x64), macOS (ARM64/x64) | 148 | 148 |
| 149 | | -## 相关包 | 150 | | - | 151 | | -- `TypeScriptParser.Native` - 包含跨平台原生库的运行时包 | 152 | | - | 153 | 149 | ## 许可证 | 154 | 150 |
| 155 | 151 | 本项目基于MIT许可证开源。 |
Collapse file Copy file name to clipboard +9-9Lines changed: 9 additions & 9 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -<Project Sdk="Microsoft.NET.Sdk"> | 2 | | - | | 1 | +<Project Sdk="Microsoft.NET.Sdk"> | 3 | 2 |
| 4 | 3 | <PropertyGroup> | 5 | 4 | <TargetFramework>netstandard2.0</TargetFramework> | 6 | | - <ImplicitUsings>disable</ImplicitUsings> | 7 | | - <Nullable>disable</Nullable> | 8 | 5 | <PackageId>TypeScriptParser</PackageId> | 9 | 6 | <Description>TypeScript语法解析器 - 基于Tree-sitter的.NET绑定</Description> | 10 | | - <PackageTags>tree-sitter;typescript;parser;syntax;ast</PackageTags> | 11 | | - <NoWarn>$(NoWarn);CS1591</NoWarn> | | 7 | + <PackageTags>tree-sitter;typescript;parser;syntax;ast;native</PackageTags> | | 8 | + <PackageLicenseExpression>MIT</PackageLicenseExpression> | | 9 | + <NoWarn>$(NoWarn);NU5128;CS1591</NoWarn> | 12 | 10 | </PropertyGroup> | 13 | 11 |
| 14 | 12 | <!-- README文件包含到包中 --> | 15 | 13 | <ItemGroup> | 16 | | - <None Include="..\README.md" Pack="true" PackagePath="\" /> | | 14 | + <None Include="README.md" Pack="true" PackagePath="\" /> | 17 | 15 | </ItemGroup> | 18 | 16 |
| 19 | | - <!-- Native库依赖 --> | | 17 | + <!-- 包含runtime和build文件到NuGet包 --> | 20 | 18 | <ItemGroup> | 21 | | - <ProjectReference Include="..\TypeScriptParser.Native\TypeScriptParser.Native.csproj" /> | | 19 | + <Content Include="runtimes/**/*" Pack="true" PackagePath="runtimes/" /> | | 20 | + <Content Include="build/**/*" Pack="true" PackagePath="build/" /> | | 21 | + <Content Include="buildTransitive/**/*" Pack="true" PackagePath="buildTransitive/" /> | 22 | 22 | </ItemGroup> | 23 | 23 |
| 24 | 24 | </Project> |
|