Skip to content

Commit

Permalink
Merge pull request #2 from fp-tx/ja/new-config
Browse files Browse the repository at this point in the history
Feat: add .d.ts, .d.cts, and .d.mts generation
  • Loading branch information
jacob-alford authored Feb 12, 2024
2 parents e62abc7 + cbb2664 commit 7b39060
Show file tree
Hide file tree
Showing 16 changed files with 3,136 additions and 476 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Check, Test, Build
on:
push:
branches:
- main
- $default-branch
pull_request:
branches:
- main
- $default-branch
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16.x
- 18.x
- 20.x

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

# TODO: Fix commit linting
# - name: Check Commits
# if: github.event_name == 'pull_request'
# run: pnpm i conventional-changelog-conventionalcommits

# - run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose

- name: Check Formatting
run: pnpm run prettier:check

- name: Lint Changes
run: pnpm run lint

- name: Check Types
run: pnpm run typecheck

- name: Run Tests
run: pnpm run test:ci

- name: Run Build
run: pnpm run prerelease
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
transform: {
'^.+\\.(t|j)sx?$': '@swc/jest',
},
}
19 changes: 16 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,28 @@
},
"./package.json": "./dist/package.json"
},
"engines": {
"node": ">=16.0.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.13.1",
"@arethetypeswrong/cli": "^0.13.7",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@fp-tx/build-tools": "link:@fp-tx/build-tools",
"@swc/core": "^1.3.107",
"@swc/jest": "^0.2.31",
"@types/glob": "^8.1.0",
"@types/jest": "^29.5.11",
"@types/node": "^20.10.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"esbuild-plugin-file-path-extensions": "^1.0.0",
"eslint": "^8.54.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-unused-imports": "^3.0.0",
"fast-check": "^3.15.1",
"husky": "^8.0.3",
"jest": "^29.7.0",
"lint-staged": "^15.1.0",
"prettier": "^3.1.0",
"prettier-plugin-jsdoc": "^1.1.1",
Expand All @@ -46,13 +53,18 @@
"tsup": "^8.0.0"
},
"dependencies": {
"@ts-morph/common": "^0.22.0",
"colorette": "^2.0.20",
"esbuild-plugin-file-path-extensions": "^1.0.0",
"fp-ts": "^2.16.1",
"glob": "^10.3.10",
"schemata-ts": "^2.2.0",
"schemata-ts": "^2.2.3",
"ts-morph": "^21.0.1",
"type-fest": "^4.10.0"
},
"scripts": {
"test": "jest",
"test:ci": "pnpm run test --ci",
"postinstall": "husky install",
"build": "tsup",
"build:check": "attw --pack ./dist",
Expand All @@ -65,6 +77,7 @@
"lint:staged": "lint-staged",
"lint:fix": "eslint --fix \"src/**/*.ts\"",
"prettier": "prettier \"./src/**/*.ts\"",
"prettier:check": "prettier \"./{src,test}/**/*.ts\" --check",
"prettier:fix": "prettier --write \"./src/**/*.ts"
},
"lint-staged": {
Expand Down
Loading

0 comments on commit 7b39060

Please sign in to comment.