Skip to content

Commit

Permalink
Refactor build configuration (#166)
Browse files Browse the repository at this point in the history
* chore(release): prepare next release

* npm: bump @actions/github from 3.0.0 to 4.0.0

Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 3.0.0 to 4.0.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/master/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump @typescript-eslint/eslint-plugin from 3.4.0 to 3.5.0

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.5.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump @typescript-eslint/parser from 3.4.0 to 3.5.0

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.5.0/packages/parser)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump typescript from 3.9.5 to 3.9.6

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.5 to 3.9.6.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump eslint from 7.3.1 to 7.4.0

Bumps [eslint](https://github.com/eslint/eslint) from 7.3.1 to 7.4.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v7.3.1...v7.4.0)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump eslint-plugin-jest from 23.17.1 to 23.18.0

Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 23.17.1 to 23.18.0.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md)
- [Commits](jest-community/eslint-plugin-jest@v23.17.1...v23.18.0)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump @typescript-eslint/parser from 3.5.0 to 3.6.0

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.6.0/packages/parser)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump @types/jest from 26.0.3 to 26.0.4

Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.3 to 26.0.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump @typescript-eslint/eslint-plugin from 3.5.0 to 3.6.0

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.6.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump @typescript-eslint/eslint-plugin from 3.6.0 to 3.6.1

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 3.6.0 to 3.6.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.6.1/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump @typescript-eslint/parser from 3.6.0 to 3.6.1

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 3.6.0 to 3.6.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.6.1/packages/parser)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump ts-jest from 26.1.1 to 26.1.3

Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.1.1 to 26.1.3.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](kulshekhar/ts-jest@v26.1.1...v26.1.3)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump @octokit/rest from 18.0.0 to 18.0.1

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.0.0 to 18.0.1.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](octokit/rest.js@v18.0.0...v18.0.1)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump typescript from 3.9.6 to 3.9.7

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.6 to 3.9.7.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v3.9.6...v3.9.7)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump @types/jest from 26.0.4 to 26.0.5

Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.4 to 26.0.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump eslint-plugin-unicorn from 20.1.0 to 21.0.0

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 20.1.0 to 21.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](sindresorhus/eslint-plugin-unicorn@v20.1.0...v21.0.0)

Signed-off-by: dependabot[bot] <[email protected]>

* npm: bump eslint from 7.4.0 to 7.5.0

