Skip to content

Commit 6493f96

Browse files
Merge pull request #1731 from forcedotcom/release-5.0.0-beta.1
RELEASE @W-17615470@: Conducting v5.0.0 beta.1 release
2 parents 034b4e9 + f74f4ba commit 6493f96

16 files changed

+1428
-1324
lines changed

.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
"project": "./tsconfig.json"
1313
},
1414
"rules": {
15-
"@typescript-eslint/no-unused-vars": ["error", {"argsIgnorePattern": "^_"}],
15+
"@typescript-eslint/no-unused-vars": ["error", {
16+
"argsIgnorePattern": "^_",
17+
"varsIgnorePattern": "^_",
18+
"caughtErrorsIgnorePattern": "^_"}],
1619
"@typescript-eslint/unbound-method": ["error", {"ignoreStatic": true}]
1720
},
1821
"plugins": [
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: Report a Bug with a code-analyzer command
2+
description: Report an issue with a code-analyzer command.
3+
title: "[BUG][code-analyzer] <YOUR_TITLE_HERE>"
4+
labels: []
5+
body:
6+
- type: dropdown
7+
attributes:
8+
label: Have you tried to resolve this issue yourself first?
9+
description: |
10+
Oftentimes, you can resolve `code-analyzer` issues on your own. Follow these steps:
11+
1. Read the error message.
12+
2. Read [Salesforce Code Analyzer](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/code-analyzer.html) documentation.
13+
3. Double-check the command that you ran. Ensure that items like file names, method names, and category names are correctly spelled and cased.
14+
4. Verify that your code is syntactically valid.
15+
5. Verify that the error is reproducible on another machine.
16+
6. Check open and closed [issues](https://github.com/forcedotcom/sfdx-scanner/issues) to see if your issue is already logged.
17+
18+
**I confirm that I have gone through these steps and still have an issue to report.**
19+
<sup>(You must select "Yes" to create an issue.)</sup>
20+
options:
21+
- ''
22+
- "Yes"
23+
validations:
24+
required: true
25+
- type: textarea
26+
attributes:
27+
label: Bug Description
28+
description: Provide a clear and concise description of what the bug is and include the exact command that you ran.
29+
validations:
30+
required: true
31+
- type: textarea
32+
attributes:
33+
label: Output / Logs
34+
description: Attach any output or logs here
35+
placeholder: |
36+
Add log output here or drag files here.
37+
- type: textarea
38+
attributes:
39+
label: Steps To Reproduce
40+
description: List out the steps that you used to reproduce the bug behavior. Be as specific and clear as possible.
41+
placeholder: |
42+
1. I first do ...
43+
2. Then I do ...
44+
3. Lastly, I do ...
45+
validations:
46+
required: true
47+
- type: textarea
48+
attributes:
49+
label: Expected Behavior
50+
description: Provide a clear and concise description of what you expected to happen.
51+
validations:
52+
required: true
53+
- type: input
54+
attributes:
55+
label: Operating System
56+
description: |
57+
What is your machine's operating system?
58+
placeholder: |
59+
Example: MacOS Sonoma 14.4.1
60+
validations:
61+
required: true
62+
- type: input
63+
attributes:
64+
label: Salesforce CLI Version
65+
description: |
66+
What do you get from the command "sf --version"?
67+
placeholder: |
68+
Example: @salesforce/cli/2.40.7 darwin-arm64 node-v20.12.2
69+
validations:
70+
required: true
71+
- type: input
72+
attributes:
73+
label: Code Analyzer Plugin (code-analyzer) Version
74+
description: |
75+
What do you get from the command "sf plugins"?
76+
placeholder: |
77+
Example: code-analyzer 5.0.0-beta.0
78+
validations:
79+
required: true
80+
- type: input
81+
attributes:
82+
label: Node Version
83+
description: |
84+
What do you get from the command "node --version"?
85+
placeholder: |
86+
Example: v23.4.0
87+
validations:
88+
required: false
89+
- type: input
90+
attributes:
91+
label: Java Version
92+
description: |
93+
What do you get from the command "java -version"?
94+
placeholder: |
95+
Example: openjdk version "11.0.17.0.1" 2022-10-18 LTS
96+
validations:
97+
required: false
98+
- type: input
99+
attributes:
100+
label: Python Version
101+
description: |
102+
What do you get from the command "python --version"?
103+
placeholder: |
104+
Example: Python 3.11.8
105+
validations:
106+
required: false
107+
- type: textarea
108+
attributes:
109+
label: Additional Context (Screenshots, Files, etc)
110+
description: Add any other context about the problem.
111+
placeholder: |
112+
Drag any files or screenshots you have here.
113+
- type: textarea
114+
attributes:
115+
label: Workaround
116+
description: What ways have you found to sidestep the problem? If you haven't found a workaround, what have you tried so far?
117+
- type: dropdown
118+
attributes:
119+
label: Urgency
120+
description: What is the severity of the problem?
121+
options:
122+
- Low
123+
- Moderate
124+
- High
125+
- Critical
126+
default: 0
127+
validations:
128+
required: true

.github/ISSUE_TEMPLATE/0-scanner_run_bug.yml renamed to .github/ISSUE_TEMPLATE/1-scanner_run_bug.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Report a Bug with scanner run
22
description: Report an issue with the scanner run command.
3-
title: "[BUG] <YOUR_TITLE_HERE>"
3+
title: "[BUG][scanner run] <YOUR_TITLE_HERE>"
44
labels: []
55
body:
66
- type: dropdown

.github/ISSUE_TEMPLATE/1-scanner_run_dfa_bug.yml renamed to .github/ISSUE_TEMPLATE/2-scanner_run_dfa_bug.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Report a Bug with scanner run dfa
22
description: Report an issue with the scanner run dfa command.
3-
title: "[BUG] <YOUR_TITLE_HERE>"
3+
title: "[BUG][scanner run dfa] <YOUR_TITLE_HERE>"
44
labels: []
55
body:
66
- type: dropdown

.github/ISSUE_TEMPLATE/2-scanner_run_false_result.yml renamed to .github/ISSUE_TEMPLATE/3-scanner_run_false_result.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Report a False Result with scanner run
22
description: Report false results in scanner run scan reports. If you're submitting your managed package for AppExchange security review, include documentation of your false results with your submission.
3-
title: "[False Result] <YOUR_TITLE_HERE>"
3+
title: "[False Result][scanner run] <YOUR_TITLE_HERE>"
44
labels: []
55
body:
66
- type: dropdown

.github/ISSUE_TEMPLATE/3-scanner_run_dfa_false_result.yml renamed to .github/ISSUE_TEMPLATE/4-scanner_run_dfa_false_result.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Report a False Result with scanner run dfa
22
description: Report false results returned in scanner run dfa scan reports. If you're submitting for AppExchange security review, include documentation of your false results with your submission.
3-
title: "[False Result] <YOUR_TITLE_HERE>"
3+
title: "[False Result][scanner run dfa] <YOUR_TITLE_HERE>"
44
labels: []
55
body:
66
- type: textarea
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: apply-npm-tag-to-version
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
package_name:
6+
description: 'Select Package Name:'
7+
required: true
8+
type: choice
9+
options:
10+
- '@salesforce/plugin-code-analyzer'
11+
- '@salesforce/sfdx-scanner'
12+
tag_name:
13+
description: 'Tag Name (ex: latest):'
14+
required: true
15+
type: string
16+
version:
17+
description: 'Version (ex: 4.8.0):'
18+
required: true
19+
type: string
20+
confirm:
21+
description: 'Check this box to confirm that you understand that applying a tag using this action is only recommended for emergency rollback situations and that you understand the consequences.'
22+
required: true
23+
type: boolean
24+
25+
jobs:
26+
publish_package:
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: actions/setup-node@v4
32+
with:
33+
node-version: 'lts/*'
34+
35+
- name: Fail if not confirmed
36+
if: ${{ github.event.inputs.confirm != 'true' }}
37+
run: |
38+
echo "::error::You did not confirm, so dist-tag not called."
39+
exit 1
40+
41+
- name: Validate package name (sanity check)
42+
if: ${{ github.event.inputs.package_name != '@salesforce/plugin-code-analyzer' && github.event.inputs.package_name != '@salesforce/sfdx-scanner' }}
43+
run: |
44+
echo "Invalid package name. Please choose one of the allowed package names."
45+
exit 1
46+
47+
- name: Prepare NPM Credentials
48+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
49+
50+
- name: Apply tag
51+
run: |
52+
echo "You have confirmed that using this action is only recommended for emergency rollback situations and that you are responsible for manually applying the ${{ github.event.inputs.tag_name }} tag to ${{ github.event.inputs.package_name }}@${{ github.event.inputs.version }}."
53+
echo "Applying tag..."
54+
npm dist-tag add ${{ github.event.inputs.package_name }}@${{ github.event.inputs.version }} ${{ github.event.inputs.tag_name }}

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ jobs:
3737
git checkout -b $INTERIM_BRANCH_NAME
3838
# Immediately push the interim branch with no changes, so GraphQL can push to it later.
3939
git push --set-upstream origin $INTERIM_BRANCH_NAME
40-
# Update our dependencies.
41-
- run: |
42-
yarn upgrade
4340
# Use the GraphQL API to create a signed commit with the various changes.
4441
- name: Commit to interim branch
4542
run: |
@@ -50,11 +47,10 @@ jobs:
5047
MESSAGE="Preparing for v$NEW_VERSION release."
5148
# GraphQL needs the latest versions of the files we changed, as Base64 encoded strings.
5249
NEW_PACKAGE="$(cat package.json | base64)"
53-
NEW_YARN_LOCK="$(cat yarn.lock | base64)"
5450
gh api graphql -F message="$MESSAGE" -F oldOid=`git rev-parse HEAD` -F branch="$BRANCH" \
55-
-F newPackage="$NEW_PACKAGE" -F newYarnLock="$NEW_YARN_LOCK" \
51+
-F newPackage="$NEW_PACKAGE" \
5652
-f query='
57-
mutation ($message: String!, $oldOid: GitObjectID!, $branch: String!, $newPackage: Base64String!, $newYarnLock: Base64String!) {
53+
mutation ($message: String!, $oldOid: GitObjectID!, $branch: String!, $newPackage: Base64String!) {
5854
createCommitOnBranch(input: {
5955
branch: {
6056
repositoryNameWithOwner: "forcedotcom/sfdx-scanner",
@@ -68,9 +64,6 @@ jobs:
6864
{
6965
path: "package.json",
7066
contents: $newPackage
71-
}, {
72-
path: "yarn.lock",
73-
contents: $newYarnLock
7467
}
7568
]
7669
},

.github/workflows/publish-to-npm.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ jobs:
7979
with:
8080
distribution: 'temurin'
8181
java-version: '11' # For now, Java version is hardcoded.
82+
- uses: actions/setup-python@v5
83+
with:
84+
python-version: '>=3.10'
8285
# Install SF, and the release candidate version.
8386
- run: npm install -g @salesforce/cli
8487
- run: sf plugins install @salesforce/plugin-code-analyzer@latest-beta-rc

0 commit comments

Comments
 (0)