Skip to content

Commit 7449e06

Browse files
authored
Merge pull request #257 from forcedotcom/release-1.9.0
RELEASE @W-19015105@ Conducting v1.9.0 Release
2 parents bc043a8 + cbe931f commit 7449e06

File tree

9 files changed

+2001
-2381
lines changed

9 files changed

+2001
-2381
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ jobs:
8282
git checkout -b $INTERIM_BRANCH_NAME
8383
# Immediately push the interim branch with no changes, so GraphQL can push to it later.
8484
git push --set-upstream origin $INTERIM_BRANCH_NAME
85-
# Update our dependencies
86-
- run: npm update
8785
# Use the GraphQL API to create a signed commmit with our changes.
8886
- run: |
8987
# GraphQL needs to know what branch to push to.
@@ -93,11 +91,10 @@ jobs:
9391
MESSAGE="Preparing for v$NEW_VERSION release."
9492
# GraphQL needs the latest versions of the files we changed, as Base64 encoded strings.
9593
NEW_PACKAGE="$(cat package.json | base64)"
96-
NEW_LOCKFILE="$(cat package-lock.json | base64)"
9794
gh api graphql -F message="$MESSAGE" -F oldOid=`git rev-parse HEAD` -F branch="$BRANCH" \
98-
-F newPackage="$NEW_PACKAGE" -F newLockfile="$NEW_LOCKFILE" \
95+
-F newPackage="$NEW_PACKAGE" \
9996
-f query='
100-
mutation ($message: String!, $oldOid: GitObjectID!, $branch: String!, $newPackage: Base64String!, $newLockfile: Base64String!) {
97+
mutation ($message: String!, $oldOid: GitObjectID!, $branch: String!, $newPackage: Base64String!) {
10198
createCommitOnBranch(input: {
10299
branch: {
103100
repositoryNameWithOwner: "forcedotcom/sfdx-code-analyzer-vscode",
@@ -111,9 +108,6 @@ jobs:
111108
{
112109
path: "package.json",
113110
contents: $newPackage
114-
}, {
115-
path: "package-lock.json",
116-
contents: $newLockfile
117111
}
118112
]
119113
},

.github/workflows/production-heartbeat.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
os: [{vm: ubuntu-latest}, {vm: windows-2019}, {vm: macos-latest}]
17-
node: ['lts/*']
16+
os:
17+
[{ vm: ubuntu-latest }, { vm: windows-latest }, { vm: macos-latest }]
18+
node: ["lts/*"]
1819
runs-on: ${{ matrix.os.vm }}
1920
timeout-minutes: 60
2021
steps:

SHA256.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ make sure that their SHA values match the values in the list below.
1515
shasum -a 256 <location_of_the_downloaded_file>
1616

1717
3. Confirm that the SHA in your output matches the value in this list of SHAs.
18-
f2f1d3d11766f331c15c1c32aa8b93a57b1626fc3e2f25a8b8b4704962198bf4 ./extensions/sfdx-code-analyzer-vscode-1.7.0.vsix
18+
112139aa0cd29e64729aceaea9fc1c19c072b95af7eda751ca9ad92a346a9783 ./extensions/sfdx-code-analyzer-vscode-1.8.0.vsix
1919
4. Change the filename extension for the file that you downloaded from .zip to
2020
.vsix.
2121

package-lock.json

Lines changed: 1911 additions & 2335 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"color": "#ECECEC",
1616
"theme": "light"
1717
},
18-
"version": "1.8.0",
18+
"version": "1.9.0",
1919
"publisher": "salesforce",
2020
"license": "BSD-3-Clause",
2121
"engines": {
@@ -34,39 +34,39 @@
3434
],
3535
"dependencies": {
3636
"@salesforce/vscode-service-provider": "^1.4.0",
37-
"@types/jest": "^29.5.14",
38-
"@types/semver": "^7.5.8",
37+
"@types/jest": "^30.0.0",
38+
"@types/semver": "^7.7.0",
3939
"@types/tmp": "^0.2.6",
4040
"diff": "^5.2.0",
41-
"glob": "^11.0.1",
42-
"semver": "^7.7.1",
41+
"glob": "^11.0.3",
42+
"semver": "^7.7.2",
4343
"tmp": "^0.2.3"
4444
},
4545
"devDependencies": {
46-
"@eslint/js": "^9.21.0",
47-
"@types/diff": "^5.2.0",
48-
"@types/chai": "^4.3.5",
49-
"@types/mocha": "^10.0.1",
50-
"@types/node": "^22.13.6",
51-
"@types/sinon": "^10.0.15",
52-
"@types/vscode": "^1.74.0",
53-
"@vscode/test-cli": "^0.0.10",
54-
"@vscode/test-electron": "^2.4.1",
55-
"@vscode/vsce": "^3.2.2",
56-
"chai": "^4.3.7",
57-
"esbuild": "^0.25.0",
58-
"eslint": "^9.21.0",
59-
"jest": "^29.7.0",
60-
"jest-mock-vscode": "^4.2.0",
61-
"mocha": "^10.1.0",
62-
"ovsx": "^0.10.1",
46+
"@eslint/js": "^9.31.0",
47+
"@types/diff": "^5.2.3",
48+
"@types/chai": "^4.3.20",
49+
"@types/mocha": "^10.0.10",
50+
"@types/node": "^22.16.4",
51+
"@types/sinon": "^10.0.20",
52+
"@types/vscode": "^1.90.0",
53+
"@vscode/test-cli": "^0.0.11",
54+
"@vscode/test-electron": "^2.5.2",
55+
"@vscode/vsce": "^3.6.0",
56+
"chai": "^4.5.0",
57+
"esbuild": "^0.25.6",
58+
"eslint": "^9.31.0",
59+
"jest": "^30.0.4",
60+
"jest-mock-vscode": "^4.5.0",
61+
"mocha": "^10.8.2",
62+
"ovsx": "^0.10.5",
6363
"proxyquire": "^2.1.3",
6464
"rimraf": "*",
65-
"sinon": "^15.1.0",
66-
"ts-jest": "^29.2.6",
67-
"ts-node": "^10.9.1",
68-
"typescript": "^5.7.3",
69-
"typescript-eslint": "^8.25.0"
65+
"sinon": "^15.2.0",
66+
"ts-jest": "^29.4.0",
67+
"ts-node": "^10.9.2",
68+
"typescript": "^5.8.3",
69+
"typescript-eslint": "^8.37.0"
7070
},
7171
"extensionDependencies": [
7272
"salesforce.salesforcedx-vscode-core"

src/lib/agentforce/supported-rules.ts

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,73 @@ export enum ViolationContextScope {
1717
*/
1818
export const A4D_SUPPORTED_RULES: Map<string, ViolationContextScope> = new Map([
1919
// =======================================================================
20-
// ==== Rules from rule selector: 'pmd:Recommended:Documentation:Apex'
20+
// ==== Rules from rule selector: 'pmd:Documentation:Apex'
2121
// =======================================================================
2222
['ApexDoc', ViolationContextScope.MethodScope],
2323

2424

2525
// =======================================================================
26-
// ==== Rules from rule selector: 'pmd:Recommended:ErrorProne:Apex'
26+
// ==== Rules from rule selector: 'pmd:BestPractices:Apex'
27+
// =======================================================================
28+
['ApexAssertionsShouldIncludeMessage', ViolationContextScope.ViolationScope],
29+
['ApexUnitTestMethodShouldHaveIsTestAnnotation', ViolationContextScope.ClassScope],
30+
['ApexUnitTestShouldNotUseSeeAllDataTrue', ViolationContextScope.ClassScope], // Range really should just be the violation but see ApexUnitTestShouldNotUseSeeAllDataTrue
31+
['UnusedLocalVariable', ViolationContextScope.ViolationScope],
32+
// NOTE: We have decided that the following `BestPractices` rules either do not get any value from A4D Quick Fix
33+
// suggestions or that the model currently gives back poor suggestions:
34+
// ApexUnitTestClassShouldHaveAsserts, ApexUnitTestClassShouldHaveRunAs, AvoidGlobalModifier, AvoidLogicInTrigger,
35+
// DebugsShouldUseLoggingLevel, QueueableWithoutFinalizer
36+
37+
// =======================================================================
38+
// ==== Rules from rule selector: 'pmd:CodeStyle:Apex'
39+
// =======================================================================
40+
['ClassNamingConventions', ViolationContextScope.ViolationScope],
41+
['FieldDeclarationsShouldBeAtStart', ViolationContextScope.ClassScope],
42+
['FieldNamingConventions', ViolationContextScope.ViolationScope],
43+
['ForLoopsMustUseBraces', ViolationContextScope.ViolationScope],
44+
['FormalParameterNamingConventions', ViolationContextScope.ViolationScope],
45+
['LocalVariableNamingConventions', ViolationContextScope.ViolationScope],
46+
['MethodNamingConventions', ViolationContextScope.ViolationScope],
47+
['OneDeclarationPerLine', ViolationContextScope.ViolationScope],
48+
['PropertyNamingConventions', ViolationContextScope.ViolationScope],
49+
// NOTE: We have decided that the following `CodeStyle` rules either do not get any value from A4D Quick Fix
50+
// suggestions or that the model currently gives back poor suggestions:
51+
// IfElseStmtsMustUseBraces, IfStmtsMustUseBraces, WhileLoopsMustUseBraces
52+
53+
54+
// =======================================================================
55+
// ==== Rules from rule selector: 'pmd:Design:Apex'
56+
// =======================================================================
57+
['AvoidDeeplyNestedIfStmts', ViolationContextScope.MethodScope],
58+
// NOTE: We have decided that the following `Design` rules either do not get any value from A4D Quick Fix
59+
// suggestions or that the model currently gives back poor suggestions:
60+
// CognitiveComplexity, CyclomaticComplexity, ExcessiveClassLength, ExcessiveParameterList, ExcessivePublicCount,
61+
// NcssConstructorCount, NcssMethodCount, NcssTypeCount, StdCyclomaticComplexity, TooManyFields, UnusedMethod
62+
63+
64+
// =======================================================================
65+
// ==== Rules from rule selector: 'pmd:ErrorProne:Apex'
2766
// =======================================================================
2867
['AvoidDirectAccessTriggerMap', ViolationContextScope.MethodScope],
2968
['InaccessibleAuraEnabledGetter', ViolationContextScope.MethodScope],
69+
['MethodWithSameNameAsEnclosingClass', ViolationContextScope.MethodScope],
3070
['OverrideBothEqualsAndHashcode', ViolationContextScope.ViolationScope],
3171
['TestMethodsMustBeInTestClasses', ViolationContextScope.ClassScope],
3272
// NOTE: We have decided that the following `ErrorProne` rules either do not get any value from A4D Quick Fix
3373
// suggestions or that the model currently gives back poor suggestions:
3474
// AvoidHardcodingId, AvoidNonExistentAnnotations, EmptyCatchBlock, EmptyIfStmt, EmptyStatementBlock,
35-
// EmptyTryOrFinallyBlock, EmptyWhileStmt, MethodWithSameNameAsEnclosingClass
75+
// EmptyTryOrFinallyBlock, EmptyWhileStmt
76+
// NOTE: New rules like AvoidStatefulDatabaseResult and TypeShadowsBuiltInNamespace have yet to be evaluated.
3677

3778

3879
// =======================================================================
39-
// ==== Rules from rule selector: 'pmd:Recommended:Security:Apex'
80+
// ==== Rules from rule selector: 'pmd:Performance:Apex'
81+
// =======================================================================
82+
// All the performance rules have yet to be evaluated.
83+
84+
85+
// =======================================================================
86+
// ==== Rules from rule selector: 'pmd:Security:Apex'
4087
// =======================================================================
4188
['ApexBadCrypto', ViolationContextScope.MethodScope],
4289
['ApexCRUDViolation', ViolationContextScope.MethodScope],
@@ -51,7 +98,5 @@ export const A4D_SUPPORTED_RULES: Map<string, ViolationContextScope> = new Map([
5198
// NOTE: We have decided that the following `Security` rule(s) either do not get any value from A4D Quick Fix
5299
// suggestions or that the model currently gives back poor suggestions:
53100
// ApexOpenRedirect
54-
55-
56-
// NOTE: We still need to evaluate other rule categories, so more will come in future releases.
101+
// NOTE: AppExchange rules have not been evaluated.
57102
]);

src/lib/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
// extension names
99
export const EXTENSION_ID = 'salesforce.sfdx-code-analyzer-vscode';
10+
export const EXTENSION_BASE_ID = 'sfdx-code-analyzer-vscode';
1011
export const CORE_EXTENSION_ID = 'salesforce.salesforcedx-vscode-core';
1112
export const EXTENSION_PACK_ID = 'salesforce.salesforcedx-vscode';
1213

src/lib/diagnostics.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ export class CodeAnalyzerDiagnostic extends vscode.Diagnostic {
7575
const rulesToReduceViolationsToSingleLine: string[] = [
7676
'ApexDoc', // https://github.com/pmd/pmd/issues/5614
7777
'ApexUnitTestMethodShouldHaveIsTestAnnotation', // https://github.com/pmd/pmd/issues/5669
78+
'ApexUnitTestShouldNotUseSeeAllDataTrue', // https://github.com/pmd/pmd/issues/5904
7879
'AvoidGlobalModifer', // https://github.com/pmd/pmd/issues/5668
7980
'ApexSharingViolations', // https://github.com/pmd/pmd/issues/5511
81+
'ClassNamingConventions', // https://github.com/pmd/pmd/issues/5905
82+
'MethodWithSameNameAsEnclosingClass', // https://github.com/pmd/pmd/issues/5906
8083
'ExcessiveParameterList']; // https://github.com/pmd/pmd/issues/5616
8184
if (rulesToReduceViolationsToSingleLine.includes(violation.rule)) {
8285
diagnostic.range = new vscode.Range(diagnostic.range.start.line, diagnostic.range.start.character,

src/lib/external-services/external-service-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class ExternalServiceProvider implements LLMServiceProvider, TelemetrySer
8989
}
9090

9191
try {
92-
const coreTelemetryService: TelemetryServiceInterface = await ServiceProvider.getService(ServiceType.Telemetry);
92+
const coreTelemetryService: TelemetryServiceInterface = await ServiceProvider.getService(ServiceType.Telemetry, Constants.EXTENSION_BASE_ID);
9393
await coreTelemetryService.initializeService(this.extensionContext);
9494
return new LiveTelemetryService(coreTelemetryService, this.logger);
9595
} catch (err) {

0 commit comments

Comments
 (0)