Remove lodash and sort dependencies out

This commit is contained in:
Andrew Kingston 2022-01-31 09:32:06 +00:00
parent dbaede79f6
commit 22bb99357a
10 changed files with 1107 additions and 391 deletions

View File

@ -3,8 +3,7 @@
import "@spectrum-css/table/dist/index-vars.css" import "@spectrum-css/table/dist/index-vars.css"
import CellRenderer from "./CellRenderer.svelte" import CellRenderer from "./CellRenderer.svelte"
import SelectEditRenderer from "./SelectEditRenderer.svelte" import SelectEditRenderer from "./SelectEditRenderer.svelte"
import { cloneDeep } from "lodash" import { cloneDeep, deepGet } from "../utils/helpers"
import { deepGet } from "../utils/helpers"
/** /**
* The expected schema is our normal couch schemas for our tables. * The expected schema is our normal couch schemas for our tables.

View File

@ -64,3 +64,7 @@ export const deepSet = (obj, key, value) => {
} }
obj[split[split.length - 1]] = value obj[split[split.length - 1]] = value
} }
export const cloneDeep = obj => {
return JSON.parse(JSON.stringify(obj))
}

View File

@ -3,3 +3,4 @@ node_modules
package-lock.json package-lock.json
release/ release/
dist/ dist/
stats.html

View File

@ -20,11 +20,15 @@
}, },
"dependencies": { "dependencies": {
"@budibase/bbui": "^1.0.46-alpha.7", "@budibase/bbui": "^1.0.46-alpha.7",
"@budibase/standard-components": "^0.9.139",
"@budibase/string-templates": "^1.0.46-alpha.7", "@budibase/string-templates": "^1.0.46-alpha.7",
"apexcharts": "^3.22.1",
"dayjs": "^1.10.5",
"regexparam": "^1.3.0", "regexparam": "^1.3.0",
"rollup-plugin-polyfill-node": "^0.8.0", "rollup-plugin-polyfill-node": "^0.8.0",
"shortid": "^2.2.15", "shortid": "^2.2.15",
"svelte": "^3.38.2",
"svelte-apexcharts": "^1.0.2",
"svelte-flatpickr": "^3.1.0",
"svelte-spa-router": "^3.0.5" "svelte-spa-router": "^3.0.5"
}, },
"devDependencies": { "devDependencies": {
@ -39,10 +43,6 @@
"@spectrum-css/tag": "^3.1.4", "@spectrum-css/tag": "^3.1.4",
"@spectrum-css/typography": "^3.0.2", "@spectrum-css/typography": "^3.0.2",
"@spectrum-css/vars": "^3.0.1", "@spectrum-css/vars": "^3.0.1",
"apexcharts": "^3.22.1",
"dayjs": "^1.10.5",
"fs-extra": "^8.1.0",
"jsdom": "^16.0.1",
"postcss": "^8.2.10", "postcss": "^8.2.10",
"rollup": "^2.44.0", "rollup": "^2.44.0",
"rollup-plugin-json": "^4.0.0", "rollup-plugin-json": "^4.0.0",
@ -50,9 +50,7 @@
"rollup-plugin-svelte": "^7.1.0", "rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-svg": "^2.0.0", "rollup-plugin-svg": "^2.0.0",
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-terser": "^7.0.2",
"svelte": "^3.38.2", "rollup-plugin-visualizer": "^5.5.4"
"svelte-apexcharts": "^1.0.2",
"svelte-flatpickr": "^3.1.0"
}, },
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc"
} }

View File

@ -8,6 +8,7 @@ import svg from "rollup-plugin-svg"
import json from "rollup-plugin-json" import json from "rollup-plugin-json"
import nodePolyfills from "rollup-plugin-polyfill-node" import nodePolyfills from "rollup-plugin-polyfill-node"
import path from "path" import path from "path"
import { visualizer } from "rollup-plugin-visualizer"
const production = !process.env.ROLLUP_WATCH const production = !process.env.ROLLUP_WATCH
const ignoredWarnings = [ const ignoredWarnings = [
@ -83,6 +84,7 @@ export default {
svg(), svg(),
json(), json(),
production && terser(), production && terser(),
visualizer(),
], ],
watch: { watch: {
clearScreen: false, clearScreen: false,

View File

@ -3,8 +3,7 @@
import { derived, get, writable } from "svelte/store" import { derived, get, writable } from "svelte/store"
import { createValidatorFromConstraints } from "./validation" import { createValidatorFromConstraints } from "./validation"
import { generateID } from "utils/helpers" import { generateID } from "utils/helpers"
import { deepGet, deepSet } from "@budibase/bbui" import { cloneDeep, deepGet, deepSet } from "@budibase/bbui"
import { cloneDeep } from "lodash/fp"
export let dataSource export let dataSource
export let disabled = false export let disabled = false

View File

@ -1,4 +1,4 @@
import { cloneDeep } from "lodash/fp" import { cloneDeep } from "@budibase/bbui"
import { processString, processObjectSync } from "@budibase/string-templates" import { processString, processObjectSync } from "@budibase/string-templates"
// Regex to test inputs with to see if they are likely candidates for template strings // Regex to test inputs with to see if they are likely candidates for template strings

View File

@ -1,6 +1,6 @@
import DataFetch from "./DataFetch.js" import DataFetch from "./DataFetch.js"
import { executeQuery, fetchQueryDefinition } from "api" import { executeQuery, fetchQueryDefinition } from "api"
import { cloneDeep } from "lodash/fp" import { cloneDeep } from "@budibase/bbui"
import { get } from "svelte/store" import { get } from "svelte/store"
export default class QueryFetch extends DataFetch { export default class QueryFetch extends DataFetch {

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1,3 @@
dist/ dist/
node_modules/ node_modules/
stats.html