Bumps [eslint](https://github.com/eslint/eslint) from 7.4.0 to 7.5.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v7.4.0...v7.5.0)

Signed-off-by: dependabot[bot] <[email protected]>

* chore(quality): add codacy and codeclimate

* refactor(vscode): refactor vscode config

* refactor(build): refactor GitHub CI

* refactor(docs): refactor docs

* refactor(test): move test utils

* docs(SECURITY): update

* refactor(eslint): fix complexity issue

* chore(docs): update docs

* chore(dependencies): update dependencie

* chore(buildf): add build path

* chore(release): 0.0.10 release

* docs(changelog): update changelog

* chore(dependencies): update dev dependencies

* chore(dependencies): update dev dependencies

* chore(dependencies): update dependnencies

* chore(dependencies): update dev dependencies

* chore(release): bump version

* chore(CHANGELOG): update changelog

* chore(release): bump version

* chore(dependencies): update dependencies

* chore(dist): update dist

* chore(codequality): renamed variable

* chore(codequality): renamed variable, find to some

* chore(docs): update README

* chore(docs): update SECURITY

* chore(docs): update CHANGELOG

* build(dependencies): ➕ introduces conventional commit

Updates husky and lint-stage dependencies and introduces conventional commit.

* chore(dependencies): ⬆️ updates jest dependencies

* chore(dependencies): ⬆️ updates ncc dependency

Replaces @zeit/ncc with @vercel/ncc.

* build(dependencies): ➖ removes jest typing

* chore(dependencies): ⬆️ updates eslint dependencies

Updates eslint related configurations

* build(dependencies): ➖ removes ts-code dependency

* chore(dependencies): ⬆️ updates typescript dependency

* chore(dependencies): ⬆️ updates @actions/core dependency

* refactor: 🔨 refactors build scripts

* fix(action): 🐛 fixes action

Adds type to error

* docs(docs): 📝 updates documentation

* ci(workflows): 👷 updates GitHub workflows

* build(action): ⬆️ uses node16 for action

* build(action): 🚨 configure method complexity for codeclimate

* docs(docs): 📝 updates codeclimate related documentation

* build(vscode): ➕ adds vscode extensions

Removes brackets extension

* chore(action): 📦 updates action package

* ci(workflows): 🐛 fixes GitHub workflows

* chore(dependencies): ⬆️ updates @octokit/rest dependency

* chore: 🔖 bumps version

* chore(dependencies): ⬆️ updates @actions/github dependency

* docs: 📝 updates changelog

* build: 🧑‍💻 adds pre-push hook

Runs checks on push.

* build: 🐛 fix codeclimate check to run as pre commit hook

* chore: 🔖 prepares next release

Prepares 0.0.14 release.

* chore(docs): 📝 update license

* build(dev dependencies): ⬆️ update dev dependencies

* build(dependencies): 🔧 refactor build configuration

Removes Codacy integration, adds markdownlint an remark.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
gregoranders and dependabot[bot] authored Feb 25, 2022
1 parent 74db0b2 commit 5381730
Show file tree
Hide file tree
Showing 34 changed files with 845 additions and 156 deletions.
24 changes: 0 additions & 24 deletions .codacy.yml

This file was deleted.

31 changes: 18 additions & 13 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
version: '2'
checks:
method-complexity:
config:
threshold: 7
plugins:
duplication:
enabled: true
editorconfig:
enabled: true
tslint:
enabled: false
eslint:
enabled: true
channel: "eslint-7"
config:
config: .eslintrc-cc.json
extensions:
- .ts
- .js
- .mjs
fixme:
enabled: true
git-legal:
enabled: true
checks:
method-complexity:
config:
threshold: 8
markdownlint:
enabled: true
structure:
enabled: true
exclude_patterns:
- '**/.github'
- '**/.circleci'
- '**/.husky'
- '**/.vscode'
- '**/fixtures'
- '**/dist'
- '**/temp'
- '**/test'
- '**/docs'
- '**/node_modules/'
- '**/fixtures'
- '**/.husky'
- '**/commitlint.config.js'
- '**/node_modules'
51 changes: 51 additions & 0 deletions .conventionalCommit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"types": {
"build": {
"description": "Changes which affect CI configuration files and scripts"
},
"chore": {
"description": "Changes which aren't user-facing"
},
"enh": {
"description": "Changes which improve a feature"
},
"docs": {
"description": "Changes which affect documentation"
},
"feat": {
"description": "Changes which introduce a new feature"
},
"fix": {
"description": "Changes which patch a bug"
},
"perf": {
"description": "Changes which improve performance."
},
"refactor": {
"description": "Changes which neither fix a bug nor add a feature"
},
"revert": {
"description": "Changes which revert a previous commit"
},
"style": {
"description": "Changes which don't affect code logic, such as white-spaces, formatting, missing semi-colons"
},
"test": {
"description": "Changes which add missing tests or correct existing tests"
}
},
"scopes": {
"codeclimate": {
"description": "Changes which affect Code Climate integration"
},
"github": {
"description": "Changes which affect GitHub integration"
},
"release": {
"description": "Changes which affect a release"
},
"vscode": {
"description": "Changes which affect VisualStudio Code integration"
}
}
}
11 changes: 11 additions & 0 deletions .dictionary
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CLI
conventional-changelog-cli
defaultProps
displayName
gregoranders
localhost
npm
markdownlint
propTypes
sexualized
socio-economic
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
docs/
CODE_OF_CONDUCT.md
README.md
SECURITY.md
CHANGELOG.md
LICENSE
commitlint.config.js
6 changes: 4 additions & 2 deletions .eslintrc-cc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["prettier", "jest", "unicorn", "@typescript-eslint"],
"plugins": ["prettier", "jest", "@typescript-eslint"],
"extends": [
"plugin:jest/recommended",
"plugin:unicorn/recommended",
"plugin:prettier/recommended"
],
"parserOptions": {
Expand All @@ -19,6 +18,9 @@
"jest": true
},
"rules": {
"quotes": [
2, "single", { "avoidEscape": true }
],
"@typescript-eslint/explicit-module-boundary-types": "off"
},
"settings": {}
Expand Down
22 changes: 14 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["prettier", "jest", "unicorn", "@typescript-eslint"],
"plugins": ["@typescript-eslint", "jest", "prettier", "unicorn"],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:unicorn/recommended",
"plugin:prettier/recommended"
"plugin:prettier/recommended",
"plugin:unicorn/recommended"
],
"parserOptions": {
"ecmaVersion": 2020,
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {}
"ecmaFeatures": {
}
},
"env": {
"es2020": true,
"es6": true,
"es2022": true,
"browser": false,
"node": true,
"jest": true
},
"rules": {
"quotes": [
2, "single", { "avoidEscape": true }
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"sort-imports": [
"error",
Expand All @@ -30,5 +35,6 @@
}
]
},
"settings": {}
"settings": {
}
}
8 changes: 1 addition & 7 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,11 @@ jobs:
if: matrix.os == 'ubuntu-latest'
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE }}
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm test
coverageLocations: |
./test/coverage/lcov.info:lcov
- name: run codacy-coverage-reporter
if: matrix.os == 'ubuntu-latest'
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./test/coverage/lcov.info
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v1
with:
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,11 @@ jobs:
if: matrix.os == 'ubuntu-latest'
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE }}
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm test
coverageLocations: |
./test/coverage/lcov.info:lcov
- name: run codacy-coverage-reporter
if: matrix.os == 'ubuntu-latest'
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./test/coverage/lcov.info
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v1
with:
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,11 @@ jobs:
if: matrix.os == 'ubuntu-latest'
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE }}
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm test
coverageLocations: |
./test/coverage/lcov.info:lcov
- name: run codacy-coverage-reporter
if: matrix.os == 'ubuntu-latest'
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./test/coverage/lcov.info
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v1
with:
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Release CI

