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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ jobs:
PACKAGE_NAME="${EXTENSION_NAME}-${{ steps.version.outputs.version }}-${SHORT_SHA}.vsix"
echo "packageName=$PACKAGE_NAME" >> $GITHUB_OUTPUT

- name: Build extension
run: pnpm build:production

- name: Package extension
run: pnpm vsce package --no-dependencies --out "${{ steps.setup.outputs.packageName }}"

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ jobs:
PACKAGE_NAME="${EXTENSION_NAME}-${{ steps.version.outputs.version }}-pre.vsix"
echo "packageName=$PACKAGE_NAME" >> $GITHUB_OUTPUT

- name: Build extension
run: pnpm build:production

- name: Package extension
run: pnpm vsce package --no-dependencies --pre-release --out "${{ steps.setup.outputs.packageName }}"

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ jobs:
PACKAGE_NAME="${EXTENSION_NAME}-${{ steps.version.outputs.version }}.vsix"
echo "packageName=$PACKAGE_NAME" >> $GITHUB_OUTPUT

- name: Build extension
run: pnpm build:production

- name: Package extension
run: pnpm vsce package --no-dependencies --out "${{ steps.setup.outputs.packageName }}"

Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@
pnpm-debug.log
.eslintcache

# Webview packages build artifacts
# Workspace packages
packages/*/node_modules/
packages/*/dist/
packages/*/*.tsbuildinfo
2 changes: 1 addition & 1 deletion esbuild.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check
import { context, build } from "esbuild";

const production = process.argv.includes("--production");
const production = process.env.NODE_ENV === "production";
const watch = process.argv.includes("--watch");

/** @type {import("esbuild").Plugin} */
Expand Down
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default defineConfig(
globalIgnores([
"out/**",
"dist/**",
"packages/*/dist/**",
"**/*.d.ts",
"vitest.config.ts",
"**/vite.config*.ts",
Expand Down
47 changes: 24 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@
"type": "commonjs",
"main": "./dist/extension.js",
"scripts": {
"build": "pnpm build:webviews && tsc --noEmit && node esbuild.mjs",
"build:production": "NODE_ENV=production pnpm build:webviews && tsc --noEmit && node esbuild.mjs --production",
"build:webviews": "pnpm -r --filter \"./packages/*\" build",
"build": "concurrently -g -n webviews,extension \"pnpm build:webviews\" \"node esbuild.mjs\"",
"build:production": "NODE_ENV=production pnpm build",
"build:webviews": "pnpm -r --filter \"./packages/*\" --parallel build",
"format": "prettier --write --cache --cache-strategy content .",
"format:check": "prettier --check --cache --cache-strategy content .",
"lint": "eslint --cache --cache-strategy content .",
"lint:fix": "pnpm lint --fix",
"package": "vsce package --no-dependencies",
"package:prerelease": "vsce package --pre-release --no-dependencies",
"package": "pnpm build:production && vsce package --no-dependencies",
"package:prerelease": "pnpm build:production && vsce package --pre-release --no-dependencies",
"test": "CI=true pnpm test:extension && CI=true pnpm test:webview",
"test:extension": "ELECTRON_RUN_AS_NODE=1 electron node_modules/vitest/vitest.mjs --project extension",
"test:integration": "tsc -p test --outDir out --noCheck && node esbuild.mjs && vscode-test",
"test:integration": "tsc -p test/integration --outDir out --noCheck && node esbuild.mjs && vscode-test",
"test:webview": "vitest --project webview",
"typecheck": "concurrently -g \"tsc --noEmit\" \"tsc --noEmit -p test\"",
"vscode:prepublish": "pnpm build:production",
"watch": "concurrently -n extension,webviews \"pnpm watch:extension\" \"pnpm watch:webviews\"",
"typecheck": "concurrently -g -n extension,tests,packages \"tsc --noEmit\" \"tsc --noEmit -p test\" \"pnpm typecheck:packages\"",
"typecheck:packages": "pnpm -r --filter \"./packages/*\" --parallel typecheck",
"watch": "concurrently -g -n extension,webviews \"pnpm watch:extension\" \"pnpm watch:webviews\"",
"watch:extension": "node esbuild.mjs --watch",
"watch:webviews": "pnpm -r --filter \"./packages/*\" --parallel dev"
},
Expand Down Expand Up @@ -478,7 +478,7 @@
"openpgp": "^6.3.0",
"pretty-bytes": "^7.1.0",
"proper-lockfile": "^4.1.2",
"proxy-agent": "^6.5.0",
"proxy-agent": "^7.0.0",
"semver": "^7.7.4",
"strip-ansi": "^7.2.0",
"ua-parser-js": "^1.0.41",
Expand All @@ -489,6 +489,7 @@
"@eslint-react/eslint-plugin": "^2.13.0",
"@eslint/js": "^10.0.1",
"@eslint/markdown": "^7.5.1",
"@rolldown/plugin-babel": "catalog:",
"@tanstack/react-query": "catalog:",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
Expand All @@ -502,42 +503,42 @@
"@types/ua-parser-js": "0.7.39",
"@types/vscode": "^1.95.0",
"@types/ws": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.56.1",
"@typescript-eslint/parser": "^8.56.1",
"@typescript-eslint/eslint-plugin": "^8.57.0",
"@typescript-eslint/parser": "^8.57.0",
"@vitejs/plugin-react": "catalog:",
"@vitest/coverage-v8": "^4.0.18",
"@vitest/coverage-v8": "^4.1.0",
"@vscode/test-cli": "^0.0.12",
"@vscode/test-electron": "^2.5.2",
"@vscode/vsce": "^3.7.1",
"babel-plugin-react-compiler": "catalog:",
"bufferutil": "^4.1.0",
"coder": "catalog:",
"concurrently": "^9.2.1",
"dayjs": "^1.11.19",
"electron": "^40.6.1",
"esbuild": "^0.27.3",
"eslint": "^10.0.2",
"dayjs": "^1.11.20",
"electron": "^41.0.0",
"esbuild": "^0.27.4",
"eslint": "^10.0.3",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import-x": "^4.16.1",
"eslint-plugin-package-json": "^0.89.2",
"eslint-plugin-import-x": "^4.16.2",
"eslint-plugin-package-json": "^0.90.1",
"globals": "^17.4.0",
"jsdom": "^28.1.0",
"jsonc-eslint-parser": "^3.1.0",
"memfs": "^4.56.10",
"memfs": "^4.56.11",
"prettier": "^3.8.1",
"react": "catalog:",
"react-dom": "catalog:",
"typescript": "catalog:",
"typescript-eslint": "^8.56.1",
"typescript-eslint": "^8.57.0",
"utf-8-validate": "^6.0.6",
"vite": "catalog:",
"vitest": "^4.0.18"
"vitest": "^4.1.0"
},
"extensionPack": [
"ms-vscode-remote.remote-ssh"
],
"packageManager": "pnpm@10.30.3",
"packageManager": "pnpm@10.32.1",
"engines": {
"vscode": "^1.95.0",
"node": ">= 20"
Expand Down
3 changes: 3 additions & 0 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"default": "./src/index.ts"
}
},
"scripts": {
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"typescript": "catalog:"
}
Expand Down
8 changes: 0 additions & 8 deletions packages/shared/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"extends": "../tsconfig.packages.json",
"compilerOptions": {
"composite": true,
"declaration": true,
"noEmit": false,
"outDir": "dist",
"rootDir": "src",
"tsBuildInfoFile": "dist/.tsbuildinfo"
},
"include": ["src"]
}
6 changes: 4 additions & 2 deletions packages/tasks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"private": true,
"type": "module",
"scripts": {
"build": "tsc -b && vite build",
"dev": "vite build --watch"
"build": "vite build",
"dev": "vite build --watch",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@repo/shared": "workspace:*",
Expand All @@ -19,6 +20,7 @@
"react-dom": "catalog:"
},
"devDependencies": {
"@rolldown/plugin-babel": "catalog:",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@vitejs/plugin-react": "catalog:",
Expand Down
3 changes: 1 addition & 2 deletions packages/tasks/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
"@repo/webview-shared": ["../webview-shared/src"]
}
},
"include": ["src"],
"references": [{ "path": "../shared" }, { "path": "../webview-shared" }]
"include": ["src"]
}
11 changes: 3 additions & 8 deletions packages/webview-shared/createWebviewConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import react from "@vitejs/plugin-react";
import babel from "@rolldown/plugin-babel";
import react, { reactCompilerPreset } from "@vitejs/plugin-react";
import { resolve } from "node:path";
import { defineConfig, type UserConfig } from "vite";

