Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 1 addition & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,10 @@ jobs:
node-version: 20
cache: 'npm'

- name: Sync Version from Tag
if: github.ref_type == 'tag'
run: |
VERSION=${GITHUB_REF_NAME#v}
npm version $VERSION --no-git-tag-version

- name: Install, Compile & Package
run: |
npm install
npm run compile
npm run test:unit
npx @vscode/vsce package

- name: Publish to VS Code Marketplace
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run Unit Tests

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install & Run Tests
run: |
npm install
npm run test:unit
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"java.project.excludes": [
"**/node_modules",
"**/.metadata",
"**/archetype",
"**/bin",
"**/test/fixtures"
]
}
4 changes: 4 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ tsconfig.json
**/*.ts
!**/*.d.ts
.github/**
*.vsix
test/**
out/test/**

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Java Sorter (Eclipse Style)",
"description": "%extension.description%",
"icon": "icon.png",
"version": "1.0.2",
"version": "1.0.3",
"publisher": "eoasmxd",
"repository": {
"type": "git",
Expand Down Expand Up @@ -97,7 +97,8 @@
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"clean": "node -e \"try { require('fs').rmSync('out', {recursive:true,force:true}); require('fs').readdirSync('.').filter(f => f.endsWith('.vsix')).forEach(f => require('fs').unlinkSync(f)) } catch(e) {}\"",
"package": "npx @vscode/vsce package"
"package": "npx @vscode/vsce package",
"test:unit": "npm run compile && node out/test/run-tests.js"
},
"devDependencies": {
"@types/node": "^20.0.0",
Expand Down
2 changes: 1 addition & 1 deletion package.nls.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"command.title": "Java Sorter: 排序类成员 (仿 Eclipse 风格)",
"config.memberOrder": "指定不同类别成员的物理排列顺序。如果 sortAllMembers 为 false,未包含在数组中的类型将保持原位不动。",
"config.visibilityOrder": "指定同组内各成员可见性的排序优先级顺序(如 ['public', 'protected', 'package', 'private'])。保留空数组则不启用可见性排序。",
"config.sortAllMembers": "是否对所有类成员进行排序。若为 false,则字段、枚举常量和初始化块将像钉子一样固定在原位不动。"
"config.sortAllMembers": "是否对所有类成员进行排序。若为 false,则字段、枚举常量和初始化块将保持在原始位置,不参与排序。"
}
2 changes: 1 addition & 1 deletion package.nls.zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"command.title": "Java Sorter: 排序类成员 (仿 Eclipse 风格)",
"config.memberOrder": "指定不同类别成员的物理排列顺序。如果 sortAllMembers 为 false,未包含在数组中的类型将保持原位不动。",
"config.visibilityOrder": "指定同组内各成员可见性的排序优先级顺序(如 ['public', 'protected', 'package', 'private'])。保留空数组则不启用可见性排序。",
"config.sortAllMembers": "是否对所有类成员进行排序。若为 false,则字段、枚举常量和初始化块将像钉子一样固定在原位不动。"
"config.sortAllMembers": "是否对所有类成员进行排序。若为 false,则字段、枚举常量和初始化块将保持在原始位置,不参与排序。"
}
Loading
Loading