mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
Merge pull request #50 from logto-io/gao--use-pnpm
This commit is contained in:
commit
eff73ffaa2
16 changed files with 16130 additions and 15748 deletions
32
.github/workflows/core-main.yml
vendored
32
.github/workflows/core-main.yml
vendored
|
@ -15,26 +15,28 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
|
- uses: actions/setup-node@v2
|
||||||
- name: Get yarn cache directory path
|
|
||||||
id: yarn-cache-dir-path
|
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
node-version: '14'
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
|
|
||||||
- name: Install packages
|
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
|
||||||
run: yarn
|
- name: Cache pnpm modules
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.pnpm-store
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v2.0.1
|
||||||
|
with:
|
||||||
|
version: 6.0.2
|
||||||
|
run_install: true
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
working-directory: packages/core
|
working-directory: packages/core
|
||||||
run: yarn lint
|
run: pnpm lint
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: packages/core
|
working-directory: packages/core
|
||||||
run: yarn build
|
run: pnpm build
|
||||||
|
|
32
.github/workflows/phrases-main.yml
vendored
32
.github/workflows/phrases-main.yml
vendored
|
@ -15,26 +15,28 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
|
- uses: actions/setup-node@v2
|
||||||
- name: Get yarn cache directory path
|
|
||||||
id: yarn-cache-dir-path
|
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
node-version: '14'
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
|
|
||||||
- name: Install packages
|
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
|
||||||
run: yarn
|
- name: Cache pnpm modules
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.pnpm-store
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v2.0.1
|
||||||
|
with:
|
||||||
|
version: 6.0.2
|
||||||
|
run_install: true
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
working-directory: packages/phrases
|
working-directory: packages/phrases
|
||||||
run: yarn lint
|
run: npm run lint
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: packages/phrases
|
working-directory: packages/phrases
|
||||||
run: yarn build
|
run: npm run build
|
||||||
|
|
32
.github/workflows/schemas-main.yml
vendored
32
.github/workflows/schemas-main.yml
vendored
|
@ -15,26 +15,28 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
|
- uses: actions/setup-node@v2
|
||||||
- name: Get yarn cache directory path
|
|
||||||
id: yarn-cache-dir-path
|
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
node-version: '14'
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
|
|
||||||
- name: Install packages
|
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
|
||||||
run: yarn
|
- name: Cache pnpm modules
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.pnpm-store
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v2.0.1
|
||||||
|
with:
|
||||||
|
version: 6.0.2
|
||||||
|
run_install: true
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
working-directory: packages/schemas
|
working-directory: packages/schemas
|
||||||
run: yarn lint
|
run: npm run lint
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: packages/schemas
|
working-directory: packages/schemas
|
||||||
run: yarn build
|
run: npm run build
|
||||||
|
|
32
.github/workflows/ui-main.yml
vendored
32
.github/workflows/ui-main.yml
vendored
|
@ -15,26 +15,28 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
|
- uses: actions/setup-node@v2
|
||||||
- name: Get yarn cache directory path
|
|
||||||
id: yarn-cache-dir-path
|
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
node-version: '14'
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
|
|
||||||
- name: Install packages
|
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
|
||||||
run: yarn
|
- name: Cache pnpm modules
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.pnpm-store
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v2.0.1
|
||||||
|
with:
|
||||||
|
version: 6.0.2
|
||||||
|
run_install: true
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
working-directory: packages/ui
|
working-directory: packages/ui
|
||||||
run: yarn lint && yarn stylelint
|
run: npm run lint && npm run stylelint
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: packages/ui
|
working-directory: packages/ui
|
||||||
run: yarn build
|
run: npm run build
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. "$(dirname "$0")/_/husky.sh"
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
yarn lerna run --concurrency 1 --stream precommit --since HEAD --exclude-dependents
|
pnpm -- lerna run --concurrency 1 --stream precommit --since HEAD --exclude-dependents
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"npmClient": "yarn",
|
"npmClient": "pnpm",
|
||||||
"useWorkspaces": true
|
"useWorkspaces": true
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,6 @@
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.15.0",
|
"node": ">=14.15.0",
|
||||||
"yarn": "^1.22.10"
|
"pnpm": ">=6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ The core backend service.
|
||||||
Copy proper `.env` to project root. (TBD: design the config process)
|
Copy proper `.env` to project root. (TBD: design the config process)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn && yarn dev
|
pnpm i && pnpm dev
|
||||||
```
|
```
|
||||||
|
|
||||||
## OpenAPI Doc
|
## OpenAPI Doc
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"dev": "rm -rf build/ && tsc-watch --preserveWatchOutput --onSuccess \"node ./build/index.js\""
|
"dev": "rm -rf build/ && tsc-watch --preserveWatchOutput --onSuccess \"node ./build/index.js\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@logto/essentials": "^1.1.0-rc.1",
|
"@logto/essentials": "^1.1.0-rc.2",
|
||||||
"@logto/phrases": "^0.1.0",
|
"@logto/phrases": "^0.1.0",
|
||||||
"@logto/schemas": "^0.1.0",
|
"@logto/schemas": "^0.1.0",
|
||||||
"dayjs": "^1.10.5",
|
"dayjs": "^1.10.5",
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
"formidable": "^1.2.2",
|
"formidable": "^1.2.2",
|
||||||
"got": "^11.8.2",
|
"got": "^11.8.2",
|
||||||
"i18next": "^20.3.5",
|
"i18next": "^20.3.5",
|
||||||
|
"jose": "^3.14.3",
|
||||||
"koa": "^2.13.1",
|
"koa": "^2.13.1",
|
||||||
"koa-body": "^4.2.0",
|
"koa-body": "^4.2.0",
|
||||||
"koa-logger": "^3.2.1",
|
"koa-logger": "^3.2.1",
|
||||||
|
@ -55,8 +56,7 @@
|
||||||
"typescript": "^4.3.5"
|
"typescript": "^4.3.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.15.0",
|
"node": ">=14.15.0"
|
||||||
"yarn": "^1.22.10"
|
|
||||||
},
|
},
|
||||||
"_moduleAliases": {
|
"_moduleAliases": {
|
||||||
"@": "./build"
|
"@": "./build"
|
||||||
|
|
|
@ -10,9 +10,6 @@
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"publishConfig": {
|
|
||||||
"registry": "https://registry.yarnpkg.com"
|
|
||||||
},
|
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/logto-io/logto.git"
|
"url": "git+https://github.com/logto-io/logto.git"
|
||||||
|
@ -20,7 +17,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rm -rf lib/ && tsc",
|
"build": "rm -rf lib/ && tsc",
|
||||||
"lint": "eslint --format pretty \"src/**\"",
|
"lint": "eslint --format pretty \"src/**\"",
|
||||||
"prepack": "yarn build"
|
"prepack": "pnpm build"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/logto-io/logto/issues"
|
"url": "https://github.com/logto-io/logto/issues"
|
||||||
|
|
|
@ -11,17 +11,16 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"generate": "ts-node src/gen/index.ts && eslint --format pretty \"src/db-entries/**\" --fix",
|
"generate": "ts-node src/gen/index.ts && eslint --format pretty \"src/db-entries/**\" --fix",
|
||||||
"build": "yarn generate && rm -rf lib/ && tsc --p tsconfig.build.json",
|
"build": "pnpm generate && rm -rf lib/ && tsc --p tsconfig.build.json",
|
||||||
"lint": "eslint --format pretty \"src/**\"",
|
"lint": "eslint --format pretty \"src/**\"",
|
||||||
"prepack": "yarn build"
|
"prepack": "pnpm build"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.15.0",
|
"node": ">=14.15.0"
|
||||||
"yarn": "^1.22.10"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@logto/eslint-config": "^0.1.0-rc.14",
|
"@logto/eslint-config": "^0.1.0-rc.14",
|
||||||
"@logto/essentials": "^1.1.0-rc.1",
|
"@logto/essentials": "^1.1.0-rc.2",
|
||||||
"@logto/ts-config": "^0.1.0-rc.14",
|
"@logto/ts-config": "^0.1.0-rc.14",
|
||||||
"@types/lodash.uniq": "^4.5.6",
|
"@types/lodash.uniq": "^4.5.6",
|
||||||
"@types/node": "14",
|
"@types/node": "14",
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"precommit": "lint-staged",
|
"precommit": "lint-staged",
|
||||||
"dev:tsc": "tsc -b -w --preserveWatchOutput",
|
"dev:tsc": "tsc -b -w --preserveWatchOutput",
|
||||||
"dev:razzle": "razzle start",
|
"dev:razzle": "razzle start",
|
||||||
"dev": "PORT=5000 concurrently -c \"blue,cyan\" \"yarn:dev:tsc\" -k \"yarn:dev:razzle\"",
|
"dev": "PORT=5000 concurrently -c \"blue,cyan\" \"pnpm:dev:tsc\" -k \"pnpm:dev:razzle\"",
|
||||||
"start": "NODE_ENV=production node build/server.js",
|
"start": "NODE_ENV=production node build/server.js",
|
||||||
"build": "tsc -b && razzle build --noninteractive",
|
"build": "tsc -b && razzle build --noninteractive",
|
||||||
"lint": "eslint --format pretty --ext .ts --ext .tsx src",
|
"lint": "eslint --format pretty --ext .ts --ext .tsx src",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="<%= process.env.PUBLIC_PATH %>favicon.ico" />
|
<link rel="icon" href="<%= process.env.PUBLIC_PATH %>favicon.ico" />
|
||||||
|
@ -12,10 +13,11 @@
|
||||||
Only files inside the `public` folder can be referenced from the HTML.
|
Only files inside the `public` folder can be referenced from the HTML.
|
||||||
Unlike "/favicon.ico" or "favicon.ico", "<%= process.env.PUBLIC_PATH %>/favicon.ico" will
|
Unlike "/favicon.ico" or "favicon.ico", "<%= process.env.PUBLIC_PATH %>/favicon.ico" will
|
||||||
work correctly both with client-side routing and a non-root public URL.
|
work correctly both with client-side routing and a non-root public URL.
|
||||||
Learn how to configure a non-root public URL by running `npm run build`.
|
Learn how to configure a non-root public URL by running `pnpm build`.
|
||||||
-->
|
-->
|
||||||
<title>React App</title>
|
<title>React App</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
@ -24,9 +26,10 @@
|
||||||
If you open it directly in the browser, you will see an empty page.
|
If you open it directly in the browser, you will see an empty page.
|
||||||
You can add webfonts, meta tags, or analytics to this file.
|
You can add webfonts, meta tags, or analytics to this file.
|
||||||
The build step will place the bundled scripts into the <body> tag.
|
The build step will place the bundled scripts into the <body> tag.
|
||||||
To begin the development, run `npm start` or `yarn start`.
|
To begin the development, run `pnpm start`.
|
||||||
To create a production bundle, use `npm run build` or `yarn build`.
|
To create a production bundle, use `pnpm build`.
|
||||||
-->
|
-->
|
||||||
<%= htmlWebpackPlugin.tags.bodyTags %>
|
<%= htmlWebpackPlugin.tags.bodyTags %>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
16038
pnpm-lock.yaml
Normal file
16038
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load diff
2
pnpm-workspace.yaml
Normal file
2
pnpm-workspace.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
packages:
|
||||||
|
- 'packages/*'
|
Loading…
Reference in a new issue