Compare commits

..
Author SHA1 Message Date
dependabot[bot] da23f72180 Bump form-data, jest and ts-jest
Removes [form-data](https://github.com/form-data/form-data). It's no longer used after updating ancestor dependencies [form-data](https://github.com/form-data/form-data), [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) and [ts-jest](https://github.com/kulshekhar/ts-jest). These dependencies need to be updated together.


Removes `form-data`

Updates `jest` from 24.9.0 to 30.5.1
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v30.5.1/packages/jest)

Updates `ts-jest` from 24.2.0 to 29.4.12
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v24.2.0...v29.4.12)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version:
  dependency-type: indirect
- dependency-name: jest
  dependency-version: 30.5.1
  dependency-type: direct:development
- dependency-name: ts-jest
  dependency-version: 29.4.12
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-14 16:50:19 +00:00
7 changed files with 14838 additions and 5029 deletions

No files matched your search

-30
View File
@@ -1,30 +0,0 @@
{
"problemMatcher": [
{
"owner": "msbuild",
"pattern": [
{
"regexp": "^\\s*(?:\\d+>\\s*)?([^\\s].*?)\\((\\d+)(?:,(\\d+))?(?:,\\d+)*\\)\\s*:\\s*(error|warning)\\s+([A-Za-z]+\\d+)\\s*:\\s*(.*?)(?:\\s+\\[(.+?)\\])?\\s*$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"code": 5,
"message": 6,
"fromPath": 7
}
]
},
{
"owner": "msbuild-no-location",
"pattern": [
{
"regexp": "^(?!.*\\().*\\b(error|warning)\\s+([A-Za-z]+\\d+)\\s*:\\s*(.*)$",
"severity": 1,
"code": 2,
"message": 3
}
]
}
]
}
-4
View File
@@ -69,10 +69,6 @@ This makes use of the vswhere tool which is a tool delivered by Microsoft to hel
vswhere-path: 'C:\path\to\your\tools\'
```
## Problem matcher
This action registers a [problem matcher](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md) for MSBuild/csc-style `error`/`warning` output (for example `error MSB1234:` or `error CS1234:`). Once registered, matching lines in the build log are automatically surfaced as annotations in the GitHub Actions UI and, when applicable, as pull request check annotations.
## Notes on arguments
While the Action enables you to specify a `vswhere` path as well as a `vs-version`, these are more advanced options and when using GitHub-hosted runners you should not need these and is recommended you don't specify them as they are optional. Using these require you to fully understand the runner environment, updates to the tools on the runner, and can cause failures if you are out of sync. For GitHub-hosted runners, omitting these arguments is the preferred usage.
-7
View File
@@ -42,16 +42,9 @@ if (VS_VERSION !== 'latest') {
VSWHERE_EXEC += `-version "${VS_VERSION}" `;
}
core.debug(`Execution arguments: ${VSWHERE_EXEC}`);
function registerProblemMatcher() {
const matcherPath = path.join(__dirname, '..', '.github', 'msbuild.json');
core.info(`##[add-matcher]${matcherPath}`);
}
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
// register the problem matcher so MSBuild/csc errors and warnings are
// annotated in the workflow log and any related pull request
registerProblemMatcher();
// exit if non Windows runner
if (IS_WINDOWS === false) {
core.setFailed('setup-msbuild can only be run on Windows runners');
+14836 -4876
View File
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -40,11 +40,11 @@
"eslint": "^5.16.0",
"eslint-plugin-github": "^2.0.0",
"eslint-plugin-jest": "^22.21.0",
"jest": "^24.9.0",
"jest": "^30.5.1",
"jest-circus": "^24.9.0",
"js-yaml": "^3.13.1",
"prettier": "^1.19.1",
"ts-jest": "^24.2.0",
"ts-jest": "^29.4.12",
"typescript": "^3.6.4"
}
}
-101
View File
@@ -1,101 +0,0 @@
import * as fs from 'fs'
import * as path from 'path'
interface ProblemMatcherPattern {
regexp: string
file?: number
line?: number
column?: number
severity?: number
code?: number
message?: number
fromPath?: number
}
interface ProblemMatcherOwner {
owner: string
pattern: ProblemMatcherPattern[]
}
interface ProblemMatcherFile {
problemMatcher: ProblemMatcherOwner[]
}
const matcherPath = path.join(__dirname, '..', '..', '.github', 'msbuild.json')
const matcherFile: ProblemMatcherFile = JSON.parse(
fs.readFileSync(matcherPath, 'utf8')
)
function findOwner(owner: string): ProblemMatcherOwner {
const found = matcherFile.problemMatcher.find(m => m.owner === owner)
if (!found) {
throw new Error(`No matcher owner named ${owner} found`)
}
return found
}
describe('msbuild problem matcher', () => {
it('is valid JSON with the expected owners', () => {
expect(matcherFile.problemMatcher.map(m => m.owner)).toEqual([
'msbuild',
'msbuild-no-location'
])
})
describe('msbuild owner (file-based diagnostics)', () => {
const regexp = new RegExp(findOwner('msbuild').pattern[0].regexp)
it('matches a csc-style error with file, line, column and project path', () => {
const line =
'Program.cs(10,5): error CS1002: ; expected [C:\\proj\\proj.csproj]'
const match = regexp.exec(line)
expect(match).not.toBeNull()
expect(match?.[1]).toBe('Program.cs')
expect(match?.[2]).toBe('10')
expect(match?.[3]).toBe('5')
expect(match?.[4]).toBe('error')
expect(match?.[5]).toBe('CS1002')
expect(match?.[6]).toBe('; expected')
expect(match?.[7]).toBe('C:\\proj\\proj.csproj')
})
it('matches an MSB-coded warning with file and line only', () => {
const line =
'C:\\proj\\proj.csproj(15,1): warning MSB3277: Found conflicts [C:\\proj\\proj.csproj]'
const match = regexp.exec(line)
expect(match).not.toBeNull()
expect(match?.[4]).toBe('warning')
expect(match?.[5]).toBe('MSB3277')
})
it('matches a diagnostic without a trailing project path', () => {
const line = 'Program.cs(3,1): error CS0246: The type or namespace name could not be found'
const match = regexp.exec(line)
expect(match).not.toBeNull()
expect(match?.[5]).toBe('CS0246')
expect(match?.[6]).toBe(
'The type or namespace name could not be found'
)
expect(match?.[7]).toBeUndefined()
})
})
describe('msbuild-no-location owner (engine-level diagnostics)', () => {
const regexp = new RegExp(findOwner('msbuild-no-location').pattern[0].regexp)
it('matches an MSBuild engine error with no file/line info', () => {
const line = 'MSBUILD : error MSB1009: Project file does not exist.'
const match = regexp.exec(line)
expect(match).not.toBeNull()
expect(match?.[1]).toBe('error')
expect(match?.[2]).toBe('MSB1009')
expect(match?.[3]).toBe('Project file does not exist.')
})
it('does not match lines already covered by the file-based owner', () => {
const line =
'Program.cs(10,5): error CS1002: ; expected [C:\\proj\\proj.csproj]'
expect(regexp.test(line)).toBe(false)
})
})
})
-9
View File
@@ -23,17 +23,8 @@ if (VS_VERSION !== 'latest') {
core.debug(`Execution arguments: ${VSWHERE_EXEC}`)
function registerProblemMatcher(): void {
const matcherPath = path.join(__dirname, '..', '.github', 'msbuild.json')
core.info(`##[add-matcher]${matcherPath}`)
}
async function run(): Promise<void> {
try {
// register the problem matcher so MSBuild/csc errors and warnings are
// annotated in the workflow log and any related pull request
registerProblemMatcher()
// exit if non Windows runner
if (IS_WINDOWS === false) {
core.setFailed('setup-msbuild can only be run on Windows runners')