aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2024-04-07 01:59:09 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2024-04-07 01:59:09 +0200
commit1d2b5c85a177b4be0cc270b8e6e54488e23da5a1 (patch)
treec8b87c875faa7e6048e5ba41b5a9e4449263fc6a
parentchore(deps): upgrade to frontend-jdk17 8.0.0 (diff)
downloadrefinery-1d2b5c85a177b4be0cc270b8e6e54488e23da5a1.tar.gz
refinery-1d2b5c85a177b4be0cc270b8e6e54488e23da5a1.tar.zst
refinery-1d2b5c85a177b4be0cc270b8e6e54488e23da5a1.zip
build: move Javascript config to top level
We need this to support multiple Javascript subprojects (e.g., a frontend and a documentation website).
-rw-r--r--.eslintrc.cjs (renamed from subprojects/frontend/.eslintrc.cjs)23
-rw-r--r--build.gradle.kts54
-rw-r--r--package.json29
-rw-r--r--prettier.config.cjs (renamed from subprojects/frontend/prettier.config.cjs)0
-rw-r--r--scripts/eslintReport.cjs90
-rw-r--r--subprojects/frontend/build.gradle.kts7
-rw-r--r--subprojects/frontend/config/eslintReport.cjs58
-rw-r--r--subprojects/frontend/package.json24
-rw-r--r--subprojects/frontend/package.json.orig121
-rw-r--r--subprojects/frontend/tsconfig.json2
-rw-r--r--subprojects/frontend/tsconfig.node.json2
-rw-r--r--subprojects/frontend/tsconfig.shared.json2
-rw-r--r--tsconfig.base.json (renamed from subprojects/frontend/tsconfig.base.json)0
-rw-r--r--tsconfig.json20
-rw-r--r--yarn.lock61
15 files changed, 248 insertions, 245 deletions
diff --git a/subprojects/frontend/.eslintrc.cjs b/.eslintrc.cjs
index 25b86a83..da434649 100644
--- a/subprojects/frontend/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -1,5 +1,5 @@
1/* 1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors 2 * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors
3 * 3 *
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
@@ -9,8 +9,9 @@ const path = require('node:path');
9// Allow the Codium ESLint plugin to find `tsconfig.json` from the repository root. 9// Allow the Codium ESLint plugin to find `tsconfig.json` from the repository root.
10const project = [ 10const project = [
11 path.join(__dirname, 'tsconfig.json'), 11 path.join(__dirname, 'tsconfig.json'),
12 path.join(__dirname, 'tsconfig.node.json'), 12 path.join(__dirname, 'subprojects/frontend/tsconfig.json'),
13 path.join(__dirname, 'tsconfig.shared.json'), 13 path.join(__dirname, 'subprojects/frontend/tsconfig.node.json'),
14 path.join(__dirname, 'subprojects/frontend/tsconfig.shared.json'),
14]; 15];
15 16
16/** @type {import('eslint').Linter.Config} */ 17/** @type {import('eslint').Linter.Config} */
@@ -44,7 +45,12 @@ module.exports = {
44 env: { 45 env: {
45 browser: true, 46 browser: true,
46 }, 47 },
47 ignorePatterns: ['build/**/*', 'dev-dist/**/*', 'src/**/*.typegen.ts'], 48 ignorePatterns: [
49 'build/**/*',
50 'subprojects/*/build/**/*',
51 'subprojects/*/dev-dist/**/*',
52 'subprojects/*/src/**/*.typegen.ts',
53 ],
48 rules: { 54 rules: {
49 // In typescript, some class methods implementing an inderface do not use `this`: 55 // In typescript, some class methods implementing an inderface do not use `this`:
50 // https://github.com/typescript-eslint/typescript-eslint/issues/1103 56 // https://github.com/typescript-eslint/typescript-eslint/issues/1103
@@ -88,7 +94,7 @@ module.exports = {
88 }, 94 },
89 overrides: [ 95 overrides: [
90 { 96 {
91 files: ['types/**/*.d.ts'], 97 files: ['subprojects/*/types/**/*.d.ts'],
92 rules: { 98 rules: {
93 // We don't have control over exports of external modules. 99 // We don't have control over exports of external modules.
94 'import/prefer-default-export': 'off', 100 'import/prefer-default-export': 'off',
@@ -104,10 +110,11 @@ module.exports = {
104 { 110 {
105 files: [ 111 files: [
106 '.eslintrc.cjs', 112 '.eslintrc.cjs',
107 'config/*.ts', 113 'scripts/*.cjs',
108 'config/*.cjs', 114 'subprojects/*/config/*.ts',
115 'subprojects/*/config/*.cjs',
109 'prettier.config.cjs', 116 'prettier.config.cjs',
110 'vite.config.ts', 117 'subprojects/*/vite.config.ts',
111 ], 118 ],
112 env: { 119 env: {
113 browser: false, 120 browser: false,
diff --git a/build.gradle.kts b/build.gradle.kts
index 46fc8c37..3ed2b6be 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -4,9 +4,63 @@
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
6 6
7import org.siouan.frontendgradleplugin.infrastructure.gradle.RunYarn
8
7plugins { 9plugins {
8 alias(libs.plugins.versions) 10 alias(libs.plugins.versions)
9 id("tools.refinery.gradle.eclipse") 11 id("tools.refinery.gradle.eclipse")
10 id("tools.refinery.gradle.frontend-worktree") 12 id("tools.refinery.gradle.frontend-worktree")
11 id("tools.refinery.gradle.sonarqube") 13 id("tools.refinery.gradle.sonarqube")
12} 14}
15
16val frontendFiles: FileCollection = files(
17 "yarn.lock",
18 "package.json",
19 "tsconfig.json",
20 "tsconfig.base.json",
21 "eslintrc.cjs",
22 "prettier.config.cjs",
23 "vite.config.ts",
24) + fileTree("scripts") {
25 include("**/*.cjs")
26}
27
28tasks {
29 val typeCheckFrontend by registering(RunYarn::class) {
30 dependsOn(installFrontend)
31 inputs.files(frontendFiles)
32 outputs.dir(layout.buildDirectory.dir("typescript"))
33 script.set("run typecheck")
34 group = "verification"
35 description = "Check for TypeScript type errors."
36 }
37
38 val lintFrontend by registering(RunYarn::class) {
39 dependsOn(installFrontend)
40 dependsOn(typeCheckFrontend)
41 inputs.files(frontendFiles)
42 outputs.file(layout.buildDirectory.file("eslint.json"))
43 script.set("run lint")
44 group = "verification"
45 description = "Check for TypeScript lint errors and warnings."
46 }
47
48 register<RunYarn>("fixFrontend") {
49 dependsOn(installFrontend)
50 dependsOn(typeCheckFrontend)
51 inputs.files(frontendFiles)
52 script.set("run lint:fix")
53 group = "verification"
54 description = "Fix TypeScript lint errors and warnings."
55 }
56
57 check {
58 dependsOn(typeCheckFrontend)
59 dependsOn(lintFrontend)
60 }
61}
62
63sonarqube.properties {
64 property("sonar.nodejs.executable", "${frontend.nodeInstallDirectory.get()}/bin/node")
65 property("sonar.eslint.reportPaths", "${layout.buildDirectory.get()}/eslint.json")
66}
diff --git a/package.json b/package.json
index 8630aed8..88859a0a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
1{ 1{
2 "//": [ 2 "//": [
3 "SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>", 3 "SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/>",
4 "", 4 "",
5 "SPDX-License-Identifier: EPL-2.0" 5 "SPDX-License-Identifier: EPL-2.0"
6 ], 6 ],
@@ -21,11 +21,36 @@
21 "subprojects/frontend" 21 "subprojects/frontend"
22 ], 22 ],
23 "scripts": { 23 "scripts": {
24 "frontend": "yarn workspace @refinery/frontend" 24 "frontend": "yarn workspace @refinery/frontend",
25 "typecheck": "yarn run g:tsc -p tsconfig.json",
26 "lint": "yarn run g:lint",
27 "lint:fix": "yarn run lint --fix",
28 "g:lint": "node scripts/eslintReport.cjs",
29 "g:tsc": "tsc"
25 }, 30 },
26 "packageManager": "yarn@4.1.1", 31 "packageManager": "yarn@4.1.1",
32 "dependencies": {
33 "react": "^18.2.0"
34 },
27 "devDependencies": { 35 "devDependencies": {
36 "@types/eslint": "^8.56.7",
37 "@types/node": "^20.12.3",
38 "@types/react": "^18.2.74",
39 "@typescript-eslint/eslint-plugin": "^7.5.0",
40 "@typescript-eslint/parser": "^7.5.0",
41 "corepack": "^0.26.0",
28 "eslint": "^8.57.0", 42 "eslint": "^8.57.0",
43 "eslint-config-airbnb": "^19.0.4",
44 "eslint-config-airbnb-typescript": "^18.0.0",
45 "eslint-config-prettier": "^9.1.0",
46 "eslint-import-resolver-typescript": "^3.6.1",
47 "eslint-plugin-import": "^2.29.1",
48 "eslint-plugin-jsx-a11y": "^6.8.0",
49 "eslint-plugin-mobx": "^0.0.9",
50 "eslint-plugin-prettier": "^5.1.3",
51 "eslint-plugin-react": "^7.34.1",
52 "eslint-plugin-react-hooks": "^4.6.0",
53 "prettier": "^3.2.5",
29 "typescript": "5.4.3" 54 "typescript": "5.4.3"
30 }, 55 },
31 "resolutions": { 56 "resolutions": {
diff --git a/subprojects/frontend/prettier.config.cjs b/prettier.config.cjs
index 6f9ff7ad..6f9ff7ad 100644
--- a/subprojects/frontend/prettier.config.cjs
+++ b/prettier.config.cjs
diff --git a/scripts/eslintReport.cjs b/scripts/eslintReport.cjs
new file mode 100644
index 00000000..647a4253
--- /dev/null
+++ b/scripts/eslintReport.cjs
@@ -0,0 +1,90 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7const { writeFile } = require('node:fs/promises');
8const path = require('node:path');
9const { Readable } = require('node:stream');
10const { pipeline } = require('node:stream/promises');
11
12const { ESLint } = require('eslint');
13
14/**
15 * Write ESLint report to console.
16 *
17 * @param cli {import('eslint').ESLint} The ESLint CLI.
18 * @param report {import('eslint').ESLint.LintResult[]} The ESLint report.
19 * @return {Promise<void>} A promise that resolves when the report is finished.
20 */
21async function reportToConsole(cli, report) {
22 const stylishFormatter = await cli.loadFormatter('stylish');
23 const output = new Readable();
24 output.push(await stylishFormatter.format(report));
25 output.push(null);
26 return pipeline(output, process.stdout);
27}
28
29/**
30 * Write ESLint report to the <code>build</code> directory.
31 *
32 * @param cli {import('eslint').ESLint} The ESLint CLI.
33 * @param workspace {string} The workspace path.
34 * @param report {import('eslint').ESLint.LintResult[]} The ESLint report.
35 * @return {Promise<void>} A promise that resolves when the report is finished.
36 */
37async function reportToJson(cli, workspace, report) {
38 const jsonFormatter = await cli.loadFormatter('json');
39 const json = await jsonFormatter.format(report);
40 const reportPath = path.join(workspace, 'build', 'eslint.json');
41 return writeFile(reportPath, json, 'utf-8');
42}
43
44/**
45 * Write ESLint report to both the console and the <code>build</code> directory.
46 *
47 * @param workspace {string | undefined} The workspace path or `undefined`
48 * for the root workspace.
49 * @param fix {boolean} `true` if errors should be fixed.
50 * @return {Promise<void>} A promise that resolves when the report is finished.
51 */
52async function createReport(workspace, fix) {
53 const absoluteWorkspace = path.resolve(__dirname, '..', workspace ?? '.');
54 /** @type {import('eslint').ESLint.Options} */
55 const options = {
56 useEslintrc: true,
57 cwd: absoluteWorkspace,
58 fix,
59 };
60 if (workspace === undefined) {
61 options.overrideConfig = {
62 ignorePatterns: ['subprojects/**/*'],
63 };
64 }
65 const cli = new ESLint(options);
66 const report = await cli.lintFiles('.');
67 await Promise.all([
68 reportToConsole(cli, report),
69 reportToJson(cli, absoluteWorkspace, report),
70 ]);
71
72 if (report.some((entry) => entry.errorCount > 0)) {
73 process.exitCode = 1;
74 }
75}
76
77const fixArg = '--fix';
78let fix = false;
79/** @type {string | undefined} */
80let workspace;
81if (process.argv[2] === fixArg) {
82 fix = true;
83} else {
84 /* eslint-disable-next-line prefer-destructuring --
85 * Destructuring is harder to read here.
86 */
87 workspace = process.argv[2];
88 fix = process.argv[3] === fixArg;
89}
90createReport(workspace, fix).catch(console.error);
diff --git a/subprojects/frontend/build.gradle.kts b/subprojects/frontend/build.gradle.kts
index 40e31517..ac2c1817 100644
--- a/subprojects/frontend/build.gradle.kts
+++ b/subprojects/frontend/build.gradle.kts
@@ -32,8 +32,8 @@ val sourcesWithoutTypes = fileTree("src") {
32val sourcesWithTypes: FileCollection = fileTree("src") + fileTree("types") 32val sourcesWithTypes: FileCollection = fileTree("src") + fileTree("types")
33 33
34val buildScripts: FileCollection = fileTree("config") + files( 34val buildScripts: FileCollection = fileTree("config") + files(
35 ".eslintrc.cjs", 35 rootProject.file(".eslintrc.cjs"),
36 "prettier.config.cjs", 36 rootProject.file("prettier.config.cjs"),
37 "vite.config.ts", 37 "vite.config.ts",
38) 38)
39 39
@@ -44,8 +44,8 @@ val installationState = files(
44) 44)
45 45
46val sharedConfigFiles: FileCollection = installationState + files( 46val sharedConfigFiles: FileCollection = installationState + files(
47 rootProject.file("tsconfig.base.json"),
47 "tsconfig.json", 48 "tsconfig.json",
48 "tsconfig.base.json",
49 "tsconfig.node.json", 49 "tsconfig.node.json",
50 "tsconfig.shared.json", 50 "tsconfig.shared.json",
51) 51)
@@ -76,7 +76,6 @@ tasks {
76 outputs.dir(productionResources) 76 outputs.dir(productionResources)
77 } 77 }
78 78
79
80 val typeCheckFrontend by registering(RunYarn::class) { 79 val typeCheckFrontend by registering(RunYarn::class) {
81 dependsOn(installFrontend) 80 dependsOn(installFrontend)
82 dependsOn(generateXStateTypes) 81 dependsOn(generateXStateTypes)
diff --git a/subprojects/frontend/config/eslintReport.cjs b/subprojects/frontend/config/eslintReport.cjs
deleted file mode 100644
index 7c4b7bd6..00000000
--- a/subprojects/frontend/config/eslintReport.cjs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7const { writeFile } = require('node:fs/promises');
8const path = require('node:path');
9const { Readable } = require('node:stream');
10const { pipeline } = require('node:stream/promises');
11
12const { ESLint } = require('eslint');
13
14const rootDir = path.join(__dirname, '..');
15
16/**
17 * Write ESLint report to console.
18 *
19 * @param cli {import('eslint').ESLint} The ESLint CLI.
20 * @param report {import('eslint').ESLint.LintResult[]} The ESLint report.
21 * @return {Promise<void>} A promise that resolves when the report is finished.
22 */
23async function reportToConsole(cli, report) {
24 const stylishFormatter = await cli.loadFormatter('stylish');
25 const output = new Readable();
26 output.push(await stylishFormatter.format(report));
27 output.push(null);
28 return pipeline(output, process.stdout);
29}
30
31/**
32 * Write ESLint report to the <code>build</code> directory.
33 *
34 * @param cli {import('eslint').ESLint} The ESLint CLI.
35 * @param report {import('eslint').ESLint.LintResult[]} The ESLint report.
36 * @return {Promise<void>} A promise that resolves when the report is finished.
37 */
38async function reportToJson(cli, report) {
39 const jsonFormatter = await cli.loadFormatter('json');
40 const json = await jsonFormatter.format(report);
41 const reportPath = path.join(rootDir, 'build', 'eslint.json');
42 return writeFile(reportPath, json, 'utf-8');
43}
44
45async function createReport() {
46 const cli = new ESLint({
47 useEslintrc: true,
48 cwd: rootDir,
49 });
50 const report = await cli.lintFiles('.');
51 await Promise.all([reportToConsole(cli, report), reportToJson(cli, report)]);
52
53 if (report.some((entry) => entry.errorCount > 0)) {
54 process.exitCode = 1;
55 }
56}
57
58createReport().catch(console.error);
diff --git a/subprojects/frontend/package.json b/subprojects/frontend/package.json
index f7f6e8f8..c53d515f 100644
--- a/subprojects/frontend/package.json
+++ b/subprojects/frontend/package.json
@@ -10,11 +10,11 @@
10 "type": "module", 10 "type": "module",
11 "private": true, 11 "private": true,
12 "scripts": { 12 "scripts": {
13 "build": "cross-env MODE=production vite build", 13 "build": "MODE=production vite build",
14 "serve": "cross-env MODE=development vite serve", 14 "serve": "MODE=development vite serve",
15 "typegen": "xstate typegen \"src/**/*.ts?(x)\"", 15 "typegen": "xstate typegen \"src/**/*.ts?(x)\"",
16 "typecheck": "tsc -p tsconfig.shared.json && tsc -p tsconfig.node.json && tsc -p tsconfig.json", 16 "typecheck": "yarn run g:tsc -p subprojects/frontend/tsconfig.shared.json && yarn run g:tsc -p subprojects/frontend/tsconfig.node.json && yarn run g:tsc -p subprojects/frontend/tsconfig.json",
17 "lint": "node config/eslintReport.cjs", 17 "lint": "yarn run g:lint subprojects/frontend",
18 "lint:fix": "yarn run lint --fix" 18 "lint:fix": "yarn run lint --fix"
19 }, 19 },
20 "repository": { 20 "repository": {
@@ -83,7 +83,6 @@
83 "@types/d3-graphviz": "^2.6.10", 83 "@types/d3-graphviz": "^2.6.10",
84 "@types/d3-selection": "^3.0.10", 84 "@types/d3-selection": "^3.0.10",
85 "@types/d3-zoom": "^3.0.8", 85 "@types/d3-zoom": "^3.0.8",
86 "@types/eslint": "^8.56.7",
87 "@types/html-minifier-terser": "^7.0.2", 86 "@types/html-minifier-terser": "^7.0.2",
88 "@types/jspdf": "^2.0.0", 87 "@types/jspdf": "^2.0.0",
89 "@types/lodash-es": "^4.17.12", 88 "@types/lodash-es": "^4.17.12",
@@ -93,26 +92,11 @@
93 "@types/pnpapi": "^0.0.5", 92 "@types/pnpapi": "^0.0.5",
94 "@types/react": "^18.2.74", 93 "@types/react": "^18.2.74",
95 "@types/react-dom": "^18.2.23", 94 "@types/react-dom": "^18.2.23",
96 "@typescript-eslint/eslint-plugin": "^7.5.0",
97 "@typescript-eslint/parser": "^7.5.0",
98 "@vitejs/plugin-react-swc": "^3.6.0", 95 "@vitejs/plugin-react-swc": "^3.6.0",
99 "@xstate/cli": "^0.5.17", 96 "@xstate/cli": "^0.5.17",
100 "cross-env": "^7.0.3",
101 "eslint": "^8.57.0",
102 "eslint-config-airbnb": "^19.0.4",
103 "eslint-config-airbnb-typescript": "^18.0.0",
104 "eslint-config-prettier": "^9.1.0",
105 "eslint-import-resolver-typescript": "^3.6.1",
106 "eslint-plugin-import": "^2.29.1",
107 "eslint-plugin-jsx-a11y": "^6.8.0",
108 "eslint-plugin-mobx": "^0.0.9",
109 "eslint-plugin-prettier": "^5.1.3",
110 "eslint-plugin-react": "^7.34.1",
111 "eslint-plugin-react-hooks": "^4.6.0",
112 "html-minifier-terser": "^7.2.0", 97 "html-minifier-terser": "^7.2.0",
113 "micromatch": "^4.0.5", 98 "micromatch": "^4.0.5",
114 "pnpapi": "^0.0.0", 99 "pnpapi": "^0.0.0",
115 "prettier": "^3.2.5",
116 "typescript": "5.4.3", 100 "typescript": "5.4.3",
117 "vite": "^5.2.8", 101 "vite": "^5.2.8",
118 "vite-plugin-pwa": "^0.19.7", 102 "vite-plugin-pwa": "^0.19.7",
diff --git a/subprojects/frontend/package.json.orig b/subprojects/frontend/package.json.orig
deleted file mode 100644
index 34bbd6d2..00000000
--- a/subprojects/frontend/package.json.orig
+++ /dev/null
@@ -1,121 +0,0 @@
1{
2 "//": [
3 "SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/>",
4 "",
5 "SPDX-License-Identifier: EPL-2.0"
6 ],
7 "name": "@refinery/frontend",
8 "version": "0.0.0",
9 "description": "Web frontend for Refinery",
10 "type": "module",
11 "private": true,
12 "scripts": {
13 "build": "cross-env MODE=production vite build",
14 "serve": "cross-env MODE=development vite serve",
15 "typegen": "xstate typegen \"src/**/*.ts?(x)\"",
16 "typecheck": "tsc -p tsconfig.shared.json && tsc -p tsconfig.node.json && tsc -p tsconfig.json",
17 "lint": "node config/eslintReport.cjs",
18 "lint:fix": "yarn run lint --fix"
19 },
20 "repository": {
21 "type": "git",
22 "url": "git+https://github.com/graphs4value/refinery.git"
23 },
24 "author": "The Refinery Authors <https://refinery.tools/>",
25 "license": "EPL-2.0",
26 "bugs": {
27 "url": "https://github.com/graphs4value/refinery/issues"
28 },
29 "homepage": "https://refinery.tools",
30 "dependencies": {
31 "@codemirror/autocomplete": "^6.15.0",
32 "@codemirror/commands": "^6.3.3",
33 "@codemirror/language": "^6.10.1",
34 "@codemirror/lint": "^6.5.0",
35 "@codemirror/search": "^6.5.6",
36 "@codemirror/state": "^6.4.1",
37 "@codemirror/view": "^6.26.0",
38 "@emotion/cache": "^11.11.0",
39 "@emotion/react": "11.11.3",
40 "@emotion/serialize": "^1.1.3",
41 "@emotion/styled": "^11.11.0",
42 "@emotion/utils": "^1.2.1",
43 "@fontsource-variable/jetbrains-mono": "^5.0.20",
44 "@fontsource-variable/open-sans": "^5.0.28",
45 "@fontsource/open-sans": "^5.0.27",
46 "@hpcc-js/wasm": "^2.16.0",
47 "@lezer/common": "^1.2.1",
48 "@lezer/highlight": "^1.2.0",
49 "@lezer/lr": "^1.4.0",
50 "@material-icons/svg": "^1.0.33",
51 "@mui/icons-material": "5.15.11",
52 "@mui/material": "5.15.11",
53 "@mui/system": "5.15.11",
54 "@mui/x-data-grid": "6.19.5",
55 "ansi-styles": "^6.2.1",
56 "csstype": "^3.1.3",
57 "d3": "^7.9.0",
58 "d3-color": "^3.1.0",
59 "d3-graphviz": "patch:d3-graphviz@npm%3A5.3.0#~/.yarn/patches/d3-graphviz-npm-5.3.0-e0eace978a.patch",
60 "d3-selection": "^3.0.0",
61 "d3-zoom": "patch:d3-zoom@npm%3A3.0.0#~/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch",
62 "escape-string-regexp": "^5.0.0",
63 "jspdf": "^2.5.1",
64 "lodash-es": "^4.17.21",
65 "loglevel": "^1.9.1",
66 "loglevel-plugin-prefix": "^0.8.4",
67 "mobx": "^6.12.1",
68 "mobx-react-lite": "^4.0.6",
69 "ms": "^2.1.3",
70 "nanoid": "^5.0.6",
71 "notistack": "^3.0.1",
72 "react": "^18.2.0",
73 "react-dom": "^18.2.0",
74 "react-resize-detector": "^10.0.1",
75 "svg2pdf.js": "^2.2.3",
76 "xstate": "^4.38.3",
77 "zod": "^3.22.4"
78 },
79 "devDependencies": {
80 "@lezer/generator": "^1.7.0",
81 "@types/d3": "^7.4.3",
82 "@types/d3-color": "^3.1.3",
83 "@types/d3-graphviz": "^2.6.10",
84 "@types/d3-selection": "^3.0.10",
85 "@types/d3-zoom": "^3.0.8",
86 "@types/eslint": "^8.56.6",
87 "@types/html-minifier-terser": "^7.0.2",
88 "@types/jspdf": "^2.0.0",
89 "@types/lodash-es": "^4.17.12",
90 "@types/micromatch": "^4.0.6",
91 "@types/ms": "^0.7.34",
92 "@types/node": "^20.11.30",
93 "@types/pnpapi": "^0.0.5",
94 "@types/react": "^18.2.71",
95 "@types/react-dom": "^18.2.22",
96 "@typescript-eslint/eslint-plugin": "^7.4.0",
97 "@typescript-eslint/parser": "^7.4.0",
98 "@vitejs/plugin-react-swc": "^3.6.0",
99 "@xstate/cli": "^0.5.17",
100 "cross-env": "^7.0.3",
101 "eslint": "^8.57.0",
102 "eslint-config-airbnb": "^19.0.4",
103 "eslint-config-airbnb-typescript": "^18.0.0",
104 "eslint-config-prettier": "^9.1.0",
105 "eslint-import-resolver-typescript": "^3.6.1",
106 "eslint-plugin-import": "^2.29.1",
107 "eslint-plugin-jsx-a11y": "^6.8.0",
108 "eslint-plugin-mobx": "^0.0.9",
109 "eslint-plugin-prettier": "^5.1.3",
110 "eslint-plugin-react": "^7.34.1",
111 "eslint-plugin-react-hooks": "^4.6.0",
112 "html-minifier-terser": "^7.2.0",
113 "micromatch": "^4.0.5",
114 "pnpapi": "^0.0.0",
115 "prettier": "^3.2.5",
116 "typescript": "5.4.3",
117 "vite": "5.1.4",
118 "vite-plugin-pwa": "0.19.0",
119 "workbox-window": "^7.0.0"
120 }
121}
diff --git a/subprojects/frontend/tsconfig.json b/subprojects/frontend/tsconfig.json
index 06f6d8fe..3b20bc83 100644
--- a/subprojects/frontend/tsconfig.json
+++ b/subprojects/frontend/tsconfig.json
@@ -4,7 +4,7 @@
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
6{ 6{
7 "extends": "./tsconfig.base.json", 7 "extends": "../../tsconfig.base.json",
8 "compilerOptions": { 8 "compilerOptions": {
9 "jsx": "react-jsx", 9 "jsx": "react-jsx",
10 "lib": ["DOM", "DOM.Iterable", "ES2022"], 10 "lib": ["DOM", "DOM.Iterable", "ES2022"],
diff --git a/subprojects/frontend/tsconfig.node.json b/subprojects/frontend/tsconfig.node.json
index 47feaf97..99e4eaca 100644
--- a/subprojects/frontend/tsconfig.node.json
+++ b/subprojects/frontend/tsconfig.node.json
@@ -4,7 +4,7 @@
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
6{ 6{
7 "extends": "./tsconfig.base.json", 7 "extends": "../../tsconfig.base.json",
8 "compilerOptions": { 8 "compilerOptions": {
9 "composite": true, 9 "composite": true,
10 "lib": ["ES2022"], 10 "lib": ["ES2022"],
diff --git a/subprojects/frontend/tsconfig.shared.json b/subprojects/frontend/tsconfig.shared.json
index 154fe122..fe4e78e7 100644
--- a/subprojects/frontend/tsconfig.shared.json
+++ b/subprojects/frontend/tsconfig.shared.json
@@ -4,7 +4,7 @@
4 * SPDX-License-Identifier: EPL-2.0 4 * SPDX-License-Identifier: EPL-2.0
5 */ 5 */
6{ 6{
7 "extends": "./tsconfig.base.json", 7 "extends": "../../tsconfig.base.json",
8 "compilerOptions": { 8 "compilerOptions": {
9 "composite": true, 9 "composite": true,
10 "lib": ["ES2022"], 10 "lib": ["ES2022"],
diff --git a/subprojects/frontend/tsconfig.base.json b/tsconfig.base.json
index 545eca35..545eca35 100644
--- a/subprojects/frontend/tsconfig.base.json
+++ b/tsconfig.base.json
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 00000000..8c060848
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,20 @@
1/*
2 * SPDX-FileCopyrightText: 2024 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6{
7 "extends": "./tsconfig.base.json",
8 "compilerOptions": {
9 "composite": true,
10 "lib": ["ES2022"],
11 "types": ["node"],
12 "emitDeclarationOnly": true,
13 "outDir": "build/typescript"
14 },
15 "include": [
16 ".eslintrc.cjs",
17 "prettier.config.cjs",
18 "scripts/*.cjs"
19 ]
20}
diff --git a/yarn.lock b/yarn.lock
index 330825d3..16120a01 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2203,7 +2203,6 @@ __metadata:
2203 "@types/d3-graphviz": "npm:^2.6.10" 2203 "@types/d3-graphviz": "npm:^2.6.10"
2204 "@types/d3-selection": "npm:^3.0.10" 2204 "@types/d3-selection": "npm:^3.0.10"
2205 "@types/d3-zoom": "npm:^3.0.8" 2205 "@types/d3-zoom": "npm:^3.0.8"
2206 "@types/eslint": "npm:^8.56.7"
2207 "@types/html-minifier-terser": "npm:^7.0.2" 2206 "@types/html-minifier-terser": "npm:^7.0.2"
2208 "@types/jspdf": "npm:^2.0.0" 2207 "@types/jspdf": "npm:^2.0.0"
2209 "@types/lodash-es": "npm:^4.17.12" 2208 "@types/lodash-es": "npm:^4.17.12"
@@ -2213,12 +2212,9 @@ __metadata:
2213 "@types/pnpapi": "npm:^0.0.5" 2212 "@types/pnpapi": "npm:^0.0.5"
2214 "@types/react": "npm:^18.2.74" 2213 "@types/react": "npm:^18.2.74"
2215 "@types/react-dom": "npm:^18.2.23" 2214 "@types/react-dom": "npm:^18.2.23"
2216 "@typescript-eslint/eslint-plugin": "npm:^7.5.0"
2217 "@typescript-eslint/parser": "npm:^7.5.0"
2218 "@vitejs/plugin-react-swc": "npm:^3.6.0" 2215 "@vitejs/plugin-react-swc": "npm:^3.6.0"
2219 "@xstate/cli": "npm:^0.5.17" 2216 "@xstate/cli": "npm:^0.5.17"
2220 ansi-styles: "npm:^6.2.1" 2217 ansi-styles: "npm:^6.2.1"
2221 cross-env: "npm:^7.0.3"
2222 csstype: "npm:^3.1.3" 2218 csstype: "npm:^3.1.3"
2223 d3: "npm:^7.9.0" 2219 d3: "npm:^7.9.0"
2224 d3-color: "npm:^3.1.0" 2220 d3-color: "npm:^3.1.0"
@@ -2226,17 +2222,6 @@ __metadata:
2226 d3-selection: "npm:^3.0.0" 2222 d3-selection: "npm:^3.0.0"
2227 d3-zoom: "patch:d3-zoom@npm%3A3.0.0#~/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch" 2223 d3-zoom: "patch:d3-zoom@npm%3A3.0.0#~/.yarn/patches/d3-zoom-npm-3.0.0-18f706a421.patch"
2228 escape-string-regexp: "npm:^5.0.0" 2224 escape-string-regexp: "npm:^5.0.0"
2229 eslint: "npm:^8.57.0"
2230 eslint-config-airbnb: "npm:^19.0.4"
2231 eslint-config-airbnb-typescript: "npm:^18.0.0"
2232 eslint-config-prettier: "npm:^9.1.0"
2233 eslint-import-resolver-typescript: "npm:^3.6.1"
2234 eslint-plugin-import: "npm:^2.29.1"
2235 eslint-plugin-jsx-a11y: "npm:^6.8.0"
2236 eslint-plugin-mobx: "npm:^0.0.9"
2237 eslint-plugin-prettier: "npm:^5.1.3"
2238 eslint-plugin-react: "npm:^7.34.1"
2239 eslint-plugin-react-hooks: "npm:^4.6.0"
2240 html-minifier-terser: "npm:^7.2.0" 2225 html-minifier-terser: "npm:^7.2.0"
2241 jspdf: "npm:^2.5.1" 2226 jspdf: "npm:^2.5.1"
2242 lodash-es: "npm:^4.17.21" 2227 lodash-es: "npm:^4.17.21"
@@ -2249,7 +2234,6 @@ __metadata:
2249 nanoid: "npm:^5.0.6" 2234 nanoid: "npm:^5.0.6"
2250 notistack: "npm:^3.0.1" 2235 notistack: "npm:^3.0.1"
2251 pnpapi: "npm:^0.0.0" 2236 pnpapi: "npm:^0.0.0"
2252 prettier: "npm:^3.2.5"
2253 react: "npm:^18.2.0" 2237 react: "npm:^18.2.0"
2254 react-dom: "npm:^18.2.0" 2238 react-dom: "npm:^18.2.0"
2255 react-resize-detector: "npm:^10.0.1" 2239 react-resize-detector: "npm:^10.0.1"
@@ -2267,7 +2251,25 @@ __metadata:
2267 version: 0.0.0-use.local 2251 version: 0.0.0-use.local
2268 resolution: "@refinery/root@workspace:." 2252 resolution: "@refinery/root@workspace:."
2269 dependencies: 2253 dependencies:
2254 "@types/eslint": "npm:^8.56.7"
2255 "@types/node": "npm:^20.12.3"
2256 "@types/react": "npm:^18.2.74"
2257 "@typescript-eslint/eslint-plugin": "npm:^7.5.0"
2258 "@typescript-eslint/parser": "npm:^7.5.0"
2259 corepack: "npm:^0.26.0"
2270 eslint: "npm:^8.57.0" 2260 eslint: "npm:^8.57.0"
2261 eslint-config-airbnb: "npm:^19.0.4"
2262 eslint-config-airbnb-typescript: "npm:^18.0.0"
2263 eslint-config-prettier: "npm:^9.1.0"
2264 eslint-import-resolver-typescript: "npm:^3.6.1"
2265 eslint-plugin-import: "npm:^2.29.1"
2266 eslint-plugin-jsx-a11y: "npm:^6.8.0"
2267 eslint-plugin-mobx: "npm:^0.0.9"
2268 eslint-plugin-prettier: "npm:^5.1.3"
2269 eslint-plugin-react: "npm:^7.34.1"
2270 eslint-plugin-react-hooks: "npm:^4.6.0"
2271 prettier: "npm:^3.2.5"
2272 react: "npm:^18.2.0"
2271 typescript: "npm:5.4.3" 2273 typescript: "npm:5.4.3"
2272 languageName: unknown 2274 languageName: unknown
2273 linkType: soft 2275 linkType: soft
@@ -4050,6 +4052,19 @@ __metadata:
4050 languageName: node 4052 languageName: node
4051 linkType: hard 4053 linkType: hard
4052 4054
4055"corepack@npm:^0.26.0":
4056 version: 0.26.0
4057 resolution: "corepack@npm:0.26.0"
4058 bin:
4059 corepack: ./dist/corepack.js
4060 pnpm: ./dist/pnpm.js
4061 pnpx: ./dist/pnpx.js
4062 yarn: ./dist/yarn.js
4063 yarnpkg: ./dist/yarnpkg.js
4064 checksum: 10c0/1c345ff83ec2c0949fb9eb6637e96de8c2ecdb3c84bba3a4a20487316a8b8d5b0145c8c10bf0b25b8ec12e1aba36f703fe0507aa43a96d78b1948ca125d30d06
4065 languageName: node
4066 linkType: hard
4067
4053"cosmiconfig@npm:^7.0.0": 4068"cosmiconfig@npm:^7.0.0":
4054 version: 7.1.0 4069 version: 7.1.0
4055 resolution: "cosmiconfig@npm:7.1.0" 4070 resolution: "cosmiconfig@npm:7.1.0"
@@ -4070,19 +4085,7 @@ __metadata:
4070 languageName: node 4085 languageName: node
4071 linkType: hard 4086 linkType: hard
4072 4087
4073"cross-env@npm:^7.0.3": 4088"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2":
4074 version: 7.0.3
4075 resolution: "cross-env@npm:7.0.3"
4076 dependencies:
4077 cross-spawn: "npm:^7.0.1"
4078 bin:
4079 cross-env: src/bin/cross-env.js
4080 cross-env-shell: src/bin/cross-env-shell.js
4081 checksum: 10c0/f3765c25746c69fcca369655c442c6c886e54ccf3ab8c16847d5ad0e91e2f337d36eedc6599c1227904bf2a228d721e690324446876115bc8e7b32a866735ecf
4082 languageName: node
4083 linkType: hard
4084
4085"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2":
4086 version: 7.0.3 4089 version: 7.0.3
4087 resolution: "cross-spawn@npm:7.0.3" 4090 resolution: "cross-spawn@npm:7.0.3"
4088 dependencies: 4091 dependencies: