diff --git a/examples/workflow-glsp/package.json b/examples/workflow-glsp/package.json index 2cea66ad..d49cee77 100644 --- a/examples/workflow-glsp/package.json +++ b/examples/workflow-glsp/package.json @@ -36,10 +36,8 @@ ], "scripts": { "build": "tsc -b", - "clean": "rimraf tsconfig.tsbuildinfo lib", + "clean": "rimraf *.tsbuildinfo lib", "lint": "eslint --ext .ts,.tsx ./src", - "lint:ci": "yarn lint -o eslint.xml -f checkstyle", - "prepare": "yarn clean && yarn build ", "watch": "tsc -w" }, "dependencies": { diff --git a/examples/workflow-glsp/tsconfig.json b/examples/workflow-glsp/tsconfig.json index b4e6fe3e..6227c1ef 100644 --- a/examples/workflow-glsp/tsconfig.json +++ b/examples/workflow-glsp/tsconfig.json @@ -1,11 +1,17 @@ { "extends": "@eclipse-glsp/ts-config", "compilerOptions": { + "composite": true, "rootDir": "src", "outDir": "lib", "reactNamespace": "JSX", "skipLibCheck": true, "resolveJsonModule": true }, - "include": ["src"] + "include": ["src"], + "references": [ + { + "path": "../../packages/client" + } + ] } diff --git a/examples/workflow-standalone/package.json b/examples/workflow-standalone/package.json index 70c4cccf..1ea206db 100644 --- a/examples/workflow-standalone/package.json +++ b/examples/workflow-standalone/package.json @@ -22,13 +22,14 @@ "main": "lib", "types": "lib", "scripts": { - "build": "tsc -b && webpack", - "clean": "rimraf lib tsconfig.tsbuildinfo app/bundle.js app/bundle.js.map app/css", + "build": "yarn compile && yarn bundle", + "bundle": "webpack", + "clean": "rimraf lib *.tsbuildinfo app/bundle.js app/bundle.js.map app/css", + "compile": "tsc -b", "lint": "eslint --ext .ts,.tsx ./src", - "lint:ci": "yarn lint -o eslint.xml -f checkstyle", - "prepare": "yarn clean && yarn build", "start:exampleServer": "yarn ts-node ./scripts/start-example-server.ts", - "watch": "tsc -w -p ./tsconfig.json" + "watch": "tsc -w && yarn watch:bundle", + "watch:bundle": "webpack -w" }, "dependencies": { "@eclipse-glsp-examples/workflow-glsp": "2.2.0-next", diff --git a/examples/workflow-standalone/tsconfig.json b/examples/workflow-standalone/tsconfig.json index c5b2db8e..edcac2a4 100644 --- a/examples/workflow-standalone/tsconfig.json +++ b/examples/workflow-standalone/tsconfig.json @@ -1,8 +1,17 @@ { "extends": "@eclipse-glsp/ts-config/tsconfig.json", "compilerOptions": { + "composite": true, "rootDir": "src", "outDir": "lib" }, - "include": ["src", "lib", "css", "app"] + "include": ["src", "lib", "css", "app"], + "references": [ + { + "path": "../../packages/client" + }, + { + "path": "../workflow-glsp" + } + ] } diff --git a/package.json b/package.json index 06620c18..5b14f876 100644 --- a/package.json +++ b/package.json @@ -8,28 +8,32 @@ ], "scripts": { "all": "yarn install && yarn lint && yarn test", - "build": "lerna run build", + "build": "yarn compile && yarn bundle", + "bundle": "yarn standalone bundle", "check:headers": "glsp checkHeaders . -t lastCommit", "check:pr": "yarn all && yarn check:headers", "clean": "lerna run clean && rimraf coverage .nyc_output", - "lint": "lerna run lint", - "lint:ci": "lerna run lint:ci", - "prepare": "lerna run prepare", + "compile": "tsc -b", + "lint": "eslint --ext .ts,.tsx .", + "lint:ci": "yarn lint -o eslint.xml -f checkstyle", + "prepare": "yarn build", "publish:latest": "lerna publish from-git --no-git-reset --no-git-tag-version --no-push", "publish:next": "lerna publish preminor --exact --canary --preid next --dist-tag next --no-git-reset --no-git-tag-version --no-push --ignore-scripts --yes", "publish:prepare": "lerna version --ignore-scripts --yes --no-push", - "start:exampleServer": "yarn --cwd ./examples/workflow-standalone start:exampleServer", + "standalone": "yarn --cwd ./examples/workflow-standalone", + "start:exampleServer": "yarn standalone start:exampleServer", "test": "lerna run test", "test:ci": "lerna run test:ci", "test:coverage": "lerna run test:coverage", "test:coverage:ci": "yarn glsp coverageReport .", "upgrade:next": "yarn upgrade -p \"@eclipse-glsp.*|sprotty.*\" --next ", - "watch": "lerna run --parallel watch" + "watch": "concurrently --kill-others -n tsc,standalone -c red,yellow \"tsc -b -w --preserveWatchOutput\" \"yarn -s standalone watch:bundle\"" }, "devDependencies": { "@eclipse-glsp/dev": "~2.0.0", "@types/lodash": "4.14.191", "@types/node": "16.x", + "concurrently": "^8.2.2", "lerna": "^7.1.1", "typescript": "^5.1.6" }, diff --git a/packages/client/package.json b/packages/client/package.json index 7cb65751..568b005c 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -37,10 +37,8 @@ ], "scripts": { "build": "tsc -b", - "clean": "rimraf lib tsconfig.tsbuildinfo coverage .nyc_output", + "clean": "rimraf lib *.tsbuildinfo coverage .nyc_output", "lint": "eslint --ext .ts,.tsx ./src", - "lint:ci": "yarn lint -o eslint.xml -f checkstyle", - "prepare": "yarn clean && yarn build", "test": "mocha --config ../../.mocharc \"./src/**/*.spec.?(ts|tsx)\"", "test:ci": "export JUNIT_REPORT_PATH=./report.xml && yarn test --reporter mocha-jenkins-reporter", "test:coverage": "nyc yarn test", diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index 1f6d5ad0..e2fdc87b 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -1,8 +1,16 @@ { "extends": "@eclipse-glsp/ts-config/mocha", "compilerOptions": { + "composite": true, + "rootDir": "src", + "resolveJsonModule": true, "outDir": "lib", "reactNamespace": "JSX" }, - "include": ["src"] + "include": ["src", "src/**/*.json"], + "references": [ + { + "path": "../glsp-sprotty" + } + ] } diff --git a/packages/glsp-sprotty/package.json b/packages/glsp-sprotty/package.json index e132f796..7eb46e7a 100644 --- a/packages/glsp-sprotty/package.json +++ b/packages/glsp-sprotty/package.json @@ -27,10 +27,8 @@ ], "scripts": { "build": "tsc -b", - "clean": "rimraf lib tsconfig.tsbuildinfo", + "clean": "rimraf lib *.tsbuildinfo", "lint": "eslint --ext .ts,.tsx ./src", - "lint:ci": "yarn lint -o eslint.xml -f checkstyle", - "prepare": "yarn clean && yarn build", "watch": "tsc -w" }, "dependencies": { diff --git a/packages/glsp-sprotty/tsconfig.json b/packages/glsp-sprotty/tsconfig.json index f3d8c204..95cc815d 100644 --- a/packages/glsp-sprotty/tsconfig.json +++ b/packages/glsp-sprotty/tsconfig.json @@ -1,8 +1,15 @@ { "extends": "@eclipse-glsp/ts-config", "compilerOptions": { + "composite": true, + "rootDir": "src", "outDir": "lib", "reactNamespace": "JSX" }, - "include": ["src"] + "include": ["src"], + "references": [ + { + "path": "../protocol" + } + ] } diff --git a/packages/protocol/package.json b/packages/protocol/package.json index d8bdfb7b..4ee1d190 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -36,10 +36,8 @@ ], "scripts": { "build": "tsc -b", - "clean": "rimraf lib tsconfig.tsbuildinfo coverage .nyc_output ", + "clean": "rimraf lib *.tsbuildinfo coverage .nyc_output ", "lint": "eslint --ext .ts,.tsx ./src", - "lint:ci": "yarn lint -o eslint.xml -f checkstyle", - "prepare": "yarn clean && yarn build", "test": "mocha --config ../../.mocharc \"./src/**/*.spec.?(ts|tsx)\"", "test:ci": "export JUNIT_REPORT_PATH=./report.xml && yarn test --reporter mocha-jenkins-reporter", "test:coverage": "nyc yarn test", diff --git a/packages/protocol/tsconfig.json b/packages/protocol/tsconfig.json index db53a4c4..07b938be 100644 --- a/packages/protocol/tsconfig.json +++ b/packages/protocol/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "@eclipse-glsp/ts-config/mocha", "compilerOptions": { + "composite": true, "rootDir": "src", "outDir": "lib", "reactNamespace": "JSX" diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..a66ee8ea --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,25 @@ +{ + "extends": "@eclipse-glsp/ts-config", + "include": [], + "compilerOptions": { + "composite": true, + "resolveJsonModule": true + }, + "references": [ + { + "path": "./packages/protocol" + }, + { + "path": "./packages/glsp-sprotty" + }, + { + "path": "./packages/client" + }, + { + "path": "./examples/workflow-glsp" + }, + { + "path": "./examples/workflow-standalone" + } + ] +} diff --git a/yarn.lock b/yarn.lock index a9276b1a..b2278fd2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -160,6 +160,13 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== +"@babel/runtime@^7.21.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.0.tgz#584c450063ffda59697021430cb47101b085951e" + integrity sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/template@^7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" @@ -1846,7 +1853,7 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1: +chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -2066,6 +2073,21 @@ concat-stream@^2.0.0: readable-stream "^3.0.2" typedarray "^0.0.6" +concurrently@^8.2.2: + version "8.2.2" + resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-8.2.2.tgz#353141985c198cfa5e4a3ef90082c336b5851784" + integrity sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg== + dependencies: + chalk "^4.1.2" + date-fns "^2.30.0" + lodash "^4.17.21" + rxjs "^7.8.1" + shell-quote "^1.8.1" + spawn-command "0.0.2" + supports-color "^8.1.1" + tree-kill "^1.2.2" + yargs "^17.7.2" + console-control-strings@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -2207,6 +2229,13 @@ dargs@^7.0.0: resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== +date-fns@^2.30.0: + version "2.30.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" + integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== + dependencies: + "@babel/runtime" "^7.21.0" + dateformat@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" @@ -5796,6 +5825,11 @@ reflect-metadata@^0.1.13: resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + regexp.prototype.flags@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" @@ -5906,7 +5940,7 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@^7.5.5: +rxjs@^7.5.5, rxjs@^7.8.1: version "7.8.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== @@ -6032,6 +6066,11 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +shell-quote@^1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" + integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== + shelljs@^0.8.5: version "0.8.5" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" @@ -6185,6 +6224,11 @@ source-map@^0.6.0, source-map@^0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +spawn-command@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2.tgz#9544e1a43ca045f8531aac1a48cb29bdae62338e" + integrity sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ== + spawn-wrap@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-2.0.0.tgz#103685b8b8f9b79771318827aa78650a610d457e" @@ -6391,7 +6435,7 @@ style-loader@^3.3.1: resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.3.tgz#bba8daac19930169c0c9c96706749a597ae3acff" integrity sha512-53BiGLXAcll9maCYtZi2RCQZKa8NQQai5C4horqKyRmHj9H7QmcUyucrH+4KW/gBQbXM2AsB0axoEcFZPlfPcw== -supports-color@8.1.1, supports-color@^8.0.0: +supports-color@8.1.1, supports-color@^8.0.0, supports-color@^8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -6564,6 +6608,11 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +tree-kill@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" + integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== + trim-newlines@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" @@ -7201,7 +7250,7 @@ yargs@^15.0.2: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^17.6.2: +yargs@^17.6.2, yargs@^17.7.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==