Skip to content

Commit

Permalink
Merge branch 'main' into workflow_artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
sjd78 authored Jan 29, 2025
2 parents 7e9cbf0 + 5d48c1f commit 02da691
Show file tree
Hide file tree
Showing 11 changed files with 606 additions and 50 deletions.
572 changes: 548 additions & 24 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,13 @@
"prepare": "husky",
"postinstall": "npm run build -w shared",
"clean": "rimraf ./dist ./downloaded_assets && npm run clean --workspaces --if-present",
"clean:all": "npm run clean && rimraf ./node_modules ./**/node_modules/",
"clean:all": "npm run clean && rimraf ./node_modules ./**/node_modules/ ./**/tsconfig.tsbuildinfo",
"lint": "eslint ./scripts && npm run lint --workspaces --if-present",
"lint:fix": "npm run lint:fix --workspaces --if-present",
"predev": "npm run build -w shared",
"dev": "concurrently -c auto 'npm:dev:shared' 'npm:dev:webview-ui' 'npm:dev:vscode'",
"dev:shared": "npm run dev -w shared",
"dev:webview-ui": "npm run start -w webview-ui",
"dev:vscode": "npm run dev -w vscode",
"dev:webview-ui": "wait-on -d 500 shared/dist/index.mjs && npm run start -w webview-ui",
"dev:vscode": "wait-on -d 500 shared/dist/index.mjs && npm run dev -w vscode",
"build": "npm run build --workspaces --if-present",
"collect-assets": "rimraf ./downloaded_assets && node ./scripts/collect-assets.js",
"dist": "rimraf ./dist && node ./scripts/copy-dist.js",
Expand All @@ -63,6 +62,7 @@
},
"devDependencies": {
"@eslint/js": "^9.11.1",
"@rollup/plugin-node-resolve": "^16.0.0",
"@types/fs-extra": "^11.0.4",
"@types/js-yaml": "^4.0.9",
"@types/node": "22.x",
Expand All @@ -88,7 +88,8 @@
"tar": "^7.4.3",
"typescript": "^5.6.3",
"typescript-eslint": "^8.14.0",
"unzipper": "^0.12.3"
"unzipper": "^0.12.3",
"wait-on": "^8.0.2"
},
"dependencies": {
"fs-extra": "^11.2.0",
Expand Down
22 changes: 19 additions & 3 deletions shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,31 @@
"name": "@editor-extensions/shared",
"version": "0.0.6",
"private": true,
"main": "./dist/index.js",
"type": "module",
"types": "./dist/index.d.ts",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.mjs"
},
"./package.json": "./package.json"
},
"scripts": {
"clean": "rimraf dist",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"prebuild": "npm run clean",
"build": "tsc --build",
"dev": "tsc --build --watch --preserveWatchOutput"
"build": "vite build && tsc",
"dev": "concurrently -c auto 'npm:dev:*'",
"dev:types": "tsc --watch",
"dev:build": "vite build --watch"
},
"devDependencies": {
"vite": "^5.4.9",
"vite-plugin-checker": "^0.8.0"
},
"lint-staged": {
"*.{js,cjs,mjs,ts,cts,mts}": "eslint --fix",
Expand Down
6 changes: 3 additions & 3 deletions shared/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"composite": true,
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
"module": "ESNext",
"moduleResolution": "Node"
},
"include": ["src/**/*.ts"],
"exclude": ["dist", "node_modules"]
Expand Down
21 changes: 21 additions & 0 deletions shared/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { resolve } from "path";
import { defineConfig } from "vite";
import nodeResolve from "@rollup/plugin-node-resolve";
import checker from "vite-plugin-checker";

export default defineConfig({
plugins: [checker({ typescript: true })],
build: {
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: "Shared",
fileName: (format) => (format === "es" ? "index.mjs" : "index.cjs"),
formats: ["es", "cjs"],
},
minify: false,
sourcemap: true,
rollupOptions: {
plugins: [nodeResolve()], // this is a library so don't package libraries
},
},
});
12 changes: 3 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"composite": true,
"declaration": true
},

"references": [
{ "path": "./shared" },
{ "path": "./vscode" },
{ "path": "./webview-ui" }
]
"declaration": true,
"preserveWatchOutput": true
}
}
4 changes: 2 additions & 2 deletions vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -723,11 +723,11 @@
"lint:fix": "eslint --fix .",
"prebuild": "npm run clean",
"build": "npm run compile",
"compile": "tsc -b && webpack --mode production",
"compile": "tsc && webpack --mode production",
"dev": "npm run watch",
"watch": "webpack --watch --mode development",
"test:local": "mocha --require ts-node/register src/**/__tests__/*test.ts",
"test": "npm run test:local && npm run compile && vscode-test"
"test": "npm run compile && npm run test:local && vscode-test"
},
"lint-staged": {
"*.{js,cjs,mjs,ts,cts,mts}": "eslint --fix",
Expand Down
1 change: 0 additions & 1 deletion vscode/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"sourceMap": true,
"rootDir": "src",
"strict": true,
"composite": true,
"declaration": true
},
"include": ["src/**/*.ts"]
Expand Down
4 changes: 3 additions & 1 deletion webview-ui/src/components/AnalysisPage/AnalysisPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ const AnalysisPage: React.FC = () => {
variant={ButtonVariant.primary}
onClick={runAnalysisRequest}
isLoading={isAnalyzing}
isDisabled={isAnalyzing || isStartingServer || !serverRunning}
isDisabled={
isAnalyzing || isStartingServer || !serverRunning || isWaitingForSolution
}
>
{isAnalyzing ? "Analyzing..." : "Run Analysis"}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/components/ResolutionsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const ResolutionPage: React.FC = () => {
</FlexItem>
</>
)}
{isResolved && (
{isResolved && !isFetchingSolution && (
<FlexItem>
<Label color="blue">All resolutions have been applied.</Label>
</FlexItem>
Expand Down
1 change: 0 additions & 1 deletion webview-ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"noImplicitAny": false,
"allowJs": false,
"baseUrl": ".",
"composite": true,
"outDir": "dist",
"declaration": true,
"noEmit": false
Expand Down

0 comments on commit 02da691

Please sign in to comment.