Skip to content

Commit

Permalink
fix: refactor vitesst.config.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperse-net committed Jul 25, 2024
1 parent b33e4ee commit 9b7cf60
Show file tree
Hide file tree
Showing 25 changed files with 1,242 additions and 1,788 deletions.
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn commitlint --edit "$1"
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn g:lint-staged-files --debug
5 changes: 0 additions & 5 deletions .prettierignore

This file was deleted.

626 changes: 313 additions & 313 deletions .yarn/releases/yarn-4.2.2.cjs → .yarn/releases/yarn-4.3.1.cjs

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ changesetBaseRefs:
- upstream/main

changesetIgnorePatterns:
- '**/*.test.{js,ts,jsx,tsx}'
- '**/test.{js,ts,jsx,tsx}'
- '**/*.spec.{js,ts,jsx,tsx}'
- "**/*.test.{js,ts,jsx,tsx}"
- "**/test.{js,ts,jsx,tsx}"
- "**/*.spec.{js,ts,jsx,tsx}"

defaultSemverRangePrefix: ''
defaultSemverRangePrefix: ""

enableGlobalCache: false

nmMode: hardlinks-local

nodeLinker: node-modules

npmRegistryServer: 'https://registry.npmjs.org/'
npmRegistryServer: "https://registry.npmjs.org/"

supportedArchitectures:
cpu:
- current
os:
- current

yarnPath: .yarn/releases/yarn-4.2.2.cjs
yarnPath: .yarn/releases/yarn-4.3.1.cjs
15 changes: 10 additions & 5 deletions next-mate.code-workspace
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"folders": [
{
"name": "root",
"path": ".",
},
{
"name": "next-demo",
"path": "packages/next-demo",
Expand All @@ -24,10 +28,6 @@
"name": "next-prisma",
"path": "packages/next-prisma",
},
{
"name": "root",
"path": ".",
},
],
"extensions": {
"recommendations": [
Expand All @@ -36,7 +36,6 @@
},
"settings": {
"editor.formatOnSave": true,
"eslint.experimental.useFlatConfig": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
Expand Down Expand Up @@ -64,6 +63,12 @@
"[prisma]": {
"editor.defaultFormatter": "Prisma.prisma",
},
"[json]": {
"editor.formatOnSave": false
},
"[jsonc]": {
"editor.formatOnSave": false
},
"i18n-ally.localesPaths": [
"i18n"
],
Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"?build-release": "When https://github.com/atlassian/changesets/issues/432 has a solution we can remove this trick",
"g:build-release": "yarn workspaces foreach --all -tv run build-release",
"g:build-local": "yarn workspaces foreach --all -tv run build",
"g:test": "yarn workspaces foreach --all -ptv run test",
"g:test-unit": "yarn workspaces foreach --all -ptv run test-unit",
"g:test-e2e": "yarn workspaces foreach --all -tv run test-e2e",
"g:test-coverage": "yarn workspaces foreach --all -tv run test-coverage",
Expand All @@ -46,7 +47,7 @@
"deps:update": "yarn dlx npm-check-updates@latest --configFileName .ncurc.json -u --deep --mergeConfig",
"check:install": "yarn dlx @yarnpkg/[email protected] .",
"install:playwright": "npx playwright install",
"prepare": "yarn husky"
"prepare": "husky"
},
"config": {
"commitizen": {
Expand All @@ -58,23 +59,23 @@
},
"devDependencies": {
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.5",
"@changesets/cli": "2.27.7",
"@commitlint/cli": "19.3.0",
"@commitlint/config-conventional": "19.2.2",
"@hyperse/eslint-config-hyperse": "^1.0.7",
"@hyperse/eslint-config-hyperse": "^1.0.10",
"commitizen": "4.3.0",
"cz-conventional-changelog": "3.3.0",
"eslint": "^9.4.0",
"husky": "9.0.11",
"lint-staged": "15.2.5",
"eslint": "^9.7.0",
"husky": "9.1.1",
"lint-staged": "15.2.7",
"npm-run-all": "4.1.5",
"rimraf": "5.0.7",
"typescript": "5.4.5"
"rimraf": "6.0.1",
"typescript": "5.5.4"
},
"engines": {
"node": ">=18.0.0",
"npm": "please-use-yarn",
"yarn": ">=1.22.0"
},
"packageManager": "yarn@4.2.2"
"packageManager": "yarn@4.3.1"
}
29 changes: 13 additions & 16 deletions packages/next-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,30 +47,27 @@
"typecheck": "tsc --project ./tsconfig.json --noEmit"
},
"dependencies": {
"arctic": "1.9.0",
"oslo": "1.2.0"
"arctic": "1.9.2",
"oslo": "1.2.1"
},
"devDependencies": {
"@hyperse/eslint-config-hyperse": "^1.0.7",
"@prisma/client": "^5.15.0",
"@types/node": "20.14.2",
"@vitest/coverage-istanbul": "1.6.0",
"@vitest/ui": "1.6.0",
"eslint": "^9.4.0",
"next": "^14.2.3",
"@hyperse/eslint-config-hyperse": "^1.0.10",
"@prisma/client": "^5.17.0",
"@types/node": "20.14.12",
"eslint": "^9.7.0",
"next": "^14.2.5",
"npm-run-all": "4.1.5",
"prisma": "^5.15.0",
"prisma": "^5.17.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"rimraf": "5.0.7",
"typescript": "5.4.5",
"vite": "5.2.13",
"rimraf": "6.0.1",
"typescript": "5.5.4",
"vite-tsconfig-paths": "4.3.2",
"vitest": "1.6.0"
"vitest": "2.0.4"
},
"peerDependencies": {
"@prisma/client": "^5.15.0",
"next": "^14.2.3"
"@prisma/client": "^5.17.0",
"next": "^14.2.5"
},
"peerDependenciesMeta": {
"@prisma/client": {
Expand Down
5 changes: 1 addition & 4 deletions packages/next-auth/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
"paths": {},
"types": ["vitest/globals"]
},
"include": [
"**/*.ts",
"**/*.tsx"
],
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["**/node_modules", "**/.*/", "dist", "build"]
}
23 changes: 4 additions & 19 deletions packages/next-auth/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
import tsConfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
import tsconfigPaths from 'vite-tsconfig-paths';
import { configDefaults, defineConfig } from 'vitest/config';

