Skip to content

Commit

Permalink
Merge pull request #112 from forcedotcom/release-1.0.0
Browse files Browse the repository at this point in the history
RELEASE: @W-16095971@: Conducting v1.0.0 release
  • Loading branch information
jfeingold35 committed Jul 30, 2024
2 parents 0401d9f + f521c72 commit 4ed5252
Show file tree
Hide file tree
Showing 19 changed files with 1,057 additions and 447 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"out",
"dist",
"**/*.d.ts",
"src/test"
"src/test",
"esbuild.js"
]
}
36 changes: 26 additions & 10 deletions .github/workflows/create-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:
with:
node-version: 'lts/*' # Always use Node LTS for building dependencies.
- run: yarn
# Increment the version as desired.
- name: Increment version
# Increment the version as desired locally, without actually committing anything.
- name: Locally increment version
run: |
# A workflow dispatch event lets the user specify what release type they want.
if [[ "${{ github.event_name }}" = "workflow_dispatch" ]]; then
Expand All @@ -73,16 +73,17 @@ jobs:
fi
# Increment the version as needed
npm --no-git-tag-version version $RELEASE_TYPE
# Create the new branch as a direct copy of `dev` and push it to GitHub so the API can
# interact with it later.
- id: create-branch
# The branch protection rule for `release-x.y.z` branches prevents pushing commits directly. To work around this,
# we create an interim branch that we _can_ push commits to, and we'll do our version bookkeeping in that branch
# instead.
- id: create-interim-branch
run: |
NEW_VERSION=$(jq -r ".version" package.json)
git checkout -b release-$NEW_VERSION
# Push the branch immediately without committing anything.
git push --set-upstream origin release-$NEW_VERSION
# Output the branch name so we can use it in later jobs.
echo "branch_name=release-$NEW_VERSION" >> "$GITHUB_OUTPUT"
INTERIM_BRANCH_NAME=${NEW_VERSION}-interim
# Create and check out the interim branch.
git checkout -b $INTERIM_BRANCH_NAME
# Immediately push the interim branch with no changes, so GraphQL can push to it later.
git push --set-upstream origin $INTERIM_BRANCH_NAME
# Update our dependencies
- run: yarn upgrade
# Use the GraphQL API to create a signed commmit with our changes.
Expand Down Expand Up @@ -125,6 +126,21 @@ jobs:
}
}
}'
# Now that we've done our bookkeeping commits on the interim branch, use it as the base for the real release branch.
- name: Create release branch
id: create-branch
run: |
# The commit happened on the remote end, not ours, so we need to clean the directory and pull.
git checkout -- .
git pull
# Now we can create the actual release branch.
NEW_VERSION=$(jq -r ".version" package.json)
git checkout -b release-$NEW_VERSION
git push --set-upstream origin release-$NEW_VERSION
# Now that we're done with the interim branch, delete it.
git push -d origin ${NEW_VERSION}-interim
# Output the release branch name so we can use it in later jobs.
echo "branch_name=release-$NEW_VERSION" >> "$GITHUB_OUTPUT"
# Build the scanner tarball so it can be installed locally when we run tests.
build-scanner-tarball:
name: 'Build scanner tarball'
Expand Down
11 changes: 11 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@
src/**
.gitignore
.yarnrc
.sfdx
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
CODEOWNERS
code-fixtures/**
coverage/**
github-actions/**
templates/**
.git2gus/**
.github/**
!out/extension.js
out/**
node_modules/
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Change Log - Salesforce Code Analyzer VS Code Extension (Beta)
# Change Log - Salesforce Code Analyzer VS Code Extension

To see a list of changes each month for the Salesforce Code Analyzer VS Code Extension (Beta), visit our [Salesforce Code Analyzer Release Notes](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/release-notes.md) page.
To see a list of changes each month for the Salesforce Code Analyzer VS Code Extension, visit our [Salesforce Code Analyzer Release Notes](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/release-notes.md) page.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Salesforce Code Analyzer Extension for Visual Studio Code (Beta)
# Salesforce Code Analyzer Extension for Visual Studio Code
Scan your code against multiple rule engines to produce lists of violations and improve your code.

The Salesforce Code Analyzer Extension (beta) enables Visual Studio (VS) Code to use Salesforce Code Analyzer to interact with your code.
The Salesforce Code Analyzer Extension enables Visual Studio (VS) Code to use Salesforce Code Analyzer to interact with your code.

# Documentation
For documentation, visit the [Salesforce Code Analyzer VS Code Extension](https://forcedotcom.github.io/sfdx-scanner/en/v3.x/code-analyzer-vs-code-extension/) documentation.
For documentation, visit the [Salesforce Code Analyzer VS Code Extension](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/code-analyzer-vs-code-extension.html) documentation.

# Bugs and Feedback
To report issues with the Salesforce Code Analyzer VS Code Extension, create a [bug on Github](https://github.com/forcedotcom/sfdx-code-analyzer-vscode/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=%5BBUG%5D). To suggest a feature enhancement, create a [request on Github](https://github.com/forcedotcom/sfdx-code-analyzer-vscode/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=%5BFeature+Request%5D).
Expand All @@ -22,11 +22,11 @@ Currently, Visual Studio Code extensions aren't signed or verified on the Micros

---

**Terms of Use for the Code Analyzer VS Code Extension (Beta)**
**Terms of Use for the Code Analyzer VS Code Extension**

Copyright 2023 Salesforce, Inc. All rights reserved.

These Terms of Use govern the download, installation, and/or use of the beta Code Analyzer VS Code Extension provided by Salesforce, Inc. (“Salesforce”) (the “Extension”).
These Terms of Use govern the download, installation, and/or use of the Code Analyzer VS Code Extension provided by Salesforce, Inc. (“Salesforce”) (the “Extension”).

**License**: Salesforce grants you a non-transferable, non-sublicensable, non-exclusive license to use the Extension, at no charge, subject to these Terms. Salesforce reserves all rights, title, and interest in and to the Extension.

Expand Down
2 changes: 1 addition & 1 deletion SHA256.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ make sure that their SHA values match the values in the list below.
shasum -a 256 <location_of_the_downloaded_file>

3. Confirm that the SHA in your output matches the value in this list of SHAs.
e34c5dd98fb29b52c2f02d04905f9f3c158700c36f0254be366038ec842271af ./extensions/sfdx-code-analyzer-vscode-0.6.0.vsix
7ddd2068fbe9a58bbb8fdf81f80964bd645e7a3112aaace72b3da1ca3dad05f5 ./extensions/sfdx-code-analyzer-vscode-0.7.0.vsix
4. Change the filename extension for the file that you downloaded from .zip to
.vsix.

Expand Down
31 changes: 31 additions & 0 deletions esbuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Copyright (c) 2023, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
**/
/* eslint-disable @typescript-eslint/no-var-requires */
const { build } = require('esbuild');

