diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 0d69406..120bafc 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,4 +1,4 @@ -name: CD Utils +name: CD on: push: @@ -7,30 +7,24 @@ on: jobs: build: - runs-on: ubuntu-18.04 - steps: - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 - - uses: actions/setup-node@v1 with: node-version: '14.x' registry-url: 'https://registry.npmjs.org' - - name: Download dependencies + - name: Install dependencies run: npm install - - name: Transpile typescript to javascript run: npm run build - - name: Automatic GitHub Release uses: justincy/github-action-npm-release@2.0.1 id: release - - name: Publish to NPM Registry run: npm publish --access public if: steps.release.outputs.released == 'true' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e82c84..28452fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI Utils +name: CI on: pull_request: @@ -6,26 +6,44 @@ on: - main jobs: - build: - - runs-on: ubuntu-18.04 - + linux: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: + - 14.15.4 + - 17.x steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v2 with: fetch-depth: 0 - - - uses: actions/setup-node@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 with: - node-version: '14.x' - registry-url: 'https://registry.npmjs.org' + node-version: ${{ matrix.node-version }} - - name: Download dependencies + - name: Install dependencies run: npm install + - name: Run tests + run: npm run test:coverage + + windows: + runs-on: windows-latest + strategy: + matrix: + node-version: + - 14.15.4 + - 17.x + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} - - name: Verify project lint and try to fix it - run: npm run lint:fix - - - name: Run the tests from project - run: npm run test + - name: Install dependencies + run: npm install + - name: Run tests + run: npm run test:coverage diff --git a/.gitignore b/.gitignore index ed0ff05..c446e8d 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ lib-cov # Coverage directory used by tools like istanbul coverage +Coverage *.lcov # nyc test coverage @@ -124,4 +125,3 @@ out # MacOS folder mapper file .DS_Store -.Coverage diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5cdff90..61d4b32 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,19 +2,19 @@ SecJS is a community driven project. You are free to contribute in any of the following ways. -- [Coding style](coding-style) -- [Fix bugs by creating PR's](fix-bugs-by-creating-prs) -- [Share an RFC for new features or big changes](share-an-rfc-for-new-features-or-big-changes) -- [Report security issues](report-security-issues) -- [Be a part of the community](be-a-part-of-community) +- [Coding style](#coding-style) +- [Fix bugs by creating PR's](#fix-bugs-by-creating-prs) +- [Report security issues](#report-security-issues) ## Coding style -Majority of SecJS core packages are written in Typescript. Having a brief knowledge of Typescript is required to contribute to the core. +Majority of SecJS core packages are written in Typescript. Having a brief knowledge of Typescript is required to +contribute to the core. ## Fix bugs by creating PR's -We appreciate every time you report a bug in the packages. However, taking time to submit a PR can help us in fixing bugs quickly and ensure a healthy and stable eco-system. +We appreciate every time you report a bug in the packages. However, taking time to submit a PR can help us in fixing +bugs quickly and ensure a healthy and stable ecosystem. Go through the following points, before creating a new PR. @@ -22,27 +22,12 @@ Go through the following points, before creating a new PR. 2. Once approved, go ahead and fork the repository. 3. Make sure to start from the `develop`, since this is the upto date branch. 4. Make sure to keep commits small and relevant. -5. We follow [conventional-commits](https://github.com/conventional-changelog/conventional-changelog) to structure our commit messages. Instead of running `git commit -m "message"`, you must run only `git commit`, which will show you prompts to create a valid commit message. +5. We follow [conventional-commits](https://github.com/conventional-changelog/conventional-changelog) to structure our + commit messages. Instead of running `git commit -m "message"`, you must run only `git commit`, which will show you + prompts to create a valid commit message. 6. Once done with all the changes, create a PR against the `develop` branch. -## Share an RFC for new features or big changes - -Sharing PR's for small changes works great. However, when contributing big features to the package, it is required to go through the RFC process. - -### What is an RFC? - -RFC stands for **Request for Commits**, a standard process followed by many other frameworks including [Ember](https://github.com/emberjs/rfcs), [yarn](https://github.com/yarnpkg/rfcs) and [rust](https://github.com/rust-lang/rfcs). - -In brief, RFC process allows you to talk about the changes with everyone in the community and get a view of the core team before dedicating your time to work on the feature. - -The RFC proposals are created as issues on [SecJS/Rfcs](https://github.com/SecJS/Rfcs) repository. Make sure to read the README to learn about the process in depth. - ## Report security issues -All the security issues, must be reported via [email](mailto:lenon@secjs.com.br) and not using any of the public channels. - -## Be a part of community - -We welcome you to participate in the [forum](https://forum.secjs.com.br/) and the SecJS [discord server](https://discord.me/secjs). You are free to ask your questions and share your work or contributions made to SecJS eco-system. - -We follow a strict [Code of Conduct](https://secjs.com.br/community-guidelines) to make sure everyone is respectful to each other. +All the security issues, must be reported via [email](mailto:lenonSec7@gmail.com) and not using any of the public +channels. diff --git a/index.js b/index.js index fa2821f..7c465df 100644 --- a/index.js +++ b/index.js @@ -35,3 +35,6 @@ export * from '#src/Exceptions/NotFoundFolderException' export * from '#src/Exceptions/OrdinalNanException' export * from '#src/Exceptions/RecursiveConfigException' export * from '#src/Exceptions/RouteMatchException' + +// TODO Update docs +// TODO Create .d.ts files