diff --git a/.eslintrc.json b/.eslintrc.json index d94c749042..75584b8163 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,7 +5,7 @@ "jest": true, "node": true }, - "parser": "babel-eslint", + "parser": "@babel/eslint-parser", "parserOptions": { "ecmaVersion": 2019, "sourceType": "module", @@ -18,17 +18,23 @@ "*.spec.js", "bundle.js" ], - "plugins": ["svelte3"], "extends": ["eslint:recommended"], "overrides": [ { - "files": ["*.svelte"], - "processor": "svelte3/svelte3" + "files": ["**/*.svelte"], + "extends": "plugin:svelte/recommended", + "parser": "svelte-eslint-parser", + "parserOptions": { + "parser": "@babel/eslint-parser", + "ecmaVersion": 2019, + "sourceType": "module", + "allowImportExportEverywhere": true + } + }, { "files": ["**/*.ts"], "parser": "@typescript-eslint/parser", - "plugins": [], "extends": ["eslint:recommended"], "rules": { "no-unused-vars": "off", @@ -41,7 +47,8 @@ } ], "rules": { - "no-self-assign": "off" + "no-self-assign": "off", + "no-unused-vars": ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_", "destructuredArrayIgnorePattern": "^_" }] }, "globals": { "GeolocationPositionError": true diff --git a/.github/workflows/release-master.yml b/.github/workflows/release-master.yml index 68625ad7af..9a86f50c04 100644 --- a/.github/workflows/release-master.yml +++ b/.github/workflows/release-master.yml @@ -34,7 +34,6 @@ jobs: exit 1 fi - - uses: actions/setup-node@v1 with: node-version: 14.x @@ -58,9 +57,12 @@ jobs: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc yarn release - - name: "Get Previous tag" - id: previoustag - uses: "WyriHaximus/github-action-get-previous-tag@v1" + - name: "Get Current tag" + id: currenttag + run: | + version=v$(./scripts/getCurrentVersion.sh) + echo 'Using tag $version' + echo "::set-output name=tag::$resversionult" - name: Build/release Docker images run: | @@ -69,7 +71,7 @@ jobs: env: DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} - BUDIBASE_RELEASE_VERSION: ${{ steps.previoustag.outputs.tag }} + BUDIBASE_RELEASE_VERSION: ${{ steps.currenttag.outputs.tag }} release-helm-chart: needs: [release-images] diff --git a/babel.config.json b/babel.config.json new file mode 100644 index 0000000000..a6c42326bb --- /dev/null +++ b/babel.config.json @@ -0,0 +1,3 @@ +{ + "presets": [["@babel/preset-env", { "targets": { "node": "current" } }]] +} diff --git a/lerna.json b/lerna.json index 2c1ffac2c5..09979397e0 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.7.37-alpha.15", + "version": "2.8.2-alpha.4", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/package.json b/package.json index 42e528dfce..a4b830d40b 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,10 @@ "@nx/js": "16.2.1", "@rollup/plugin-json": "^4.0.2", "@typescript-eslint/parser": "5.45.0", - "babel-eslint": "^10.0.3", "esbuild": "^0.17.18", "esbuild-node-externals": "^1.7.0", - "eslint": "^7.28.0", + "eslint": "^8.44.0", "eslint-plugin-cypress": "^2.11.3", - "eslint-plugin-svelte3": "^3.2.0", "husky": "^8.0.3", "js-yaml": "^4.1.0", "kill-port": "^1.6.1", @@ -23,7 +21,12 @@ "rimraf": "^3.0.2", "rollup-plugin-replace": "^2.2.0", "svelte": "^3.38.2", - "typescript": "4.7.3" + "typescript": "4.7.3", + "@babel/core": "^7.22.5", + "@babel/eslint-parser": "^7.22.5", + "@babel/preset-env": "^7.22.5", + "eslint-plugin-svelte": "^2.32.2", + "svelte-eslint-parser": "^0.32.0" }, "scripts": { "preinstall": "node scripts/syncProPackage.js", @@ -52,10 +55,10 @@ "dev:built": "yarn run kill-all && cd packages/server && yarn dev:stack:up && cd ../../ && lerna run --stream --parallel 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", - "lint:eslint": "eslint packages && eslint qa-core", + "lint:eslint": "eslint packages qa-core --max-warnings=0", "lint:prettier": "prettier --check \"packages/**/*.{js,ts,svelte}\" && prettier --write \"examples/**/*.{js,ts,svelte}\" && prettier --check \"qa-core/**/*.{js,ts,svelte}\"", "lint": "yarn run lint:eslint && yarn run lint:prettier", - "lint:fix:eslint": "eslint --fix packages qa-core", + "lint:fix:eslint": "eslint --fix --max-warnings=0 packages qa-core", "lint:fix:prettier": "prettier --write \"packages/**/*.{js,ts,svelte}\" && prettier --write \"examples/**/*.{js,ts,svelte}\" && prettier --write \"qa-core/**/*.{js,ts,svelte}\"", "lint:fix": "yarn run lint:fix:prettier && yarn run lint:fix:eslint", "build:specs": "lerna run --stream specs", @@ -103,5 +106,6 @@ "@budibase/string-templates": "0.0.0", "@budibase/types": "0.0.0" }, - "dependencies": {} + "dependencies": { + } } diff --git a/packages/bbui/src/Button/Button.svelte b/packages/bbui/src/Button/Button.svelte index efd5f33bd2..91affdb6c7 100644 --- a/packages/bbui/src/Button/Button.svelte +++ b/packages/bbui/src/Button/Button.svelte @@ -16,8 +16,6 @@ export let tooltip = undefined export let newStyles = true export let id - - let showTooltip = false - {/if} - - -
- {#each deployments as deployment} -
-
- - {formatDate(deployment.updatedAt, "fullDate")} - - - {formatDate(deployment.updatedAt, "timeOnly")} - -
-
- {#if deployment.status.toLowerCase() === "pending"} - - {/if} -
showErrorReasonModal(deployment.err)} - class={`deployment-status ${deployment.status}`} - > - - {deployment.status} - {#if deployment.status === DeploymentStatus.FAILURE} - - {/if} - -
-
-
- {/each} -
- -{/if} - - - - - - {errorReason} - - - - diff --git a/packages/builder/src/components/deploy/utils.js b/packages/builder/src/components/deploy/utils.js deleted file mode 100644 index cb254f0dbf..0000000000 --- a/packages/builder/src/components/deploy/utils.js +++ /dev/null @@ -1,25 +0,0 @@ -export const DeploymentStatus = { - SUCCESS: "SUCCESS", - PENDING: "PENDING", - FAILURE: "FAILURE", -} - -// Required to check any updated deployment statuses between polls -export function checkIncomingDeploymentStatus(current, incoming) { - return incoming.reduce((acc, incomingDeployment) => { - if (incomingDeployment.status === DeploymentStatus.FAILURE) { - const currentDeployment = current.find( - deployment => deployment._id === incomingDeployment._id - ) - - //We have just been notified of an ongoing deployments failure - if ( - !currentDeployment || - currentDeployment.status === DeploymentStatus.PENDING - ) { - acc.push(incomingDeployment) - } - } - return acc - }, []) -} diff --git a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/TriggerAutomation.svelte b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/TriggerAutomation.svelte index 72d38cded0..971a5ede44 100644 --- a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/TriggerAutomation.svelte +++ b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/TriggerAutomation.svelte @@ -42,7 +42,6 @@ } }) - $: hasAutomations = automations && automations.length > 0 $: selectedAutomation = automations?.find( a => a._id === parameters?.automationId ) @@ -145,12 +144,6 @@ padding-bottom: 20px; } - .params { - display: flex; - flex-wrap: nowrap; - gap: 25px; - } - .synchronous-info { display: flex; gap: var(--spacing-s); diff --git a/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldConfiguration.svelte b/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldConfiguration.svelte index f9127460e2..2778ce4f74 100644 --- a/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldConfiguration.svelte +++ b/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldConfiguration.svelte @@ -8,7 +8,6 @@ getSchemaForDatasource, } from "builderStore/dataBinding" import { currentAsset } from "builderStore" - import { getFields } from "helpers/searchFields" export let componentInstance export let value = [] @@ -31,9 +30,6 @@ $: options = Object.keys(schema || {}) $: sanitisedValue = getValidColumns(value, options) $: updateBoundValue(sanitisedValue) - $: enrichedSchemaFields = getFields(Object.values(schema || {}), { - allowLinks: true, - }) const getSchema = (asset, datasource) => { const schema = getSchemaForDatasource(asset, datasource).schema diff --git a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte index f56d7a78d4..d703ace92d 100644 --- a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte +++ b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte @@ -192,7 +192,7 @@
- {#each rawFilters as filter, idx} + {#each rawFilters as filter}