const production = process.argv.includes('--production');

/**
* TODO: We have entryPoints and outfile to be the same since runTests looks for the extension's main to be at
* 'out/' as defined in package.json.We should refactor the tests not to rely on package.json and until then,
* the entryPoints and outfile will be the same with allowOverwrite set ti true.
*/
build({
entryPoints: ['out/extension.js'],
bundle: true,
platform: 'node',
target: 'es2020',
outfile: 'out/extension.js',
format: 'cjs',
external: ['vscode'],
sourcemap: !production,
minify: production,
allowOverwrite: true
}).catch((e) => {
console.error(e);
NodeJS.process.exit(1);
});
41 changes: 33 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"color": "#ECECEC",
"theme": "light"
},
"version": "0.7.0",
"version": "1.0.0",
"publisher": "salesforce",
"license": "BSD-3-Clause",
"engines": {
"vscode": "^1.74.0"
"vscode": "^1.82.0"
},
"categories": [
"Programming Languages",
Expand Down Expand Up @@ -52,6 +52,7 @@
"@vscode/test-electron": "^2.2.0",
"@vscode/vsce": "^2.20.0",
"chai": "^4.3.7",
"esbuild": "^0.23.0",
"eslint": "^8.28.0",
"mocha": "^10.1.0",
"nyc": "^15.1.0",
Expand All @@ -60,8 +61,12 @@
"ts-node": "^10.9.1",
"typescript": "^4.9.3"
},
"extensionDependencies": [
"salesforce.salesforcedx-vscode-core"
],
"scripts": {
"vscode:prepublish": "yarn run compile",
"vscode:prepublish": "yarn run compile && node esbuild.js --production",
"build": "node esbuild.js",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "yarn run compile && yarn run lint",
Expand All @@ -76,23 +81,31 @@
"commands": [
{
"command": "sfca.runOnActiveFile",
"title": "SFDX: Scan current file with Code Analyzer"
"title": "SFDX: Scan Current File with Code Analyzer"
},
{
"command": "sfca.runOnSelected",
"title": "SFDX: Scan selected files or folders with Code Analyzer"
"title": "SFDX: Scan Selected Files or Folders with Code Analyzer"
},
{
"command": "sfca.runDfaOnSelectedMethod",
"title": "SFDX: Scan selected method with Graph Engine path-based analysis"
"title": "SFDX: Scan Selected Method with Graph Engine Path-Based Analysis"
},
{
"command": "sfca.removeDiagnosticsOnActiveFile",
"title": "SFDX: Clear Code Analyzer violations from current file"
"title": "SFDX: Clear Code Analyzer Violations from Current File"
},
{
"command": "sfca.removeDiagnosticsOnSelectedFile",
"title": "SFDX: Clear Code Analyzer violations from selected files or folders"
"title": "SFDX: Clear Code Analyzer Violations from Selected Files or Folders"
},
{
"command": "sfca.runDfa",
"title": "***SFDX: Run Graph-Engine Based Analysis***"
},
{
"command": "sfca.runApexGuruAnalysisOnSelectedFile",
"title": "***SFDX: Run Apex Guru Analysis***"
}
],
"configuration": {
Expand Down Expand Up @@ -162,13 +175,21 @@
"command": "sfca.runDfaOnSelectedMethod",
"when": "false"
},
{
"command": "sfca.runDfa",
"when": "false"
},
{
"command": "sfca.removeDiagnosticsOnActiveFile",
"when": "true"
},
{
"command": "sfca.removeDiagnosticsOnSelectedFile",
"when": "false"
},
{
"command": "sfca.runApexGuruAnalysisOnSelectedFile",
"when": "false"
}
],
"editor/context": [
Expand All @@ -189,6 +210,10 @@
{
"command": "sfca.removeDiagnosticsOnSelectedFile",
"when": "true"
},
{
"command": "sfca.runApexGuruAnalysisOnSelectedFile",
"when": "sfca.apexGuruEnabled"
}
]
},
Expand Down
Loading

0 comments on commit 4ed5252

Please sign in to comment.