Skip to content

Commit c814f75

Browse files
authored
v1.6.19 - Updates Extra Code Coverage Plugin (#574)
* Removes some goofy test-based workarounds for System.OrgLimits not being previously available during packaging workflows thanks to @jongpie * Adding Task/Event/User wiki post to README * Updates Extra Code Coverage plugin which fixes #573 * Updates sfdx-scanner * Updating pipeline to use the preview version of PMD 7
1 parent 01f5654 commit c814f75

File tree

15 files changed

+16717
-363
lines changed

15 files changed

+16717
-363
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ Read below for more on how you can use Apex Rollup in your day-to-day. Please no
2020
- [Rollup Control custom metadata configuration](https://youtu.be/vUP_uBB2m-k)
2121
- [Unit testing Apex Rollup](https://youtu.be/u7ly5xGMfFM)
2222

23-
As well, don't miss [the Wiki](../../wiki), which includes even more info for common topics.
23+
As well, don't miss [the Wiki](../../wiki), which includes even more info for common topics like [setting up Task/Event/User rollups](../../wiki/Creating-Task-User-Event-Based-Rollups).
2424

2525
## Deployment & Setup
2626

27-
<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008Oak1AAC">
27+
<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008Oal4AAC">
2828
<img alt="Deploy to Salesforce"
2929
src="./media/deploy-package-to-prod.png">
3030
</a>
3131

32-
<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008Oak1AAC">
32+
<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008Oal4AAC">
3333
<img alt="Deploy to Salesforce Sandbox"
3434
src="./media/deploy-package-to-sandbox.png">
3535
</a>

extra-tests/classes/RollupTests.cls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@SuppressWarnings('PMD.NcssTypeCount')
12
@IsTest
23
private class RollupTests {
34
static Rollup.Op testOp;
@@ -3035,7 +3036,7 @@ private class RollupTests {
30353036
);
30363037
Rollup.apexContext = TriggerOperation.AFTER_INSERT;
30373038
// one over the default limit
3038-
RollupLimits.orgAsyncJobsUsed = 250001;
3039+
RollupLimits.currentAsyncJobsUsed = 250001;
30393040

30403041
// specifically no Test.startTest()/Test.stopTest() to prove it's been run sync
30413042
Rollup.sumFromApex(ContactPointAddress.PreferenceRank, ContactPointAddress.ParentId, Account.Id, Account.AnnualRevenue, Account.SObjectType).runCalc();

package-lock.json

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

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "apex-rollup",
3-
"version": "1.6.18",
3+
"version": "1.6.19",
44
"description": "Fast, configurable, elastically scaling custom rollup solution. Apex Invocable action, one-liner Apex trigger/CMDT-driven logic, and scheduled Apex-ready.",
55
"repository": {
66
"type": "git",
@@ -19,7 +19,7 @@
1919
"@salesforce/eslint-config-lwc": "3.5.2",
2020
"@salesforce/eslint-plugin-lightning": "1.0.0",
2121
"@salesforce/sfdx-lwc-jest": "3.1.1",
22-
"@salesforce/sfdx-scanner": "^3.21.0",
22+
"@salesforce/sfdx-scanner": "^3.22.0",
2323
"eslint": "*",
2424
"eslint-config-prettier": "9.1.0",
2525
"husky": "8.0.3",
@@ -47,12 +47,12 @@
4747
"create:package:code-coverage": "pwsh -Command \"&{ . ./scripts/generatePackage.ps1; Generate -PackageName '\"Apex Rollup - Extra Code Coverage\"' -ReadmePath \"./plugins/ExtraCodeCoverage/README.md\" }\"",
4848
"get:project:json": "pwsh -Command \"&{ . ./scripts/generatePackage.ps1; Update-SFDX-Project-JSON }\"",
4949
"husky:pre-commit": "lint-staged",
50-
"lint:verify": "sfdx scanner:run --target **/lwc/**/*.js,!node_modules/** --engine eslint-lwc --severity-threshold 3 --eslintconfig .eslintrc.json",
51-
"prepare": "husky install && sfdx plugins:link ./node_modules/@salesforce/sfdx-scanner && sfdx plugins:link ./node_modules/@jongpie/sfdx-bummer-plugin",
50+
"lint:verify": "sf scanner run --target **/lwc/**/*.js,!node_modules/** --engine eslint-lwc --severity-threshold 3 --eslintconfig .eslintrc.json",
51+
"prepare": "husky install && sf plugins link ./node_modules/@salesforce/sfdx-scanner && sf plugins link ./node_modules/@jongpie/sfdx-bummer-plugin",
5252
"prettier": "prettier",
5353
"scan": "npm run lint:verify && npm run scan:pmd",
54-
"scan:pmd": "sfdx scanner:run --pmdconfig config/pmd-ruleset.xml --target .,!plugins/ExtraCodeCoverage/** --engine pmd --severity-threshold 3",
55-
"scan:graph": "sfdx scanner:run -e sfge -p . --target 'rollup'",
54+
"scan:pmd": "sf scanner run --pmdconfig config/pmd-ruleset.xml --target .,!plugins/ExtraCodeCoverage/** --engine pmd --severity-threshold 3 --preview-pmd7",
55+
"scan:graph": "sf scanner run -e sfge -p . --target 'rollup'",
5656
"test": "npm run test:apex && npm run test:lwc",
5757
"test:apex": "sh ./scripts/runLocalTests.sh",
5858
"test:lwc": "sfdx-lwc-jest --coverage --skipApiVersionCheck"

plugins/ExtraCodeCoverage/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Extra Code Coverage
22

3-
<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008C78yAAC">
3+
<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008OakpAAC">
44
<img alt="Deploy to Salesforce"
55
src="../../media/deploy-package-to-prod.png">
66
</a>
77

8-
<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008C78yAAC">
8+
<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008OakpAAC">
99
<img alt="Deploy to Salesforce Sandbox"
1010
src="../../media/deploy-package-to-sandbox.png">
1111
</a>

rollup-namespaced/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ For more info, see the base `README`.
1818

1919
## Deployment & Setup
2020

21-
<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008Oak6AAC">
21+
<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008Oal9AAC">
2222
<img alt="Deploy to Salesforce"
2323
src="./media/deploy-package-to-prod.png">
2424
</a>
2525

26-
<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008Oak6AAC">
26+
<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008Oal9AAC">
2727
<img alt="Deploy to Salesforce Sandbox"
2828
src="./media/deploy-package-to-sandbox.png">
2929
</a>

rollup-namespaced/sfdx-project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"[email protected]": "04t6g000008OaYwAAK",
2626
"[email protected]": "04t6g000008OaZBAA0",
2727
"[email protected]": "04t6g000008OaZaAAK",
28-
"[email protected]": "04t6g000008Oak6AAC"
28+
"[email protected]": "04t6g000008Oal9AAC"
2929
}
3030
}

rollup/core/classes/Rollup.cls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@SuppressWarnings('PMD.NcssTypeCount')
12
global without sharing virtual class Rollup implements RollupLogger.ToStringObject {
23
/**
34
* Test override / bookkeeping section. Normally I would do this through dependency injection,

rollup/core/classes/RollupAsyncProcessor.cls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@SuppressWarnings('PMD.NcssTypeCount')
12
global virtual without sharing class RollupAsyncProcessor extends Rollup implements Database.Batchable<SObject>, Database.RaisesPlatformEvents, System.Comparable {
23
private final Evaluator eval;
34
private final Op op;

rollup/core/classes/RollupCalculator.cls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@SuppressWarnings('PMD.NcssTypeCount')
12
public without sharing abstract class RollupCalculator {
23
private Boolean isCDCUpdate = false;
34
private Boolean isFirstTimeThrough = true;

0 commit comments

Comments
 (0)