Skip to content

Commit

Permalink
feat(node-modules-packer): added initial version of the cli
Browse files Browse the repository at this point in the history
  • Loading branch information
H4ad committed Jul 26, 2022
0 parents commit 185bed6
Show file tree
Hide file tree
Showing 48 changed files with 34,389 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/types/global.d.ts
168 changes: 168 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"parserOptions": {
"project": [
"./tsconfig.eslint.json"
]
},
"extends": [
"eslint:recommended",
"plugin:node/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended"
],
"rules": {
"prettier/prettier": "warn",
"comma-dangle": [
"error",
"always-multiline"
],
"node/no-missing-import": "off",
"node/no-empty-function": "off",
"node/no-unsupported-features/es-syntax": "off",
"node/no-missing-require": "off",
"node/shebang": "off",
"import/order": [
"error",
{
"newlines-between": "never"
}
],
"sort-imports": [
"error",
{
"ignoreDeclarationSort": true
}
],
"@typescript-eslint/no-use-before-define": "off",
"quotes": [
"warn",
"single",
{
"avoidEscape": true
}
],
"curly": [
"error",
"multi-or-nest"
],
"max-len": [
"warn",
{
"code": 140,
"tabWidth": 2,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreUrls": true,
"ignoreComments": true,
"ignorePattern": "^import\\s.+\\sfrom\\s.+;$"
}
],
"no-case-declarations": "warn",
"no-control-regex": "off",
"node/no-unpublished-import": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/member-ordering": [
"error",
{
"default": [
// Constructors
"public-constructor",
"protected-constructor",
"private-constructor",
// Index signature
"signature",
// Fields
"protected-abstract-field",
"public-abstract-field",
"private-abstract-field",
"protected-static-field",
"public-static-field",
"private-static-field",
"protected-decorated-field",
"public-decorated-field",
"private-decorated-field",
"protected-instance-field",
"public-instance-field",
"private-instance-field",
// Getters
"protected-decorated-get",
"public-decorated-get",
"private-decorated-get",
"protected-static-get",
"public-static-get",
"private-static-get",
"protected-instance-get",
"public-instance-get",
"private-instance-get",
"protected-abstract-get",
"public-abstract-get",
"private-abstract-get",
"decorated-get",
"abstract-get",
"protected-get",
"public-get",
"private-get",
"static-get",
"instance-get",
"get",
// Setters
"protected-abstract-set",
"public-abstract-set",
"private-abstract-set",
"abstract-set",
"protected-decorated-set",
"public-decorated-set",
"private-decorated-set",
"protected-static-set",
"public-static-set",
"private-static-set",
"protected-instance-set",
"public-instance-set",
"private-instance-set",
"protected-set",
"public-set",
"private-set",
"decorated-set",
"static-set",
"instance-set",
"set",
// Methods
"public-static-method",
"protected-static-method",
"private-static-method",
"public-decorated-method",
"protected-decorated-method",
"private-decorated-method",
"public-abstract-method",
"protected-abstract-method",
"private-abstract-method",
"public-instance-method",
"protected-instance-method",
"private-instance-method"
]
}
]
}
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Set the repository to show as TypeScript rather than JS in GitHub
*.js linguist-detectable=false
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: "🐛 Bug Report"
about: Report a reproducible bug or regression.
title: ''
labels: bug
assignees: ''

---

## Current Behavior

<!-- Describe how the issue manifests. -->

## Expected Behavior

<!-- Describe what the desired behavior would be. -->

## Steps to Reproduce the Problem

1.
1.
1.

## Environment

- Version: <!-- Version set in package.json -->
- Platform: <!-- Win/Mac/Linux -->
- Node.js Version: <!-- Output of running `node -v` -->
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: 🌈 Feature request
about: Suggest an amazing new idea for this project
title: ''
labels: enhancement
assignees: ''

---

## Feature Request

**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I have an issue when [...] -->

**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. Add any considered drawbacks. -->

**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

## Are you willing to resolve this issue by submitting a Pull Request?

<!--
Remember that first-time contributors are welcome! 🙌
-->

- [ ] Yes, I have the time, and I know how to start.
- [ ] Yes, I have the time, but I don't know how to start. I would need guidance.
- [ ] No, I don't have the time, although I believe I could do it if I had the time...
- [ ] No, I don't have the time and I wouldn't even know how to start.

<!--
👋 Have a great day and thank you for the feature request!
-->
43 changes: 43 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!--
😀 Wonderful! Thank you for opening a pull request.
Please fill in the information below to expedite the review
and (hopefully) merge of your change.
-->

### Description of change

<!--
Please be clear and concise what the change is intended to do,
why this change is needed, and how you've verified that it
corrects what you intended.
In some cases it may be helpful to include the current behavior
and the new behavior.
If the change is related to an open issue, you can link it here.
If you include `Fixes #0000` (replacing `0000` with the issue number)
when this is merged it will automatically mark the issue as fixed and
close it.
-->

### Pull-Request Checklist

<!--
Please make sure to review and check all of the following.
If an item is not applicable, you can add "N/A" to the end.
-->

- [ ] Code is up-to-date with the `main` branch
- [ ] `npm run lint` passes with this change
- [ ] `npm run test` passes with this change
- [ ] This pull request links relevant issues as `Fixes #0000`
- [ ] There are new or updated unit tests validating the change
- [ ] Added documentation inside `www/docs/main` folder.
- [ ] Included new files inside `index.doc.ts`.
- [ ] The new commits follow conventions outlined in the [conventional commit spec](https://www.conventionalcommits.org/en/v1.0.0/)

<!--
🎉 Thank you for contributing!
-->
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '36 7 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
39 changes: 39 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Pull Request

on: [ pull_request ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 12.x, 14.x, 16.x, 18.x ]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-
- name: Install Lib Dependencies
run: npm ci

- name: Build
run: npm run build --if-present

- name: Run tests
run: npm test

- name: Get Coverage Info
run: npm run coverage
Loading

0 comments on commit 185bed6

Please sign in to comment.