Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Jan 6, 2024
0 parents commit 0a157ec
Show file tree
Hide file tree
Showing 26 changed files with 12,057 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
coverage:
precision: 2
round: down
range: 80..100

status:
project:
default:
target: "80%"
patch:
default: off
changes:
default: off

comment:
layout: "header, reach, diff, flags, files, footer"
behavior: default
require_changes: false
require_base: false
require_head: true
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Editor configuration, see http://editorconfig.org
root = true

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

[*.snap]
max_line_length = off
trim_trailing_whitespace = false

[*.md]
max_line_length = off
trim_trailing_whitespace = false
92 changes: 92 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"env": {
"es2022": true,
"jest": true
},
"plugins": ["jsdoc", "node", "prettier"],
"extends": [
"eslint:recommended",
"plugin:jsdoc/recommended",
"plugin:node/recommended",
"plugin:prettier/recommended"
],
"overrides": [
{
"files": ["tests/**/*.js", "lib/**/*.js"],
"plugins": ["jest"],
"extends": [
"plugin:jest/recommended"
]
}
],
"parserOptions": {
"ecmaVersion": 2022
},
"globals": {
"fixturePath": "readonly",
"generateFixture": "readonly",
"mockObjectProperty": "readonly",
"setMockResourceFunctions": "readonly",
"tempFixturePath": "readonly"
},
"ignorePatterns": ["src/__fixtures__/**/*"],
"rules": {
"arrow-parens": ["error", "as-needed"],
"comma-dangle": 0,
"consistent-return": 1,
"jsdoc/no-undefined-types": 2,
"jsdoc/require-jsdoc": 2,
"jsdoc/require-param": 2,
"jsdoc/require-param-description": 0,
"jsdoc/require-param-name": 2,
"jsdoc/require-param-type": 2,
"jsdoc/require-property": 2,
"jsdoc/require-property-description": 0,
"jsdoc/require-property-name": 2,
"jsdoc/require-property-type": 2,
"jsdoc/require-returns": 2,
"jsdoc/require-returns-description": 0,
"jsdoc/require-returns-type": 2,
"jsdoc/tag-lines": [
"warn",
"always",
{
"count": 0,
"applyToEndTag": false,
"startLines": 1
}
],
"max-len": [
"error",
{
"code": 240,
"ignoreUrls": true
}
],
"no-console": 0,
"no-debugger": 1,
"no-plusplus": 0,
"no-unsafe-optional-chaining": 1,
"no-var": 2,
"node/no-unsupported-features/es-syntax": 1,
"node/shebang": 0,
"node/no-unpublished-bin": 0,
"node/no-unpublished-require": [
"error",
{
"allowModules": ["shelljs", "mockery", "mock-fs"]
}
],
"padded-blocks": 0,
"prettier/prettier": [
"error",
{
"arrowParens": "avoid",
"singleQuote": true,
"trailingComma": "none",
"printWidth": 120
}
],
"space-before-function-paren": 0
}
}
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug Report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Bug report
about: A clear and concise description of what the bug is.

---

## Summary:
<!-- Provide a description of the issue being raised. -->

### Steps to reproduce
<!-- List clear steps to reproduce the bug. -->
1.
1.

### Expected Result
<!-- Describe the expected behavior for the program. -->
...

## Additional Context
<!-- Append a demo/screenshot/animated gif of the problem. Package.json version, tag, or git commit information. -->
...
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature Request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest a feature, or enhancement, for this project.

---

## Feature description
As user X, I want Y to happen so that Z.

### Is your feature request related to a problem?
<!-- Provide a clear, concise description of what the problem is. -->
...

### Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->
...

## Acceptance Criteria

- [ ] X should happen
- [ ] Y should also happen for Z

<!-- ## Assumptions and Questions -->
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## What's included
<!-- List your changes/additions, or commits -->
...

<!-- ### Notes -->
<!-- Anything funky about your updates. Or issues that aren't resolved by this merge request, things of note? -->

## How to test
<!-- Are there directions to test/review? -->
<!--
### Coverage and basic unit test check
1. update the NPM packages with `$ yarn`
1. `$ yarn test`
### Interactive unit test check
1. update the NPM packages with `$ yarn`
1. `$ yarn test:dev`
-->
...

## Example
<!-- Append a demo/screenshot/animated gif, or a link to the aforementioned, of the cli output -->
...

## Updates issue/story
<!-- What issue/story does this update, i.e Updates #33 -->
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: monthly
day: monday
open-pull-requests-limit: 5
target-branch: "main"
versioning-strategy: increase
allow:
- dependency-type: direct
labels:
- "build"

- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
day: monday
open-pull-requests-limit: 2
target-branch: "main"
labels:
- "build"
37 changes: 37 additions & 0 deletions .github/workflows/commit_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Commit lint
on:
pull_request
env:
BRANCH: ${{ github.base_ref }}

jobs:
Commits:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Git commits
run: |
git remote add ssh-origin "https://github.com/$GITHUB_REPOSITORY"
git fetch ssh-origin
echo 'GIT_COMMITS<<EOF' >> $GITHUB_ENV
git cherry -v ssh-origin/${{ env.BRANCH }} | grep "+" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Lint
uses: actions/github-script@v6
with:
script: |
const actionCommit = require(`${process.env.GITHUB_WORKSPACE}/scripts/actions.commit.js`)
const { resultsArray, resultsString } = actionCommit(process.env.GIT_COMMITS)
if (resultsArray.length) {
core.setFailed(resultsString)
}
48 changes: 48 additions & 0 deletions .github/workflows/documentation_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Documentation lint
on:
push:
branches: [ main ]
pull_request:

jobs:
Documentation:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Node.js modules cache
uses: actions/cache@v3
id: modules-cache
with:
path: ${{ github.workspace }}/node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-modules
- name: Install Node.js packages
if: ${{ steps.modules-cache.outputs.cache-hit != 'true' }}
run: npm install
- name: Build
run: npm run build:docs
- name: Git modified files
if: ${{ success() }}
run: |
echo 'GIT_MODIFIED<<EOF' >> $GITHUB_ENV
git ls-files -m >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Lint
if: ${{ success() }}
uses: actions/github-script@v6
with:
script: |
const actionCommit = require(`${process.env.GITHUB_WORKSPACE}/scripts/actions.documentation.js`)
const { resultsArray, resultsString } = actionCommit(process.env.GIT_MODIFIED)
if (resultsArray.length) {
core.setFailed(resultsString)
}
34 changes: 34 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build
on:
push:
branches: [ main ]
pull_request:
env:
COV_NODE_VERSION: 18

jobs:
Integration-checks:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Node.js modules cache
uses: actions/cache@v3
id: modules-cache
with:
path: ${{ github.workspace }}/node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-modules
- name: Install Node.js packages
if: ${{ steps.modules-cache.outputs.cache-hit != 'true' }}
run: npm install
- name: Lint and test
run: npm test
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# dependencies
node_modules
.yarn-integrity

# coverage
lib-cov
coverage
.nyc*
*.lcov

# logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
api-debug*
dependency-update-log.txt

# misc
.docs
!.env
.fixtures
__fixtures__/tsconfig*
__fixtures__/dist
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*
!package.json
src/**/package.json
!bin/**/*.js
!src/**/*.js
src/**/*test.js
src/**/*.archive
!LICENSE
!README.md
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package.json
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog

All notable changes to this project will be documented in this file.
Loading

0 comments on commit 0a157ec

Please sign in to comment.