Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/split extension package #30

Merged
merged 55 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
41ad9c6
feat: 初步抽离逻辑到wormhole中
Aug 16, 2024
c38773b
refactor: wormhole初步分离
Aug 20, 2024
2ed769d
chore: 暂时保存
Aug 23, 2024
6c9620f
chore: 初步分离
czhlin Aug 30, 2024
225215c
Merge branch 'feature/v1.0.0-czhlin' into feat/split-extension-package
JOU-amjs Aug 30, 2024
3ad72a6
feat: 分离出wormhole包
Sep 3, 2024
b6a5aaa
refactor: 重构work
Sep 4, 2024
93e478e
feat: 将模板拆分成一个包
Sep 4, 2024
a967057
chore: templates移动到packages里
Sep 4, 2024
fcb2224
refactor(vscode-extension): 将vscode插件移动到packages目录下
czhlin Sep 4, 2024
97a42d0
fix: alova.config模板区分项目类型
czhlin Sep 4, 2024
81bdf5b
fix(templates): 修复createApis模板中错误提示错误
Sep 5, 2024
aedc51b
chore: 合并release v0.0.10
Sep 5, 2024
13dcd22
Merge branch 'main' of github.com:alovajs/devtools into feat/split-ex…
Sep 5, 2024
befe59c
chore(wormhole): 调整tsconfig,移动templates
Sep 6, 2024
800ec19
build(wormhole): 使用unbuild打包wormhole
Sep 6, 2024
afc602e
build(wormhole): 修改wormhole的打包配置文件
czhlin Sep 7, 2024
988bd1a
fix(wormhole/openapi2data): 修复handleApi修改时unkown类型问题
Sep 9, 2024
9e2e687
chore(whormhole): 控制需要导出的文件
Sep 9, 2024
d6377f5
feat: 添加defaultRequire,默认都是require选项
Sep 10, 2024
af51cba
feat(wormhole): 添加node命名行
czhlin Sep 10, 2024
683c8f2
chore(wormhole): 添加没有配置文件提示
czhlin Sep 10, 2024
cf75e9c
feat: add vitest as unit test tool, change file operation synchronous…
JOU-amjs Sep 12, 2024
ad607fa
fix: transform to FormData when data contains blob
JOU-amjs Sep 13, 2024
64e0bb9
fix: detect `FormData` existence
JOU-amjs Sep 18, 2024
5005139
test(添加readconfig 测试): 修复readconfig没法跑通的问题
Sep 19, 2024
8c7a4c6
Merge pull request #37 from alovajs/test/splited-test-vitest
czhlin Sep 29, 2024
ea44aca
test: add `generate` unit tests
JOU-amjs Oct 13, 2024
6ec8235
test: add all `generate` tests
JOU-amjs Oct 14, 2024
da64987
feat: add features workspaces & import statement in config file, test…
JOU-amjs Oct 24, 2024
e7bf76a
chore: husky cli fix
JOU-amjs Oct 24, 2024
e73bfeb
feat(vscode-extension): 完成wormhole分离适配
Oct 24, 2024
481f3af
feat: 解决wormhole打包后esbuild找不到依赖
czhlin Oct 24, 2024
6667ced
fix(wormhole): 修复单元测试中toMatch处理多行文本问题/s
czhlin Oct 25, 2024
00be2df
Merge branch 'feat/split-extension-package-czhlin' into feat/split-ex…
czhlin Oct 25, 2024
f7a5cc1
feat(vscode-extension): 去除work模式、去掉依赖esbuild,改为用户提供@alova/wormhole包
Oct 25, 2024
ea7076d
fix(wormhole): 修复bin/acitons ora 是esm模块需要使用动态import加载
Oct 25, 2024
9e6868c
fix(vscode-extension): getWormhole改成返回代理对象,解决无法激活插件的问题
Nov 5, 2024
0a50bba
feat(vscode-extension): 添加wormhole没有安装时状态按钮置灰效果
Nov 5, 2024
937559c
feat(vscode-extension): 1.@alova/wormhole禁用状态 2.handleApi调试 3.支持monor…
Nov 6, 2024
21a3ca3
feat: wormhole and devtools splited is completed
JOU-amjs Nov 7, 2024
986e113
fix: initial version
JOU-amjs Nov 7, 2024
e7baff4
ci: add secret VSCE_PAT to env
JOU-amjs Nov 7, 2024
a9f2f74
test: correct test error
JOU-amjs Nov 7, 2024
86dca8f
chore: translate Chinese to English in all files
JOU-amjs Nov 7, 2024
6d0163b
Merge pull request #39 from alovajs/test/splited-test-vitest
czhlin Nov 8, 2024
18de3d7
docs: fill the comments
JOU-amjs Nov 8, 2024
f24565d
feat(wormhole): support response data types starting with 2xx in open…
Nov 8, 2024
9f32cef
fix(vscode-extension): fix alova status button status problem
Nov 8, 2024
49e37b8
Merge branch 'feat/split-extension-package' of https://github.com/alo…
JOU-amjs Nov 8, 2024
7e7c32d
chore: update pnpm-lock.yaml
JOU-amjs Nov 8, 2024
b18e7d4
ci: ci flows debug
JOU-amjs Nov 8, 2024
7cc8bfd
Merge branch 'feat/split-extension-package' of https://github.com/alo…
JOU-amjs Nov 8, 2024
4163652
Merge branch 'main' of https://github.com/alovajs/devtools into feat/…
JOU-amjs Nov 8, 2024
3c60f92
test: update snapshot file
JOU-amjs Nov 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "alovajs/devtools" }],
"commit": false,
"fixed": [],
"linked": [],
"ignore": [
"api-v3-js-commonjs-test",
"api-js-commonjs-test",
"api-v3-js-test",
"api-v3-ts-test",
"api-js-test",
"api-ts-test",
"api-common"
],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "minor",
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
}
5 changes: 5 additions & 0 deletions .changeset/cyan-rats-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'alova-vscode-extension': major
---

