Skip to content

Commit 5873158

Browse files
committed
Merge branch 'release/1.0.0-alpha.4'
2 parents 068fe97 + dd68c96 commit 5873158

File tree

17 files changed

+325
-149
lines changed

17 files changed

+325
-149
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"extends": ["next/core-web-vitals", "prettier"]
33
}

.github/dependabot.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
version: 2
22
updates:
33
# Maintain dependencies for GitHub Actions
4-
- package-ecosystem: "github-actions"
4+
- package-ecosystem: 'github-actions'
55
# Files stored in repository root
6-
directory: "/"
6+
directory: '/'
77
# Check for updates every weekday
88
schedule:
9-
interval: "daily"
9+
interval: 'daily'
1010
# Add assignees
1111
assignees:
12-
- "nekofar"
12+
- 'nekofar'
1313
# Include a list of updated dependencies
1414
commit-message:
15-
prefix: "ci"
16-
include: "scope"
15+
prefix: 'ci'
16+
include: 'scope'
1717
# Specify labels for pull requests
1818
labels:
19-
- "dependencies"
19+
- 'dependencies'
2020
# Allow up to 20 open pull requests for dependencies
2121
open-pull-requests-limit: 20
2222
# Add reviewers
2323
reviewers:
24-
- "nekofar"
24+
- 'nekofar'
2525
# Raise pull requests against the `develop` branch
26-
target-branch: "develop"
26+
target-branch: 'develop'
2727

2828
# Maintain dependencies for PNPM
29-
- package-ecosystem: "npm"
29+
- package-ecosystem: 'npm'
3030
# Files stored in repository root
31-
directory: "/"
31+
directory: '/'
3232
# Check for updates every weekday
3333
schedule:
34-
interval: "daily"
34+
interval: 'daily'
3535
# Add assignees
3636
assignees:
37-
- "nekofar"
37+
- 'nekofar'
3838
# Include a list of updated dependencies
3939
commit-message:
40-
prefix: "chore"
41-
include: "scope"
40+
prefix: 'chore'
41+
include: 'scope'
4242
# Specify labels for pull requests
4343
labels:
44-
- "dependencies"
44+
- 'dependencies'
4545
# Allow up to 10 open pull requests for dependencies
4646
open-pull-requests-limit: 20
4747
# Add reviewers
4848
reviewers:
49-
- "nekofar"
49+
- 'nekofar'
5050
# Raise pull requests against the `develop` branch
51-
target-branch: "develop"
51+
target-branch: 'develop'

.github/workflows/build.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
name: Build Pipeline # A Build Pipeline which will use for build, test and deploy.
22

33
on:
4-
push: # When we push the changes.
5-
branches: # Only for these branches.
4+
push: # When we push the changes.
5+
branches: # Only for these branches.
66
- master
77
- bugfix/*
88
- hotfix/*
99
- release/*
10-
paths-ignore: # Ignoring the markdown file changes.
11-
- "**/*.md"
12-
pull_request: # Also on pull request events.
13-
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab.
10+
paths-ignore: # Ignoring the markdown file changes.
11+
- '**/*.md'
12+
pull_request: # Also on pull request events.
13+
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab.
1414

1515
jobs:
16-
build: # Job named 'build'
17-
runs-on: ubuntu-latest # The type of machine to run the job on.
16+
build: # Job named 'build'
17+
runs-on: ubuntu-latest # The type of machine to run the job on.
1818

19-
strategy: # Allows you to create a matrix for job configuration.
19+
strategy: # Allows you to create a matrix for job configuration.
2020
matrix:
21-
node-version: [ 18.x, 19.x, 20.x ] # Running tests across different environments.
21+
node-version: [18.x, 19.x, 20.x] # Running tests across different environments.
2222
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2323

24-
steps: # The sequence of tasks that make up a job.
24+
steps: # The sequence of tasks that make up a job.
2525
- name: Checking out repository code
26-
uses: actions/[email protected] # Action for checking out a repo.
26+
uses: actions/[email protected] # Action for checking out a repo.
2727

2828
- name: Setup Node.js ${{ matrix.node-version }} Environment
29-
uses: actions/[email protected] # Action for setting up Node environment.
29+
uses: actions/[email protected] # Action for setting up Node environment.
3030
with:
3131
node-version: ${{ matrix.node-version }}
3232

3333
- name: Install pnpm package manager
34-
uses: pnpm/[email protected] # Action for setting up pnpm.
34+
uses: pnpm/[email protected] # Action for setting up pnpm.
3535
id: pnpm-install
3636
with:
3737
version: ^8
@@ -43,19 +43,19 @@ jobs:
4343
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
4444
4545
- name: Cache pnpm Store
46-
uses: actions/[email protected] # Action provides caching dependencies and build outputs to improve workflow execution time.
46+
uses: actions/[email protected] # Action provides caching dependencies and build outputs to improve workflow execution time.
4747
with:
48-
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} # The path of the directory to cache.
49-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} # An explicit key for restoring and saving the cache.
48+
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} # The path of the directory to cache.
49+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} # An explicit key for restoring and saving the cache.
5050
restore-keys: |
5151
${{ runner.os }}-pnpm-store-
5252
5353
- name: Install project dependencies
54-
run: pnpm install # Install all project dependencies.
54+
run: pnpm install # Install all project dependencies.
5555

