Skip to content

Commit

Permalink
Merge pull request #63 from falsepopsky/dev
Browse files Browse the repository at this point in the history
 chore: use vitest
  • Loading branch information
falsepopsky authored Mar 23, 2024
2 parents 6a1b75e + 0b73977 commit b55e1fb
Show file tree
Hide file tree
Showing 22 changed files with 1,696 additions and 2,696 deletions.
9 changes: 4 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@
"features": {
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"version": "20.11.0",
"version": "20.11.1",
"nvmVersion": "latest"
}
},
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"editorconfig.editorconfig",
"orta.vscode-jest",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss",
"astro-build.astro-vscode",
"unifiedjs.vscode-mdx",
"pkief.material-icon-theme",
"github.vscode-github-actions",
"github.vscode-pull-request-github"
"github.vscode-pull-request-github",
"vitest.explorer"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ module.exports = {
sourceType: 'module',
project: ['./tsconfig.json', './packages/web/tsconfig.json', './packages/api/tsconfig.json'],
},
ignorePatterns: ['dist', 'examples', '*.cjs', 'jest.*.js', 'env.d.ts'],
ignorePatterns: ['dist', 'examples', '*.cjs', 'env.d.ts'],
};
24 changes: 15 additions & 9 deletions .github/labeler.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
"📦 @untidy/thetvdb":
- "packages/api/src/**"
- changed-files:
- any-glob-to-any-file: packages/api/src/**
"📚 docs":
- "packages/web/**"
- "README.md"
- "packages/api/README.md"
- changed-files:
- any-glob-to-any-file:
- packages/web/**
- README.md
- packages/api/README.md
"🧪 tests":
- "packages/api/tests/**"
- "mocks/**"
- changed-files:
- any-glob-to-any-file:
- packages/api/tests/**
- mocks/**
"⚙️ configs":
- ".prettierrc"
- "jest.config.js"
- ".eslintrc.cjs"
- changed-files:
- any-glob-to-any-file:
- ".prettierrc"
- ".eslintrc.cjs"
14 changes: 7 additions & 7 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- main

env:
PNPM_VERSION: 8.14.1
PNPM_VERSION: 8.15.5

jobs:
lint:
Expand All @@ -16,12 +16,12 @@ jobs:
uses: actions/checkout@v4.1.1

- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
uses: pnpm/action-setup@v3.0.0
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node
uses: actions/setup-node@v4.0.1
uses: actions/setup-node@v4.0.2
with:
node-version-file: ".nvmrc"
cache: pnpm
Expand All @@ -38,12 +38,12 @@ jobs:
uses: actions/checkout@v4.1.1

- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
uses: pnpm/action-setup@v3.0.0
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node
uses: actions/setup-node@v4.0.1
uses: actions/setup-node@v4.0.2
with:
node-version-file: ".nvmrc"
cache: pnpm
Expand All @@ -61,12 +61,12 @@ jobs:
uses: actions/checkout@v4.1.1

- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
uses: pnpm/action-setup@v3.0.0
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node
uses: actions/setup-node@v4.0.1
uses: actions/setup-node@v4.0.2
with:
node-version-file: ".nvmrc"
cache: pnpm
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- main

env:
PNPM_VERSION: 8.14.1
PNPM_VERSION: 8.15.5

jobs:
lint:
Expand All @@ -16,12 +16,12 @@ jobs:
uses: actions/checkout@v4.1.1

- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
uses: pnpm/action-setup@v3.0.0
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node
uses: actions/setup-node@v4.0.1
uses: actions/setup-node@v4.0.2
with:
node-version-file: ".nvmrc"
cache: pnpm
Expand All @@ -41,12 +41,12 @@ jobs:
uses: actions/checkout@v4.1.1

- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
uses: pnpm/action-setup@v3.0.0
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node
uses: actions/setup-node@v4.0.1
uses: actions/setup-node@v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
Expand All @@ -64,12 +64,12 @@ jobs:
uses: actions/checkout@v4.1.1

- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
uses: pnpm/action-setup@v3.0.0
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node
uses: actions/setup-node@v4.0.1
uses: actions/setup-node@v4.0.2
with:
node-version-file: ".nvmrc"
cache: pnpm
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/label.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4.3.0
- uses: actions/labeler@v5.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labeler.yaml
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

env:
PNPM_VERSION: 8.14.1
PNPM_VERSION: 8.15.5

jobs:
release:
Expand All @@ -24,12 +24,12 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4.1.1
- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
uses: pnpm/action-setup@v3.0.0
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node
uses: actions/setup-node@v4.0.1
uses: actions/setup-node@v4.0.2
with:
node-version-file: ".nvmrc"
cache: pnpm
Expand All @@ -38,7 +38,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Create Release Pull Request
uses: changesets/action@v1.4.5
uses: changesets/action@v1.4.7
with:
title: "chore(release): new @untidy/thetvdb version"
commit: "chore(release): publish new version"
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.11.0
v20.11.1
8 changes: 4 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"recommendations": [
"astro-build.astro-vscode",
"unifiedjs.vscode-mdx",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss",
"editorconfig.editorconfig",
"orta.vscode-jest"
"astro-build.astro-vscode",
"unifiedjs.vscode-mdx",
"vitest.explorer"
]
}
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
},
"typescript.tsdk": "./node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"jest.autoRun": "off",
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "/.github/workflows/*.yml"
},
Expand Down
20 changes: 0 additions & 20 deletions jest.config.js

This file was deleted.

31 changes: 14 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,39 @@
"private": true,
"type": "module",
"license": "Apache-2.0",
"author": "falsepopsky",
"scripts": {
"dev": "tsx playground.ts",
"format": "prettier --cache -w .",
"lint": "eslint . --cache --cache-location \"./node_modules/.cache/eslint/\"",
"build": "pnpm --filter thetvdb build",
"test": "jest --coverage",
"test": "vitest --coverage",
"publish-packages": "pnpm run build && changeset publish",
"docs:dev": "pnpm --filter thetvdb-docs dev",
"docs:build": "pnpm --filter thetvdb-docs build"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@swc/core": "^1.3.104",
"@swc/jest": "^0.2.30",
"@types/jest": "^29.5.11",
"@types/node": "^20.11.5",
"dotenv": "^16.3.2",
"eslint": "^8.56.0",
"@types/node": "^20.11.30",
"@vitest/coverage-v8": "^1.4.0",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-config-untidy": "workspace:^",
"jest": "^29.7.0",
"msw": "^2.1.2",
"prettier": "^3.2.4",
"msw": "^2.2.10",
"prettier": "^3.2.5",
"prettier-plugin-astro": "^0.13.0",
"prettier-plugin-tailwindcss": "^0.5.11",
"tsx": "^4.7.0",
"typescript": "^5.3.3"
"prettier-plugin-tailwindcss": "^0.5.12",
"tsx": "^4.7.1",
"typescript": "^5.4.3",
"vitest": "^1.4.0"
},
"engines": {
"node": "^18.16.1 || ^20.0.0",
"node": "^18.17.0 || ^20.0.0",
"pnpm": "^8"
},
"pnpm": {
"overrides": {
"esbuild": "^0.19.11"
"esbuild": "0.20.2"
}
},
"packageManager": "pnpm@8.14.1"
"packageManager": "pnpm@8.15.5+sha256.4b4efa12490e5055d59b9b9fc9438b7d581a6b7af3b5675eb5c5f447cee1a589"
}
6 changes: 3 additions & 3 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
"clean:build": "rm -rf dist",
"prebuild": "pnpm run clean:build",
"build": "tsc --project tsconfig.build.json",
"test": "jest --coverage"
"test": "vitest --coverage"
},
"devDependencies": {
"@types/node": "^20.11.5",
"typescript": "^5.3.3"
"@types/node": "^20.11.30",
"typescript": "^5.4.3"
},
"engines": {
"node": "^18.17.0 || ^20.0.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-config-untidy/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ module.exports = {
],
overrides: [
{
env: { jest: true },
plugins: ['jest'],
extends: ['plugin:jest/recommended', 'plugin:jest/style'],
plugins: ['vitest'],
extends: ['plugin:vitest/recommended'],
files: ['packages/api/tests/*.test.ts'],
rules: {
'@typescript-eslint/no-unsafe-call': 'off',
Expand Down Expand Up @@ -94,6 +93,7 @@ module.exports = {
'@typescript-eslint/strict-boolean-expressions': 'error',
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
'@typescript-eslint/no-import-type-side-effects': 'error',
'@typescript-eslint/restrict-template-expressions': 'off',
'n/no-missing-import': 'off',
},
reportUnusedDisableDirectives: true,
Expand Down
12 changes: 6 additions & 6 deletions packages/eslint-config-untidy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"main": "./index.cjs",
"exports": "./index.cjs",
"dependencies": {
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^27.6.3",
"eslint-plugin-jsdoc": "^48.0.2",
"eslint-plugin-jsdoc": "^48.2.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.1.1"
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-vitest": "^0.3.26"
},
"devDependencies": {
"eslint": "^8.56.0"
"eslint": "^8.57.0"
}
}
Loading

0 comments on commit b55e1fb

Please sign in to comment.