Skip to content

Commit

Permalink
feat: init release
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarvin8 committed Feb 7, 2024
0 parents commit 1c2bb16
Show file tree
Hide file tree
Showing 37 changed files with 13,427 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.cjs/
7 changes: 7 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
extends: ['eslint-config-salesforce-typescript', 'plugin:sf-plugin/recommended'],
root: true,
rules: {
header: 'off',
},
};
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build
on:
push:
branches-ignore:
- main
- beta

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4.1.1

- name: Setup Node
uses: actions/setup-node@v4.0.1
with:
node-version: 18
cache: yarn

- name: Install Dependencies
run: yarn install

- name: Build
run: yarn build

- name: Test
run: yarn test
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release
on:
push:
branches:
- main
- beta
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1

- name: Setup Node
uses: actions/setup-node@v4.0.1
with:
node-version: 18
cache: yarn

- name: Install Dependencies
run: yarn install

- name: Build
run: yarn build

- name: Test
run: yarn test

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# -- CLEAN
tmp/
# use yarn by default, so ignore npm
package-lock.json

# never checkin npm config
.npmrc

# debug logs
npm-error.log
yarn-error.log


# compile source
lib

# test artifacts
*xunit.xml
*checkstyle.xml
*unitcoverage
.nyc_output
coverage
test_session*

# generated docs
docs

# ignore sfdx-trust files
*.tgz
*.sig
package.json.bak.

# -- CLEAN ALL
*.tsbuildinfo
.eslintcache
.wireit
node_modules

# --
# put files here you don't want cleaned with sf-clean

# os specific files
.DS_Store
.idea

oclif.manifest.json

oclif.lock
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint && yarn pretty-quick --staged && yarn build
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn build
3 changes: 3 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
'**/*.{js,json,md}?(x)': () => 'npm run reformat',
};
8 changes: 8 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"require": ["ts-node/register"],
"watch-extensions": "ts",
"recursive": true,
"reporter": "spec",
"timeout": 600000,
"node-option": ["loader=ts-node/esm"]
}
7 changes: 7 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"check-coverage": true,
"lines": 75,
"statements": 75,
"functions": 75,
"branches": 75
}
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@salesforce/prettier-config"
28 changes: 28 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"branches": [
"main",
{
"name": "beta",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci] ${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
"assets": ["dist/**"]
}
]
]
}
10 changes: 10 additions & 0 deletions .sfdevrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"test": {
"testsPath": "test/**/*.test.ts"
},
"wireit": {
"test": {
"dependencies": ["test:compile", "test:only", "lint"]
}
}
}
45 changes: 45 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229,
"skipFiles": ["<node_internals>/**"]
},
{
"name": "Run All Tests",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/mocha/bin/mocha",
"args": ["--inspect", "--colors", "test/**/*.test.ts"],
"env": {
"NODE_ENV": "development",
"SFDX_ENV": "development"
},
"sourceMaps": true,
"smartStep": true,
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "Compile tests"
},
{
"type": "node",
"request": "launch",
"name": "Run Current Test",
"program": "${workspaceFolder}/node_modules/mocha/bin/mocha",
"args": ["--inspect", "--colors", "${file}"],
"env": {
"NODE_ENV": "development",
"SFDX_ENV": "development"
},
"sourceMaps": true,
"smartStep": true,
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "Compile tests"
}
]
}
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true
},
"search.exclude": {
"**/lib": true,
"**/bin": true
},
"editor.tabSize": 2,
"editor.formatOnSave": true,
"rewrap.wrappingColumn": 80
}
21 changes: 21 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"version": "2.0.0",
"problemMatcher": "$tsc",
"tasks": [
{
"label": "Compile tests",
"group": {
"kind": "build",
"isDefault": true
},
"command": "yarn",
"type": "shell",
"presentation": {
"focus": false,
"panel": "dedicated"
},
"args": ["run", "pretest"],
"isBackground": false
}
]
}
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# [1.1.0](https://github.com/mcarvin8/sfdx-decomposer-plugin/compare/v1.0.0...v1.1.0) (2024-02-02)

