Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add accept header parsing package #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
extends: ['@tablecheck/eslint-config']
extends: ['@tablecheck/eslint-config'],
rules: {
'@nx/enforce-module-boundaries': 'off',
},
};
64 changes: 14 additions & 50 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ concurrency:
cancel-in-progress: true

jobs:
setup:
checks:
runs-on: ubuntu-latest
outputs:
nvmrc: ${{ steps.nvm.outputs.nvmrc }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0

- name: Read .nvmrc
Expand All @@ -31,67 +33,29 @@ jobs:
cache: npm

- name: Install 🔧
run: npm ci --legacy-peer-deps

lint:
needs: [setup]
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ needs.setup.outputs.nvmrc }}
cache: npm

- name: Restore npm installs and Lerna setup
run: npm ci --legacy-peer-deps
run: npm ci --ignore-scripts

- name: Validate all commits from PR
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

- name: Check formatting
run: npx prettier --check .

- name: Run linter
run: npm run lint

# test:
# needs: [setup]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout 🛎️
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
#
# - name: Setup Node.js
# uses: actions/setup-node@v2
# with:
# node-version: ${{ needs.setup.outputs.nvmrc }}
# cache: npm
#
# - name: Restore npm installs and Lerna setup
# run: npm i --legacy-peer-deps
#
# - name: Run Tests
# run: npm test
#
# - name: Publish Unit Test Results
# uses: EnricoMi/publish-unit-test-result-action@v1
# if: always()
# with:
# files: junit/**/*.xml
- name: Run Tests
run: npm test

release:
runs-on: ubuntu-latest
needs: [lint]
# needs: [test, lint]
needs: [checks]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0

- name: Read .nvmrc
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0

- name: Prepare repository
run: git fetch --unshallow --prune --tags

- name: Unset header
# checkout@v2 adds a header that makes branch protection report errors ):
run: git config --local --unset http.https://github.com/.extraheader

- name: Read .nvmrc
id: nvm
run: echo ::set-output name=nvmrc::$(cat .nvmrc)
Expand All @@ -33,9 +33,6 @@ jobs:
- name: Install 🔧
run: npm ci --legacy-peer-deps

# - name: Run Tests
# run: npm test

- name: Create Release ✨
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }}
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ cache
public/static
docs
lib
dist
config/local.*
config/local-*
tsconfig.json
tsconfig.*.json
storybook-static
junit
*.tsbuildinfo
Expand Down
2 changes: 0 additions & 2 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint -e
4 changes: 1 addition & 3 deletions .husky/pre-commit
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx tablecheck-scripts precommit
npx lint-staged
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
registry=https://registry.npmjs.org/
legacy-peer-deps=true
save-exact=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.4.2
v22.11.0
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ styleguide
coverage
docs
CHANGELOG.md
.husky
.autorc
.all-contributorsrc
5 changes: 1 addition & 4 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
{
"singleQuote": true,
"trailingComma": "none"
}
"@tablecheck/prettier-config"
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 22.11.0
Loading
Loading