Modernize extension: npm workspaces, TypeScript 6, rollup, Jest, GitHub Actions#440
Open
jessehouwing wants to merge 1 commit intomainfrom
Open
Modernize extension: npm workspaces, TypeScript 6, rollup, Jest, GitHub Actions#440jessehouwing wants to merge 1 commit intomainfrom
jessehouwing wants to merge 1 commit intomainfrom
Conversation
- Restructure to npm workspaces (v0 + v1 tasks) - Add TypeScript 6 with tsconfig.base.json / tsconfig.jest.json - Bundle each task to dist/ with rollup (CJS, no node_modules shipped) - Move task source to src/ subdirectory, export run() for testability - Add Jest 30 unit tests (68 tests) for full task input coverage - Update vss-extension.json to reference dist/ instead of node_modules - Update task.json execution targets to dist/vsts-msbuild-helper.js - Add GitHub Actions CI workflow (build/test/lint) - Add GitHub Actions release workflow (OIDC publish to marketplace) - Remove old Azure Pipelines release workflow - Update eslint.config.mjs for new source paths Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The build system was outdated: tasks compiled to JS alongside
node_modules/(shipped in the VSIX), had no tests, and used Azure Pipelines for CI/release. This PR brings the repo up to the same modern stack used in@jessehouwing/azdo-marketplace.What changed
Build toolchain
vsts-msbuild-helper/v0andv1together; a singlenpm installat the root sets everything uptsconfig.base.jsonat the root with task-specifictsconfig.jsonfiles extending itdist/vsts-msbuild-helper.js(CJS, all dependencies inlined); the VSIX ships only thedist/folder instead of a fullnode_modules/treeSource structure
src/vsts-msbuild-helper.tswith logic wrapped in an exportedrun()function and arequire.main === moduleguard, making it fully unit-testable without running in an actual pipeline agentTests
src/__tests__/vsts-msbuild-helper.test.ts(shared pattern for both v0 and v1), covering all input groups: targets, output paths, MsBuild options, code analysis, layer validation, ASP.NET, and deployExtension manifest
vss-extension.jsonupdated:filesentries now point todist/folders;contributionssplit into explicitv0andv1entriestask.jsonexecution targets updated todist/vsts-msbuild-helper.jsfor Node16/20_1/24; v0 legacy Node/Node10 handlers replaced with the modern onesCI/CD
.github/workflows/ci.yml-- build, lint, and test on every push/PR tomain/develop.github/workflows/release.yml-- manual workflow that builds, tests, packages the VSIX with tfx-cli, publishes to the marketplace via Azure OIDC, and creates a GitHub Release for public releasesazure-pipelines.ymlNotes for reviewers
ts-jest29.x does not officially declare support for TypeScript 6, so--legacy-peer-depsis required on install. This is the same approach used in the reference repo and is expected to be resolved once ts-jest 30 stabilises.@typescript-eslintwarning about TS 6 not being officially supported is cosmetic and expected; lint still exits clean.task.jsonversioning and allow independent rollup bundles.