diff --git a/.azure/ci.yml b/.azure/ci.yml index b6e5048ae..eba063703 100644 --- a/.azure/ci.yml +++ b/.azure/ci.yml @@ -39,8 +39,8 @@ jobs: - pwsh: | npm install npm run format-check - npm run build:github - npm run build:azure + npm run build:agent:github + npm run build:agent:azure displayName: 'Build code' - pwsh: | # set the inputs for the 'gitversion/setup' action diff --git a/.editorconfig b/.editorconfig index 0c2e939fb..8ade60512 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,16 +2,13 @@ root = true [*] +charset = utf-8 indent_style = space indent_size = 4 end_of_line = lf -charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true max_line_length = off -[*.yml] -indent_size = 2 - -[*.md] +[{*.yml,*.yaml,*.md}] indent_size = 2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b8639f59..a48d7c055 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + os: [ windows-latest, ubuntu-latest, macos-13, macos-14 ] fail-fast: false steps: - uses: actions/checkout@v4 @@ -37,8 +37,8 @@ jobs: - run: | npm install npm run format-check - npm run build:github - npm run build:azure + npm run build:agent:github + npm run build:agent:azure name: Build code - name: gitversion/setup uses: ./gitversion/setup diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 862ad11ba..ced4a8f28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,8 +21,8 @@ jobs: git fetch --prune --unshallow - run: | npm install - npm run build:github - npm run build:azure + npm run build:agent:github + npm run build:agent:azure # npm run compress:github # npm run compress:azure diff --git a/.gitignore b/.gitignore index 98c25ae80..20dfd8477 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,31 @@ -node_modules/ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +#dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +.test/ .taskkey -*.js -!dist/**/*.js *.vsix -.idea/ /dist/mock/ diff --git a/.prettierignore b/.prettierignore index 8c9891172..c2658d7d1 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1 @@ node_modules/ -src/*/node_modules/ diff --git a/.prettierrc.json b/.prettierrc.json index 38b59794e..d74ce9952 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -7,5 +7,6 @@ "trailingComma": "none", "bracketSpacing": true, "arrowParens": "avoid", - "parser": "typescript" + "parser": "typescript", + "endOfLine": "lf" } diff --git a/package-lock.json b/package-lock.json index 2a6295b99..78c10abcf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,6 +38,9 @@ "validator": "^13.11.0", "webpack": "^5.90.3", "webpack-cli": "^5.1.4" + }, + "engines": { + "node": ">=20.0.0" } }, "node_modules/@actions/core": { diff --git a/package.json b/package.json index aa071dd93..9f2bd88eb 100644 --- a/package.json +++ b/package.json @@ -4,20 +4,19 @@ "description": "Easy Semantic Versioning (https://semver.org) for projects using Git", "repository": { "type": "git", - "url": "https://github.com/GitTools/use-gitversion.git" + "url": "https://github.com/GitTools/actions.git" + }, + "module": "ES2022", + "engines": { + "node": ">=20.0.0" }, - "main": "main.js", "scripts": { + "build": "npm run build:mock && npm run build:azure && npm run build:github", "format": "prettier --write src/**/*.ts", "format-check": "prettier --check src/**/*.ts", - "build:mock": "webpack --config webpack.config.js --env agent=mock", - "build:azure": "webpack --config webpack.config.js --env agent=azure", - "build:github": "webpack --config webpack.config.js --env agent=github", - "compress:mock": "npm run build:mock -- --env task=compress", - "compress:azure": "npm run build:azure -- --env task=compress", - "compress:github": "npm run build:github -- --env task=compress", - "build": "npm run build:mock && npm run build:azure && npm run build:github", - "compress": "npm run compress:mock && npm run compress:azure && npm run compress:github", + "build:agent:mock": "webpack --config webpack.config.js --env agent=mock", + "build:agent:azure": "webpack --config webpack.config.js --env agent=azure", + "build:agent:github": "webpack --config webpack.config.js --env agent=github", "publish:azure": "tfx extension publish --root ./dist/azure --no-wait-validation --auth-type pat" }, "author": "GitTools", diff --git a/src/agent/github/build-agent.ts b/src/agent/github/build-agent.ts index 9eac77f62..33f5f69d8 100644 --- a/src/agent/github/build-agent.ts +++ b/src/agent/github/build-agent.ts @@ -128,7 +128,7 @@ class BuildAgent implements IBuildAgent { public async exec(exec: string, args: string[]): Promise { const dotnetPath = await io.which(exec, true) - let result = await exe.getExecOutput(`"${dotnetPath}"`, args); + let result = await exe.getExecOutput(`"${dotnetPath}"`, args) return { code: result.exitCode, error: null,