Skip to content

Commit

Permalink
✨ Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-m-santos committed Sep 25, 2023
0 parents commit 2b2121e
Show file tree
Hide file tree
Showing 306 changed files with 37,966 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// eslint-disable-next-line no-undef
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
],
plugins: ['vue', '@typescript-eslint'],
rules: {
indent: ['warn', 2],
'object-curly-spacing': ['warn', 'always'],
'vue/multi-word-component-names': 'off',
'vue/no-v-text-v-html-on-component': 'off', // ESLint thinks `tspan` tag is a custom componenent, so disabling this until we find a way to fix that.
'sort-imports': [
'error',
{
ignoreCase: true,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['all', 'single', 'multiple', 'none'],
allowSeparatedGroups: true,
},
],
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.vue'],
},
env: {
es6: true,
},
};
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @adyen/team-lume
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request
assignees: ''
---

**Feature description**
A clear and concise description of what you want to happen.

**Problem/motivation**
Please provide valid reason(s) why this should be added to Lume.

**Describe alternatives you've considered**
What alternative solutions or features have you considered before making this request?

**Additional context**
What resources (links, screenshots, etc.) do you have to assist this effort?
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 🚀 Feature request
description: Propose a new feature to be added to Lume
labels: [feature request]
body:
- type: markdown
attributes:
value: |
Thanks for your interest in the project and taking the time to fill out this feature request!
- type: textarea
id: feature-description
attributes:
label: Feature description
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: problem-motivation
attributes:
label: Problem/motivation
description: Please provide valid reason(s) why this should be added to Lume.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: Describe alternatives you've considered
description: What alternative solutions or features have you considered before making this request?
- type: textarea
id: additional-context
attributes:
label: Additional context
description: What resources (links, screenshots, etc.) do you have to assist this effort?
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Follow our [Code of Conduct](https://github.com/Adyen/lume/blob/main/CODE_OF_CONDUCT.md)
required: true
- label: Read the [Contributing Guidelines](https://github.com/Adyen/lume/blob/main/CONTRIBUTING.md).
required: true
- label: Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
required: true
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/problem-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Problem report
about: Create a report to help us improve
title: ''
labels: problem report
assignees: ''
---

**Problem description**
A clear and concise description of what the problem/bug is.

**Steps to reproduce**

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Device:**

- Type: [e.g. desktop, smartphone]
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
104 changes: 104 additions & 0 deletions .github/ISSUE_TEMPLATE/problem-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: 🐛 Problem report
description: Create a report to help us improve
labels: [problem report]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this problem report!
- type: textarea
id: problem-description
attributes:
label: Problem description
description: A clear and concise description of what the problem/bug is
placeholder: Problem description
validations:
required: true
- type: input
id: reproduction-url
attributes:
label: Reproduction URL
description: Please enter your GitHub URL to provide a reproduction of the issue
placeholder: ex. https://github.com/USERNAME/REPO-NAME
validations:
required: false
- type: textarea
id: reproduction
attributes:
label: Reproduction steps
description: Please enter an explicit description of your issue
value: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: Expected behavior
validations:
required: true
- type: textarea
id: screenshot
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
value: |
![DESCRIPTION](LINK.png)
render: bash
validations:
required: false
- type: textarea
id: logs
attributes:
label: Logs
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: bash
validations:
required: false
- type: dropdown
id: browsers
attributes:
label: Browsers
description: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- Opera
validations:
required: false
- type: dropdown
id: os
attributes:
label: OS
description: What is the impacted environment?
multiple: true
options:
- Windows
- Linux
- Mac
validations:
required: false
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Follow our [Code of Conduct](https://github.com/Adyen/lume/blob/main/CODE_OF_CONDUCT.md)
required: true
- label: Read the [Contributing Guidelines](https://github.com/Adyen/lume/blob/main/CONTRIBUTING.md).
required: true
- label: Check that there isn't [already an issue](https://github.com/Adyen/lume/issues) that reports the same bug to avoid creating a duplicate.
required: true
- label: Make sure this is a Lume issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
required: true
- label: The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
required: true
30 changes: 30 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!---
Thanks for creating a Pull Request 💖!
Please pay attention to the following before submitting:
- Read the [Contributing guidelines](https://github.com/Adyen/lume/blob/main/CONTRIBUTING.md)
- Keep your PR as small as possible.
- Limit your PR to one type (docs, feature, refactoring, ci, or bugfix)
-->

Relates to # <!-- [Relates to / Closes / Fixes] + Github issue # here -->

## 📝 Description

> Add a brief description
## 💥 Is this a breaking change (Yes/No):

- [ ] No
- [ ] Yes (please describe the impact and migration path for existing Lume users)

## 📝 Additional Information

>
### Before submitting the PR, please make sure you do the following

- [ ] Read the [Contributing Guidelines](https://github.com/Adyen/lume/blob/main/CONTRIBUTING.md).
- [ ] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
- [ ] Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`).
- [ ] Ideally, include relevant tests that fail without this PR but pass with it.
76 changes: 76 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# This workflow will:
# 1. Do a clean installation of node dependencies
# 2. Run unit tests
# 3. Build the package
# 4. Scan push/PRs for leaked credentials using TruffleHog

name: PR workflow

on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
build:
name: Setup & build
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3

- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm

- name: Use Node version from .nvmrc
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Install dependencies
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Build the package
run: pnpm run build

run-unit-tests:
name: Test on Node ${{ matrix.node_version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Run unit tests (with experimental VM modules)
run: pnpm run test

trufflehog:
name: TruffleHog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD
extra_args: --debug --only-verified
43 changes: 43 additions & 0 deletions .github/workflows/publish-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish both Lume packages

on:
workflow_dispatch:
release:
types: [published]

jobs:
setup:
runs-on: ubuntu-latest
environment: release

steps:
- name: Checkout the repo
uses: actions/checkout@v3

- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm

- name: Use Node version from .nvmrc
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Install dependencies
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Build the package
run: pnpm run build

- name: Publish Vue 2 package to npm registry
run: |
pnpm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_ADYEN_LUME_TOKEN }}
pnpm publish --filter='./packages/vue2' --no-git-checks
- name: Publish Vue 3 package to npm registry
run: |
pnpm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_ADYEN_LUME_VUE3_TOKEN }}
pnpm publish --filter='./packages/vue3' --no-git-checks
Loading

0 comments on commit 2b2121e

Please sign in to comment.