From baaa8f1ec7f1a8835da5b342bcaeb762a9fa63c9 Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Mon, 5 Nov 2018 08:35:36 -0600 Subject: [PATCH 1/2] JS dep upgrades --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 18b6a3a34..ee04693a0 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "webpack-dev-server": "3.1.9" }, "dependencies": { - "@blueprintjs/core": "^3.7.0", + "@blueprintjs/core": "^3.8.0", "@blueprintjs/datetime": "^3.3.1", "@blueprintjs/select": "^3.2.1", "@types/enzyme": "3.1.14", @@ -56,7 +56,7 @@ "farmbot-toastr": "^1.0.3", "fastclick": "^1.0.6", "file-loader": "2.0.0", - "i18next": "^11.9.1", + "i18next": "^12.0.0", "imports-loader": "0.8.0", "jest": "23.6.0", "jest-cli": "^23.6.0", @@ -66,7 +66,7 @@ "markdown-it-emoji": "^1.4.0", "moment": "2.22.2", "moxios": "^0.4.0", - "node-sass": "^4.9.4", + "node-sass": "^4.10.0", "optimize-css-assets-webpack-plugin": "5.0.1", "raf": "^3.4.1", "react": "^16.6.0", @@ -92,7 +92,7 @@ "tslint": "5.11.0", "typescript": "^3.1.6", "url-loader": "^1.1.2", - "webpack": "^4.24.0", + "webpack": "^4.25.0", "webpack-uglify-js-plugin": "1.1.9", "which": "1.3.1" }, From 600ba9eafc970aeb0d585b20f780b3b9812037ba Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Mon, 5 Nov 2018 09:45:55 -0600 Subject: [PATCH 2/2] BUG: OVERWRITE_RESOURCE did not re-index data. --- Gemfile | 1 - webpack/resources/reducer.ts | 1 + webpack/resources/resource_index_chain.ts | 19 ++++--------------- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index 7cb9b3c4b..9e88a1ba4 100755 --- a/Gemfile +++ b/Gemfile @@ -29,7 +29,6 @@ gem "skylight" gem "tzinfo" # For validation of user selected timezone names gem "valid_url" gem "webpack-rails" -# Still working out the bugs. - RC 5 Jul 18 gem "rabbitmq_http_api_client" gem "zero_downtime_migrations" gem "redis", "~> 4.0" diff --git a/webpack/resources/reducer.ts b/webpack/resources/reducer.ts index 52aba5599..441e9f9fa 100644 --- a/webpack/resources/reducer.ts +++ b/webpack/resources/reducer.ts @@ -102,6 +102,7 @@ export let resourceReducer = .add(Actions.OVERWRITE_RESOURCE, (s, { payload }) => { const original = findByUuid(s.index, payload.uuid); original.body = payload.update; + indexUpsert(s.index, original); mutateSpecialStatus(payload.uuid, s.index, payload.specialStatus); return s; }) diff --git a/webpack/resources/resource_index_chain.ts b/webpack/resources/resource_index_chain.ts index 4ac7008b4..6ce356942 100644 --- a/webpack/resources/resource_index_chain.ts +++ b/webpack/resources/resource_index_chain.ts @@ -36,21 +36,10 @@ const BY_KIND_AND_ID: Indexer = { }; const SEQUENCE_STUFF: Indexer = { - up(r, _i) { - if (r.kind === "Sequence") { - performAllTransformsOnSequence(r.body); - // const locals = (r.body.args.locals.body || []); - // i.sequenceMeta[r.uuid] = locals.map((local): SequenceVariableMeta => { - // switch (local.kind) { - // case "parameter_declaration": - // case "variable_declaration": - // return { - // label: local.args.label, - // kind: local.args.data_type - // }; - // } - // }); - } + up(r, i) { + (r.kind === "Sequence") && (i.references[r.uuid] = { + ...r, body: performAllTransformsOnSequence(r.body) + }); }, down(r, i) { delete i.sequenceMeta[r.uuid];