### Features

- import SDR for metadata types ([9b7b08a](https://github.com/mcarvin8/sfdx-decomposer-plugin/commit/9b7b08a13c22e36ea4b7a0b3f0dee50da03ff77a))

# [1.0.0](https://github.com/mcarvin8/sfdx-decomposer-plugin/compare/v0.1.1...v1.0.0) (2024-01-31)

### Features

- beta release ([808e88c](https://github.com/mcarvin8/sfdx-decomposer-plugin/commit/808e88cbb5b25cf1bdc6076286448ffd0753aa52))
- trigger new beta release with async updates ([81e6792](https://github.com/mcarvin8/sfdx-decomposer-plugin/commit/81e6792e249a54e2a701a3f73706a7ba72e68e8f))

### BREAKING CHANGES

- beta

# [1.0.0-beta.2](https://github.com/mcarvin8/sfdx-decomposer-plugin/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2024-01-31)

### Features

- trigger new beta release with async updates ([81e6792](https://github.com/mcarvin8/sfdx-decomposer-plugin/commit/81e6792e249a54e2a701a3f73706a7ba72e68e8f))

# [1.0.0-beta.1](https://github.com/mcarvin8/sfdx-decomposer-plugin/compare/v0.1.1...v1.0.0-beta.1) (2024-01-30)

### Features

- beta release ([808e88c](https://github.com/mcarvin8/sfdx-decomposer-plugin/commit/808e88cbb5b25cf1bdc6076286448ffd0753aa52))

### BREAKING CHANGES

- beta
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Apex Code Coverage Transformer

[![NPM](https://img.shields.io/npm/v/apex-code-coverage-transformer.svg?label=apex-code-coverage-transformer)](https://www.npmjs.com/package/apex-code-coverage-transformer) [![Downloads/week](https://img.shields.io/npm/dw/apex-code-coverage-transformer.svg)](https://npmjs.org/package/apex-code-coverage-transformer) [![License](https://img.shields.io/badge/License-BSD%203--Clause-brightgreen.svg)](https://raw.githubusercontent.com/salesforcecli/apex-code-coverage-transformer/main/LICENSE.txt)

The `apex-code-coverage-transformer` is a simple plugin to transform the JSON file for Apex Code Coverage into Generic Test Coverage Format (XML). This format is accepted by static code analysis tools like SonarQube.

## Install

```bash
sf plugins install apex-code-coverage-transformer@x.y.z
```

## Commands

The `apex-code-coverage-transformer` has 1 command:

- `sf apex-code-coverage transformer transform`

## `sf apex-code-coverage transformer transform`

```
USAGE
$ sf apex-code-coverage transformer transform -j <value> -x <value> -d <value> [--json]
FLAGS
-j, --json=<value> The path to the JSON file created by the Salesforce CLI for code coverage.
-m, --xml=<value> [default: coverage.xml] Output path for the XML file created by this plugin
-d, --dx-directory=<value> [default: force-app/main/default] The root directory containing your Salesforce metadata.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
This plugin will convert the JSON file created by the Salesforce CLI during Apex deployments into the Generic Test Coverage Format.
EXAMPLES
$ apex-code-coverage transformer transform -j "test.json" -x "coverage.xml" -d "force-app/main/default"
```
3 changes: 3 additions & 0 deletions bin/dev.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %*
8 changes: 8 additions & 0 deletions bin/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
// eslint-disable-next-line node/shebang
async function main() {
const { execute } = await import('@oclif/core');
await execute({ development: true, dir: import.meta.url });
}

await main();
3 changes: 3 additions & 0 deletions bin/run.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node "%~dp0\run" %*
Loading

0 comments on commit 1c2bb16

Please sign in to comment.