Skip to content

Commit

Permalink
Merge pull request #12 from aXenDeveloper/pnpm
Browse files Browse the repository at this point in the history
perf: Change npm to pnpm
  • Loading branch information
aXenDeveloper authored Dec 29, 2023
2 parents 7f24311 + a0079e0 commit 9107868
Show file tree
Hide file tree
Showing 12 changed files with 7,826 additions and 22,578 deletions.
43 changes: 25 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Tests
name: Tests & Builds

on:
push:
Expand All @@ -10,22 +7,32 @@ on:
branches: '*'

jobs:
build:
install:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run lint
- run: npm run test
- run: npm run build --if-present
node-version: 20

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Install dependencies
run: pnpm install

- name: Check formatting
run: pnpm lint

- name: Run tests
run: pnpm test

- name: Build
run: pnpm build
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"less.validate": false,
"scss.validate": false,
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
"source.fixAll.stylelint": "explicit"
}
}
27 changes: 12 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,44 @@ Personal portfolio application.
Use commands:

```bash
npm i
npm run prepare
pnpm i
pnpm prepare
```

## 🛠 Run

```bash
npm run dev
pnpm dev
```

## 🔨 Deployment

Command:

```bash
npm run build
pnpm build
```

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

## 💻 Server

Commands:
Before run server, you need to build project.

1. ```bash
npm run build
```
2. ```bash
npm start
```
```bash
pnpm start
```

## 👍 Tests

- `npm t Button.test.tsx` - run only one test `Button.test.tsx`
- `npm run t:coverage` - run tests coverage for frontend
- `pnpm t Button.test.tsx` - run only one test `Button.test.tsx`
- `pnpm t:coverage` - run tests coverage for frontend

## 👍 Lint

Commands:

```bash
npm run lint
npm run lint:fix
pnpm lint
pnpm lint:fix
```
9 changes: 3 additions & 6 deletions __mocks__/RootMock.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { NextIntlProvider } from 'next-intl';
import { NextIntlClientProvider } from 'next-intl';
import { ReactNode } from 'react';
import Cookies from 'js-cookie';

import messages from '../messages/en.json';

Expand All @@ -9,11 +8,9 @@ interface Props {
}

export const RootMock = ({ children }: Props) => {
Cookies.set('NEXT_LOCALE', 'en');

return (
<NextIntlProvider messages={messages} locale="en">
<NextIntlClientProvider messages={messages} locale="en">
{children}
</NextIntlProvider>
</NextIntlClientProvider>
);
};
11 changes: 5 additions & 6 deletions assets/faq/technology/technology-en.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ Here are some of the technologies and tools I use to build my projects.
- [NodeJS](https://nodejs.org/en/)
- [SCSS](https://sass-lang.com/)
- [IPS Community Suite](https://invisioncommunity.com/)
- [Styled Components](https://styled-components.com/)

### Tests

- [Vitest](https://vitejs.dev/)
- [Playwright](https://playwright.dev/)
- [Jest](https://jestjs.io/)
- [Cypress](https://www.cypress.io/)

### Databases

Expand All @@ -31,17 +34,13 @@ Here are some of the technologies and tools I use to build my projects.
- [GraphQL](https://graphql.org/)
- [Rest API](https://restfulapi.net/)

### Deprecated

Below are technologies that I no longer use or use very rarely.
### Basic

- [Jest](https://jestjs.io/)
- [Cypress](https://www.cypress.io/)
- [Angular](https://angular.io/)
- [Styled Components](https://styled-components.com/)
- [Smarty](https://www.smarty.net/)
- [jQuery](https://jquery.com/)
- [C#](https://docs.microsoft.com/en-us/dotnet/csharp/)
- [.Net](https://dotnet.microsoft.com/)

## Tools

Expand Down
11 changes: 5 additions & 6 deletions assets/faq/technology/technology-pl.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ Tutaj znajdziesz listę technologii, których używam w swojej pracy.
- [NodeJS](https://nodejs.org/en/)
- [SCSS](https://sass-lang.com/)
- [IPS Community Suite](https://invisioncommunity.com/)
- [Styled Components](https://styled-components.com/)

### Testy

- [Vitest](https://vitejs.dev/)
- [Playwright](https://playwright.dev/)
- [Jest](https://jestjs.io/)
- [Cypress](https://www.cypress.io/)

### Bazy danych

Expand All @@ -31,17 +34,13 @@ Tutaj znajdziesz listę technologii, których używam w swojej pracy.
- [GraphQL](https://graphql.org/)
- [Rest API](https://restfulapi.net/)

### Przestarzałe

Poniżej znajdziesz listę technologii z którymi pracowałem w przeszłości. Możesz je znaleść w moich starszych projektach.
### Podstawowe

- [Jest](https://jestjs.io/)
- [Cypress](https://www.cypress.io/)
- [Angular](https://angular.io/)
- [Styled Components](https://styled-components.com/)
- [Smarty](https://www.smarty.net/)
- [jQuery](https://jquery.com/)
- [C#](https://docs.microsoft.com/en-us/dotnet/csharp/)
- [.Net](https://dotnet.microsoft.com/)

## Narzędzia

Expand Down
39 changes: 20 additions & 19 deletions commitlint.config.js → commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
module.exports = {
parserPreset: 'conventional-changelog-conventionalcommits',
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 100],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 100],
'header-max-length': [2, 'always', 100],
'subject-empty': [2, 'never'],
'subject-full-stop': [1, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test']
]
}
};
// eslint-disable-next-line import/no-anonymous-default-export
export default {
parserPreset: 'conventional-changelog-conventionalcommits',
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 100],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 100],
'header-max-length': [2, 'always', 100],
'subject-empty': [2, 'never'],
'subject-full-stop': [1, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test']
]
}
};
Loading

1 comment on commit 9107868

@vercel
Copy link

@vercel vercel bot commented on 9107868 Dec 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.