Skip to content

Commit 414d931

Browse files
ARHAEEMImgBotApp
authored andcommitted
new update
1 parent dcad48b commit 414d931

33 files changed

Lines changed: 5871 additions & 383 deletions

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
name: Issue Report
2+
description: Report a bug, regression, or request an enhancement
3+
title: "[Issue]: "
4+
labels:
5+
- triage
6+
body:
7+
- type: dropdown
8+
id: issue_type
9+
attributes:
10+
label: Issue Type
11+
description: What kind of issue are you reporting?
12+
options:
13+
- Bug
14+
- Regression
15+
- Performance/Freeze
16+
- Feature Request
17+
- Documentation
18+
- Other
19+
validations:
20+
required: true
21+
22+
- type: dropdown
23+
id: area
24+
attributes:
25+
label: Area
26+
description: Which part of the extension is affected?
27+
options:
28+
- Beautifier v2
29+
- Minifier v2
30+
- Beautifier v1
31+
- Minifier v1
32+
- Diagnostics
33+
- Syntax Highlighting
34+
- IntelliSense / Completions
35+
- Commands / Context Menus
36+
- Skills Installer
37+
- Build / Release
38+
- Other
39+
validations:
40+
required: true
41+
42+
- type: dropdown
43+
id: severity
44+
attributes:
45+
label: Severity / Impact
46+
options:
47+
- Low (minor issue)
48+
- Medium (workflow impacted)
49+
- High (blocking)
50+
validations:
51+
required: true
52+
53+
- type: input
54+
id: extension_version
55+
attributes:
56+
label: Extension Version
57+
placeholder: e.g. 0.2.0
58+
validations:
59+
required: true
60+
61+
- type: input
62+
id: vscode_version
63+
attributes:
64+
label: VS Code Version
65+
placeholder: e.g. 1.86.1
66+
validations:
67+
required: true
68+
69+
- type: input
70+
id: os
71+
attributes:
72+
label: OS
73+
placeholder: e.g. Windows 11 / macOS 14 / Ubuntu 22.04
74+
validations:
75+
required: true
76+
77+
- type: textarea
78+
id: summary
79+
attributes:
80+
label: Summary
81+
description: Short summary of the issue or request.
82+
placeholder: Provide a concise summary.
83+
validations:
84+
required: true
85+
86+
- type: textarea
87+
id: steps
88+
attributes:
89+
label: Steps to Reproduce
90+
description: Required for bugs, regressions, or freezes.
91+
placeholder: |
92+
1. ...
93+
2. ...
94+
3. ...
95+
validations:
96+
required: false
97+
98+
- type: textarea
99+
id: expected
100+
attributes:
101+
label: Expected Behavior
102+
placeholder: What should happen?
103+
validations:
104+
required: false
105+
106+
- type: textarea
107+
id: actual
108+
attributes:
109+
label: Actual Behavior
110+
placeholder: What actually happened?
111+
validations:
112+
required: false
113+
114+
- type: textarea
115+
id: formula
116+
attributes:
117+
label: Sample Formula / Minimal Repro
118+
description: Provide a minimal formula sample (redact sensitive data).
119+
placeholder: |
120+
Example:
121+
IF({Status}="Open", "Yes", "No")
122+
validations:
123+
required: false
124+
125+
- type: textarea
126+
id: logs
127+
attributes:
128+
label: Logs / Screenshots
129+
description: Paste extension host logs, error output, or screenshots.
130+
placeholder: Attach logs or screenshots if available.
131+
validations:
132+
required: false
133+
134+
- type: checkboxes
135+
id: confirmation
136+
attributes:
137+
label: Confirmation
138+
options:
139+
- label: I searched existing issues to avoid duplicates.
140+
required: true
141+
- label: I can share a minimal repro formula if needed.
142+
required: false

.github/workflows/test.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI Tests
2+
3+
"on":
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Setup pnpm
16+
uses: pnpm/action-setup@v4
17+
with:
18+
version: 9
19+
run_install: false
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20'
25+
cache: 'pnpm'
26+
27+
- name: Setup Bun
28+
uses: oven-sh/setup-bun@v1
29+
with:
30+
bun-version: latest
31+
32+
- name: Install dependencies
33+
run: pnpm install --frozen-lockfile
34+
35+
- name: Setup headless environment
36+
run: |
37+
sudo apt-get update
38+
sudo apt-get install -y xvfb libasound2-dev libgtk-3-dev libnss3-dev
39+
40+
- name: Run tests
41+
run: |
42+
xvfb-run -a pnpm test

.vscode/tasks.json

