Skip to content

Commit 149aba0

Browse files
committed
Upgrade packages, code refactor and clean
migrate to pnpm add lint and format git hooks refactor html.ts and code clean fix the issue that svg is not saved correctly set proper svg size when saving
1 parent f64695e commit 149aba0

25 files changed

+5110
-4629
lines changed

.eslintrc.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
name: 🛠️ Builds
22

33
on:
4-
push:
5-
branches:
6-
- '*'
7-
pull_request:
8-
branches:
9-
- master
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- master
1010

1111
concurrency:
12-
group: ${{ github.workflow }}-${{ github.ref }}
13-
cancel-in-progress: true
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
1414

1515
jobs:
16-
build:
17-
strategy:
18-
matrix:
19-
os: [macos-latest, ubuntu-latest, windows-latest]
20-
runs-on: ${{ matrix.os }}
21-
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v4
24-
25-
- name: Install Node.js
26-
uses: actions/setup-node@v4
27-
with:
28-
node-version: 18.x
29-
30-
- name: Run npm install
31-
run: npm install
32-
33-
- name: Run pretest
34-
run: xvfb-run -a npm run pretest
35-
if: runner.os == 'Linux'
36-
37-
- name: Run pretest
38-
run: npm run pretest
39-
if: runner.os != 'Linux'
40-
41-
- name: Run vsce package
42-
run: mkdir -p out/vsix && npm exec vsce package -- -o out/vsix/
43-
44-
- name: Upload artifact
45-
if: runner.os == 'Linux'
46-
uses: actions/upload-artifact@v4
47-
with:
48-
name: ${{ github.event.repository.name }}
49-
path: |
50-
${{ github.workspace }}/out/vsix/
16+
build:
17+
strategy:
18+
matrix:
19+
os: [macos-latest, ubuntu-latest, windows-latest]
20+
runs-on: ${{ matrix.os }}
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Install Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 18.x
29+
30+
- name: Run npm install
31+
run: npm install
32+
33+
- name: Run pretest
34+
run: xvfb-run -a npm run pretest
35+
if: runner.os == 'Linux'
36+
37+
- name: Run pretest
38+
run: npm run pretest
39+
if: runner.os != 'Linux'
40+
41+
- name: Run vsce package
42+
run: mkdir -p out/vsix && npm exec vsce package -- -o out/vsix/
43+
44+
- name: Upload artifact
45+
if: runner.os == 'Linux'
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: ${{ github.event.repository.name }}
49+
path: |
50+
${{ github.workspace }}/out/vsix/

.github/workflows/deploy.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
name: 🎉 Release
22

33
on:
4-
push:
5-
tags:
6-
- 'v*'
4+
push:
5+
tags:
6+
- 'v*'
77

88
jobs:
9-
deploy:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v4
14-
15-
- name: Install Node.js
16-
uses: actions/setup-node@v4
17-
with:
18-
node-version: 18.x
19-
20-
- name: Run npm install
21-
run: npm install
22-
23-
- name: Run vsce package
24-
run: mkdir -p out/vsix && npm exec vsce package -- -o out/vsix/
25-
26-
- name: Create Github Release
27-
uses: softprops/action-gh-release@v2
28-
with:
29-
files: out/vsix/*.vsix
30-
31-
- name: Publish to VS Code Marketplace
32-
run: npm run deploy
33-
env:
34-
VSCE_PAT: ${{ secrets.VSCE_PAT }}
35-
36-
- name: Publish to Open VSX
37-
run: npm run deploy_ovsx -- --pat ${{ secrets.OVSX_PAT }}
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Install Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 18.x
19+
20+
- name: Run npm install
21+
run: npm install
22+
23+
- name: Run vsce package
24+
run: mkdir -p out/vsix && npm exec vsce package -- -o out/vsix/
25+
26+
- name: Create Github Release
27+
uses: softprops/action-gh-release@v2
28+
with:
29+
files: out/vsix/*.vsix
30+
31+
- name: Publish to VS Code Marketplace
32+
run: npm run deploy
33+
env:
34+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
35+
36+
- name: Publish to Open VSX
37+
run: npm run deploy_ovsx -- --pat ${{ secrets.OVSX_PAT }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ dist
33
node_modules
44
.vscode-test/
55
*.vsix
6-
/static/graph_data*
6+
/static/*.dot

.prettierrc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
semi: false
2-
singleQuote: true
3-
printWidth: 80
4-
trailingComma: 'none'
5-
arrowParens: 'avoid'
1+
{ "semi": false, "singleQuote": true, "arrowParens": "avoid" }

.vscode/extensions.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
// See http://go.microsoft.com/fwlink/?LinkId=827846
3-
// for the documentation about the extensions.json format
4-
"recommendations": [
5-
"dbaeumer.vscode-eslint"
6-
]
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": ["dbaeumer.vscode-eslint"]
75
}

.vscode/launch.json

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,26 @@
33
// Hover to view descriptions of existing attributes.
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
{
6-
"version": "0.2.0",
7-
"configurations": [
8-
{
9-
"name": "Run Extension",
10-
"type": "extensionHost",
11-
"request": "launch",
12-
"args": [
13-
"--extensionDevelopmentPath=${workspaceFolder}"
14-
],
15-
"outFiles": [
16-
"${workspaceFolder}/out/**/*.js"
17-
],
18-
"preLaunchTask": "${defaultBuildTask}"
19-
},
20-
{
21-
"name": "Extension Tests",
22-
"type": "extensionHost",
23-
"request": "launch",
24-
"args": [
25-
"--extensionDevelopmentPath=${workspaceFolder}",
26-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
27-
],
28-
"outFiles": [
29-
"${workspaceFolder}/out/test/**/*.js"
30-
],
31-
"preLaunchTask": "${defaultBuildTask}"
32-
}
33-
]
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
13+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
14+
"preLaunchTask": "${defaultBuildTask}"
15+
},
16+
{
17+
"name": "Extension Tests",
18+
"type": "extensionHost",
19+
"request": "launch",
20+
"args": [
21+
"--extensionDevelopmentPath=${workspaceFolder}",
22+
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
23+
],
24+
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
25+
"preLaunchTask": "${defaultBuildTask}"
26+
}
27+
]
3428
}

.vscode/settings.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@
77
"out": true // set this to false to include "out" folder in search results
88
},
99
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10-
"typescript.tsc.autoDetect": "off"
11-
}
10+
"typescript.tsc.autoDetect": "off",
11+
"editor.defaultFormatter": "esbenp.prettier-vscode",
12+
"[javascript]": {
13+
"editor.defaultFormatter": "esbenp.prettier-vscode"
14+
}
15+
}

.vscode/tasks.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
// See https://go.microsoft.com/fwlink/?LinkId=733558
22
// for the documentation about the tasks.json format
33
{
4-
"version": "2.0.0",
5-
"tasks": [
6-
{
7-
"type": "npm",
8-
"script": "watch",
9-
"problemMatcher": "$tsc-watch",
10-
"isBackground": true,
11-
"presentation": {
12-
"reveal": "never"
13-
},
14-
"group": {
15-
"kind": "build",
16-
"isDefault": true
17-
}
18-
}
19-
]
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "watch",
9+
"problemMatcher": "$tsc-watch",
10+
"isBackground": true,
11+
"presentation": {
12+
"reveal": "never"
13+
},
14+
"group": {
15+
"kind": "build",
16+
"isDefault": true
17+
}
18+
}
19+
]
2020
}

.vscodeignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ vsc-extension-quickstart.md
1010
**/*.map
1111
**/*.ts
1212
.history
13-
static/**
13+
static/*.dot

0 commit comments

Comments
 (0)