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:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
|
||||
- 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'`)
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
node-version: '14'
|
||||
|
||||
- name: Install packages
|
||||
run: yarn
|
||||
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
|
||||
- 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
|
||||
working-directory: packages/core
|
||||
run: yarn lint
|
||||
run: pnpm lint
|
||||
|
||||
- name: Build
|
||||
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:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
|
||||
- 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'`)
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
node-version: '14'
|
||||
|
||||
- name: Install packages
|
||||
run: yarn
|
||||
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
|
||||
- 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
|
||||
working-directory: packages/phrases
|
||||
run: yarn lint
|
||||
run: npm run lint
|
||||
|
||||
- name: Build
|
||||
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:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
|
||||
- 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'`)
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
node-version: '14'
|
||||
|
||||
- name: Install packages
|
||||
run: yarn
|
||||
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
|
||||
- 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
|
||||
working-directory: packages/schemas
|
||||
run: yarn lint
|
||||
run: npm run lint
|
||||
|
||||
- name: Build
|
||||
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:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
|
||||
- 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'`)
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
node-version: '14'
|
||||
|
||||
- name: Install packages
|
||||
run: yarn
|
||||
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
|
||||
- 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
|
||||
working-directory: packages/ui
|
||||
run: yarn lint && yarn stylelint
|
||||
run: npm run lint && npm run stylelint
|
||||
|
||||
- name: Build
|
||||
working-directory: packages/ui
|
||||
run: yarn build
|
||||
run: npm run build
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/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",
|
||||
"npmClient": "yarn",
|
||||
"npmClient": "pnpm",
|
||||
"useWorkspaces": true
|
||||
}
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
},
|
||||
"engines": {
|
||||
"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)
|
||||
|
||||
```bash
|
||||
yarn && yarn dev
|
||||
pnpm i && pnpm dev
|
||||
```
|
||||
|
||||
## OpenAPI Doc
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"dev": "rm -rf build/ && tsc-watch --preserveWatchOutput --onSuccess \"node ./build/index.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@logto/essentials": "^1.1.0-rc.1",
|
||||
"@logto/essentials": "^1.1.0-rc.2",
|
||||
"@logto/phrases": "^0.1.0",
|
||||
"@logto/schemas": "^0.1.0",
|
||||
"dayjs": "^1.10.5",
|
||||
|
@ -22,6 +22,7 @@
|
|||
"formidable": "^1.2.2",
|
||||
"got": "^11.8.2",
|
||||
"i18next": "^20.3.5",
|
||||
"jose": "^3.14.3",
|
||||
"koa": "^2.13.1",
|
||||
"koa-body": "^4.2.0",
|
||||
"koa-logger": "^3.2.1",
|
||||
|
@ -55,8 +56,7 @@
|
|||
"typescript": "^4.3.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.15.0",
|
||||
"yarn": "^1.22.10"
|
||||
"node": ">=14.15.0"
|
||||
},
|
||||
"_moduleAliases": {
|
||||
"@": "./build"
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.yarnpkg.com"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/logto-io/logto.git"
|
||||
|
@ -20,7 +17,7 @@
|
|||
"scripts": {
|
||||
"build": "rm -rf lib/ && tsc",
|
||||
"lint": "eslint --format pretty \"src/**\"",
|
||||
"prepack": "yarn build"
|
||||
"prepack": "pnpm build"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/logto-io/logto/issues"
|
||||
|
|
|
@ -11,17 +11,16 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"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/**\"",
|
||||
"prepack": "yarn build"
|
||||
"prepack": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.15.0",
|
||||
"yarn": "^1.22.10"
|
||||
"node": ">=14.15.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@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",
|
||||
"@types/lodash.uniq": "^4.5.6",
|
||||
"@types/node": "14",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"precommit": "lint-staged",
|
||||
"dev:tsc": "tsc -b -w --preserveWatchOutput",
|
||||
"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",
|
||||
"build": "tsc -b && razzle build --noninteractive",
|
||||
"lint": "eslint --format pretty --ext .ts --ext .tsx src",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<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.
|
||||
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.
|
||||
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>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
|
@ -24,9 +26,10 @@
|
|||
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.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
To begin the development, run `pnpm start`.
|
||||
To create a production bundle, use `pnpm build`.
|
||||
-->
|
||||
<%= htmlWebpackPlugin.tags.bodyTags %>
|
||||
</body>
|
||||
|
||||
</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