Lines changed: 31 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,44 @@
1-
// See https://go.microsoft.com/fwlink/?LinkId=733558
2-
// for the documentation about the tasks.json format
31
{
42
"version": "2.0.0",
53
"tasks": [
64
{
7-
"label": "watch",
8-
"dependsOn": [
9-
"npm: watch:tsc",
10-
"npm: watch:esbuild"
11-
],
12-
"presentation": {
13-
"reveal": "never"
14-
},
15-
"group": {
16-
"kind": "build",
17-
"isDefault": true
18-
}
19-
},
20-
{
21-
"type": "npm",
22-
"script": "watch:esbuild",
23-
"group": "build",
24-
"problemMatcher": "$esbuild-watch",
25-
"isBackground": true,
26-
"label": "npm: watch:esbuild",
27-
"presentation": {
28-
"group": "watch",
29-
"reveal": "never"
30-
}
31-
},
32-
{
33-
"type": "npm",
34-
"script": "watch:tsc",
35-
"group": "build",
36-
"problemMatcher": "$tsc-watch",
37-
"isBackground": true,
38-
"label": "npm: watch:tsc",
39-
"presentation": {
40-
"group": "watch",
41-
"reveal": "never"
42-
}
43-
},
44-
{
45-
"type": "npm",
46-
"script": "watch-tests",
47-
"problemMatcher": "$tsc-watch",
5+
"label": "bun: watch",
6+
"type": "shell",
7+
"command": "bun",
8+
"args": ["run", "watch"],
489
"isBackground": true,
10+
"problemMatcher": "$esbuild-watch",
4911
"presentation": {
50-
"reveal": "never",
51-
"group": "watchers"
12+
"reveal": "never"
5213
},
14+
"group": {
15+
"kind": "build",
16+
"isDefault": true
17+
}
18+
},
19+
{
20+
"label": "bun: build",
21+
"type": "shell",
22+
"command": "bun",
23+
"args": ["run", "build"],
24+
"problemMatcher": "$esbuild-watch",
5325
"group": "build"
5426
},
5527
{
56-
"label": "tasks: watch-tests",
57-
"dependsOn": [
58-
"npm: watch",
59-
"npm: watch-tests"
60-
],
61-
"problemMatcher": []
28+
"label": "bun: compile",
29+
"type": "shell",
30+
"command": "bun",
31+
"args": ["run", "compile"],
32+
"problemMatcher": "$tsc",
33+
"group": "build"
34+
},
35+
{
36+
"label": "bun: check-types",
37+
"type": "shell",
38+
"command": "bun",
39+
"args": ["run", "check-types"],
40+
"problemMatcher": "$tsc",
41+
"group": "build"
6242
}
6343
]
6444
}

build.ts

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import * as esbuild from 'esbuild';
2+
import { cpSync, existsSync, mkdirSync } from 'fs';
3+
import { join } from 'path';
4+
5+
const production = process.argv.includes('--production');
6+
const watch = process.argv.includes('--watch');
7+
8+
const esbuildProblemMatcherPlugin: esbuild.Plugin = {
9+
name: 'esbuild-problem-matcher',
10+
setup(build) {
11+
build.onStart(() => {
12+
console.log('[watch] build started');
13+
});
14+
build.onEnd((result) => {
15+
result.errors.forEach(({ text, location }) => {
16+
console.error(`✘ [ERROR] ${text}`);
17+
if (location) {
18+
console.error(` ${location.file}:${location.line}:${location.column}:`);
19+
}
20+
});
21+
console.log('[watch] build finished');
22+
});
23+
},
24+
};
25+
26+
const copyVendorPlugin: esbuild.Plugin = {
27+
name: 'copy-vendor',
28+
setup(build) {
29+
build.onEnd(() => {
30+
try {
31+
const srcVendor = join(__dirname, 'src', 'vendor');
32+
const outVendor = join(__dirname, 'dist', 'vendor');
33+
if (existsSync(srcVendor)) {
34+
if (!existsSync(outVendor)) {
35+
mkdirSync(outVendor, { recursive: true });
36+
}
37+
cpSync(srcVendor, outVendor, { recursive: true });
38+
console.log('[copy] src/vendor -> dist/vendor');
39+
}
40+
} catch (e) {
41+
console.warn('[copy] vendor failed:', e);
42+
}
43+
});
44+
}
45+
};
46+
47+
async function main() {
48+
const ctx = await esbuild.context({
49+
entryPoints: ['src/extension.ts'],
50+
bundle: true,
51+
format: 'cjs',
52+
minify: production,
53+
sourcemap: !production,
54+
sourcesContent: false,
55+
platform: 'node',
56+
outfile: 'dist/extension.js',
57+
external: ['vscode'],
58+
logLevel: 'silent',
59+
plugins: [
60+
esbuildProblemMatcherPlugin,
61+
copyVendorPlugin,
62+
],
63+
});
64+
65+
if (watch) {
66+
await ctx.watch();
67+
console.log('[watch] watching for changes...');
68+
} else {
69+
await ctx.rebuild();
70+
await ctx.dispose();
71+
}
72+
}
73+
74+
main().catch(e => {
75+
console.error(e);
76+
process.exit(1);
77+
});

0 commit comments

Comments
 (0)