Skip to content

Commit

Permalink
fix: publish scripts parking orbit
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Aug 25, 2022
1 parent 9dec873 commit 85ed582
Show file tree
Hide file tree
Showing 11 changed files with 477 additions and 339 deletions.
47 changes: 40 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,41 @@
*-debug.log
*-error.log
/.nyc_output
/dist
/lib
/package-lock.json
/tmp
# -- 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
node_modules

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

# os specific files
.DS_Store
.idea
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
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 && yarn test --forbid-only
7 changes: 7 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"require": "ts-node/register,source-map-support/register",
"watch-extensions": "ts",
"recursive": true,
"reporter": "spec",
"timeout": 5000
}
3 changes: 3 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@salesforce/dev-config/nyc"
}
12 changes: 12 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Copyright (c) 2022, Salesforce.com, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

* Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
70 changes: 39 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,36 @@
"tslib": "^2"
},
"devDependencies": {
"@salesforce/dev-config": "^2",
"@oclif/plugin-command-snapshot": "^3.1.3",
"@salesforce/dev-config": "^3.0.0",
"@salesforce/dev-scripts": "^3.1.0",
"@salesforce/prettier-config": "^0",
"@salesforce/prettier-config": "^0.0.2",
"@salesforce/ts-sinon": "^1",
"@types/chai": "^4",
"@types/mocha": "^8",
"@typescript-eslint/eslint-plugin": "^4",
"@typescript-eslint/parser": "^4",
"chai": "^4",
"eslint": "^7",
"eslint-config-prettier": "^8",
"eslint-config-salesforce": "^0",
"eslint-config-salesforce-typescript": "^0",
"eslint-plugin-header": "^3",
"eslint-plugin-import": "^2",
"eslint-plugin-jsdoc": "^35",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"chai": "^4.2.0",
"eslint": "^8.21.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-salesforce": "^1.1.0",
"eslint-config-salesforce-license": "^0.1.6",
"eslint-config-salesforce-typescript": "^1.1.1",
"eslint-plugin-header": "^3.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^39.3.6",
"eslint-plugin-typescript": "^0",
"globby": "^11",
"husky": "^4",
"mocha": "^8",
"nyc": "^15",
"husky": "^7.0.4",
"mocha": "^9.1.3",
"nyc": "^15.1.0",
"oclif": "^2.7.0",
"prettier": "^2",
"pretty-quick": "^3",
"prettier": "^2.7.1",
"pretty-quick": "^3.1.0",
"sinon": "10.0.0",
"ts-node": "^10",
"typescript": "4"
"ts-node": "^10.0.0",
"typescript": "^4.1.3"
},
"engines": {
"node": ">=12.0.0"
"node": ">=14.0.0"
},
"files": [
"/lib",
Expand All @@ -51,7 +51,7 @@
"keywords": [
"sfdx-plugin"
],
"license": "MIT",
"license": "BSD-3-Clause",
"oclif": {
"commands": "./lib/commands",
"bin": "sfdx",
Expand All @@ -66,15 +66,23 @@
},
"repository": "vmundra/testPlugin117",
"scripts": {
"build": "tsc -p .",
"lint": "eslint src/**/*.ts test/**/*.ts",
"postpack": "rm -f oclif.manifest.json",
"posttest": "eslint src/**/*.ts test/**/*.ts",
"prepack": "rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme",
"test": "nyc --extension .ts --require ts-node/register mocha --forbid-only \"test/**/*.test.ts\"",
"version": "oclif-dev readme && git add README.md"
"build": "sf-build",
"clean": "sf-clean",
"clean-all": "sf-clean all",
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
"compile": "sf-compile",
"docs": "sf-docs",
"format": "sf-format",
"lint": "sf-lint",
"postpack": "shx rm -f oclif.manifest.json",
"posttest": "yarn lint && yarn test:deprecation-policy && yarn test:command-reference",
"prepack": "sf-prepack",
"prepare": "sf-install",
"pretest": "sf-compile-test",
"test": "sf-test",
"version": "oclif readme"
},
"publishConfig": {
"access": "public"
}
}
}
25 changes: 25 additions & 0 deletions test/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) 2020, 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
*/

module.exports = {
extends: '../.eslintrc.js',
// Allow describe and it
env: { mocha: true },
rules: {
// Allow assert style expressions. i.e. expect(true).to.be.true
'no-unused-expressions': 'off',

// It is common for tests to stub out method.

// Return types are defined by the source code. Allows for quick overwrites.
'@typescript-eslint/explicit-function-return-type': 'off',
// Mocked out the methods that shouldn't do anything in the tests.
'@typescript-eslint/no-empty-function': 'off',
// Easily return a promise in a mocked method.
'@typescript-eslint/require-await': 'off',
},
};
Loading

0 comments on commit 85ed582

Please sign in to comment.