Skip to content

Commit c0df3d7

Browse files
authored
chore: upgrade dependencies (#107)
* build: upgrade dependencies * build: upgrade source api version * build: add localdevserver folder to gitignore * build: add new LWS eslint plugin * build: add eslint recommended rules * build: upgrade PMD version * build: update scratch org def settings * build: upgrade LWS linter version
1 parent 9d88349 commit c0df3d7

File tree

50 files changed

+1633
-1370
lines changed

Some content is hidden

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

50 files changed

+1633
-1370
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ jobs:
4848

4949
# Install PMD
5050
- name: Install PMD
51-
run: wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F6.22.0/pmd-bin-6.22.0.zip && unzip pmd-bin-6.22.0.zip
51+
run: wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F6.45.0/pmd-bin-6.45.0.zip && unzip pmd-bin-6.45.0.zip
5252

5353
# Execute PMD
5454
- name: Execute PMD
55-
run: pmd-bin-6.22.0/bin/run.sh pmd -minimumpriority 2 -d force-app -R apex-ruleset.xml -f text -l apex
55+
run: pmd-bin-6.45.0/bin/run.sh pmd --minimum-priority 2 -d force-app -R apex-ruleset.xml -f text -l apex
5656

5757
scratch-org-test:
5858
runs-on: ubuntu-latest

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,7 @@ tests/
9393
_site/
9494

9595
# direnv
96-
.envrc
96+
.envrc
97+
98+
# SFDX Local Development Server
99+
.localdevserver/

apex-ruleset.xml

+7-7
Original file line numberDiff line numberDiff line change
@@ -257,20 +257,20 @@
257257

258258
<!-- Performance -->
259259
<rule
260-
ref="category/apex/performance.xml/AvoidDmlStatementsInLoops"
261-
message="Avoid DML Statements inside loops"
260+
ref="category/apex/performance.xml/AvoidDebugStatements"
261+
message="Avoid debug statements"
262262
>
263263
<priority>1</priority>
264264
</rule>
265265
<rule
266-
ref="category/apex/performance.xml/AvoidSoqlInLoops"
267-
message="Avoid Soql queries inside loops"
266+
ref="category/apex/performance.xml/EagerlyLoadedDescribeSObjectResult"
267+
message="DescribeSObjectResult could have been loaded eagerly via SObjectType.getDescribe()"
268268
>
269-
<priority>1</priority>
269+
<priority>4</priority>
270270
</rule>
271271
<rule
272-
ref="category/apex/performance.xml/AvoidSoslInLoops"
273-
message="Avoid Sosl queries inside loops"
272+
ref="category/apex/performance.xml/OperationWithLimitsInLoop"
273+
message="Avoid operations with limits inside loops"
274274
>
275275
<priority>1</priority>
276276
</rule>

config/project-scratch-def.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"language": "en_US",
55
"features": ["Communities"],
66
"settings": {
7-
"orgPreferenceSettings": {
8-
"networksEnabled": true
7+
"communitiesSettings": {
8+
"enableNetworksEnabled": true
99
}
1010
}
1111
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>
+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"extends": ["@salesforce/eslint-config-lwc/recommended"]
2+
"extends": [
3+
"eslint:recommended",
4+
"@salesforce/eslint-config-lwc/recommended",
5+
"@locker/eslint-config-locker/recommended"
6+
]
37
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>

force-app/main/default/lwc/chartBuilder/chartBuilder.js-meta.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns="http://soap.sforce.com/2006/04/metadata"
44
fqn="timeline"
55
>
6-
<apiVersion>51.0</apiVersion>
6+
<apiVersion>54.0</apiVersion>
77
<isExposed>true</isExposed>
88
<masterLabel>LWCC App Builder</masterLabel>
99
<description
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>false</isExposed>
55
</LightningComponentBundle>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<status>Active</status>
55
</ApexClass>
+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"extends": ["@salesforce/eslint-config-lwc/recommended"]
2+
"extends": [
3+
"eslint:recommended",
4+
"@salesforce/eslint-config-lwc/recommended",
5+
"@locker/eslint-config-locker/recommended"
6+
]
37
}

force-app/sample/default/lwc/sampleApp/__tests__/sampleApp.test.js

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ describe('c-sample-app-item', () => {
1515
return Promise.resolve()
1616
.then(() => {
1717
const buttons = [
18+
// eslint-disable-next-line @locker/locker/distorted-element-shadow-root-getter
1819
...element.shadowRoot.querySelectorAll(
1920
'button.slds-button.slds-button_neutral'
2021
)
@@ -25,6 +26,7 @@ describe('c-sample-app-item', () => {
2526
.then(() => {
2627
// Verify that property is correctly incremented.
2728
expect(
29+
// eslint-disable-next-line @locker/locker/distorted-element-shadow-root-getter
2830
element.shadowRoot.querySelector('c-sample-app-item')
2931
).not.toBeNull();
3032
});

force-app/sample/default/lwc/sampleApp/sampleApp.js-meta.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3-
<apiVersion>51.0</apiVersion>
3+
<apiVersion>54.0</apiVersion>
44
<isExposed>true</isExposed>
55
<masterLabel>LWCC Chart Samples</masterLabel>
66
<description>See different examples of charts using LWCC</description>

force-app/sample/default/lwc/sampleAppItem/__tests__/sampleAppItem.test.js

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ describe('c-sample-app-item', () => {
99
});
1010
document.body.appendChild(element);
1111

12+
// eslint-disable-next-line @locker/locker/distorted-element-shadow-root-getter
1213
const openModal = element.shadowRoot.querySelector(
1314
'p.slds-card__footer-action.slds-text-link'
1415
);
@@ -19,15 +20,18 @@ describe('c-sample-app-item', () => {
1920
return Promise.resolve()
2021
.then(() => {
2122
// Verify that property is correctly incremented.
23+
// eslint-disable-next-line @locker/locker/distorted-element-shadow-root-getter
2224
expect(element.shadowRoot.querySelector('section')).not.toBeNull();
2325

26+
// eslint-disable-next-line @locker/locker/distorted-element-shadow-root-getter
2427
const closeModal = element.shadowRoot.querySelector(
2528
'button.slds-button.slds-button_neutral'
2629
);
2730
closeModal.click();
2831
})
2932
.then(() => {
3033
// Verify that property is correctly incremented.
34+
// eslint-disable-next-line @locker/locker/distorted-element-shadow-root-getter
3135
expect(element.shadowRoot.querySelector('section')).toBeNull();
3236
});
3337
});

0 commit comments

Comments
 (0)