Skip to content

Commit

Permalink
✨ auto import types/*.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
trydofor committed Oct 3, 2024
1 parent 6333d7c commit 865e751
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 27 deletions.
6 changes: 6 additions & 0 deletions .changeset/mean-toes-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@fessional/razor-common": patch
"@fessional/razor-mobile": patch
---

✨ auto import types/\*.d.ts
23 changes: 16 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,30 @@ jobs:
with:
skip_install: ${{ steps.cache-sdk-repo.outputs.cache-hit == 'true' }}

- name: Install dependencies
- name: Install Dependencies
run: |
chmod a+x .changeset/bump-top.sh
echo "install pnpm-hoist-layer to devDep"
pnpm -w i --no-frozen-lockfile --ignore-pnpmfile
echo "reset the ci lockfile"
git restore .
git restore pnpm-lock.yaml
echo "install all deps by lockfile"
pnpm -r i --frozen-lockfile
echo "Packaging Envs:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- node: $(node -v)" >> $GITHUB_STEP_SUMMARY
echo "- pnpm: $(pnpm -v)" >> $GITHUB_STEP_SUMMARY
echo "- revi: $(jq -r '.version' package.json)" >> $GITHUB_STEP_SUMMARY
- name: Update or Release
- name: Bumping or Release
id: changesets
uses: changesets/action@v1
with:
commit: ":bookmark: update versions"
commit: ":bookmark: bumping versions"
title: ":rocket: release versions"
version: .changeset/bump-top.sh
publish: pnpm pubs
publish: pnpm ver:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -86,7 +87,15 @@ jobs:
# Format published packages
echo "$publishedPackages" | jq -c '.[]' | while read pkg; do
name=$(echo $pkg | jq -r '.name')
version=$(echo $pkg | jq -r '.version')
name=$(echo $pkg | jq -r '.name')
version=$(echo $pkg | jq -r '.version')
echo "- Package: $name, Version: $version" >> $GITHUB_STEP_SUMMARY
done
- name: Release Root Package
if: steps.changesets.outputs.published == 'true'
run: |
pnpm publish --access public
name=$(jq -r '.name' package.json)
version=$(jq -r '.version' package.json)
echo "- Package: $name, Version: $version" >> $GITHUB_STEP_SUMMARY
3 changes: 3 additions & 0 deletions layers/common/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ export default defineNuxtConfig({
},
typescript: {
typeCheck: true,
tsConfig: {
include: ['./types/*.d.ts'],
},
},
});
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
"readme.md"
],
"scripts": {
"deps": "taze -r -l latest",
"revi": "changeset",
"bump": "changeset version",
"pubs": "changeset publish",
"vers": "changeset status --verbose",
"rmall": "rimraf -g '**/node_modules/' '**/pnpm-lock.yaml'",
"rmdep": "rimraf -g '**/node_modules/'",
"rmgen": "rimraf -g '**/.nuxt/' '**/.output/' '**/dist/'",
"tests": "pnpm -r exec vitest --no-watch"
"dep:latest": "taze -r -l latest",
"ver:add": "changeset",
"ver:bump": "changeset version",
"ver:publish": "changeset publish",
"ver:status": "changeset status --verbose",
"del:all": "rimraf -g '**/node_modules/' '**/pnpm-lock.yaml'",
"del:dep": "rimraf -g '**/node_modules/'",
"del:gen": "rimraf -g '**/.nuxt/' '**/.output/' '**/dist/'",
"dev:test": "pnpm -r exec vitest --no-watch"
},
"devDependencies": {
"pnpm-hoist-layer": "catalog:manage",
Expand Down
6 changes: 3 additions & 3 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ catalogs:
"typescript": "5.6.2"
"unocss": "0.63.2"
"vite-plugin-eslint2": "4.4.2"
"vitest": "2.1.1"
"vitest": "2.1.2"
"vue-tsc": "2.1.6"
mobile:
"@capacitor/preferences": "6.0.2"
"@ionic/vue": "8.3.1"
"@ionic/vue-router": "8.3.1"
"@ionic/vue": "8.3.2"
"@ionic/vue-router": "8.3.2"
"ionicons": "7.4.0"
mobileDev:
"@nuxtjs/ionic": "0.15.1"
Expand Down
8 changes: 4 additions & 4 deletions readme-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ pnpm -r i --ignore-scripts
pnpm -r i

## 🧪 测试
pnpm tests
pnpm dev:test
## 删除 .nuxt, .output, dist
pnpm rmgen
pnpm del:gen
## 删除 node_modules
pnpm rmdep
pnpm del:dep
## 删除 node_modules, pnpm-lock.yaml
pnpm rmall
pnpm del:all
```
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ pnpm -r i --ignore-scripts
pnpm -r i

## 🧪 testing
pnpm tests
pnpm dev:test
## rm .nuxt, .output, dist
pnpm rmgen
pnpm del:gen
## rm node_modules
pnpm rmdep
pnpm del:dep
## rm node_modules, pnpm-lock.yaml
pnpm rmall
pnpm del:all
```

0 comments on commit 865e751

Please sign in to comment.