5656
- name: Build & export the App
57-
run: pnpm run build # Builds the app and exports it.
57+
run: pnpm run build # Builds the app and exports it.
5858

59-
concurrency: # Allows controlling the concurrency level of the job in the build pipeline.
59+
concurrency: # Allows controlling the concurrency level of the job in the build pipeline.
6060
group: ${{ github.workflow }}-${{ github.ref }}
61-
cancel-in-progress: true # If enabled, previous runs of this workflow for the same group-key will be cancelled while this build or run is in progress.
61+
cancel-in-progress: true # If enabled, previous runs of this workflow for the same group-key will be cancelled while this build or run is in progress.

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99

1010
jobs:
1111
release:
12-
1312
# Specify the type of the runner the job will run on
1413
runs-on: ubuntu-latest
1514

.prettierignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# dependencies
2+
/node_modules
3+
/.pnp
4+
.pnp.js
5+
pnpm-lock.yaml
6+
7+
# testing
8+
/coverage
9+
10+
# next.js
11+
/.next/
12+
/out/
13+
14+
# production
15+
/build
16+
/out
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
.pnpm-debug.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts
37+
38+
# next-sitemap
39+
**/robots.txt
40+
**/sitemap*.xml
41+
42+
# lingui
43+
**/locales/
44+
45+
# markdown
46+
CHANGELOG.md

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.0.0-alpha.4] - 2023-07-21
6+
7+
### <!-- 04 -->Refactor
8+
9+
- Update `getStaticProps` and `getStaticPaths` functions
10+
- Update `locales` module for code consistency
11+
- Update code for better readability and consistency
12+
13+
### <!-- 05 -->Documentation
14+
15+
- Remove unnecessary whitespace from README
16+
17+
### <!-- 08 -->Miscellaneous Tasks
18+
19+
- Update lingui configuration
20+
- Add Prettier and its plugins for code formatting
21+
- Add `prettier.config.js` for unified formatting
22+
- Add Prettier to ESLint configuration
23+
- Add `.prettierignore` file to exclude unnecessary directories and files from formatting
24+
- Standardize quotes in YAML files
25+
- Update config files for consistent quote usage
26+
- Add prettier `format` script to `package.json`
27+
528
## [1.0.0-alpha.3] - 2023-07-21
629

730
### <!-- 08 -->Miscellaneous Tasks

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
## Getting Started
32

43
First, run the development server:

lingui.config.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
/** @type {import('@lingui/conf').LinguiConfig} */
22
module.exports = {
3-
locales: ["ar", "en", "fa"],
4-
sourceLocale: "en",
5-
catalogs: [
6-
{
7-
path: "src/locales/{locale}/messages",
8-
include: ["src"],
9-
},
10-
],
11-
format: "po",
12-
};
3+
locales: ['ar', 'en', 'fa'],
4+
sourceLocale: 'en',
5+
catalogs: [
6+
{
7+
path: '<rootDir>/src/locales/{locale}/messages',
8+
include: ['<rootDir>/src'],
9+
exclude: ['**/node_modules/**', '**/.next/**', '**/out/**'],
10+
},
11+
],
12+
format: 'po',
13+
}

next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const nextConfig = {
88
experimental: {
99
swcPlugins: [
1010
[
11-
"@lingui/swc-plugin",
11+
'@lingui/swc-plugin',
1212
{
1313
// the same options as in .swcrc
1414
},

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-lingui-starter",
3-
"version": "1.0.0-alpha.3",
3+
"version": "1.0.0-alpha.4",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
@@ -10,7 +10,8 @@
1010
"start": "serve out",
1111
"lint": "next lint",
1212
"lingui:extract": "lingui extract --clean",
13-
"lingui:compile": "lingui compile"
13+
"lingui:compile": "lingui compile",
14+
"format": "prettier --write ."
1415
},
1516
"dependencies": {
1617
"@lingui/core": "4.3.0",
@@ -31,7 +32,11 @@
3132
"autoprefixer": "10.4.14",
3233
"eslint": "8.45.0",
3334
"eslint-config-next": "13.4.11",
35+
"eslint-config-prettier": "8.8.0",
3436
"postcss": "8.4.26",
37+
"prettier": "3.0.0",
38+
"prettier-plugin-organize-imports": "3.2.3",
39+
"prettier-plugin-tailwindcss": "0.4.1",
3540
"tailwindcss": "3.3.3",
3641
"typescript": "5.1.6",
3742
"serve": "14.2.0"

0 commit comments

Comments
 (0)