Expand All @@ -16,13 +17,7 @@ export function createWebviewConfig(
return defineConfig({
// Use relative URLs for assets (fonts, etc.) in CSS
base: "./",
plugins: [
react({
babel: {
plugins: [["babel-plugin-react-compiler", {}]],
},
}),
],
plugins: [react(), babel({ presets: [reactCompilerPreset()] })],
build: {
outDir: resolve(dirname, `../../dist/webviews/${webviewName}`),
emptyOutDir: true,
Expand Down
4 changes: 4 additions & 0 deletions packages/webview-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"default": "./src/react/index.ts"
}
},
"scripts": {
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@repo/shared": "workspace:*"
},
Expand All @@ -38,6 +41,7 @@
}
},
"devDependencies": {
"@types/babel__core": "^7.20.5",
"@types/react": "catalog:",
"@types/vscode-webview": "catalog:",
"@vscode-elements/react-elements": "catalog:",
Expand Down
9 changes: 1 addition & 8 deletions packages/webview-shared/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
{
"extends": "../tsconfig.packages.json",
"compilerOptions": {
"composite": true,
"declaration": true,
"noEmit": false,
"outDir": "dist",
"rootDir": "src",
"tsBuildInfoFile": "dist/.tsbuildinfo",
"paths": {
"@repo/shared": ["../shared/src"]
}
},
"include": ["src"],
"references": [{ "path": "../shared" }]
"include": ["src"]
}
Loading