the first GA version
5 changes: 5 additions & 0 deletions .changeset/slow-kids-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@alova/wormhole': patch
---

initial version
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
service_name: github-action
repo_token: k4mCwLORlEDAb7wQcYXgMbvAwx2CadBOE
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

52 changes: 0 additions & 52 deletions .eslintrc.cjs

This file was deleted.

3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
github: alovajs
open_collective: alova
custom: https://afdian.net/a/huzhen555
10 changes: 10 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://github.com/actions/labeler

'🚨 action':
- .github/workflows/**

'wormhole':
- packages/wormhole/**

'vscode':
- packages/vscode-extension/**
15 changes: 15 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Automatically labels PRs based on the configuration file
# you are probably looking for 👉 `.github/labeler.yml`
name: Label PRs

on:
- pull_request_target

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
sync-labels: true
43 changes: 43 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: pull_request check

# trigger condition: pull_request to any branch
on:
pull_request:
paths-ignore:
- '.vscode/**'
- '**/*.md'
- '.github/**'
- '.changeset/**'

jobs:
quality:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.head.ref, 'changeset-release') }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

# install pnpm version by `packageManager` in package.json
- name: Setup PNPM
uses: pnpm/[email protected]

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- name: Install deps
run: pnpm install

- name: Lint check
run: pnpm run lint

- name: Format
run: pnpm run format

- name: Unit tests
run: pnpm run test
76 changes: 76 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Release

# trigger condition: pull_request to any branch
on:
push:
branches:
- main

jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

# install pnpm version by `packageManager` in package.json
- name: Setup PNPM
uses: pnpm/[email protected]

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- name: Install deps
run: pnpm install

- name: Lint check
run: pnpm run lint

- name: Format
run: pnpm run format

release:
runs-on: ubuntu-latest
needs: [quality]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

# install pnpm version by `packageManager` in package.json
- name: Setup PNPM
uses: pnpm/[email protected]

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- name: Install deps
run: pnpm install

- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/[email protected]
with:
# Note: pnpm install after versioning is necessary to refresh lockfile
version: pnpm run changeset:version
publish: pnpm run release
commit: 'ci: release'
title: 'ci: release'
env:
# Needs access to push to main
GITHUB_TOKEN: ${{ secrets.ALOVA_GITHUB_TOKEN }}
# Needs access to publish to npm
NPM_TOKEN: ${{ secrets.NPM_ALOVA_PUBLISH_TOKEN }}
# publish vscode extension to marketplace
VSCE_PAT: ${{ secrets.VSCODE_EXTENSION_TOKEN }}
11 changes: 4 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ dist
*.vsix
.vscode-test/

# 忽略test下的生成文件
test/api-*/src/*
test/api-*/*openapi*.*
test/api-*/*swagger*.*
test/api-*/alova.config.*
!test/api-*/src/.gitkeep
!test/api-common/*
# testing
/coverage

alova_tmp_*
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# Ensure files are linted before commit
pnpm lint-staged
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
enable-pre-post-scripts = true
10 changes: 8 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/packages/vscode-extension",
"-u",
"tdd",
"--disable-extensions"
],
"cwd": "${workspaceFolder}/packages/vscode-extension",
"outFiles": ["${workspaceFolder}/packages/vscode-extension/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
}
]
Expand Down
47 changes: 7 additions & 40 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,21 @@
"tasks": [
{
"label": "watch",
"dependsOn": ["npm: watch:tsc", "npm: watch:esbuild"],
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "watch:esbuild",
"group": "build",
"problemMatcher": "$esbuild-watch",
"isBackground": true,
"label": "npm: watch:esbuild",
"presentation": {
"group": "watch",
"reveal": "never"
}
},
{
"type": "npm",
"script": "watch:tsc",
"group": "build",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"label": "npm: watch:tsc",
"options": {
"cwd": "${workspaceFolder}/packages/vscode-extension"
},
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"group": "watch",
"reveal": "never"
}
},
{
"type": "npm",
"script": "watch-tests",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": "build"
},
{
"label": "tasks: watch-tests",
"dependsOn": ["npm: watch", "npm: watch-tests"],
"problemMatcher": []
}
]
}
Loading