export default defineConfig({
plugins: [tsConfigPaths()],
cacheDir: '../../.cache/vitest/next-auth',
plugins: [tsconfigPaths()],
test: {
// Makebe suite for local debug
testTimeout: 1000 * 30,
globals: true,
environment: 'node',
passWithNoTests: true,
coverage: {
provider: 'istanbul',
reporter: ['json-summary', 'html'],
extension: ['js', 'jsx', 'ts', 'tsx'],
},
exclude: [...configDefaults.exclude],
include: ['**/?(*.){test,spec}.?(c|m)[jt]s?(x)'],
exclude: [
'**/node_modules/**',
'dist/**',
'**/coverage/**',
'**/.{idea,git,cache,output,temp}/**',
],
},
});
25 changes: 11 additions & 14 deletions packages/next-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,31 +53,28 @@
"superjson": "^2.2.1"
},
"devDependencies": {
"@hyperse/eslint-config-hyperse": "^1.0.7",
"@hyperse/eslint-config-hyperse": "^1.0.10",
"@tanstack/query-core": "^5.x",
"@tanstack/react-query": "^5.40.1",
"@tanstack/react-query": "^5.51.11",
"@trpc/server": "next",
"@types/node": "20.14.2",
"@vitest/coverage-istanbul": "1.6.0",
"@vitest/ui": "1.6.0",
"eslint": "^9.4.0",
"next": "^14.2.3",
"@types/node": "20.14.12",
"eslint": "^9.7.0",
"next": "^14.2.5",
"npm-run-all": "4.1.5",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rimraf": "5.0.7",
"rollup": "^4.18.0",
"rimraf": "6.0.1",
"rollup": "^4.19.0",
"rollup-plugin-preserve-directives": "0.4.0",
"typescript": "5.4.5",
"vite": "5.2.13",
"typescript": "5.5.4",
"vite-tsconfig-paths": "4.3.2",
"vitest": "1.6.0"
"vitest": "2.0.4"
},
"peerDependencies": {
"@tanstack/query-core": "^5.x",
"@tanstack/react-query": "^5.40.1",
"@tanstack/react-query": "^5.51.11",
"@trpc/server": "*",
"next": "^14.2.3",
"next": "^14.2.5",
"react": "^18.3.1"
},
"engines": {
Expand Down
5 changes: 1 addition & 4 deletions packages/next-core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
"paths": {},
"types": ["vitest/globals"]
},
"include": [
"**/*.ts",
"**/*.tsx"
],
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["**/node_modules", "**/.*/", "dist", "build"]
}
23 changes: 4 additions & 19 deletions packages/next-core/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
import tsConfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
import tsconfigPaths from 'vite-tsconfig-paths';
import { configDefaults, defineConfig } from 'vitest/config';

