Skip to content

Commit

Permalink
feat: release v4.3.0 (VF Remoting, Queues) (#105)
Browse files Browse the repository at this point in the history
* lightning lookup w/o API v1

* dependabot auto-merge

* Deploy rules & scripts

* API 56.0

* Tests use Assert class

* Update scratch org definition files

* feat: Update tests to use Assert class

* chore: Scratch org shape updates

* feat: Project to API 56.0

* feat(docs): ApexDox version upgrade

* fix(docs): update ApexDox

* fix(build): Update plugin dependencies

* fix(tests): redirect test to private

* build(npm): update package dependencies

* build(pmd): remove updatepmd

* build(sfdx): change sfdx to sf commands

* ci: update PR sfdx to sf, npm installation

* ci(codeQL): delete codeQL d/t IP address

* feat: update API to 57.0 (#1)

* ci(prettier): stop using local server
* build(dependabot): include scope in updates
* ci(sfdx): install sf executable
* build: update recommended extensions

* feat(tests): update tests (assertions, messages) (#3)

* fix(docs): typo in variable description

* build(pmd): add patterns to deploy rules

* test: use Assert class, add messages

* docs(README): add custom object test coverage

* ci(codecov): add token to upload

* build: move tests folder into classes

* build(deps-dev): bump eslint from 8.34.0 to 8.35.0 (#4)

Bumps [eslint](https://github.com/eslint/eslint) from 8.34.0 to 8.35.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.34.0...v8.35.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(changelog): instructions & tag prefix

* feat: sfdx-scanner config

* build(sfdx): revert to sfdx package version create

* revert(API): use 56.0 to avoid GVS bug

chore: create version 4.3.0-9

* docs(README): add image descriptions

* docs(ApexDox): include Installation & Changelog

* docs: update CanTheUser comments

* APTemplate lookup actions

* build(sfdx): optimize forceignore

* fix: redirect on template choice for records

* feat(scripts): update latest jQuery

* fix: page redirect on template from object

* escape queries

* Beta 4.3.0-9

* comment cleanup

* change URL match regex

* docs(Apex): test comments

* build(pmd): update rulesets

* feat: finish Professional Edition template lookup

* fix: remove unnecessary static resource images

* docs(ApexDox): rerun ApexDox

* build(pkg): remove redundancy in version create

* build(pkg): sfdx to sf version create

* version 4.3.0-11

* build(deps-dev): bump eslint from 8.35.0 to 8.36.0 (#6)

Bumps [eslint](https://github.com/eslint/eslint) from 8.35.0 to 8.36.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.35.0...v8.36.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump lint-staged from 13.1.2 to 13.2.0 (#7)

Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.1.2 to 13.2.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](lint-staged/lint-staged@v13.1.2...v13.2.0)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(sfdx): update sfdx to sf

* fix(sfdx): remove sequential packaging

* feat: update auto-changelog config

* fix: remove unnecessary jsencode

* fix(sfdx): sf apex test correct config

* docs: cleanup code, document variables

* build(sfdx-scanner): attempt eslint ignore jquery

* deps(prettier): ignore sf directory

* fix: cyclic dependency error display

* fix(lookup): escape=false for record name

* chore: promote package 4.3.0

* build(changelog): update changelog script

* docs(ApexDox): update ApexDox

* fix: update install CLI code

* fix: sfdx auth:sfdxurl to sf equivalent

* fix(ci): install sfdx and sf CLIs

* fix: sfdx auth:sfdxurl to sf equivalent

* fix(ci): install sfdx and sf CLIs

* remove extra space in installation.md

* ci(pmd): simplify PMD download

Skip storing version in file - use variable only

* fix(pmd, prettier): remove deprecated commands

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dschach and dependabot[bot] authored Mar 20, 2023
1 parent c4e143b commit fce42cd
Show file tree
Hide file tree
Showing 213 changed files with 8,528 additions and 4,796 deletions.
4 changes: 2 additions & 2 deletions .auto-changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": true,
"commitLimit": 0,
"commitLimit": 40,
"hideCredit": true,
"tagPrefix": ""
"tagPrefix": "v"
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@
**/aura/**/*.tokens
**/aura/**/*.xml
**/aura/**/*.app
**/ActionPlan_Resources/js
.sfdx
.sf
1 change: 1 addition & 0 deletions .forceignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ TaskPriority.standardValueSet
TaskType.standardValueSet
Lead-Lead Layout.layout
Account-Account Layout.layout
Opportunity-Opportunity Layout.layout-meta.xml
Global-Global Layout.layout
Account.object
Campaign.object
Expand Down
22 changes: 2 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,10 @@ jobs:
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm ci

# Start local Apex parser server for Prettier
- name: 'Start local Apex parser server for Prettier'
run: npm run apex:local:start &

# Wait for Apex parser server startup
- name: 'Wait for Apex parser server startup'
run: timeout 30 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' 127.0.0.1 2117

# Prettier formatting
- name: 'Code formatting verification with Prettier'
run: npm run prettier:verify:apex:local
run: npm run prettier:verify

# Stop local Apex parser server for Prettier
- name: 'Stop local Apex parser server for Prettier'
if: always()
run: npm run apex:local:stop
pmd-analysis:
runs-on: ubuntu-latest
needs: format-lint
Expand All @@ -66,16 +54,10 @@ jobs:
- name: 'Checkout source code'
uses: actions/checkout@v3

- name: 'Use latest PMD version'
run: |
VERSION=$(curl -s https://api.github.com/repos/pmd/pmd/releases/latest | grep '.tag_name' | sed 's:.*/::' | sed 's:",::')
echo $VERSION
echo -n $VERSION > pmd/pmd-version.txt
# Install PMD
- name: 'Install PMD'
run: |
PMD_VERSION=`cat pmd/pmd-version.txt`
PMD_VERSION=$(curl -s https://api.github.com/repos/pmd/pmd/releases/latest | grep '.tag_name' | sed 's:.*/::' | sed 's:",::')
wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F$PMD_VERSION/pmd-bin-$PMD_VERSION.zip
unzip pmd-bin-$PMD_VERSION.zip -d ~
mv ~/pmd-bin-$PMD_VERSION ~/pmd
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/dependabot-approve-and-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Dependabot Pull Request Approve and Merge
on: pull_request_target
permissions:
pull-requests: write
contents: write
jobs:
# Auto merge Dependabot PRs for:
# - patch updates on prod dependencies
# - minor updates on dev dependencies
dependabot-auto-merge:
# Only run for Dependabot PRs
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: "Fetch Dependabot metadata"
id: dependabot
uses: dependabot/fetch-metadata@v1

- name: "Check auto merge conditions"
id: auto-merge
if: |
(
steps.dependabot.outputs.update-type == 'version-update:semver-patch' &&
contains('direct:production,indirect:production', steps.dependabot.outputs.dependency-type)
) || (
contains('version-update:semver-minor,version-update:semver-patch', steps.dependabot.outputs.update-type) &&
contains('direct:development,indirect:development', steps.dependabot.outputs.dependency-type)
)
run: echo "::notice ::auto-merge conditions satisfied"

- name: "Approve and merge PR"
if: ${{ steps.auto-merge.conclusion == 'success' }}
run: |
gh pr review --approve "$PR_URL"
gh pr merge --auto --squash "$PR_URL"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
91 changes: 0 additions & 91 deletions .github/workflows/packaging.yml

This file was deleted.

47 changes: 27 additions & 20 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ on:
- 'config/**'
- 'data/**'
workflow_dispatch:
push:

concurrency:
group: pr-tests-${{ github.ref }}-1
cancel-in-progress: true

# Jobs to be executed
jobs:
check-pmd:
Expand All @@ -21,16 +25,10 @@ jobs:
- name: 'Checkout source code'
uses: actions/checkout@v3

- name: 'Use latest PMD version'
run: |
VERSION=$(curl -s https://api.github.com/repos/pmd/pmd/releases/latest | grep '.tag_name' | sed 's:.*/::' | sed 's:",::')
echo $VERSION
echo -n $VERSION > pmd/pmd-version.txt
# Install PMD
- name: 'Install PMD'
run: |
PMD_VERSION=`cat pmd/pmd-version.txt`
PMD_VERSION=$(curl -s https://api.github.com/repos/pmd/pmd/releases/latest | grep '.tag_name' | sed 's:.*/::' | sed 's:",::')
wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F$PMD_VERSION/pmd-bin-$PMD_VERSION.zip
unzip pmd-bin-$PMD_VERSION.zip -d ~
mv ~/pmd-bin-$PMD_VERSION ~/pmd
Expand All @@ -48,13 +46,17 @@ jobs:
uses: actions/checkout@v3

# Install Salesforce CLI
- name: 'Install Salesforce CLI'
- name: 'Install Salesforce sfdx CLI'
run: |
npm install sfdx-cli --location=global
nodeInstallPath=$(npm config get prefix)
echo "$nodeInstallPath/bin" >> $GITHUB_PATH
sfdx --version
- name: 'Install Salesforce sf CLI'
run: |
wget https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable/sfdx-linux-x64.tar.xz
mkdir ~/sfdx
tar xJf sfdx-linux-x64.tar.xz -C ~/sfdx --strip-components 1
echo "$HOME/sfdx/bin" >> $GITHUB_PATH
~/sfdx/bin/sfdx version
npm install @salesforce/cli --global
sf --version
# Store secret for dev hub
- name: 'Populate auth file with DEVHUB_SFDX_URL secret'
Expand All @@ -69,7 +71,7 @@ jobs:
# Authenticate dev hub
- name: 'Authenticate Dev Hub'
run: sfdx auth:sfdxurl:store -f ./DEVHUB_SFDX_URL.txt -a devhub -d
run: sf org login sfdx-url --sfdx-url-file ./DEVHUB_SFDX_URL.txt --alias devhub --set-default-dev-hub

# Add namespace to project config
- name: Add namespace to project config
Expand All @@ -78,30 +80,35 @@ jobs:
# Create scratch org
- name: 'Create scratch org'
run: sfdx force:org:create -f config/project-scratch-def.json -a ActionPlans -s -d 1 -w 20 --noancestors
#run: sfdx force:org:create -f config/project-scratch-def.json -a ActionPlans -s -d 1 -w 20 --no-ancestors
run: sf org create scratch --definition-file config/project-scratch-def.json --alias ActionPlans --set-default --no-ancestors --duration-days 1 --wait 20 --target-dev-hub devhub

# Deploy source to scratch org
- name: 'Push source to scratch org'
run: sfdx force:source:push
#run: sfdx force:source:push
run: sf deploy metadata --target-org ActionPlans

# Assign permissionset
- name: 'Assign permissionset to default user'
run: sfdx force:user:permset:assign -n Action_Plans_Admin
#run: sfdx force:user:permset:assign -n Action_Plans_Admin
run: sf org assign permset --name Action_Plans_Admin --target-org ActionPlans

# Run Apex tests in scratch org
- name: 'Run Apex tests'
run: sfdx force:apex:test:run --codecoverage --resultformat human -l RunLocalTests --wait 20 --outputdir ./
#run: sfdx force:apex:test:run --codecoverage --detailedcoverage --resultformat human -l RunLocalTests --wait 20 --outputdir ./
run: sf apex run test --code-coverage --detailed-coverage --result-format human --wait 20 --test-level RunLocalTests --output-dir ./

# Upload code coverage to Codecov.io
- name: 'Upload code coverage for Apex to Codecov.io'
uses: codecov/codecov-action@v3
with:
flags: Apex
token: ${{ secrets.CODECOV_TOKEN }}

# Housekeeping
- name: 'Delete scratch org'
if: always()
run: sfdx force:org:delete --noprompt -u ActionPlans
run: sf org delete scratch --no-prompt --target-org ActionPlans

# Remove namespace from project config
- name: Remove namespace from project config
Expand Down
13 changes: 3 additions & 10 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

VERSION=$(curl -s https://api.github.com/repos/pmd/pmd/releases/latest | grep '.tag_name' | sed 's:.*/::' | sed 's:",::')
echo $VERSION

printf '%s' "$VERSION" > pmd/pmd-version.txt
git add pmd/pmd-version.txt

npm run updateHighlight
npx lint-staged
npm run precommit
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

.localdevserver
.sfdx
.sf
.vscode/settings.json

data/
Expand Down
20 changes: 20 additions & 0 deletions .sfdx-scanner/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"engines": [
{
"name": "eslint",
"targetPatterns": ["**/*.js", "!**/lwc/**/*.js", "!**/node_modules/**", "!**/bower_components/**", "!**/jquery*.js"],
"disabled": false
},
{
"name": "eslint-lwc",
"targetPatterns": ["**/lwc/**/*.js", "!**/node_modules/**"],
"disabled": true
},
{
"name": "CPD",
"targetPatterns": ["**/*.cls", "**/*.trigger", "**/*.java", "**/*.page", "**/*.component", "**/*.xml", "!**/node_modules/**", "!**/*-meta.xml"],
"disabled": true,
"minimumTokens": "100"
}
]
}
25 changes: 12 additions & 13 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"recommendations": [
"salesforce.salesforcedx-vscode",
"redhat.vscode-xml",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"financialforce.lana",
"peterweinberg.apexdox-vs-code",
"chuckjonas.apex-pmd",
"eg2.vscode-npm-script",
"matteopieroni.refresh-npm-packages",
"subc4i.sublime-mavensmate-monokai-apex",
"PKief.material-icon-theme"
]
"recommendations": [
"chuckjonas.apex-pmd",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"financialforce.lana",
"matteopieroni.refresh-npm-packages",
"peterweinberg.apexdox-vs-code",
"pkief.material-icon-theme",
"redhat.vscode-xml",
"salesforce.salesforcedx-vscode",
"subc4i.sublime-mavensmate-monokai-apex"
]
}
Loading

0 comments on commit fce42cd

Please sign in to comment.