Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[*]
charset = utf-8
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 2
tab_width = 2
max_line_length = 140
trim_trailing_whitespace = true
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

26 changes: 0 additions & 26 deletions .eslintrc.js

This file was deleted.

23 changes: 9 additions & 14 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
---
name: "🐛 Bug Report"
name: '🐛 Bug Report'
about: Report a reproducible bug or regression.
title: ''
labels: bug
assignees: ''

---

## Current Behavior

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

## Expected Behavior
## Issue

<!-- Describe what the desired behaviour would be -->
<!-- What is happening? -->

## Steps to Reproduce the Problem
## Steps to Reproduce

1.
2.
1.
2.

## Environment

- Version: <!-- Version set in package.json -->
- Platform: <!-- Win/Mac/Linux -->
- Node.js Version: <!-- Output of running `node -v` -->
- Version: <!-- Version in package.json -->
- OS: <!-- Win/Mac/Linux -->
- Node.js: <!-- `node -v` -->
34 changes: 13 additions & 21 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,29 @@
---
name: 🌈 Feature request
about: Suggest an amazing new idea for this project
name: 🌈 Feature Request
about: Suggest a 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 [...] -->
**Problem**

**Describe the solution you'd like**
<!-- Briefly describe the problem -->

<!-- A clear and concise description of what you want to happen. Add any considered drawbacks -->
**Solution**

**Describe alternatives you've considered**
<!-- Briefly describe the desired solution -->

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

## Are you willing to resolve this issue by submitting a Pull Request?
<!-- Briefly describe any alternative solutions considered -->

<!--
Remember that first-time contributors are welcome! 🙌
-->
## Willing to Submit a Pull Request?

- [ ] 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 🙏
- [ ] Yes, I have the time and know how to start
- [ ] Yes, I have the time but need guidance
- [ ] No, I don't have the time

<!--
👋 Have a great day, and thank you for the feature request!
-->
<!-- Thank you for your feature request! -->
43 changes: 6 additions & 37 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,13 @@
<!--
😀 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 about 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 behaviour
and the new behaviour

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
Briefly describe the change and why it's needed. If it addresses an issue, link it using `Closes #0000` or `Fixes #0000`.
-->

### Pull-Request Checklist
### Checklist (check all that apply)

<!--
Please make sure to review and check 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 test` passes with this change
- [ ] `npm run commitlint` passes with this change
- [ ] This pull request links relevant issues as `Fixes #0000`
- [ ] There are new or updated unit tests validating the change
- [ ] Documentation has been updated to reflect this change

<!--
🎉 Thank you for contributing!
-->
- [ ] Links relevant issues as `Fixes #0000`
- [ ] New or updated unit tests added
- [ ] Documentation updated

**_Please note that this repository uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) in combination with [semantic-release](https://github.com/semantic-release/semantic-release) to automate package publication. Therefore, your commit messages are critical, and the build process will lint them. If the build fails at the commitlint stage, please refer to this [handy guide](https://www.git-tower.com/learn/git/faq/edit-fix-commit-message) on how to update the commit messages_**
**_Please note: This repository uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) and [semantic-release](https://github.com/semantic-release/semantic-release). Commit messages are critical; refer to [this guide](https://www.git-tower.com/learn/git/faq/edit-fix-commit-message) if the build fails at the commitlint stage._**
54 changes: 0 additions & 54 deletions .github/workflows/pages.yml

This file was deleted.

44 changes: 8 additions & 36 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,11 @@ on:
branches: ['main']

jobs:
build:
runs-on: ubuntu-latest

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

name: Build and test with Node ${{ matrix.node-version }}
steps:
- name: Checkout source code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
# == Cache frequently built and/or with large dependencies ==
# == Eviction policy: not accessed in over 7 days
# == Limit: 10 GB
# cache: 'npm'
# == Path to lock file when using mono repos ==
# cache-dependency-path: subdir/package-lock.json

- name: Restore packages
run: npm ci && npm ci --prefix ./src/lambda

- name: Lint commit messages
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

- name: Build package
run: npm run build

- name: Run tests
run: npm test
pull_request:
uses: makerxstudio/shared-config/.github/workflows/node-ci.yml@main
with:
node-version: lts/*
working-directory: ./
run-commit-lint: true
run-build: true
pre-run-script: npm ci --prefix ./src/lambda
72 changes: 48 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,68 @@ on:
push:
branches:
- main
workflow_dispatch:

concurrency: release

permissions:
contents: write
issues: read

jobs:
ci:
name: Continuous Integration
uses: makerxstudio/shared-config/.github/workflows/node-ci.yml@main
with:
node-version: lts/*
working-directory: ./
run-commit-lint: true
pre-run-script: npm ci --prefix ./src/lambda

build:
name: Build
uses: makerxstudio/shared-config/.github/workflows/node-build-zip.yml@main
needs:
- ci
with:
node-version: lts/*
build-path: build
artifact-name: package
pre-run-script: npm ci --prefix ./src/lambda

release:
name: Release
needs: build
runs-on: ubuntu-latest
name: Release package to NPM
permissions:
contents: write
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js latest LTS version
uses: actions/setup-node@v2
# semantic-release needs node 20
- name: Use Node.js lts/*
uses: actions/setup-node@v4
with:
node-version: lts/*
# == Cache frequently built and/or with large dependencies ==
# == Eviction policy: not accessed in over 7 days
# == Limit: 10 GB
# cache: 'npm'
# == Path to lock file when using mono repos ==
# cache-dependency-path: subdir/package-lock.json

- name: Restore packages
run: npm ci && npm ci --prefix ./src/lambda

- name: Lint commit messages
run: npx commitlint --from ${{ github.event.before }} --to ${{ github.event.head }} --verbose
- name: Download built package
uses: actions/download-artifact@v4
with:
name: package
path: artifacts

- name: Build package
run: npm run build
- name: Unzip package
shell: bash
run: |
mkdir -p dist
unzip -q "artifacts/package.zip" -d dist

- name: Run tests
run: npm test
- name: Install dependencies to get semantic release components and plugins
run: npm ci --ignore-scripts

- name: Release package
- name: 'Semantic release'
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# don't ever format node_modules
node_modules
# don't lint format output (make sure it's set to your correct build folder name)
dist
build
# don't format nyc coverage output
coverage
# don't format generated types
**/generated/types.d.ts
**/generated/types.ts
# don't format ide files
.idea
Loading