From ba8baec6969d930f544077db12a274995dacf441 Mon Sep 17 00:00:00 2001 From: Layik Hama Date: Mon, 17 May 2021 20:43:36 +0100 Subject: [PATCH] update package.json, react-scripts clash with eatlas deps --- R/explore.R | 2 +- inst/js/package.json | 53 ++++++++++++++++++++--------------- tests/testthat/test-explore.R | 2 +- 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/R/explore.R b/R/explore.R index 6fef183..d6a1074 100644 --- a/R/explore.R +++ b/R/explore.R @@ -73,7 +73,7 @@ gp_explore <- function(sf = geoplumber::traffic, gp_build() } # TODO: is it free? - # is_port_engated(port = 8000) + # is_port_engaged(port = 8000) # attempt starting backend in any case message("Serving data at ", "http://localhost:8000/api/explore") f <- function(s, p) {s$setDocs(FALSE);s$run(port = p)} diff --git a/inst/js/package.json b/inst/js/package.json index 62b9695..eef645e 100644 --- a/inst/js/package.json +++ b/inst/js/package.json @@ -1,38 +1,47 @@ { - "name": "geoplumber", + "name": "gp_app", "version": "0.1.0", "private": true, "dependencies": { - "leaflet": "^1.4.0", - "prop-types": "^15.6.2", - "react": "^16.7.0", - "react-bootstrap": "^0.32.4", - "react-dom": "^16.7.0", - "react-leaflet": "^2.2.0", - "react-leaflet-control": "^2.1.0", - "react-router": "^4.3.1", - "react-router-dom": "^4.3.1", - "react-scripts": "^3.0.1" + "leaflet": "^1.7.1", + "prop-types": "^15.7.2", + "react": "^16.13.1", + "react-bootstrap": "^1.3.0", + "react-dom": "^16.13.1", + "react-leaflet": "^2.7.0", + "react-leaflet-control": "^2.1.2", + "react-router": "^5.2.0", + "react-router-dom": "^5.2.0", + "react-scripts": "^4.0.3" }, "scripts": { "start": "react-scripts start", - "build": "react-scripts build", + "build": "react-scripts --max_old_space_size=4096 build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": "react-app" }, - "browserslist": [ - ">0.2%", - "not dead", - "not ie <= 11", - "not op_mini all" - ], + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + }, "devDependencies": { - "enzyme": "^3.8.0", - "enzyme-adapter-react-16": "^1.8.0", - "react-test-renderer": "^16.7.0", - "sinon": "^7.2.3" + "@testing-library/jest-dom": "^4.2.4", + "@testing-library/react": "^9.3.2", + "@testing-library/user-event": "^7.1.2", + "enzyme": "^3.11.0", + "enzyme-adapter-react-16": "^1.15.5", + "react-test-renderer": "^16.13.1", + "sinon": "^9.2.0" } } diff --git a/tests/testthat/test-explore.R b/tests/testthat/test-explore.R index cd2ab4d..2441f3e 100644 --- a/tests/testthat/test-explore.R +++ b/tests/testthat/test-explore.R @@ -4,7 +4,7 @@ test_that("import added", { expect_message(gp_create(gp)) proj_dir <- read_tempfile() od <- setwd(proj_dir) - # check import in ther + # check import in there gp_explore(run = FALSE) cont <- readLines("src/App.js") expect_true(any(grepl("Eatlas", cont)))