migrate to pnpm

This commit is contained in:
vchikalkin 2023-11-28 23:30:51 +03:00
parent 1a7cf3f3c5
commit 07009f11e6
17 changed files with 9409 additions and 14500 deletions

6
.eslintignore Normal file
View File

@ -0,0 +1,6 @@
node_modules
dist
*.config.*
next-env.d.ts
.next
.eslintrc.js

View File

@ -29,5 +29,6 @@
"typescriptreact",
"yaml"
],
"eslint.lintTask.enable": true
"eslint.lintTask.enable": true,
"editor.inlineSuggest.showToolbar": "onHover"
}

View File

@ -1,24 +1,32 @@
# Turborepo starter
This is an official Yarn v1 starter turborepo.
This is an official starter Turborepo.
## Using this example
Run the following command:
```sh
npx create-turbo@latest
```
## What's inside?
This turborepo uses [Yarn](https://classic.yarnpkg.com/) as a package manager. It includes the following packages/apps:
This Turborepo includes the following packages/apps:
### Apps and Packages
- `docs`: a [Next.js](https://nextjs.org/) app
- `web`: another [Next.js](https://nextjs.org/) app
- `ui`: a stub React component library shared by both `web` and `docs` applications
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
- `@repo/ui`: a stub React component library shared by both `web` and `docs` applications
- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
### Utilities
This turborepo has some additional tools already setup for you:
This Turborepo has some additional tools already setup for you:
- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
@ -30,7 +38,7 @@ To build all apps and packages, run the following command:
```
cd my-turborepo
yarn run build
pnpm build
```
### Develop
@ -39,7 +47,7 @@ To develop all apps and packages, run the following command:
```
cd my-turborepo
yarn run dev
pnpm dev
```
### Remote Caching
@ -55,7 +63,7 @@ npx turbo login
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo:
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
```
npx turbo link
@ -65,7 +73,7 @@ npx turbo link
Learn more about the power of Turborepo:
- [Pipelines](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)

View File

@ -1,2 +0,0 @@
node_modules
dist

View File

@ -1,12 +1,13 @@
module.exports = {
root: true,
extends: [
'@vchikalkin/eslint-config-awesome/typescript/config',
'@vchikalkin/eslint-config-awesome/typescript/rules',
],
const { createConfig } = require('@vchikalkin/eslint-config-awesome');
module.exports = createConfig('typescript', {
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
};
ignorePatterns: ['*.config.js', '.eslintrc.js'],
rules: {
'import/no-duplicates': 'off',
'import/consistent-type-specifier-style': 'off',
},
});

View File

@ -58,8 +58,9 @@
"@types/ldap-authentication": "^2.2.1",
"@types/node": "^20.8.6",
"@types/supertest": "^2.0.14",
"@vchikalkin/eslint-config-awesome": "^1.1.2",
"@vchikalkin/eslint-config-awesome": "^1.1.5",
"eslint": "^8.51.0",
"fastify": "^4.24.3",
"jest": "29.7.0",
"prettier": "^3.0.3",
"source-map-support": "^0.5.21",
@ -68,7 +69,7 @@
"ts-loader": "^9.5.0",
"ts-node": "^10.9.1",
"tsconfig-paths": "4.2.0",
"typescript": "4.9.5"
"typescript": "5.3.2"
},
"jest": {
"moduleFileExtensions": [

View File

@ -17,5 +17,6 @@
"strictBindCallApply": false,
"forceConsistentCasingInFileNames": false,
"noFallthroughCasesInSwitch": false
}
},
"exclude": ["node_modules"]
}

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,14 @@
module.exports = {
extends: [
'@vchikalkin/eslint-config-awesome/next-typescript/config',
'@vchikalkin/eslint-config-awesome/next-typescript/rules',
],
const { createConfig } = require('@vchikalkin/eslint-config-awesome');
module.exports = createConfig('next-typescript', {
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
root: true,
};
rules: {
'import/no-duplicates': 'off',
'import/consistent-type-specifier-style': 'off',
'react/forbid-component-props': 'off',
},
ignorePatterns: ['*.config.js', '.eslintrc.js'],
});

View File

@ -1,8 +1,8 @@
import { z } from 'zod';
const { z } = require('zod');
const envSchema = z.object({
APP_DESCRIPTION: z.string(),
APP_BASE_PATH: z.string().optional().default(''),
});
export default envSchema;
module.exports = envSchema;

View File

@ -1,14 +1,10 @@
import envSchema from './config/schema/env.js';
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const envSchema = require('./config/schema/env.js');
const { join } = require('path');
const runtimeConfig = envSchema.parse(process.env);
/** @type {import('next').NextConfig} */
const nextConfig = {
module.exports = {
basePath: process.env.APP_BASE_PATH,
eslint: {
ignoreDuringBuilds: true,
@ -22,5 +18,3 @@ const nextConfig = {
serverRuntimeConfig: runtimeConfig,
swcMinify: true,
};
export default nextConfig;

View File

@ -2,7 +2,6 @@
"name": "web",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "next dev",
"build": "next build",
@ -12,20 +11,20 @@
},
"dependencies": {
"@fontsource/montserrat": "^5.0.13",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/node": "^20.10.0",
"@types/react": "^18.2.39",
"@types/react-dom": "^18.2.17",
"axios": "^1.5.1",
"next": "^14.0.0",
"next": "^14.0.3",
"normalize.css": "^8.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass": "^1.69.3",
"typescript": "4.9.5",
"typescript": "5.3.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@vchikalkin/eslint-config-awesome": "^1.1.2",
"@vchikalkin/eslint-config-awesome": "^1.1.5",
"eslint": "^8.51.0"
}
}

View File

@ -2,6 +2,7 @@
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Next.js",
"compilerOptions": {
"target": "ES2022",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,

View File

@ -2,9 +2,6 @@
"name": "evo-auth",
"version": "0.0.0",
"private": true,
"workspaces": [
"apps/*"
],
"scripts": {
"build": "dotenv -e .env turbo run build",
"dev": "dotenv -e .env.local turbo run dev",
@ -19,9 +16,8 @@
"prettier": "latest",
"turbo": "latest"
},
"packageManager": "pnpm@8.9.0",
"engines": {
"node": ">=14.0.0"
},
"dependencies": {},
"packageManager": "yarn@1.22.19"
"node": ">=18"
}
}

9341
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

3
pnpm-workspace.yaml Normal file
View File

@ -0,0 +1,3 @@
packages:
- "apps/*"
- "packages/*"

8677
yarn.lock

File diff suppressed because it is too large Load Diff