From 8c2d0f594c99d7c1ccfcee2614678c824b541fa1 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 1 Aug 2023 18:18:53 +0100 Subject: [PATCH 01/46] Quick fix for utilising a hyphen in a Postgres schema - this needed to be escaped correctly. --- packages/server/scripts/integrations/postgres/init.sql | 6 +++--- packages/server/src/integrations/postgres.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/server/scripts/integrations/postgres/init.sql b/packages/server/scripts/integrations/postgres/init.sql index 5e385c12d7..6cb3f51269 100644 --- a/packages/server/scripts/integrations/postgres/init.sql +++ b/packages/server/scripts/integrations/postgres/init.sql @@ -1,6 +1,6 @@ SELECT 'CREATE DATABASE main' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'main')\gexec -CREATE SCHEMA test; +CREATE SCHEMA "test-1"; CREATE TYPE person_job AS ENUM ('qa', 'programmer', 'designer'); CREATE TABLE Persons ( PersonID SERIAL PRIMARY KEY, @@ -39,7 +39,7 @@ CREATE TABLE Products_Tasks ( REFERENCES Tasks(TaskID), PRIMARY KEY (ProductID, TaskID) ); -CREATE TABLE test.table1 ( +CREATE TABLE "test-1".table1 ( id SERIAL PRIMARY KEY, Name varchar(255) ); @@ -60,7 +60,7 @@ INSERT INTO Products_Tasks (ProductID, TaskID) VALUES (1, 1); INSERT INTO Products_Tasks (ProductID, TaskID) VALUES (2, 1); INSERT INTO Products_Tasks (ProductID, TaskID) VALUES (3, 1); INSERT INTO Products_Tasks (ProductID, TaskID) VALUES (1, 2); -INSERT INTO test.table1 (Name) VALUES ('Test'); +INSERT INTO "test-1".table1 (Name) VALUES ('Test'); INSERT INTO CompositeTable (KeyPartOne, KeyPartTwo, Name) VALUES ('aaa', 'bbb', 'Michael'); INSERT INTO CompositeTable (KeyPartOne, KeyPartTwo, Name) VALUES ('bbb', 'ccc', 'Andrew'); INSERT INTO CompositeTable (KeyPartOne, KeyPartTwo, Name) VALUES ('ddd', '', 'OneKey'); diff --git a/packages/server/src/integrations/postgres.ts b/packages/server/src/integrations/postgres.ts index b16f5b858b..c4b7c2bb65 100644 --- a/packages/server/src/integrations/postgres.ts +++ b/packages/server/src/integrations/postgres.ts @@ -210,7 +210,7 @@ class PostgresIntegration extends Sql implements DatasourcePlus { if (!this.config.schema) { this.config.schema = "public" } - await this.client.query(`SET search_path TO ${this.config.schema}`) + await this.client.query(`SET search_path TO "${this.config.schema}"`) this.COLUMNS_SQL = `select * from information_schema.columns where table_schema = '${this.config.schema}'` this.open = true } From e36a04d6839a6fea99d99395ca82737648b82c21 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 15:45:56 +0200 Subject: [PATCH 02/46] Remove --parallel flag --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ab62955124..d27af2e27d 100644 --- a/package.json +++ b/package.json @@ -51,9 +51,9 @@ "kill-builder": "kill-port 3000", "kill-server": "kill-port 4001 4002", "kill-all": "yarn run kill-builder && yarn run kill-server", - "dev": "yarn run kill-all && lerna run --stream --parallel dev:builder", - "dev:noserver": "yarn run kill-builder && lerna run --stream dev:stack:up && lerna run --stream --parallel dev:builder --ignore @budibase/backend-core --ignore @budibase/server --ignore @budibase/worker", - "dev:server": "yarn run kill-server && lerna run --stream --parallel dev:builder --scope @budibase/worker --scope @budibase/server", + "dev": "yarn run kill-all && lerna run --stream dev:builder", + "dev:noserver": "yarn run kill-builder && lerna run --stream dev:stack:up && lerna run --stream dev:builder --ignore @budibase/backend-core --ignore @budibase/server --ignore @budibase/worker", + "dev:server": "yarn run kill-server && lerna run --stream dev:builder --scope @budibase/worker --scope @budibase/server", "dev:built": "yarn run kill-all && cd packages/server && yarn dev:stack:up && cd ../../ && lerna run --stream dev:built", "dev:docker": "yarn build:docker:pre && docker-compose -f hosting/docker-compose.build.yaml -f hosting/docker-compose.dev.yaml --env-file hosting/.env up --build --scale proxy-service=0", "test": "lerna run --stream test --stream", From f5131f673c81c3d251fd306b38c7dc72fcd053ac Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 15:55:38 +0200 Subject: [PATCH 03/46] Fix dev build --- packages/shared-core/package.json | 12 +++++++++++- packages/types/package.json | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index f79075eb2e..d1d5160fc6 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -17,7 +17,7 @@ "prebuild": "rimraf dist/", "build": "tsc -p tsconfig.build.json && tsc -p tsconfig-cjs.build.json", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", - "dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc -p tsconfig-cjs.build.json --watch\"", + "dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch --preserveWatchOutput\" \"tsc -p tsconfig-cjs.build.json --watch --preserveWatchOutput\"", "check:types": "tsc -p tsconfig.json --noEmit --paths null" }, "dependencies": { @@ -39,6 +39,16 @@ "target": "build" } ] + }, + "dev:builder": { + "dependsOn": [ + { + "projects": [ + "@budibase/types" + ], + "target": "build" + } + ] } } } diff --git a/packages/types/package.json b/packages/types/package.json index c419a4d527..41064b8581 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -16,7 +16,7 @@ "prebuild": "rimraf dist/", "build": "tsc -p tsconfig.build.json && tsc -p tsconfig-cjs.build.json", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", - "dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc -p tsconfig-cjs.build.json --watch\"", + "dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch --preserveWatchOutput\" \"tsc -p tsconfig-cjs.build.json --watch --preserveWatchOutput\"", "check:types": "tsc -p tsconfig.json --noEmit --paths null" }, "jest": {}, From 7e30047b3fb95695d10396d831cc28a89b58b61c Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 17:46:09 +0200 Subject: [PATCH 04/46] Fix dev:builder --- packages/shared-core/package.json | 12 +++++------- packages/types/package.json | 9 ++++----- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index d1d5160fc6..0896273e68 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -2,14 +2,12 @@ "name": "@budibase/shared-core", "version": "0.0.0", "description": "Shared data utils", - "main": "dist/cjs/src/index.js", - "types": "dist/mjs/src/index.d.ts", + "main": "src/index.ts", + "types": "src/index.ts", "exports": { ".": { - "import": "./dist/mjs/src/index.js", - "require": "./dist/cjs/src/index.js" - }, - "./package.json": "./dist/mjs/package.json" + "import": "./dist/mjs/src/index.js" + } }, "author": "Budibase", "license": "GPL-3.0", @@ -17,7 +15,7 @@ "prebuild": "rimraf dist/", "build": "tsc -p tsconfig.build.json && tsc -p tsconfig-cjs.build.json", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", - "dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch --preserveWatchOutput\" \"tsc -p tsconfig-cjs.build.json --watch --preserveWatchOutput\"", + "dev:builder": "yarn prebuild && tsc -p tsconfig.json --watch --preserveWatchOutput", "check:types": "tsc -p tsconfig.json --noEmit --paths null" }, "dependencies": { diff --git a/packages/types/package.json b/packages/types/package.json index 41064b8581..520d8fa5b0 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -2,12 +2,11 @@ "name": "@budibase/types", "version": "0.0.0", "description": "Budibase types", - "main": "dist/cjs/index.js", - "types": "dist/mjs/index.d.ts", + "main": "src/index.ts", + "types": "src/index.ts", "exports": { ".": { - "import": "./dist/mjs/index.js", - "require": "./dist/cjs/index.js" + "import": "./dist/mjs/index.js" } }, "author": "Budibase", @@ -16,7 +15,7 @@ "prebuild": "rimraf dist/", "build": "tsc -p tsconfig.build.json && tsc -p tsconfig-cjs.build.json", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", - "dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch --preserveWatchOutput\" \"tsc -p tsconfig-cjs.build.json --watch --preserveWatchOutput\"", + "dev:builder": "yarn prebuild && tsc -p tsconfig.json --watch --preserveWatchOutput", "check:types": "tsc -p tsconfig.json --noEmit --paths null" }, "jest": {}, From 250a4e890fb5e1c2297dc0aad37bdd9ae5ec9bc8 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 17:46:27 +0200 Subject: [PATCH 05/46] Remove composite --- packages/backend-core/tsconfig.json | 1 - packages/builder/tsconfig.json | 1 - packages/cli/tsconfig.json | 1 - packages/server/tsconfig.json | 1 - packages/shared-core/tsconfig.json | 1 - packages/types/tsconfig.json | 3 --- packages/worker/tsconfig.json | 1 - 7 files changed, 9 deletions(-) diff --git a/packages/backend-core/tsconfig.json b/packages/backend-core/tsconfig.json index 2993ff84ed..54523cf3bf 100644 --- a/packages/backend-core/tsconfig.json +++ b/packages/backend-core/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { - "composite": true, "baseUrl": ".", "paths": { "@budibase/types": ["../types/src"] diff --git a/packages/builder/tsconfig.json b/packages/builder/tsconfig.json index 0913aea33d..bce358896f 100644 --- a/packages/builder/tsconfig.json +++ b/packages/builder/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { - "composite": true, "declaration": true, "sourceMap": true, "baseUrl": "." diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index ab306debca..e28797f20a 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { - "composite": true, "declaration": true, "sourceMap": true, "baseUrl": ".", diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json index d9f84f6a5e..cfab6c8ef8 100644 --- a/packages/server/tsconfig.json +++ b/packages/server/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { - "composite": true, "baseUrl": "." }, "ts-node": { diff --git a/packages/shared-core/tsconfig.json b/packages/shared-core/tsconfig.json index 3f32e2adb8..f1541a0f8a 100644 --- a/packages/shared-core/tsconfig.json +++ b/packages/shared-core/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { - "composite": true, "baseUrl": ".", "paths": { "@budibase/types": ["../types/src"] diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index ad5356c2dc..33e37179d7 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,7 +1,4 @@ { "extends": "./tsconfig.build.json", - "compilerOptions": { - "composite": true - }, "exclude": ["node_modules", "dist"] } diff --git a/packages/worker/tsconfig.json b/packages/worker/tsconfig.json index 4f3d5cbac8..2b8759ebd9 100644 --- a/packages/worker/tsconfig.json +++ b/packages/worker/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { - "composite": true, "baseUrl": "." }, "ts-node": { From 8ec251aefbc6e7c434fbb2e9212bf479c0180cb2 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 17:50:11 +0200 Subject: [PATCH 06/46] Remove unnecessary references --- packages/cli/tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index e28797f20a..15c04c6cab 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -15,7 +15,6 @@ "require": ["tsconfig-paths/register"], "swc": true }, - "references": [{ "path": "../types" }, { "path": "../backend-core" }], "include": ["src/**/*", "package.json"], "exclude": ["node_modules", "dist"] } From 50ca4de0f767dcf72ceaf9db9e6e52e665d8e606 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 17:56:27 +0200 Subject: [PATCH 07/46] Remove cjs refs --- packages/shared-core/package.json | 2 +- packages/shared-core/tsconfig-cjs.build.json | 8 -------- packages/types/package.json | 2 +- packages/types/tsconfig-cjs.build.json | 8 -------- 4 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 packages/shared-core/tsconfig-cjs.build.json delete mode 100644 packages/types/tsconfig-cjs.build.json diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index 0896273e68..f5a855ae7e 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -13,7 +13,7 @@ "license": "GPL-3.0", "scripts": { "prebuild": "rimraf dist/", - "build": "tsc -p tsconfig.build.json && tsc -p tsconfig-cjs.build.json", + "build": "tsc -p tsconfig.build.json", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "dev:builder": "yarn prebuild && tsc -p tsconfig.json --watch --preserveWatchOutput", "check:types": "tsc -p tsconfig.json --noEmit --paths null" diff --git a/packages/shared-core/tsconfig-cjs.build.json b/packages/shared-core/tsconfig-cjs.build.json deleted file mode 100644 index 45e81e575c..0000000000 --- a/packages/shared-core/tsconfig-cjs.build.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig-base.build.json", - "compilerOptions": { - "module": "commonjs", - "outDir": "dist/cjs/src", - "target": "es2015" - } -} diff --git a/packages/types/package.json b/packages/types/package.json index 520d8fa5b0..6429bbbf21 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -13,7 +13,7 @@ "license": "GPL-3.0", "scripts": { "prebuild": "rimraf dist/", - "build": "tsc -p tsconfig.build.json && tsc -p tsconfig-cjs.build.json", + "build": "tsc -p tsconfig.build.json", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "dev:builder": "yarn prebuild && tsc -p tsconfig.json --watch --preserveWatchOutput", "check:types": "tsc -p tsconfig.json --noEmit --paths null" diff --git a/packages/types/tsconfig-cjs.build.json b/packages/types/tsconfig-cjs.build.json deleted file mode 100644 index 9b479b7b34..0000000000 --- a/packages/types/tsconfig-cjs.build.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig-base.build.json", - "compilerOptions": { - "module": "commonjs", - "outDir": "dist/cjs", - "target": "es2015" - } -} From 5347504c1226a57a9af354eec57d96414ef195e7 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 18:06:36 +0200 Subject: [PATCH 08/46] Fix nodemon watch --- packages/server/nodemon.json | 15 +++++++++------ packages/worker/nodemon.json | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/packages/server/nodemon.json b/packages/server/nodemon.json index 7956ad161b..33d277dd64 100644 --- a/packages/server/nodemon.json +++ b/packages/server/nodemon.json @@ -1,10 +1,13 @@ { - "watch": ["src", "../backend-core", "../pro"], - "ext": "js,ts,json", - "ignore": [ - "src/**/*.spec.ts", - "src/**/*.spec.js", - "../backend-core/dist/**/*" + "watch": [ + "src", + "../backend-core", + "../pro", + "../types", + "../shared-core", + "../string-templates" ], + "ext": "js,ts,json", + "ignore": ["src/**/*.spec.ts", "src/**/*.spec.js", "../*/dist/**/*"], "exec": "yarn build && node ./dist/index.js" } diff --git a/packages/worker/nodemon.json b/packages/worker/nodemon.json index 9585d85af5..a8e9d45b47 100644 --- a/packages/worker/nodemon.json +++ b/packages/worker/nodemon.json @@ -1,10 +1,13 @@ { - "watch": ["src", "../backend-core", "../pro"], - "ext": "js,ts,json", - "ignore": [ - "src/**/*.spec.ts", - "src/**/*.spec.js", - "../backend-core/dist/**/*" + "watch": [ + "src", + "../backend-core", + "../pro", + "../types", + "../shared-core", + "../string-templates" ], + "ext": "js,ts,json", + "ignore": ["src/**/*.spec.ts", "src/**/*.spec.js", "../*/dist/**/*"], "exec": "yarn build && node dist/index.js" } From da6f7938e55f593b4d8cc2f18ff0667ba9995404 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 18:22:38 +0200 Subject: [PATCH 09/46] Remove --- packages/types/tsconfig-base.build.json | 15 --------------- packages/types/tsconfig.build.json | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 17 deletions(-) delete mode 100644 packages/types/tsconfig-base.build.json diff --git a/packages/types/tsconfig-base.build.json b/packages/types/tsconfig-base.build.json deleted file mode 100644 index d2403d75fc..0000000000 --- a/packages/types/tsconfig-base.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "lib": ["es2020"], - "strict": true, - "noImplicitAny": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "incremental": true, - "sourceMap": true, - "declaration": true, - "skipLibCheck": true - }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.spec.js"] -} diff --git a/packages/types/tsconfig.build.json b/packages/types/tsconfig.build.json index 9643676b52..33409409a8 100644 --- a/packages/types/tsconfig.build.json +++ b/packages/types/tsconfig.build.json @@ -1,8 +1,18 @@ { - "extends": "./tsconfig-base.build.json", "compilerOptions": { "target": "es6", "moduleResolution": "node", + "lib": ["es2020"], + "strict": true, + "noImplicitAny": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "incremental": true, + "sourceMap": true, + "declaration": true, + "skipLibCheck": true, "outDir": "dist/mjs" - } + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.spec.js"] } From 012ab8017644d74b4c1911bd22bcbf59a6ac8ad9 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 18:22:44 +0200 Subject: [PATCH 10/46] Remove base --- packages/shared-core/tsconfig-base.build.json | 25 ------------------- packages/shared-core/tsconfig.build.json | 25 ++++++++++++++++--- 2 files changed, 21 insertions(+), 29 deletions(-) delete mode 100644 packages/shared-core/tsconfig-base.build.json diff --git a/packages/shared-core/tsconfig-base.build.json b/packages/shared-core/tsconfig-base.build.json deleted file mode 100644 index 6930e3cb99..0000000000 --- a/packages/shared-core/tsconfig-base.build.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "target": "es6", - "moduleResolution": "node", - "lib": ["es2020"], - "strict": true, - "noImplicitAny": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "incremental": true, - "sourceMap": true, - "declaration": true, - "types": ["node"], - "outDir": "dist", - "skipLibCheck": true - }, - "include": ["**/*.js", "**/*.ts"], - "exclude": [ - "node_modules", - "dist", - "**/*.spec.ts", - "**/*.spec.js", - "__mocks__" - ] -} diff --git a/packages/shared-core/tsconfig.build.json b/packages/shared-core/tsconfig.build.json index 2a00a44dfe..d76840d3de 100644 --- a/packages/shared-core/tsconfig.build.json +++ b/packages/shared-core/tsconfig.build.json @@ -1,8 +1,25 @@ { - "extends": "./tsconfig-base.build.json", "compilerOptions": { - "module": "esnext", + "target": "es6", + "module": "commonjs", + "lib": ["es2020"], + "strict": true, + "noImplicitAny": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "incremental": true, + "sourceMap": true, + "declaration": true, + "types": ["node"], "outDir": "dist/mjs/src", - "target": "esnext" - } + "skipLibCheck": true + }, + "include": ["**/*.js", "**/*.ts"], + "exclude": [ + "node_modules", + "dist", + "**/*.spec.ts", + "**/*.spec.js", + "__mocks__" + ] } From 4b5751003f9d5e5c3e5bd7bba384d4ec526fe946 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 18:31:08 +0200 Subject: [PATCH 11/46] Revert "Remove composite" This reverts commit f9115f1554bbadadc3a0ef91d00d170fa05e45b6. --- packages/backend-core/tsconfig.json | 1 + packages/builder/tsconfig.json | 1 + packages/cli/tsconfig.json | 1 + packages/server/tsconfig.json | 1 + packages/shared-core/tsconfig.json | 1 + packages/types/tsconfig.json | 3 +++ packages/worker/tsconfig.json | 1 + 7 files changed, 9 insertions(+) diff --git a/packages/backend-core/tsconfig.json b/packages/backend-core/tsconfig.json index 54523cf3bf..2993ff84ed 100644 --- a/packages/backend-core/tsconfig.json +++ b/packages/backend-core/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { + "composite": true, "baseUrl": ".", "paths": { "@budibase/types": ["../types/src"] diff --git a/packages/builder/tsconfig.json b/packages/builder/tsconfig.json index bce358896f..0913aea33d 100644 --- a/packages/builder/tsconfig.json +++ b/packages/builder/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { + "composite": true, "declaration": true, "sourceMap": true, "baseUrl": "." diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index 15c04c6cab..c2935129a8 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { + "composite": true, "declaration": true, "sourceMap": true, "baseUrl": ".", diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json index cfab6c8ef8..d9f84f6a5e 100644 --- a/packages/server/tsconfig.json +++ b/packages/server/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { + "composite": true, "baseUrl": "." }, "ts-node": { diff --git a/packages/shared-core/tsconfig.json b/packages/shared-core/tsconfig.json index f1541a0f8a..3f32e2adb8 100644 --- a/packages/shared-core/tsconfig.json +++ b/packages/shared-core/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { + "composite": true, "baseUrl": ".", "paths": { "@budibase/types": ["../types/src"] diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index 33e37179d7..ad5356c2dc 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,4 +1,7 @@ { "extends": "./tsconfig.build.json", + "compilerOptions": { + "composite": true + }, "exclude": ["node_modules", "dist"] } diff --git a/packages/worker/tsconfig.json b/packages/worker/tsconfig.json index 2b8759ebd9..4f3d5cbac8 100644 --- a/packages/worker/tsconfig.json +++ b/packages/worker/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { + "composite": true, "baseUrl": "." }, "ts-node": { From c59bfdb9208657f42337c96a96503ca1b363f85e Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 18:44:49 +0200 Subject: [PATCH 12/46] Remove unnecessary out folder --- packages/client/rollup.config.js | 4 ++-- packages/shared-core/package.json | 2 +- packages/shared-core/tsconfig.build.json | 2 +- packages/types/package.json | 2 +- packages/types/tsconfig.build.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/client/rollup.config.js b/packages/client/rollup.config.js index c22b928f10..35a5b7a6b9 100644 --- a/packages/client/rollup.config.js +++ b/packages/client/rollup.config.js @@ -25,11 +25,11 @@ const devPaths = production : [ { find: "@budibase/shared-core", - replacement: path.resolve("../shared-core/dist/mjs/src/index"), + replacement: path.resolve("../shared-core/dist/src/index"), }, { find: "@budibase/types", - replacement: path.resolve("../types/dist/mjs/index"), + replacement: path.resolve("../types/dist/index"), }, ] diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index f5a855ae7e..aaf59023df 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -6,7 +6,7 @@ "types": "src/index.ts", "exports": { ".": { - "import": "./dist/mjs/src/index.js" + "import": "./dist/src/index.js" } }, "author": "Budibase", diff --git a/packages/shared-core/tsconfig.build.json b/packages/shared-core/tsconfig.build.json index d76840d3de..9d3bffe235 100644 --- a/packages/shared-core/tsconfig.build.json +++ b/packages/shared-core/tsconfig.build.json @@ -11,7 +11,7 @@ "sourceMap": true, "declaration": true, "types": ["node"], - "outDir": "dist/mjs/src", + "outDir": "dist/src", "skipLibCheck": true }, "include": ["**/*.js", "**/*.ts"], diff --git a/packages/types/package.json b/packages/types/package.json index 6429bbbf21..04bd3bc1d1 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -6,7 +6,7 @@ "types": "src/index.ts", "exports": { ".": { - "import": "./dist/mjs/index.js" + "import": "./dist/index.js" } }, "author": "Budibase", diff --git a/packages/types/tsconfig.build.json b/packages/types/tsconfig.build.json index 33409409a8..f2c4c7667b 100644 --- a/packages/types/tsconfig.build.json +++ b/packages/types/tsconfig.build.json @@ -11,7 +11,7 @@ "sourceMap": true, "declaration": true, "skipLibCheck": true, - "outDir": "dist/mjs" + "outDir": "dist" }, "include": ["src/**/*"], "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.spec.js"] From c715e7aa3fa79229e2098de468dd9bba3a216a94 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 18:53:19 +0200 Subject: [PATCH 13/46] Unify rollup/plugin-commonjs --- packages/bbui/package.json | 2 +- packages/string-templates/package.json | 2 +- yarn.lock | 26 -------------------------- 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/packages/bbui/package.json b/packages/bbui/package.json index e5d0ad6b57..97a4ecb042 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -17,7 +17,7 @@ "build": "rollup -c" }, "devDependencies": { - "@rollup/plugin-commonjs": "^16.0.0", + "@rollup/plugin-commonjs": "^18.0.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^11.2.1", "cross-env": "^7.0.2", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index d9416bad4c..2ef5477f1e 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -33,7 +33,7 @@ "vm2": "^3.9.15" }, "devDependencies": { - "@rollup/plugin-commonjs": "^17.1.0", + "@rollup/plugin-commonjs": "^18.0.0", "@rollup/plugin-json": "^4.1.0", "doctrine": "^3.0.0", "jest": "29.6.2", diff --git a/yarn.lock b/yarn.lock index 827c94a176..3b21e89c25 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4818,32 +4818,6 @@ dependencies: slash "^3.0.0" -"@rollup/plugin-commonjs@16.0.0", "@rollup/plugin-commonjs@^16.0.0": - version "16.0.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-16.0.0.tgz#169004d56cd0f0a1d0f35915d31a036b0efe281f" - integrity sha512-LuNyypCP3msCGVQJ7ki8PqYdpjfEkE/xtFa5DqlF+7IBD0JsfMZ87C58heSwIMint58sAUZbt3ITqOmdQv/dXw== - dependencies: - "@rollup/pluginutils" "^3.1.0" - commondir "^1.0.1" - estree-walker "^2.0.1" - glob "^7.1.6" - is-reference "^1.2.1" - magic-string "^0.25.7" - resolve "^1.17.0" - -"@rollup/plugin-commonjs@^17.1.0": - version "17.1.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-17.1.0.tgz#757ec88737dffa8aa913eb392fade2e45aef2a2d" - integrity sha512-PoMdXCw0ZyvjpCMT5aV4nkL0QywxP29sODQsSGeDpr/oI49Qq9tRtAsb/LbYbDzFlOydVEqHmmZWFtXJEAX9ew== - dependencies: - "@rollup/pluginutils" "^3.1.0" - commondir "^1.0.1" - estree-walker "^2.0.1" - glob "^7.1.6" - is-reference "^1.2.1" - magic-string "^0.25.7" - resolve "^1.17.0" - "@rollup/plugin-commonjs@^18.0.0": version "18.1.0" resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-18.1.0.tgz#5a760d757af168a50727c0ae080251fbfcc5eb02" From d310751fd3fe5d8205865080eb69082ca3708fe5 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 19:10:18 +0200 Subject: [PATCH 14/46] Update rollup/plugin-commonjs --- packages/bbui/package.json | 4 +- packages/bbui/rollup.config.js | 2 +- packages/client/package.json | 4 +- packages/sdk/package.json | 4 +- packages/string-templates/package.json | 2 +- yarn.lock | 56 ++++++++++++++------------ 6 files changed, 38 insertions(+), 34 deletions(-) diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 97a4ecb042..dbabe5c29b 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -17,9 +17,9 @@ "build": "rollup -c" }, "devDependencies": { - "@rollup/plugin-commonjs": "^18.0.0", + "@rollup/plugin-commonjs": "25.0.3", "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-node-resolve": "^11.2.1", + "@rollup/plugin-node-resolve": "15.1.0", "cross-env": "^7.0.2", "nollup": "^0.14.1", "postcss": "^8.2.9", diff --git a/packages/bbui/rollup.config.js b/packages/bbui/rollup.config.js index e285d548d6..0abb9f667b 100644 --- a/packages/bbui/rollup.config.js +++ b/packages/bbui/rollup.config.js @@ -13,8 +13,8 @@ export default { file: "dist/bbui.es.js", }, plugins: [ - resolve(), commonjs(), + resolve(), svelte({ emitCss: true, }), diff --git a/packages/client/package.json b/packages/client/package.json index 689ec332e5..f0f0d6e816 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -48,9 +48,9 @@ }, "devDependencies": { "@rollup/plugin-alias": "^3.1.5", - "@rollup/plugin-commonjs": "^18.0.0", + "@rollup/plugin-commonjs": "25.0.3", "@rollup/plugin-image": "^3.0.2", - "@rollup/plugin-node-resolve": "^11.2.1", + "@rollup/plugin-node-resolve": "15.1.0", "postcss": "^8.2.10", "rollup": "^2.44.0", "rollup-plugin-json": "^4.0.0", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 4d3c811b3d..873d60155f 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -14,8 +14,8 @@ "superagent": "^5.3.0" }, "devDependencies": { - "@rollup/plugin-commonjs": "^18.0.0", - "@rollup/plugin-node-resolve": "^11.2.1", + "@rollup/plugin-commonjs": "25.0.3", + "@rollup/plugin-node-resolve": "15.1.0", "rollup": "^2.44.0", "rollup-plugin-polyfill-node": "^0.8.0", "rollup-plugin-terser": "^7.0.2" diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 2ef5477f1e..2b5d31dabd 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -33,7 +33,7 @@ "vm2": "^3.9.15" }, "devDependencies": { - "@rollup/plugin-commonjs": "^18.0.0", + "@rollup/plugin-commonjs": "25.0.3", "@rollup/plugin-json": "^4.1.0", "doctrine": "^3.0.0", "jest": "29.6.2", diff --git a/yarn.lock b/yarn.lock index 3b21e89c25..d0072d0dcd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4818,18 +4818,17 @@ dependencies: slash "^3.0.0" -"@rollup/plugin-commonjs@^18.0.0": - version "18.1.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-18.1.0.tgz#5a760d757af168a50727c0ae080251fbfcc5eb02" - integrity sha512-h3e6T9rUxVMAQswpDIobfUHn/doMzM9sgkMrsMWCFLmB84PSoC8mV8tOloAJjSRwdqhXBqstlX2BwBpHJvbhxg== +"@rollup/plugin-commonjs@25.0.3": + version "25.0.3" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.3.tgz#eb5217ebae43d63a172b516655be270ed258bdcc" + integrity sha512-uBdtWr/H3BVcgm97MUdq2oJmqBR23ny1hOrWe2PKo9FTbjsGqg32jfasJUKYAI5ouqacjRnj65mBB/S79F+GQA== dependencies: - "@rollup/pluginutils" "^3.1.0" + "@rollup/pluginutils" "^5.0.1" commondir "^1.0.1" - estree-walker "^2.0.1" - glob "^7.1.6" - is-reference "^1.2.1" - magic-string "^0.25.7" - resolve "^1.17.0" + estree-walker "^2.0.2" + glob "^8.0.3" + is-reference "1.2.1" + magic-string "^0.27.0" "@rollup/plugin-image@^3.0.2": version "3.0.2" @@ -4855,17 +4854,17 @@ dependencies: "@rollup/pluginutils" "^3.0.8" -"@rollup/plugin-node-resolve@^11.2.1": - version "11.2.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz#82aa59397a29cd4e13248b106e6a4a1880362a60" - integrity sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg== +"@rollup/plugin-node-resolve@15.1.0": + version "15.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.1.0.tgz#9ffcd8e8c457080dba89bb9fcb583a6778dc757e" + integrity sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA== dependencies: - "@rollup/pluginutils" "^3.1.0" - "@types/resolve" "1.17.1" - builtin-modules "^3.1.0" + "@rollup/pluginutils" "^5.0.1" + "@types/resolve" "1.20.2" deepmerge "^4.2.2" + is-builtin-module "^3.2.1" is-module "^1.0.0" - resolve "^1.19.0" + resolve "^1.22.1" "@rollup/plugin-replace@^2.4.2": version "2.4.2" @@ -6543,12 +6542,10 @@ dependencies: "@types/node" "*" -"@types/resolve@1.17.1": - version "1.17.1" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" - integrity sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw== - dependencies: - "@types/node" "*" +"@types/resolve@1.20.2": + version "1.20.2" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" + integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== "@types/responselike@^1.0.0": version "1.0.0" @@ -8435,7 +8432,7 @@ buildcheck@0.0.3: resolved "https://registry.yarnpkg.com/buildcheck/-/buildcheck-0.0.3.tgz#70451897a95d80f7807e68fc412eb2e7e35ff4d5" integrity sha512-pziaA+p/wdVImfcbsZLNF32EiWyujlQLwolMqUQE8xpKNOH7KmZQaY8sXN7DGOEzPAElo9QTaeNRfGnf3iOJbA== -builtin-modules@^3.1.0: +builtin-modules@^3.1.0, builtin-modules@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== @@ -14476,6 +14473,13 @@ is-buffer@^1.1.5, is-buffer@~1.1.6: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== +is-builtin-module@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" + integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== + dependencies: + builtin-modules "^3.3.0" + is-callable@^1.1.3, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" @@ -14770,7 +14774,7 @@ is-property@^1.0.2: resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" integrity sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g== -is-reference@^1.2.1: +is-reference@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== From ddec3e9a9f46c15c54f7cd3e1ff52f52f01e7a77 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 19:11:29 +0200 Subject: [PATCH 15/46] Update plugins --- packages/string-templates/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 2b5d31dabd..fc0cab5ed3 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -35,6 +35,7 @@ "devDependencies": { "@rollup/plugin-commonjs": "25.0.3", "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "15.1.0", "doctrine": "^3.0.0", "jest": "29.6.2", "jest-environment-node": "29.6.2", From 9ab78809eb9c1b9d5897db3142495e063f7399f0 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 19:14:26 +0200 Subject: [PATCH 16/46] Clean package --- packages/string-templates/package.json | 1 - yarn.lock | 24 +++--------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index fc0cab5ed3..7cdd4ab502 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -44,7 +44,6 @@ "rollup-plugin-inject-process-env": "^1.3.1", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", - "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-terser": "^7.0.2", "typescript": "4.7.3" }, diff --git a/yarn.lock b/yarn.lock index d0072d0dcd..10411f0f55 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6535,13 +6535,6 @@ "@types/tough-cookie" "*" form-data "^2.5.0" -"@types/resolve@0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" - integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== - dependencies: - "@types/node" "*" - "@types/resolve@1.20.2": version "1.20.2" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" @@ -8432,7 +8425,7 @@ buildcheck@0.0.3: resolved "https://registry.yarnpkg.com/buildcheck/-/buildcheck-0.0.3.tgz#70451897a95d80f7807e68fc412eb2e7e35ff4d5" integrity sha512-pziaA+p/wdVImfcbsZLNF32EiWyujlQLwolMqUQE8xpKNOH7KmZQaY8sXN7DGOEzPAElo9QTaeNRfGnf3iOJbA== -builtin-modules@^3.1.0, builtin-modules@^3.3.0: +builtin-modules@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== @@ -21640,7 +21633,7 @@ resolve.exports@^2.0.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.0.tgz#c1a0028c2d166ec2fbf7d0644584927e76e7400e" integrity sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg== -resolve@^1.10.0, resolve@^1.11.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.21.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.9.0: +resolve@^1.10.0, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.21.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.9.0: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -21801,17 +21794,6 @@ rollup-plugin-node-globals@^1.4.0: process-es6 "^0.11.6" rollup-pluginutils "^2.3.1" -rollup-plugin-node-resolve@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz#730f93d10ed202473b1fb54a5997a7db8c6d8523" - integrity sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw== - dependencies: - "@types/resolve" "0.0.8" - builtin-modules "^3.1.0" - is-module "^1.0.0" - resolve "^1.11.1" - rollup-pluginutils "^2.8.1" - rollup-plugin-polyfill-node@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.8.0.tgz#859c070822f5e38d221e5b4238cb34aa894c2b19" @@ -21889,7 +21871,7 @@ rollup-pluginutils@^1.3.1: estree-walker "^0.2.1" minimatch "^3.0.2" -rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2: +rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.2: version "2.8.2" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== From 367f5c2963539a22d9bca4792f27bd2d4a952d40 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 19:15:14 +0200 Subject: [PATCH 17/46] Update usage --- packages/string-templates/rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/string-templates/rollup.config.js b/packages/string-templates/rollup.config.js index d7f45489c9..a85162116e 100644 --- a/packages/string-templates/rollup.config.js +++ b/packages/string-templates/rollup.config.js @@ -1,5 +1,5 @@ import commonjs from "@rollup/plugin-commonjs" -import resolve from "rollup-plugin-node-resolve" +import resolve from "@rollup/plugin-node-resolve" import json from "@rollup/plugin-json" import { terser } from "rollup-plugin-terser" import builtins from "rollup-plugin-node-builtins" From 4794cfce99a4e128a60f3d222103df0017d4f745 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 19:18:22 +0200 Subject: [PATCH 18/46] Unify rollup --- packages/builder/package.json | 2 +- packages/client/package.json | 2 +- packages/sdk/package.json | 2 +- packages/string-templates/package.json | 2 +- yarn.lock | 11 ++--------- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/packages/builder/package.json b/packages/builder/package.json index b6adfc674c..ad6037d91a 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -115,7 +115,7 @@ "mochawesome-report-generator": "^6.2.0", "ncp": "^2.0.0", "rimraf": "^3.0.2", - "rollup": "^2.44.0", + "rollup": "^2.45.2", "rollup-plugin-copy": "^3.4.0", "start-server-and-test": "^1.12.1", "svelte": "^3.48.0", diff --git a/packages/client/package.json b/packages/client/package.json index f0f0d6e816..f1f452eb40 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -52,7 +52,7 @@ "@rollup/plugin-image": "^3.0.2", "@rollup/plugin-node-resolve": "15.1.0", "postcss": "^8.2.10", - "rollup": "^2.44.0", + "rollup": "^2.45.2", "rollup-plugin-json": "^4.0.0", "rollup-plugin-polyfill-node": "^0.8.0", "rollup-plugin-postcss": "^4.0.0", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 873d60155f..ed877a9fce 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@rollup/plugin-commonjs": "25.0.3", "@rollup/plugin-node-resolve": "15.1.0", - "rollup": "^2.44.0", + "rollup": "^2.45.2", "rollup-plugin-polyfill-node": "^0.8.0", "rollup-plugin-terser": "^7.0.2" } diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 7cdd4ab502..489ed9ef78 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -40,7 +40,7 @@ "jest": "29.6.2", "jest-environment-node": "29.6.2", "marked": "^4.0.10", - "rollup": "^2.36.2", + "rollup": "^2.45.2", "rollup-plugin-inject-process-env": "^1.3.1", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", diff --git a/yarn.lock b/yarn.lock index 10411f0f55..af662b4c25 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12819,7 +12819,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2, fsevents@~2.3.1, fsevents@~2.3.2: +fsevents@^2.3.2, fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -21878,14 +21878,7 @@ rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0, dependencies: estree-walker "^0.6.1" -rollup@2.45.2: - version "2.45.2" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.45.2.tgz#8fb85917c9f35605720e92328f3ccbfba6f78b48" - integrity sha512-kRRU7wXzFHUzBIv0GfoFFIN3m9oteY4uAsKllIpQDId5cfnkWF2J130l+27dzDju0E6MScKiV0ZM5Bw8m4blYQ== - optionalDependencies: - fsevents "~2.3.1" - -rollup@^2.36.2, rollup@^2.44.0, rollup@^2.45.2, rollup@^2.79.1: +rollup@^2.45.2, rollup@^2.79.1: version "2.79.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7" integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw== From 064b15d8234b94fb2a6383e72b06ae4b696b00fb Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 19:22:04 +0200 Subject: [PATCH 19/46] Set plugin-commonjs in builder --- packages/builder/package.json | 1 + packages/builder/vite.config.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/packages/builder/package.json b/packages/builder/package.json index ad6037d91a..98bac96859 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -98,6 +98,7 @@ "@babel/plugin-transform-runtime": "^7.13.10", "@babel/preset-env": "^7.13.12", "@babel/runtime": "^7.13.10", + "@rollup/plugin-commonjs": "25.0.3", "@rollup/plugin-replace": "^2.4.2", "@roxi/routify": "2.18.5", "@sveltejs/vite-plugin-svelte": "1.0.1", diff --git a/packages/builder/vite.config.js b/packages/builder/vite.config.js index 4a0ffca8d4..549a3971b4 100644 --- a/packages/builder/vite.config.js +++ b/packages/builder/vite.config.js @@ -1,4 +1,5 @@ import { svelte } from "@sveltejs/vite-plugin-svelte" +import commonjs from "@rollup/plugin-commonjs" import replace from "@rollup/plugin-replace" import { defineConfig, loadEnv } from "vite" import { viteStaticCopy } from "vite-plugin-static-copy" @@ -61,6 +62,7 @@ export default defineConfig(({ mode }) => { sourcemap: !isProduction, }, plugins: [ + commonjs(), svelte({ hot: !isProduction, emitCss: true, From d104cc3a31706698d06f26f7d6e7186bf85482ca Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 1 Aug 2023 19:24:25 +0200 Subject: [PATCH 20/46] Update pro ref --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index cf3bef2aad..d37a88a5ac 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit cf3bef2aad9c739111b306fd0712397adc363f81 +Subproject commit d37a88a5acae873a7635edbd9c5bae3c4e30f4c0 From 4281d2ca53080d21c1a61d2041b299ac19e0ff57 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 00:21:59 +0200 Subject: [PATCH 21/46] Build types and shared-core --- packages/shared-core/package.json | 2 +- packages/shared-core/tsconfig.build.json | 2 +- packages/shared-core/tsconfig.json | 6 +++--- packages/types/tsconfig.build.json | 2 +- packages/types/tsconfig.json | 2 ++ 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index aaf59023df..838b8c0bea 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -6,7 +6,7 @@ "types": "src/index.ts", "exports": { ".": { - "import": "./dist/src/index.js" + "import": "./dist/index.js" } }, "author": "Budibase", diff --git a/packages/shared-core/tsconfig.build.json b/packages/shared-core/tsconfig.build.json index 9d3bffe235..8b73754a43 100644 --- a/packages/shared-core/tsconfig.build.json +++ b/packages/shared-core/tsconfig.build.json @@ -11,7 +11,7 @@ "sourceMap": true, "declaration": true, "types": ["node"], - "outDir": "dist/src", + "outDir": "dist", "skipLibCheck": true }, "include": ["**/*.js", "**/*.ts"], diff --git a/packages/shared-core/tsconfig.json b/packages/shared-core/tsconfig.json index 3f32e2adb8..29825689c8 100644 --- a/packages/shared-core/tsconfig.json +++ b/packages/shared-core/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { - "composite": true, "baseUrl": ".", + "rootDir": "./src", + "composite": true, "paths": { - "@budibase/types": ["../types/src"] + "@budibase/types": ["../../types/src"] } }, - "include": ["**/*.js", "**/*.ts"], "exclude": ["node_modules", "dist"] } diff --git a/packages/types/tsconfig.build.json b/packages/types/tsconfig.build.json index f2c4c7667b..8df63fac57 100644 --- a/packages/types/tsconfig.build.json +++ b/packages/types/tsconfig.build.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es6", - "moduleResolution": "node", + "module": "commonjs", "lib": ["es2020"], "strict": true, "noImplicitAny": true, diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index ad5356c2dc..a2fd5207b4 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "./tsconfig.build.json", "compilerOptions": { + "baseUrl": ".", + "rootDir": "./src", "composite": true }, "exclude": ["node_modules", "dist"] From 89c89e648d38738505d9a7fd5337fd99fbb07fbc Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 00:25:24 +0200 Subject: [PATCH 22/46] Fix build --- packages/client/rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/rollup.config.js b/packages/client/rollup.config.js index 35a5b7a6b9..ee839424ee 100644 --- a/packages/client/rollup.config.js +++ b/packages/client/rollup.config.js @@ -25,7 +25,7 @@ const devPaths = production : [ { find: "@budibase/shared-core", - replacement: path.resolve("../shared-core/dist/src/index"), + replacement: path.resolve("../shared-core/dist/index"), }, { find: "@budibase/types", From 3952cbc80c175c007f4551aa786b5cefafaa5a4e Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 00:38:30 +0200 Subject: [PATCH 23/46] Undo adding plugin --- packages/builder/package.json | 1 - packages/builder/vite.config.js | 2 -- 2 files changed, 3 deletions(-) diff --git a/packages/builder/package.json b/packages/builder/package.json index 98bac96859..ad6037d91a 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -98,7 +98,6 @@ "@babel/plugin-transform-runtime": "^7.13.10", "@babel/preset-env": "^7.13.12", "@babel/runtime": "^7.13.10", - "@rollup/plugin-commonjs": "25.0.3", "@rollup/plugin-replace": "^2.4.2", "@roxi/routify": "2.18.5", "@sveltejs/vite-plugin-svelte": "1.0.1", diff --git a/packages/builder/vite.config.js b/packages/builder/vite.config.js index 549a3971b4..4a0ffca8d4 100644 --- a/packages/builder/vite.config.js +++ b/packages/builder/vite.config.js @@ -1,5 +1,4 @@ import { svelte } from "@sveltejs/vite-plugin-svelte" -import commonjs from "@rollup/plugin-commonjs" import replace from "@rollup/plugin-replace" import { defineConfig, loadEnv } from "vite" import { viteStaticCopy } from "vite-plugin-static-copy" @@ -62,7 +61,6 @@ export default defineConfig(({ mode }) => { sourcemap: !isProduction, }, plugins: [ - commonjs(), svelte({ hot: !isProduction, emitCss: true, From 4f723720fe6728698b95df9b6af672b1ab35132a Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 00:40:09 +0200 Subject: [PATCH 24/46] Fix tsBuildInfoFile --- packages/shared-core/tsconfig.json | 1 + packages/types/tsconfig.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/shared-core/tsconfig.json b/packages/shared-core/tsconfig.json index 29825689c8..f72933ff9b 100644 --- a/packages/shared-core/tsconfig.json +++ b/packages/shared-core/tsconfig.json @@ -4,6 +4,7 @@ "baseUrl": ".", "rootDir": "./src", "composite": true, + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo", "paths": { "@budibase/types": ["../../types/src"] } diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index a2fd5207b4..66357a9d71 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "baseUrl": ".", "rootDir": "./src", - "composite": true + "composite": true, + "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" }, "exclude": ["node_modules", "dist"] } From 194e413026a5595dc84e4857e547f9609a90aea2 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 00:56:43 +0200 Subject: [PATCH 25/46] Undo changes --- packages/bbui/package.json | 4 +- packages/bbui/rollup.config.js | 2 +- packages/builder/package.json | 14 +-- packages/client/package.json | 6 +- packages/sdk/package.json | 6 +- packages/string-templates/package.json | 6 +- packages/string-templates/rollup.config.js | 2 +- yarn.lock | 129 +++++++++++++++------ 8 files changed, 109 insertions(+), 60 deletions(-) diff --git a/packages/bbui/package.json b/packages/bbui/package.json index dbabe5c29b..e5d0ad6b57 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -17,9 +17,9 @@ "build": "rollup -c" }, "devDependencies": { - "@rollup/plugin-commonjs": "25.0.3", + "@rollup/plugin-commonjs": "^16.0.0", "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-node-resolve": "15.1.0", + "@rollup/plugin-node-resolve": "^11.2.1", "cross-env": "^7.0.2", "nollup": "^0.14.1", "postcss": "^8.2.9", diff --git a/packages/bbui/rollup.config.js b/packages/bbui/rollup.config.js index 0abb9f667b..e285d548d6 100644 --- a/packages/bbui/rollup.config.js +++ b/packages/bbui/rollup.config.js @@ -13,8 +13,8 @@ export default { file: "dist/bbui.es.js", }, plugins: [ - commonjs(), resolve(), + commonjs(), svelte({ emitCss: true, }), diff --git a/packages/builder/package.json b/packages/builder/package.json index ad6037d91a..2f6d329877 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -115,7 +115,7 @@ "mochawesome-report-generator": "^6.2.0", "ncp": "^2.0.0", "rimraf": "^3.0.2", - "rollup": "^2.45.2", + "rollup": "^2.44.0", "rollup-plugin-copy": "^3.4.0", "start-server-and-test": "^1.12.1", "svelte": "^3.48.0", @@ -140,18 +140,6 @@ } ] }, - "dev:builder": { - "dependsOn": [ - { - "projects": [ - "@budibase/string-templates", - "@budibase/shared-core", - "@budibase/types" - ], - "target": "build" - } - ] - }, "test": { "dependsOn": [ { diff --git a/packages/client/package.json b/packages/client/package.json index f1f452eb40..689ec332e5 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -48,11 +48,11 @@ }, "devDependencies": { "@rollup/plugin-alias": "^3.1.5", - "@rollup/plugin-commonjs": "25.0.3", + "@rollup/plugin-commonjs": "^18.0.0", "@rollup/plugin-image": "^3.0.2", - "@rollup/plugin-node-resolve": "15.1.0", + "@rollup/plugin-node-resolve": "^11.2.1", "postcss": "^8.2.10", - "rollup": "^2.45.2", + "rollup": "^2.44.0", "rollup-plugin-json": "^4.0.0", "rollup-plugin-polyfill-node": "^0.8.0", "rollup-plugin-postcss": "^4.0.0", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index ed877a9fce..4d3c811b3d 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -14,9 +14,9 @@ "superagent": "^5.3.0" }, "devDependencies": { - "@rollup/plugin-commonjs": "25.0.3", - "@rollup/plugin-node-resolve": "15.1.0", - "rollup": "^2.45.2", + "@rollup/plugin-commonjs": "^18.0.0", + "@rollup/plugin-node-resolve": "^11.2.1", + "rollup": "^2.44.0", "rollup-plugin-polyfill-node": "^0.8.0", "rollup-plugin-terser": "^7.0.2" } diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 489ed9ef78..d9416bad4c 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -33,17 +33,17 @@ "vm2": "^3.9.15" }, "devDependencies": { - "@rollup/plugin-commonjs": "25.0.3", + "@rollup/plugin-commonjs": "^17.1.0", "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-node-resolve": "15.1.0", "doctrine": "^3.0.0", "jest": "29.6.2", "jest-environment-node": "29.6.2", "marked": "^4.0.10", - "rollup": "^2.45.2", + "rollup": "^2.36.2", "rollup-plugin-inject-process-env": "^1.3.1", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-terser": "^7.0.2", "typescript": "4.7.3" }, diff --git a/packages/string-templates/rollup.config.js b/packages/string-templates/rollup.config.js index a85162116e..d7f45489c9 100644 --- a/packages/string-templates/rollup.config.js +++ b/packages/string-templates/rollup.config.js @@ -1,5 +1,5 @@ import commonjs from "@rollup/plugin-commonjs" -import resolve from "@rollup/plugin-node-resolve" +import resolve from "rollup-plugin-node-resolve" import json from "@rollup/plugin-json" import { terser } from "rollup-plugin-terser" import builtins from "rollup-plugin-node-builtins" diff --git a/yarn.lock b/yarn.lock index af662b4c25..d1f22e7699 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4818,17 +4818,44 @@ dependencies: slash "^3.0.0" -"@rollup/plugin-commonjs@25.0.3": - version "25.0.3" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.3.tgz#eb5217ebae43d63a172b516655be270ed258bdcc" - integrity sha512-uBdtWr/H3BVcgm97MUdq2oJmqBR23ny1hOrWe2PKo9FTbjsGqg32jfasJUKYAI5ouqacjRnj65mBB/S79F+GQA== +"@rollup/plugin-commonjs@16.0.0", "@rollup/plugin-commonjs@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-16.0.0.tgz#169004d56cd0f0a1d0f35915d31a036b0efe281f" + integrity sha512-LuNyypCP3msCGVQJ7ki8PqYdpjfEkE/xtFa5DqlF+7IBD0JsfMZ87C58heSwIMint58sAUZbt3ITqOmdQv/dXw== dependencies: - "@rollup/pluginutils" "^5.0.1" + "@rollup/pluginutils" "^3.1.0" commondir "^1.0.1" - estree-walker "^2.0.2" - glob "^8.0.3" - is-reference "1.2.1" - magic-string "^0.27.0" + estree-walker "^2.0.1" + glob "^7.1.6" + is-reference "^1.2.1" + magic-string "^0.25.7" + resolve "^1.17.0" + +"@rollup/plugin-commonjs@^17.1.0": + version "17.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-17.1.0.tgz#757ec88737dffa8aa913eb392fade2e45aef2a2d" + integrity sha512-PoMdXCw0ZyvjpCMT5aV4nkL0QywxP29sODQsSGeDpr/oI49Qq9tRtAsb/LbYbDzFlOydVEqHmmZWFtXJEAX9ew== + dependencies: + "@rollup/pluginutils" "^3.1.0" + commondir "^1.0.1" + estree-walker "^2.0.1" + glob "^7.1.6" + is-reference "^1.2.1" + magic-string "^0.25.7" + resolve "^1.17.0" + +"@rollup/plugin-commonjs@^18.0.0": + version "18.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-18.1.0.tgz#5a760d757af168a50727c0ae080251fbfcc5eb02" + integrity sha512-h3e6T9rUxVMAQswpDIobfUHn/doMzM9sgkMrsMWCFLmB84PSoC8mV8tOloAJjSRwdqhXBqstlX2BwBpHJvbhxg== + dependencies: + "@rollup/pluginutils" "^3.1.0" + commondir "^1.0.1" + estree-walker "^2.0.1" + glob "^7.1.6" + is-reference "^1.2.1" + magic-string "^0.25.7" + resolve "^1.17.0" "@rollup/plugin-image@^3.0.2": version "3.0.2" @@ -4854,17 +4881,17 @@ dependencies: "@rollup/pluginutils" "^3.0.8" -"@rollup/plugin-node-resolve@15.1.0": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.1.0.tgz#9ffcd8e8c457080dba89bb9fcb583a6778dc757e" - integrity sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA== +"@rollup/plugin-node-resolve@^11.2.1": + version "11.2.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz#82aa59397a29cd4e13248b106e6a4a1880362a60" + integrity sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg== dependencies: - "@rollup/pluginutils" "^5.0.1" - "@types/resolve" "1.20.2" + "@rollup/pluginutils" "^3.1.0" + "@types/resolve" "1.17.1" + builtin-modules "^3.1.0" deepmerge "^4.2.2" - is-builtin-module "^3.2.1" is-module "^1.0.0" - resolve "^1.22.1" + resolve "^1.19.0" "@rollup/plugin-replace@^2.4.2": version "2.4.2" @@ -6535,10 +6562,19 @@ "@types/tough-cookie" "*" form-data "^2.5.0" -"@types/resolve@1.20.2": - version "1.20.2" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" - integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== +"@types/resolve@0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" + integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== + dependencies: + "@types/node" "*" + +"@types/resolve@1.17.1": + version "1.17.1" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" + integrity sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw== + dependencies: + "@types/node" "*" "@types/responselike@^1.0.0": version "1.0.0" @@ -8425,7 +8461,7 @@ buildcheck@0.0.3: resolved "https://registry.yarnpkg.com/buildcheck/-/buildcheck-0.0.3.tgz#70451897a95d80f7807e68fc412eb2e7e35ff4d5" integrity sha512-pziaA+p/wdVImfcbsZLNF32EiWyujlQLwolMqUQE8xpKNOH7KmZQaY8sXN7DGOEzPAElo9QTaeNRfGnf3iOJbA== -builtin-modules@^3.3.0: +builtin-modules@^3.1.0: version "3.3.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== @@ -12819,7 +12855,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2, fsevents@~2.3.2: +fsevents@^2.3.2, fsevents@~2.3.1, fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -14466,13 +14502,6 @@ is-buffer@^1.1.5, is-buffer@~1.1.6: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-builtin-module@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" - integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== - dependencies: - builtin-modules "^3.3.0" - is-callable@^1.1.3, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" @@ -14767,7 +14796,7 @@ is-property@^1.0.2: resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" integrity sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g== -is-reference@1.2.1: +is-reference@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== @@ -20250,6 +20279,20 @@ posthog-js@^1.36.0: fflate "^0.4.1" rrweb-snapshot "^1.1.14" +posthog-node@1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/posthog-node/-/posthog-node-1.0.7.tgz#a7a9525eebff23312117e57cff3ddac82afb2262" + integrity sha512-KTCwyU+PU1eAQtjy5ZSJ47mrxv2d/mMkxo+vvV5c+YqfE4mBAY1UPEPMv1nElb5Vq0UnxvyQXaUnOn8d8Xr6Eg== + dependencies: + axios "^0.21.1" + axios-retry "^3.1.9" + component-type "^1.2.1" + join-component "^1.1.0" + md5 "^2.3.0" + ms "^2.1.3" + remove-trailing-slash "^0.1.1" + uuid "^8.3.2" + posthog-node@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/posthog-node/-/posthog-node-1.3.0.tgz#804ed2f213a2f05253f798bf9569d55a9cad94f7" @@ -21633,7 +21676,7 @@ resolve.exports@^2.0.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.0.tgz#c1a0028c2d166ec2fbf7d0644584927e76e7400e" integrity sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg== -resolve@^1.10.0, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.21.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.9.0: +resolve@^1.10.0, resolve@^1.11.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.21.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.9.0: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -21794,6 +21837,17 @@ rollup-plugin-node-globals@^1.4.0: process-es6 "^0.11.6" rollup-pluginutils "^2.3.1" +rollup-plugin-node-resolve@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz#730f93d10ed202473b1fb54a5997a7db8c6d8523" + integrity sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw== + dependencies: + "@types/resolve" "0.0.8" + builtin-modules "^3.1.0" + is-module "^1.0.0" + resolve "^1.11.1" + rollup-pluginutils "^2.8.1" + rollup-plugin-polyfill-node@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.8.0.tgz#859c070822f5e38d221e5b4238cb34aa894c2b19" @@ -21871,14 +21925,21 @@ rollup-pluginutils@^1.3.1: estree-walker "^0.2.1" minimatch "^3.0.2" -rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.2: +rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2: version "2.8.2" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== dependencies: estree-walker "^0.6.1" -rollup@^2.45.2, rollup@^2.79.1: +rollup@2.45.2: + version "2.45.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.45.2.tgz#8fb85917c9f35605720e92328f3ccbfba6f78b48" + integrity sha512-kRRU7wXzFHUzBIv0GfoFFIN3m9oteY4uAsKllIpQDId5cfnkWF2J130l+27dzDju0E6MScKiV0ZM5Bw8m4blYQ== + optionalDependencies: + fsevents "~2.3.1" + +rollup@^2.36.2, rollup@^2.44.0, rollup@^2.45.2, rollup@^2.79.1: version "2.79.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7" integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw== From d5e614222d0b34aae7c2a7b1585116386438c494 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 01:02:22 +0200 Subject: [PATCH 26/46] Undo changes --- packages/pro | 2 +- yarn.lock | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/packages/pro b/packages/pro index d37a88a5ac..cf14c6a1bb 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit d37a88a5acae873a7635edbd9c5bae3c4e30f4c0 +Subproject commit cf14c6a1bbb51b4c047db991370d6c0dd1566a44 diff --git a/yarn.lock b/yarn.lock index d1f22e7699..827c94a176 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20279,20 +20279,6 @@ posthog-js@^1.36.0: fflate "^0.4.1" rrweb-snapshot "^1.1.14" -posthog-node@1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/posthog-node/-/posthog-node-1.0.7.tgz#a7a9525eebff23312117e57cff3ddac82afb2262" - integrity sha512-KTCwyU+PU1eAQtjy5ZSJ47mrxv2d/mMkxo+vvV5c+YqfE4mBAY1UPEPMv1nElb5Vq0UnxvyQXaUnOn8d8Xr6Eg== - dependencies: - axios "^0.21.1" - axios-retry "^3.1.9" - component-type "^1.2.1" - join-component "^1.1.0" - md5 "^2.3.0" - ms "^2.1.3" - remove-trailing-slash "^0.1.1" - uuid "^8.3.2" - posthog-node@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/posthog-node/-/posthog-node-1.3.0.tgz#804ed2f213a2f05253f798bf9569d55a9cad94f7" From 1df57261cd7dbbad1ecaa73c432975428f127664 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 01:03:26 +0200 Subject: [PATCH 27/46] Update ref --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index cf14c6a1bb..cf3bef2aad 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit cf14c6a1bbb51b4c047db991370d6c0dd1566a44 +Subproject commit cf3bef2aad9c739111b306fd0712397adc363f81 From 803c79fa55db58c002f5b0d674f210b0b282aece Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 01:57:13 +0200 Subject: [PATCH 28/46] Fix build --- packages/shared-core/tsconfig.build.json | 2 +- packages/types/tsconfig.build.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/shared-core/tsconfig.build.json b/packages/shared-core/tsconfig.build.json index 8b73754a43..6930e3cb99 100644 --- a/packages/shared-core/tsconfig.build.json +++ b/packages/shared-core/tsconfig.build.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es6", - "module": "commonjs", + "moduleResolution": "node", "lib": ["es2020"], "strict": true, "noImplicitAny": true, diff --git a/packages/types/tsconfig.build.json b/packages/types/tsconfig.build.json index 8df63fac57..f2c4c7667b 100644 --- a/packages/types/tsconfig.build.json +++ b/packages/types/tsconfig.build.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es6", - "module": "commonjs", + "moduleResolution": "node", "lib": ["es2020"], "strict": true, "noImplicitAny": true, From ec79f612bc23065f2b39a0409eed71646c26ef42 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 02:16:27 +0200 Subject: [PATCH 29/46] Fix execution order --- packages/builder/package.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/builder/package.json b/packages/builder/package.json index 2f6d329877..c24d031518 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -140,6 +140,16 @@ } ] }, + "dev:builder": { + "dependsOn": [ + { + "projects": [ + "@budibase/shared-core" + ], + "target": "dev:builder" + } + ] + }, "test": { "dependsOn": [ { From 6c60ea79dd8d65dfaa8e62f769bd7f72ee51bedd Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 02:17:51 +0200 Subject: [PATCH 30/46] Fix --- packages/builder/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/package.json b/packages/builder/package.json index c24d031518..75c845a4a4 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -146,7 +146,7 @@ "projects": [ "@budibase/shared-core" ], - "target": "dev:builder" + "target": "build" } ] }, From 839f4f9545bad2a652a4cca91b08252c780479eb Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 02:20:07 +0200 Subject: [PATCH 31/46] Fix more ordering --- packages/builder/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/builder/package.json b/packages/builder/package.json index 75c845a4a4..6b5399c942 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -144,6 +144,7 @@ "dependsOn": [ { "projects": [ + "@budibase/string-templates", "@budibase/shared-core" ], "target": "build" From 77a22470cb86cdf9e867a97d6adc08f84efe7932 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 09:59:14 +0200 Subject: [PATCH 32/46] Use path for shared-core in backend-core --- packages/backend-core/jest.config.ts | 1 + packages/backend-core/tsconfig.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/backend-core/jest.config.ts b/packages/backend-core/jest.config.ts index 52d042dbac..3f1065ead2 100644 --- a/packages/backend-core/jest.config.ts +++ b/packages/backend-core/jest.config.ts @@ -9,6 +9,7 @@ const baseConfig: Config.InitialProjectOptions = { }, moduleNameMapper: { "@budibase/types": "/../types/src", + "@budibase/shared-core": ["/../shared-core/src"], }, } diff --git a/packages/backend-core/tsconfig.json b/packages/backend-core/tsconfig.json index 2993ff84ed..128814b955 100644 --- a/packages/backend-core/tsconfig.json +++ b/packages/backend-core/tsconfig.json @@ -4,7 +4,8 @@ "composite": true, "baseUrl": ".", "paths": { - "@budibase/types": ["../types/src"] + "@budibase/types": ["../types/src"], + "@budibase/shared-core": ["../shared-core/src"] } }, "exclude": ["node_modules", "dist"] From bb861e45a863acc546ce1693ec7b663ca5f3fd19 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 10:02:39 +0200 Subject: [PATCH 33/46] Remove unnecessary nx dependencies for build --- nx.json | 11 +---------- packages/backend-core/package.json | 14 -------------- packages/shared-core/package.json | 24 ------------------------ 3 files changed, 1 insertion(+), 48 deletions(-) diff --git a/nx.json b/nx.json index 9680f96dc1..8176bae82c 100644 --- a/nx.json +++ b/nx.json @@ -8,14 +8,5 @@ } } }, - "targetDefaults": { - "dev:builder": { - "dependsOn": [ - { - "projects": ["@budibase/string-templates"], - "target": "build" - } - ] - } - } + "targetDefaults": {} } diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index b842abb389..20ea53b420 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -89,19 +89,5 @@ "tsconfig-paths": "4.0.0", "typescript": "4.7.3" }, - "nx": { - "targets": { - "build": { - "dependsOn": [ - { - "projects": [ - "@budibase/types" - ], - "target": "build" - } - ] - } - } - }, "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" } diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index 838b8c0bea..9c8861c9d8 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -25,29 +25,5 @@ "concurrently": "^7.6.0", "rimraf": "3.0.2", "typescript": "4.7.3" - }, - "nx": { - "targets": { - "build": { - "dependsOn": [ - { - "projects": [ - "@budibase/types" - ], - "target": "build" - } - ] - }, - "dev:builder": { - "dependsOn": [ - { - "projects": [ - "@budibase/types" - ], - "target": "build" - } - ] - } - } } } From 52940b87fb2752ebc024a6a646b989fa6184be68 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 10:07:03 +0200 Subject: [PATCH 34/46] Fix build order --- packages/bbui/package.json | 6 +++--- packages/builder/package.json | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/bbui/package.json b/packages/bbui/package.json index e5d0ad6b57..8a9318ba94 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -98,13 +98,13 @@ { "projects": [ "@budibase/string-templates", - "@budibase/shared-core" + "@budibase/shared-core", + "@budibase/types" ], "target": "build" } ] } } - }, - "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" + } } diff --git a/packages/builder/package.json b/packages/builder/package.json index 6b5399c942..27a1b2f6c2 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -134,7 +134,8 @@ { "projects": [ "@budibase/string-templates", - "@budibase/shared-core" + "@budibase/shared-core", + "@budibase/types" ], "target": "build" } From 24d4ac2b5f8747fa7c304dd89071c6e83f95b125 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 10:12:41 +0200 Subject: [PATCH 35/46] Fix cli order --- packages/cli/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 4437469be2..cb59bf7c69 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -71,7 +71,8 @@ "dependsOn": [ { "projects": [ - "@budibase/backend-core" + "@budibase/backend-core", + "@budibase/string-templates" ], "target": "build" } From c2798493401ce358c96c0fab8780d2bb06a836e2 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 10:17:58 +0200 Subject: [PATCH 36/46] Fix orders on server/worker --- packages/server/package.json | 10 ---------- packages/worker/package.json | 14 -------------- 2 files changed, 24 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index ba663df9c3..c0ab3a4f3b 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -182,16 +182,6 @@ }, "nx": { "targets": { - "dev:builder": { - "dependsOn": [ - { - "projects": [ - "@budibase/backend-core" - ], - "target": "build" - } - ] - }, "test": { "dependsOn": [ { diff --git a/packages/worker/package.json b/packages/worker/package.json index a1b9e68878..6377bed6fc 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -103,19 +103,5 @@ "typescript": "4.7.3", "update-dotenv": "1.1.1" }, - "nx": { - "targets": { - "dev:builder": { - "dependsOn": [ - { - "projects": [ - "@budibase/backend-core" - ], - "target": "build" - } - ] - } - } - }, "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" } From acd9d8ae545b274fb060b957c9d351bea153e5f7 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 10:22:42 +0200 Subject: [PATCH 37/46] Fix test issues --- packages/builder/package.json | 6 ++++-- packages/server/package.json | 15 --------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/packages/builder/package.json b/packages/builder/package.json index 27a1b2f6c2..c4b49f2f64 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -146,7 +146,8 @@ { "projects": [ "@budibase/string-templates", - "@budibase/shared-core" + "@budibase/shared-core", + "@budibase/types" ], "target": "build" } @@ -157,7 +158,8 @@ { "projects": [ "@budibase/shared-core", - "@budibase/string-templates" + "@budibase/string-templates", + "@budibase/types" ], "target": "build" } diff --git a/packages/server/package.json b/packages/server/package.json index c0ab3a4f3b..8d4f096ac1 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -180,20 +180,5 @@ "optionalDependencies": { "oracledb": "5.3.0" }, - "nx": { - "targets": { - "test": { - "dependsOn": [ - { - "projects": [ - "@budibase/string-templates", - "@budibase/shared-core" - ], - "target": "build" - } - ] - } - } - }, "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" } From b4eccc4163f1d1bd898de54bf91aa224fab17ac5 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 10:30:54 +0200 Subject: [PATCH 38/46] Fix dev nx order --- packages/builder/package.json | 4 ++-- packages/client/package.json | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/builder/package.json b/packages/builder/package.json index c4b49f2f64..235fce97ec 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -133,8 +133,8 @@ "dependsOn": [ { "projects": [ - "@budibase/string-templates", "@budibase/shared-core", + "@budibase/string-templates", "@budibase/types" ], "target": "build" @@ -145,8 +145,8 @@ "dependsOn": [ { "projects": [ - "@budibase/string-templates", "@budibase/shared-core", + "@budibase/string-templates", "@budibase/types" ], "target": "build" diff --git a/packages/client/package.json b/packages/client/package.json index 689ec332e5..67fd4ee3f9 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -76,6 +76,17 @@ "target": "build" } ] + }, + "dev:builder": { + "dependsOn": [ + { + "projects": [ + "@budibase/string-templates", + "@budibase/shared-core" + ], + "target": "build" + } + ] } } }, From a2d7b0f7773c93f66b1a04a7f3a9c6855ba3d15a Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 10:41:46 +0200 Subject: [PATCH 39/46] Fix client order --- packages/client/package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/client/package.json b/packages/client/package.json index 67fd4ee3f9..4ff8b9c67a 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -70,8 +70,9 @@ "dependsOn": [ { "projects": [ + "@budibase/shared-core", "@budibase/string-templates", - "@budibase/shared-core" + "@budibase/types" ], "target": "build" } @@ -81,8 +82,9 @@ "dependsOn": [ { "projects": [ + "@budibase/shared-core", "@budibase/string-templates", - "@budibase/shared-core" + "@budibase/types" ], "target": "build" } From 7944f72820d8b6febbba9bb409bf253cbede8f4c Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 10:59:15 +0200 Subject: [PATCH 40/46] Fix integration tests --- .github/workflows/budibase_ci.yml | 2 +- packages/shared-core/package.json | 3 ++- packages/types/package.json | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 9509a22e99..ba8d9f53ea 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -154,7 +154,7 @@ jobs: node-version: 14.x cache: "yarn" - run: yarn - - run: yarn build + - run: yarn build --projects=@budibase/server,@budibase/worker,@budibase/shared-core - name: Run tests run: | cd qa-core diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index 9c8861c9d8..98ee89999b 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -6,7 +6,8 @@ "types": "src/index.ts", "exports": { ".": { - "import": "./dist/index.js" + "import": "./dist/index.js", + "require": "./src/index.ts" } }, "author": "Budibase", diff --git a/packages/types/package.json b/packages/types/package.json index 04bd3bc1d1..96ab8cb095 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -6,7 +6,8 @@ "types": "src/index.ts", "exports": { ".": { - "import": "./dist/index.js" + "import": "./dist/index.js", + "require": "./src/index.ts" } }, "author": "Budibase", From b6c4bd7698786c36faa55a1e194708cff3f0ad3d Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 11:01:47 +0200 Subject: [PATCH 41/46] Remove unnecessary build --- .github/workflows/budibase_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index ba8d9f53ea..c56894335c 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -154,7 +154,7 @@ jobs: node-version: 14.x cache: "yarn" - run: yarn - - run: yarn build --projects=@budibase/server,@budibase/worker,@budibase/shared-core + - run: yarn build --projects=@budibase/server,@budibase/worker - name: Run tests run: | cd qa-core From 416899b3b86e2cd4be124cb2b2080431e92b7183 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 11:09:59 +0200 Subject: [PATCH 42/46] Build client for integration test --- .github/workflows/budibase_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index c56894335c..b84fd54fae 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -154,7 +154,7 @@ jobs: node-version: 14.x cache: "yarn" - run: yarn - - run: yarn build --projects=@budibase/server,@budibase/worker + - run: yarn build --projects=@budibase/server,@budibase/worker,@budibase/client - name: Run tests run: | cd qa-core From fcba916f0cf49e8e1b20dbed544cb47dcbff6295 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 11:25:52 +0200 Subject: [PATCH 43/46] Add bail in jest --- packages/server/scripts/test.sh | 4 ++-- packages/worker/scripts/test.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/server/scripts/test.sh b/packages/server/scripts/test.sh index f3f679c4da..bc21ec53ed 100644 --- a/packages/server/scripts/test.sh +++ b/packages/server/scripts/test.sh @@ -5,8 +5,8 @@ if [[ -n $CI ]] then # --runInBand performs better in ci where resources are limited export NODE_OPTIONS="--max-old-space-size=4096" - echo "jest --coverage --runInBand --forceExit" - jest --coverage --runInBand --forceExit + echo "jest --coverage --runInBand --forceExit --bail" + jest --coverage --runInBand --forceExit --bail else # --maxWorkers performs better in development echo "jest --coverage --maxWorkers=2 --forceExit" diff --git a/packages/worker/scripts/test.sh b/packages/worker/scripts/test.sh index d7659a9318..e9755f6afe 100644 --- a/packages/worker/scripts/test.sh +++ b/packages/worker/scripts/test.sh @@ -4,8 +4,8 @@ set -e if [[ -n $CI ]] then # --runInBand performs better in ci where resources are limited - echo "jest --coverage --runInBand --forceExit" - jest --coverage --runInBand --forceExit + echo "jest --coverage --runInBand --forceExit --bail" + jest --coverage --runInBand --forceExit --bail else # --maxWorkers performs better in development echo "jest --coverage --maxWorkers=2 --forceExit" From 1ef8d118cbf9d2e97686bea1dd036c88e22ad036 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 12:04:54 +0200 Subject: [PATCH 44/46] Remove unnecessary package.json/gitHead --- packages/backend-core/package.json | 3 +-- packages/builder/package.json | 3 +-- packages/client/package.json | 3 +-- packages/server/package.json | 3 +-- packages/string-templates/package.json | 3 +-- packages/worker/package.json | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 20ea53b420..4631b090fe 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -88,6 +88,5 @@ "ts-node": "10.8.1", "tsconfig-paths": "4.0.0", "typescript": "4.7.3" - }, - "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" + } } diff --git a/packages/builder/package.json b/packages/builder/package.json index 235fce97ec..56834f79dd 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -166,6 +166,5 @@ ] } } - }, - "gitHead": "115189f72a850bfb52b65ec61d932531bf327072" + } } diff --git a/packages/client/package.json b/packages/client/package.json index 4ff8b9c67a..a5ee304610 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -91,6 +91,5 @@ ] } } - }, - "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" + } } diff --git a/packages/server/package.json b/packages/server/package.json index 8d4f096ac1..7d0d8f5feb 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -179,6 +179,5 @@ }, "optionalDependencies": { "oracledb": "5.3.0" - }, - "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" + } } diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index d9416bad4c..4dc4c17ad8 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -46,6 +46,5 @@ "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-terser": "^7.0.2", "typescript": "4.7.3" - }, - "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" + } } diff --git a/packages/worker/package.json b/packages/worker/package.json index 6377bed6fc..a71e9519d9 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -102,6 +102,5 @@ "tsconfig-paths": "4.0.0", "typescript": "4.7.3", "update-dotenv": "1.1.1" - }, - "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" + } } From bcae0371d37362525fddeaf0312b07513088e8d0 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 2 Aug 2023 12:24:43 +0200 Subject: [PATCH 45/46] Do not ignore *.tsbuildinfo as they should never be created outside the dist folder --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index b3dc8af0d4..22a7313e66 100644 --- a/.gitignore +++ b/.gitignore @@ -101,8 +101,6 @@ packages/builder/cypress.env.json packages/builder/cypress/reports stats.html -# TypeScript cache -*.tsbuildinfo # plugins budibase-component From 063942d21cc79791981518ac2907c0969931d677 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 2 Aug 2023 12:22:47 +0000 Subject: [PATCH 46/46] Bump version to 2.8.29-alpha.12 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 74a1392bf9..13fc86bb18 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.8.29-alpha.11", + "version": "2.8.29-alpha.12", "npmClient": "yarn", "packages": [ "packages/*"