Skip to content

Commit

Permalink
Version 2 (sergiodxa#3)
Browse files Browse the repository at this point in the history
* Update code and setup

* Import Outlet from remix package

* Create new bodyParser interface

* Add initial new docs

* Update tests

* Delete size.yml

* Replace main workflow with simplified ci workflow

* Update Node version

* Update bump.yml

* Update action version

* Update code

* Update server.ts

* Install Prettier

* Update responses.ts

* Renamte bodyParser.toParams to toSearchParams and add toString

* Add more docs

* Fix typo

* Fix typos and reference to argument

* Add docs for CSRF functions

* Remove unknown default generic on json

* Update linter
  • Loading branch information
sergiodxa authored Nov 4, 2021
1 parent 37b14d4 commit d816471
Show file tree
Hide file tree
Showing 34 changed files with 36,396 additions and 9,082 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* eslint-disable unicorn/prefer-module */
module.exports = require("./config/eslint");
10 changes: 7 additions & 3 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,24 @@ jobs:
uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Setup Node.js

- name: Setup Node LTS
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: 'lts/*'
cache: 'npm'

- name: Install dependencies
uses: bahmutov/npm-install@v1
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

- name: Setup Git
run: |
git config user.name 'Sergio Xalambrí'
git config user.email '[email protected]'
- name: bump version
- name: Bump package.json versino
run: npm version ${{ github.event.inputs.version }}

- name: Push latest version
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: CI

on: [push]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node LTS
uses: actions/setup-node@v2
with:
node-version: "lts/*"

- name: Install dependencies
uses: bahmutov/npm-install@v1
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

- name: Build
run: npm run setup && npm run build
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

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

- name: Use Node LTS
uses: actions/setup-node@v2
with:
node-version: "lts/*"

- name: Install dependencies
uses: bahmutov/npm-install@v1
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

- name: Typecheck
run: npm run setup && npm run typecheck
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

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

- name: Use Node LTS
uses: actions/setup-node@v2
with:
node-version: "lts/*"

- name: Install dependencies
uses: bahmutov/npm-install@v1
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

- name: Test
run: npm run setup && npm run test -- --ci --coverage --maxWorkers=2
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

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

- name: Use Node LTS
uses: actions/setup-node@v2
with:
node-version: "lts/*"

- name: Install dependencies
uses: bahmutov/npm-install@v1
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

- name: Build
run: npm run setup && npm run build
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

- name: Lint
run: npm run lint
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}
40 changes: 0 additions & 40 deletions .github/workflows/main.yml

This file was deleted.

18 changes: 13 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,26 @@ on:
types: [published]

jobs:
build:
publish-npm:
name: "Publish to npm"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1

- uses: actions/setup-node@v2
with:
node-version: 14
node-version: "lts/*"
registry-url: https://registry.npmjs.org/
- run: yarn install

- run: npm install
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

- run: npm run build
env:
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}

- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}
REMIX_TOKEN: ${{ secrets.REMIX_TOKEN }}
12 changes: 0 additions & 12 deletions .github/workflows/size.yml

This file was deleted.

9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
*.log
.DS_Store
node_modules
dist

/react
/react.js
/react.d.ts

/server
/server.js
/server.d.ts
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/.github
/config
/src
/test
.eslintrc.js
.gitignore
.npmignore
.npmrc
tsconfig.json
Loading

0 comments on commit d816471

Please sign in to comment.