export default defineConfig({
plugins: [tsConfigPaths()],
cacheDir: '../../.cache/vitest/next-core',
plugins: [tsconfigPaths()],
test: {
// Makebe suite for local debug
testTimeout: 1000 * 30,
globals: true,
environment: 'node',
passWithNoTests: true,
coverage: {
provider: 'istanbul',
reporter: ['json-summary', 'html'],
extension: ['js', 'jsx', 'ts', 'tsx'],
},
exclude: [...configDefaults.exclude],
include: ['**/?(*.){test,spec}.?(c|m)[jt]s?(x)'],
exclude: [
'**/node_modules/**',
'dist/**',
'**/coverage/**',
'**/.{idea,git,cache,output,temp}/**',
],
},
});
47 changes: 23 additions & 24 deletions packages/next-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
}
},
"dependencies": {
"@hookform/resolvers": "3.6.0",
"@hookform/resolvers": "3.9.0",
"@hyperse/next-auth": "workspace:*",
"@hyperse/next-core": "workspace:*",
"@hyperse/next-env": "workspace:*",
"@hyperse/next-prisma": "workspace:*",
"@next/bundle-analyzer": "14.2.3",
"@prisma/client": "^5.15.0",
"@next/bundle-analyzer": "14.2.5",
"@prisma/client": "^5.17.0",
"@tanstack/query-core": "^5.x",
"@tanstack/react-query": "^5.40.1",
"@tanstack/react-query": "^5.51.11",
"@trpc/client": "next",
"@trpc/next": "next",
"@trpc/react-query": "next",
Expand All @@ -57,31 +57,31 @@
"@urql/next": "1.1.1",
"class-variance-authority": "0.7.0",
"clsx": "^2.1.1",
"dayjs": "1.11.11",
"graphql": "16.8.1",
"next": "^14.2.3",
"next-intl": "^3.14.1",
"dayjs": "1.11.12",
"graphql": "16.9.0",
"next": "^14.2.5",
"next-intl": "^3.17.2",
"next-runtime-env": "^3.2.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "7.51.5",
"react-hook-form": "7.52.1",
"server-only": "0.0.1",
"tailwind-merge": "^2.3.0",
"tailwind-merge": "^2.4.0",
"urql": "4.1.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@changesets/cli": "2.27.5",
"@changesets/cli": "2.27.7",
"@commitlint/cli": "19.3.0",
"@commitlint/config-conventional": "19.2.2",
"@graphql-codegen/add": "5.0.2",
"@graphql-codegen/add": "5.0.3",
"@graphql-codegen/cli": "5.0.2",
"@graphql-codegen/typescript": "4.0.7",
"@graphql-codegen/typescript-operations": "4.2.1",
"@hyperse/eslint-config-hyperse": "^1.0.7",
"@graphql-codegen/typescript": "4.0.9",
"@graphql-codegen/typescript-operations": "4.2.3",
"@hyperse/eslint-config-hyperse": "^1.0.10",
"@hyperse/tailwind-layer": "^1.0.4",
"@playwright/test": "^1.44.1",
"@types/node": "^20.14.2",
"@playwright/test": "^1.45.3",
"@types/node": "^20.14.12",
"@types/prettier": "3.0.0",
"@types/react": "^18.3.3",
"autoprefixer": "^10.4.19",
Expand All @@ -90,17 +90,16 @@
"cz-conventional-changelog": "3.3.0",
"dotenv": "^16.4.5",
"es-check": "7.2.1",
"eslint": "^9.4.0",
"eslint": "^9.7.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.38",
"prisma": "^5.15.0",
"postcss": "^8.4.40",
"prisma": "^5.17.0",
"size-limit": "11.1.4",
"start-server-and-test": "^2.0.4",
"tailwindcss": "^3.4.4",
"typescript": "^5.4.5",
"vite": "^5.2.13",
"tailwindcss": "^3.4.6",
"typescript": "^5.5.4",
"vite-tsconfig-paths": "4.3.2",
"vitest": "^1.6.0"
"vitest": "^2.0.4"
},
"engines": {
"node": ">=20.12.2"
Expand Down
Loading

0 comments on commit 9b7cf60

Please sign in to comment.