on:
release:
types:
- edited

env:
CI: true
GITHUB_BRANCH: ${{ github.ref }}
GITHUB_HEAD_REF: ${{ github.head_ref }}
GITHUB_BASE_REF: ${{ github.base_ref }}
GITHUB_COMMIT: ${{ github.sha }}

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org/'
- name: nodejs project information
id: projectinfo
uses: gregoranders/nodejs-project-info@master
- name: npm install
run: |
npm install
- name: npm test
run: |
npm test
- name: npm run build
run: |
npm run build
- uses: actions/setup-node@v2
with:
registry-url: 'https://npm.pkg.github.com'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: upload index.js
id: uploadmain
uses: gregoranders/nodejs-upload-asset@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: ${{ steps.createrelease.outputs.id }}
path: dist/index.js
name: index.js
- name: upload index.d.ts
id: uploadtype
uses: gregoranders/nodejs-upload-asset@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: ${{ steps.createrelease.outputs.id }}
path: dist/index.d.ts
name: index.d.ts
4 changes: 3 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

lint-staged && npm test && npm run build
lint-staged
npm test
npm run build
7 changes: 6 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run clear && npm install && lint-staged && npm test && npm run build && npm run codeclimate
npm run clear
npm install
npm test
npm run build
npm run lint
npm run codeclimate
3 changes: 3 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/**
CHANGELOG.md
LICENSE
Loading

0 comments on commit 5381730

Please sign in to comment.