Skip to content

Commit

Permalink
New major version
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Feb 23, 2024
1 parent 348d2c2 commit d6ff36c
Show file tree
Hide file tree
Showing 21 changed files with 1,007 additions and 19,845 deletions.
54 changes: 54 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/* eslint-disable unicorn/prefer-module */
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: [
"@typescript-eslint",
"import",
"jsx-a11y",
"prettier",
"promise",
"react-hooks",
"react",
"unicorn",
],
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/typescript",
"plugin:import/warnings",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended",
"plugin:promise/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:unicorn/recommended",
],
settings: {
react: { version: "detect" },
"import/resolver": { typescript: {} },
},
rules: {
"@typescript-eslint/explicit-module-boundary-types": "off",
"no-unused-vars": "off",
"no-var": "off",
"prefer-const": "off",
"react/prop-types": "off",
"react/button-has-type": "error",
"react/function-component-definition": [
"error",
{
namedComponents: "function-declaration",
unnamedComponents: "arrow-function",
},
],
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"unicorn/filename-case": "off",
"unicorn/no-null": "off",
"unicorn/prefer-node-protocol": "off",
"unicorn/prevent-abbreviations": "off",
},
};
26 changes: 0 additions & 26 deletions .eslintrc.js

This file was deleted.

33 changes: 15 additions & 18 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,33 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Semver type of new version (major / minor / patch)'
description: "Semver type of new version (major / minor / patch)"
required: true
type: choice
options:
- major
- minor
- patch
- major
- minor
- patch

jobs:
bump-version:
name: Bump version
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Setup Node.js
uses: actions/setup-node@v2

- uses: oven-sh/setup-bun@v1
- run: bun install

- uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'npm'
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Setup Git
run: |
node-version: "lts/*"

- run: |
git config user.name 'Sergio Xalambrí'
git config user.email '[email protected]'
- name: bump version
run: npm version ${{ github.event.inputs.version }}
- name: Push latest version
run: git push origin main --follow-tags
- run: npm version ${{ github.event.inputs.version }}
- run: git push origin main --follow-tags
85 changes: 29 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,80 +1,53 @@
name: CI

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

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun run build

- name: Use Node 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Build
run: npm run build
exports:
name: Verify Exports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun run test:exports

typecheck:
name: Typechecker
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Use Node 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Typecheck
run: npm run typecheck
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun run typecheck

test:
name: Unit and Integration Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Use Node 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Test
run: npm run test
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun run test

lint:
name: Linter
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Use Node 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Lint
run: npm run lint
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun run lint
21 changes: 9 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,17 @@ jobs:
name: "Publish to npm"
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun run build
- run: bun run test:exports

- name: Use Node 16
uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
node-version: "lts/*"
registry-url: https://registry.npmjs.org/

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Publish
run: npm publish --access public
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Binary file added bun.lockb
Binary file not shown.
Loading

0 comments on commit d6ff36c

Please sign in to comment.