Skip to content

Fix/bugs ci improvements#12

Merged
d1820 merged 9 commits into
mainfrom
fix/bugs-ci-improvements
Jun 20, 2026
Merged

Fix/bugs ci improvements#12
d1820 merged 9 commits into
mainfrom
fix/bugs-ci-improvements

Conversation

@d1820

@d1820 d1820 commented Jun 20, 2026

Copy link
Copy Markdown
Owner

No description provided.

d1820 and others added 9 commits June 20, 2026 16:07
Parser fixes (VS extension):
- Skip static and expression-bodied properties in Proto/DataAttributeAdder
- Guard ProtoAttributeReader with _classDepth to avoid counting nested class properties
- Save/restore StartIndex in BaseProtoRewriter/BaseDataRewriter around nested class visits so outer class indices are not corrupted
- Null-guard ArgumentList in ProtoAttributeReader and DataAttributeReader to prevent NRE on bare [ProtoMember]/[DataMember]

Parser fixes (VS Code extension):
- Fix getLeadingTrivia crash when member is on line 0 (lineAt(-1))
- Fix getEnumBody crash when text contains no public enum (null assert on regex result)

Tests:
- Add Jest coverage enforcement (70% threshold) and ~50 new test cases
- Add ProtoAttributeAdderBugTests and DataAttributeReaderBugTests proving each fixed bug

CI / publish:
- Add auto-publish to VS Marketplace on push to main (VsixPublisher via vswhere)
- Add auto-publish to VS Code Marketplace on push to main (vsce)
- Add version bump from github.run_number before each publish step
- Update Microsoft.VSSDK.BuildTools 17.9.3168 -> 17.14.2142 and Microsoft.VisualStudio.SDK 17.9.37000 -> 17.14.40265 to fix GetDeploymentPathFromVsixManifest TypeLoadException on windows-latest
- Add publishManifest.json for VS Marketplace

ProtoAttributor.Core:
- New SDK-style netstandard2.0 project compiling Parsers + Constants via relative includes
- Test project now references Core instead of VSIX so dotnet test works without MSBuild

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Bump @types/mocha, @types/node (18->26), @types/vscode (1.85->1.125), @vscode/test-cli, ts-jest to latest compatible versions
- Update engines.vscode to ^1.125.0 to match @types/vscode bump
- Add types: [node, jest] to tsconfig.json — @types/node 26.x no longer injects globals without explicit types field; including jest prevents breaking describe/it/expect
- Remove unused import { match } from 'assert' and console.log debug statement exposed by stricter type resolution
- Update vswhere to drop -requires Microsoft.VisualStudio.Component.VSSDK filter; add Test-Path guard on VsixPublisher.exe
- Bump Microsoft.VSSDK.BuildTools 17.9.3168 -> 17.14.2142 and Microsoft.VisualStudio.SDK 17.9.37000 -> 17.14.40265 to fix GetDeploymentPathFromVsixManifest TypeLoadException on windows-latest

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move publish steps out of dotnet.yml and node.js.yml into a new
release.yml that triggers on GitHub release published. CI workflows
now only build and test. Release workflow publishes both VS and VS Code
extensions to their respective marketplaces.

Also bump node-version 18.x -> 20.x in node.js.yml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
vsce publish rejects @types/vscode versions newer than engines.vscode.
Rolling back to ^1.85.0 avoids forcing users onto a recent VS Code build
while the extension only uses stable APIs available since 1.85.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both extensions now derive their version from the release tag (e.g. v1.0.5):
- VS Code: npm version strips the v prefix via ${GITHUB_REF_NAME#v}
- VS extension: PowerShell strips v prefix and appends .0 for 4-part VSIX format
  BaseVersion remains a static placeholder matching VsixOptions.cs so the
  assembly version replace step has the correct find target.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use npm pkg set instead of npm version to stamp release tag version
  (npm version fails if version already matches; npm pkg set is idempotent)
- Add vscode/.vscodeignore to exclude mocks, coverage, test output, stackdumps,
  src/, tsconfig, jest.config from the packaged VSIX
- Exclude src/test from tsconfig.json compilation so vscode:prepublish does not
  fail on mocha globals (suite) now that types: [node, jest] restricts auto-inclusion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GITHUB_REF_NAME and github.ref_name are not reliable in release workflows.
github.event.release.tag_name reads directly from the webhook payload
and is guaranteed to be the tag that triggered the release.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Change InstallationTarget version from [17.0, 18.0) to [17.0,) so the
extension installs in VS 2022 and any future Visual Studio version.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@d1820 d1820 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

good

@d1820 d1820 merged commit b9c2aa5 into main Jun 20, 2026
2 checks passed
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.

1 participant