Skip to content

Commit 681df1c

Browse files
Merge pull request #198 from forcedotcom/release-1.5.0
RELEASE @W-17915084@ Conducting 1.5.0 release
2 parents 9bfb5cf + 1f0f202 commit 681df1c

File tree

133 files changed

+16999
-48586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+16999
-48586
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
root = true
22

33
[*]
4-
indent_style = tab
4+
indent_style = space
55
indent_size = 4
66
charset = utf-8
77
trim_trailing_whitespace = true

.eslintrc.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/create-release-branch.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- uses: actions/setup-node@v4
6161
with:
6262
node-version: 'lts/*' # Always use Node LTS for building dependencies.
63-
- run: yarn install --frozen-lockfile
63+
- run: npm ci
6464
# Increment the version as desired locally, without actually committing anything.
6565
- name: Locally increment version
6666
run: |
@@ -85,7 +85,7 @@ jobs:
8585
# Immediately push the interim branch with no changes, so GraphQL can push to it later.
8686
git push --set-upstream origin $INTERIM_BRANCH_NAME
8787
# Update our dependencies
88-
- run: yarn upgrade
88+
- run: npm update
8989
# Use the GraphQL API to create a signed commmit with our changes.
9090
- run: |
9191
# GraphQL needs to know what branch to push to.
@@ -95,11 +95,11 @@ jobs:
9595
MESSAGE="Preparing for v$NEW_VERSION release."
9696
# GraphQL needs the latest versions of the files we changed, as Base64 encoded strings.
9797
NEW_PACKAGE="$(cat package.json | base64)"
98-
NEW_YARN_LOCK="$(cat yarn.lock | base64)"
98+
NEW_LOCKFILE="$(cat package-lock.json | base64)"
9999
gh api graphql -F message="$MESSAGE" -F oldOid=`git rev-parse HEAD` -F branch="$BRANCH" \
100-
-F newPackage="$NEW_PACKAGE" -F newYarnLock="$NEW_YARN_LOCK" \
100+
-F newPackage="$NEW_PACKAGE" -F newLockfile="$NEW_LOCKFILE" \
101101
-f query='
102-
mutation ($message: String!, $oldOid: GitObjectID!, $branch: String!, $newPackage: Base64String!, $newYarnLock: Base64String!) {
102+
mutation ($message: String!, $oldOid: GitObjectID!, $branch: String!, $newPackage: Base64String!, $newLockfile: Base64String!) {
103103
createCommitOnBranch(input: {
104104
branch: {
105105
repositoryNameWithOwner: "forcedotcom/sfdx-code-analyzer-vscode",
@@ -114,8 +114,8 @@ jobs:
114114
path: "package.json",
115115
contents: $newPackage
116116
}, {
117-
path: "yarn.lock",
118-
contents: $newYarnLock
117+
path: "package-lock.json",
118+
contents: $newLockfile
119119
}
120120
]
121121
},

.github/workflows/create-vsix-artifact.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
with:
1515
node-version: 'lts/*' # Node LTS should always be fine.
1616
- name: 'Install node dependencies'
17-
run: yarn install --frozen-lockfile
17+
run: npm ci
1818
- name: 'Create VSIX'
1919
run: npx vsce package
2020
- name: 'Upload artifact'

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
with:
8282
distribution: 'temurin'
8383
java-version: '11'
84-
- run: yarn install --frozen-lockfile
84+
- run: npm ci
8585
# Download the .vsix attached to the release.
8686
- name: Download Extension From Release
8787
run: |
@@ -114,7 +114,7 @@ jobs:
114114
with:
115115
distribution: 'temurin'
116116
java-version: '11'
117-
- run: yarn install --frozen-lockfile
117+
- run: npm ci
118118
# Download the .vsix attached to the release.
119119
- name: Download Extension From Release
120120
run: |

.github/workflows/run-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
with:
4949
python-version: 3.12
5050
- name: 'Install node module dependencies'
51-
run: yarn install --frozen-lockfile
51+
run: npm ci
5252
# We'll need to install the CLI tool, since some of the tests
5353
# are integration tests.
5454
- name: Install SF CLI
@@ -115,14 +115,14 @@ jobs:
115115
run: sf plugins install code-analyzer
116116
# Run the tests. (Linux and non-Linux need slightly different commands.)
117117
- name: 'Run Tests (Linux)'
118-
run: xvfb-run -a yarn test
118+
run: xvfb-run -a npm run test
119119
if: runner.os == 'Linux'
120120
- name: 'Run Tests (non-Linux)'
121-
run: yarn test
121+
run: npm run test
122122
if: runner.os != 'Linux'
123123
# Lint, to make sure we're following best practices.
124124
- name: 'Lint'
125-
run: yarn lint
125+
run: npm run lint
126126
# Upload the code coverage from the test as an artifact with
127127
# the name 'code-coverage-[whatever the OS is]'.
128128
- name: Upload coverage artifact

.github/workflows/validate-pr.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,32 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515
- name: Verify PR Title
16-
uses: ./github-actions/verify-pr-title
17-
id: verify_pr_title
16+
run: |
17+
title="${{ github.event.pull_request.title }}"
18+
title_upper=$(echo "$title" | tr '[:lower:]' '[:upper:]')
19+
base_ref="${{ github.base_ref }}"
20+
21+
# Define regex patterns for different types of PR titles
22+
MAIN2DEV_REGEX="^MAIN2DEV[[:space:]]*:?[[:space:]]*@W-[[:digit:]]{8,9}@.*MERGING.+[[:digit:]]{1,2}\.[[:digit:]]{1,2}\.[[:digit:]]{1,2}.*"
23+
RELEASE2MAIN_REGEX="^RELEASE[[:space:]]*:?[[:space:]]*@W-[[:digit:]]{8,9}@.+"
24+
PR_INTO_DEV_OR_RELEASE_REGEX="^(FIX|CHANGE|NEW)([[:space:]]*\([^)]+\))?[[:space:]]*:?[[:space:]]*@W-[[:digit:]]{8,9}@.+"
25+
26+
# Validate PR title based on base_ref and head_ref
27+
if [[ "$base_ref" == "dev" && "${{ startsWith(github.head_ref, 'm2d/') }}" == "true" && ! "$title_upper" =~ $MAIN2DEV_REGEX ]]; then
28+
echo "::error::Invalid PR title: '$title'. Please follow the format: Main2Dev (__) @W-XXXXXXXX@ Merging.*\d+\.\d+\.\d+"
29+
exit 1
30+
elif [[ "$base_ref" == "main" && ! "$title_upper" =~ $RELEASE2MAIN_REGEX ]]; then
31+
echo "::error::Invalid PR title: '$title'. Please follow the format: RELEASE @W-XXXXXXXX@ Summary"
32+
exit 1
33+
elif [[ ("$base_ref" == "dev" || "${{ startsWith(github.base_ref, 'release-') }}" == "true") && ! "$title_upper" =~ $PR_INTO_DEV_OR_RELEASE_REGEX ]]; then
34+
echo "::error::Invalid PR title: '$title'. Please follow the format: FIX|CHANGE|NEW (__) @W-XXXXXXXX@ Summary"
35+
exit 1
36+
else
37+
echo "PR title '$title' automatically accepted for $base_ref branch."
38+
fi
39+
40+
# If no errors, print success
41+
echo "Valid PR title: '$title'"
1842
# RUN TESTS
1943
# Step 1: Build the scanner tarball so it can be installed locally.
2044
build_v4_scanner_tarball:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ node_modules
88
**/.DS_Store
99
coverage
1010
typescript-test-results
11+
.nyc_output/

.vscode-test.mjs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { defineConfig } from '@vscode/test-cli';
2+
import { fileURLToPath } from "url";
3+
import { dirname } from "path";
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
8+
export default defineConfig({
9+
tests: [{
10+
files: `./out/test/legacy/**/*.test.js`,
11+
installExtensions: ['salesforce.salesforcedx-vscode']
12+
}],
13+
coverage: {
14+
includeAll: true,
15+
reporter: ["text", "lcov"]
16+
}
17+
});

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"request": "launch",
2424
"args": [
2525
"--extensionDevelopmentPath=${workspaceFolder}",
26-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
26+
"--extensionTestsPath=${workspaceFolder}/out/test/legacy/index"
2727
],
2828
"outFiles": [
2929
"${workspaceFolder}/out/test/**/*.js"

0 commit comments

Comments
 (0)