diff --git a/.github/workflows/test-branches.yml b/.github/workflows/test-branches.yml index 0b401aef8..90bb65e6f 100644 --- a/.github/workflows/test-branches.yml +++ b/.github/workflows/test-branches.yml @@ -22,7 +22,7 @@ jobs: run: yarn build # format tests don't pass on node 12 since icu is missing and tests don't work with locales - name: Test packages - run: yarn test-ci + run: yarn test:ci - name: Upload coverage to codecov run: bash <(curl -s https://codecov.io/bash) - name: Upload coverage to codeclimate diff --git a/.github/workflows/test-pulls.yml b/.github/workflows/test-pulls.yml index e4fa814a6..2b3580188 100644 --- a/.github/workflows/test-pulls.yml +++ b/.github/workflows/test-pulls.yml @@ -19,7 +19,7 @@ jobs: run: yarn build - name: Test packages - run: yarn test-ci + run: yarn test:ci - name: Upload coverage to codecov run: bash <(curl -s https://codecov.io/bash) diff --git a/.gitignore b/.gitignore index 6aa593d9e..00079cf97 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,8 @@ **/.env **/lowdefy.yaml +.turbo + packages/server/build/** packages/server-dev/build/** !packages/docs/lowdefy.yaml diff --git a/.pnp.cjs b/.pnp.cjs index 515ee57d8..602dccbaa 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -250,7 +250,8 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-plugin-react", "virtual:14dc3c5c29c93a240ee9920d64fd6833645f8d8a02afe23178a1bf927002b564a4b08cf8ebf9743280710b14fd76f4d49a30c662180d631d2b7265cbb3f04552#npm:7.28.0"], ["eslint-plugin-react-hooks", "virtual:14dc3c5c29c93a240ee9920d64fd6833645f8d8a02afe23178a1bf927002b564a4b08cf8ebf9743280710b14fd76f4d49a30c662180d631d2b7265cbb3f04552#npm:4.3.0"], ["lerna", "npm:4.0.0"], - ["prettier", "npm:2.5.1"] + ["prettier", "npm:2.5.1"], + ["turbo", "npm:1.2.9"] ], "linkType": "SOFT", }] @@ -3333,7 +3334,8 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-plugin-react", "virtual:14dc3c5c29c93a240ee9920d64fd6833645f8d8a02afe23178a1bf927002b564a4b08cf8ebf9743280710b14fd76f4d49a30c662180d631d2b7265cbb3f04552#npm:7.28.0"], ["eslint-plugin-react-hooks", "virtual:14dc3c5c29c93a240ee9920d64fd6833645f8d8a02afe23178a1bf927002b564a4b08cf8ebf9743280710b14fd76f4d49a30c662180d631d2b7265cbb3f04552#npm:4.3.0"], ["lerna", "npm:4.0.0"], - ["prettier", "npm:2.5.1"] + ["prettier", "npm:2.5.1"], + ["turbo", "npm:1.2.9"] ], "linkType": "SOFT", }] @@ -18464,6 +18466,145 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD", }] ]], + ["turbo", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-npm-1.2.9-5da9cb7700/node_modules/turbo/", + "packageDependencies": [ + ["turbo", "npm:1.2.9"], + ["turbo-darwin-64", "npm:1.2.9"], + ["turbo-darwin-arm64", "npm:1.2.9"], + ["turbo-freebsd-64", "npm:1.2.9"], + ["turbo-freebsd-arm64", "npm:1.2.9"], + ["turbo-linux-32", "npm:1.2.9"], + ["turbo-linux-64", "npm:1.2.9"], + ["turbo-linux-arm", "npm:1.2.9"], + ["turbo-linux-arm64", "npm:1.2.9"], + ["turbo-linux-mips64le", "npm:1.2.9"], + ["turbo-linux-ppc64le", "npm:1.2.9"], + ["turbo-windows-32", "npm:1.2.9"], + ["turbo-windows-64", "npm:1.2.9"], + ["turbo-windows-arm64", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], + ["turbo-darwin-64", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-darwin-64-npm-1.2.9-f5f5a4a5b6/node_modules/turbo-darwin-64/", + "packageDependencies": [ + ["turbo-darwin-64", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], + ["turbo-darwin-arm64", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-darwin-arm64-npm-1.2.9-5ba4db5144/node_modules/turbo-darwin-arm64/", + "packageDependencies": [ + ["turbo-darwin-arm64", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], + ["turbo-freebsd-64", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-freebsd-64-npm-1.2.9-d98d14e100/node_modules/turbo-freebsd-64/", + "packageDependencies": [ + ["turbo-freebsd-64", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], + ["turbo-freebsd-arm64", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-freebsd-arm64-npm-1.2.9-e58a579f43/node_modules/turbo-freebsd-arm64/", + "packageDependencies": [ + ["turbo-freebsd-arm64", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], + ["turbo-linux-32", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-linux-32-npm-1.2.9-25f6e2c2c6/node_modules/turbo-linux-32/", + "packageDependencies": [ + ["turbo-linux-32", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], + ["turbo-linux-64", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-linux-64-npm-1.2.9-c10fd49096/node_modules/turbo-linux-64/", + "packageDependencies": [ + ["turbo-linux-64", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], + ["turbo-linux-arm", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-linux-arm-npm-1.2.9-d750bdfb4b/node_modules/turbo-linux-arm/", + "packageDependencies": [ + ["turbo-linux-arm", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], + ["turbo-linux-arm64", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-linux-arm64-npm-1.2.9-e4ae23d2b3/node_modules/turbo-linux-arm64/", + "packageDependencies": [ + ["turbo-linux-arm64", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], + ["turbo-linux-mips64le", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-linux-mips64le-npm-1.2.9-60826c615a/node_modules/turbo-linux-mips64le/", + "packageDependencies": [ + ["turbo-linux-mips64le", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], + ["turbo-linux-ppc64le", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-linux-ppc64le-npm-1.2.9-3b670882c7/node_modules/turbo-linux-ppc64le/", + "packageDependencies": [ + ["turbo-linux-ppc64le", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], + ["turbo-windows-32", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-windows-32-npm-1.2.9-eed65d5169/node_modules/turbo-windows-32/", + "packageDependencies": [ + ["turbo-windows-32", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], + ["turbo-windows-64", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-windows-64-npm-1.2.9-43add06263/node_modules/turbo-windows-64/", + "packageDependencies": [ + ["turbo-windows-64", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], + ["turbo-windows-arm64", [ + ["npm:1.2.9", { + "packageLocation": "./.yarn/unplugged/turbo-windows-arm64-npm-1.2.9-192987e1af/node_modules/turbo-windows-arm64/", + "packageDependencies": [ + ["turbo-windows-arm64", "npm:1.2.9"] + ], + "linkType": "HARD", + }] + ]], ["tweetnacl", [ ["npm:0.14.5", { "packageLocation": "./.yarn/cache/tweetnacl-npm-0.14.5-a3f766c0d1-6061daba17.zip/node_modules/tweetnacl/", diff --git a/.yarn/cache/turbo-darwin-arm64-npm-1.2.9-5ba4db5144-8.zip b/.yarn/cache/turbo-darwin-arm64-npm-1.2.9-5ba4db5144-8.zip new file mode 100644 index 000000000..e1cc082d9 Binary files /dev/null and b/.yarn/cache/turbo-darwin-arm64-npm-1.2.9-5ba4db5144-8.zip differ diff --git a/.yarn/cache/turbo-linux-arm64-npm-1.2.9-e4ae23d2b3-8.zip b/.yarn/cache/turbo-linux-arm64-npm-1.2.9-e4ae23d2b3-8.zip new file mode 100644 index 000000000..33d04caa0 Binary files /dev/null and b/.yarn/cache/turbo-linux-arm64-npm-1.2.9-e4ae23d2b3-8.zip differ diff --git a/.yarn/cache/turbo-npm-1.2.9-5da9cb7700-7f8bbe9ff3.zip b/.yarn/cache/turbo-npm-1.2.9-5da9cb7700-7f8bbe9ff3.zip new file mode 100644 index 000000000..02a1a3e67 Binary files /dev/null and b/.yarn/cache/turbo-npm-1.2.9-5da9cb7700-7f8bbe9ff3.zip differ diff --git a/.yarn/cache/turbo-windows-arm64-npm-1.2.9-192987e1af-8.zip b/.yarn/cache/turbo-windows-arm64-npm-1.2.9-192987e1af-8.zip new file mode 100644 index 000000000..03826821d Binary files /dev/null and b/.yarn/cache/turbo-windows-arm64-npm-1.2.9-192987e1af-8.zip differ diff --git a/package.json b/package.json index e226a3541..d80f02ea8 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ ], "scripts": { "build": "lerna run build", - "build:dev": "NODE_ENV=development lerna run build", + "build:turbo": "turbo run build", "build:plugins": "yarn build:blocks && yarn build:connections && yarn build:operators", "build:blocks": "lerna run --scope '@lowdefy/blocks-*' build", "build:connections": "lerna run --scope '@lowdefy/connection-*' build", @@ -39,15 +39,14 @@ "clean": "lerna run clean", "lerna:version": "lerna version --no-git-tag-version", "lerna:publish": "lerna publish from-git", - "postversion": "yarn install", "prettier": "prettier --config .prettierrc --write **/*.js", "start": "yarn start:server:app", - "start:cli:build:app": "yarn workspace lowdefy build && yarn workspace lowdefy start build --config-directory ../../app --server-directory ../server --output-directory ../", - "start:cli:build:docs": "yarn workspace lowdefy build && yarn workspace lowdefy start build --config-directory ../docs --server-directory ../server --output-directory ../", - "start:cli:dev:app": "yarn workspace lowdefy build && yarn workspace lowdefy start dev --config-directory ../../app --dev-directory ../server-dev", - "start:cli:dev:docs": "yarn workspace lowdefy build && yarn workspace lowdefy start dev --config-directory ../docs --dev-directory ../server-dev", - "start:cli:start:app": "yarn workspace lowdefy build && yarn workspace lowdefy start start --config-directory ../../app --server-directory ../server --output-directory ../", - "start:cli:start:docs": "yarn workspace lowdefy build && yarn workspace lowdefy start start --config-directory ../docs --server-directory ../server --output-directory ../", + "start:cli:build:app": "yarn build:turbo && yarn workspace lowdefy start build --config-directory ../../app --server-directory ../server --output-directory ../", + "start:cli:build:docs": "yarn build:turbo && yarn workspace lowdefy start build --config-directory ../docs --server-directory ../server --output-directory ../", + "start:cli:dev:app": "yarn build:turbo && yarn workspace lowdefy start dev --config-directory ../../app --dev-directory ../server-dev", + "start:cli:dev:docs": "yarn build:turbo && yarn workspace lowdefy start dev --config-directory ../docs --dev-directory ../server-dev", + "start:cli:start:app": "yarn build:turbo && yarn workspace lowdefy start start --config-directory ../../app --server-directory ../server --output-directory ../", + "start:cli:start:docs": "yarn build:turbo && yarn workspace lowdefy start start --config-directory ../docs --server-directory ../server --output-directory ../", "start:server-dev:app": "yarn workspace @lowdefy/server-dev start --package-manager yarn --config-directory ../../app", "start:server-dev:docs": "yarn workspace @lowdefy/server-dev start --package-manager yarn --config-directory ../docs", "start:server:app": "yarn workspace @lowdefy/server build:lowdefy --config-directory ../../app && yarn && yarn workspace @lowdefy/server build:next && yarn workspace @lowdefy/server start", @@ -56,7 +55,7 @@ "start:server:next-dev:docs": "yarn start:cli:build:docs && yarn && yarn workspace @lowdefy/server dev", "start:server-dev:next-dev:app": "yarn workspace lowdefy start build --config-directory ../../app --server-directory ../server-dev --output-directory ../ && yarn workspace @lowdefy/server-dev next dev", "test": "lerna run test", - "test-ci": "yarn test --ignore='@lowdefy/engine' --ignore='@lowdefy/format' --ignore='@lowdefy/blocks-*' --ignore='@lowdefy/plugin-aws'" + "test:ci": "yarn test --ignore='@lowdefy/engine' --ignore='@lowdefy/format' --ignore='@lowdefy/blocks-*' --ignore='@lowdefy/plugin-aws'" }, "devDependencies": { "@yarnpkg/pnpify": "3.1.1-rc.13", @@ -69,7 +68,8 @@ "eslint-plugin-react": "7.28.0", "eslint-plugin-react-hooks": "4.3.0", "lerna": "4.0.0", - "prettier": "2.5.1" + "prettier": "2.5.1", + "turbo": "1.2.9" }, "packageManager": "yarn@3.1.0" } diff --git a/turbo.json b/turbo.json new file mode 100644 index 000000000..37294a564 --- /dev/null +++ b/turbo.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://turborepo.org/schema.json", + "baseBranch": "origin/main", + "pipeline": { + "build": { + "dependsOn": ["^build"], + "outputs": [] + } + } +} diff --git a/yarn.lock b/yarn.lock index d1dc24eb5..59ea1855b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2462,6 +2462,7 @@ __metadata: eslint-plugin-react-hooks: 4.3.0 lerna: 4.0.0 prettier: 2.5.1 + turbo: 1.2.9 languageName: unknown linkType: soft @@ -15127,6 +15128,147 @@ __metadata: languageName: node linkType: hard +"turbo-darwin-64@npm:1.2.9": + version: 1.2.9 + resolution: "turbo-darwin-64@npm:1.2.9" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"turbo-darwin-arm64@npm:1.2.9": + version: 1.2.9 + resolution: "turbo-darwin-arm64@npm:1.2.9" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"turbo-freebsd-64@npm:1.2.9": + version: 1.2.9 + resolution: "turbo-freebsd-64@npm:1.2.9" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"turbo-freebsd-arm64@npm:1.2.9": + version: 1.2.9 + resolution: "turbo-freebsd-arm64@npm:1.2.9" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"turbo-linux-32@npm:1.2.9": + version: 1.2.9 + resolution: "turbo-linux-32@npm:1.2.9" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"turbo-linux-64@npm:1.2.9": + version: 1.2.9 + resolution: "turbo-linux-64@npm:1.2.9" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"turbo-linux-arm64@npm:1.2.9": + version: 1.2.9 + resolution: "turbo-linux-arm64@npm:1.2.9" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"turbo-linux-arm@npm:1.2.9": + version: 1.2.9 + resolution: "turbo-linux-arm@npm:1.2.9" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"turbo-linux-mips64le@npm:1.2.9": + version: 1.2.9 + resolution: "turbo-linux-mips64le@npm:1.2.9" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"turbo-linux-ppc64le@npm:1.2.9": + version: 1.2.9 + resolution: "turbo-linux-ppc64le@npm:1.2.9" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"turbo-windows-32@npm:1.2.9": + version: 1.2.9 + resolution: "turbo-windows-32@npm:1.2.9" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"turbo-windows-64@npm:1.2.9": + version: 1.2.9 + resolution: "turbo-windows-64@npm:1.2.9" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"turbo-windows-arm64@npm:1.2.9": + version: 1.2.9 + resolution: "turbo-windows-arm64@npm:1.2.9" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"turbo@npm:1.2.9": + version: 1.2.9 + resolution: "turbo@npm:1.2.9" + dependencies: + turbo-darwin-64: 1.2.9 + turbo-darwin-arm64: 1.2.9 + turbo-freebsd-64: 1.2.9 + turbo-freebsd-arm64: 1.2.9 + turbo-linux-32: 1.2.9 + turbo-linux-64: 1.2.9 + turbo-linux-arm: 1.2.9 + turbo-linux-arm64: 1.2.9 + turbo-linux-mips64le: 1.2.9 + turbo-linux-ppc64le: 1.2.9 + turbo-windows-32: 1.2.9 + turbo-windows-64: 1.2.9 + turbo-windows-arm64: 1.2.9 + dependenciesMeta: + turbo-darwin-64: + optional: true + turbo-darwin-arm64: + optional: true + turbo-freebsd-64: + optional: true + turbo-freebsd-arm64: + optional: true + turbo-linux-32: + optional: true + turbo-linux-64: + optional: true + turbo-linux-arm: + optional: true + turbo-linux-arm64: + optional: true + turbo-linux-mips64le: + optional: true + turbo-linux-ppc64le: + optional: true + turbo-windows-32: + optional: true + turbo-windows-64: + optional: true + turbo-windows-arm64: + optional: true + bin: + turbo: bin/turbo + checksum: 7f8bbe9ff37590e01a10f8e9859a99fb74def0c94f38d46844f3a29d7559ad95f9c85944085783f122d5ee2fff20f49e2d838d953343a45680a9089190eee2a3 + languageName: node + linkType: hard + "tweetnacl@npm:^0.14.3, tweetnacl@npm:~0.14.0": version: 0.14.5 resolution: "tweetnacl@npm:0.14.5"