reactR icon indicating copy to clipboard operation
reactR copied to clipboard

update core-js to `3.40.0` and minor increment

Open jhk0530 opened this issue 11 months ago • 0 comments

Hello, I updated core-js's version as latest: 3.40.0. (issue #85)

Here's what I did.

Update codebase

  1. update inst/www/core-js/shim.min.js (core-js file)
  • js file is downloaded from CDN reference.
  • and renamed as shim.min.js from minified.min.js
  1. update R/dependencies.R
  • Line 65: update CDN's url which provides minified.js file. (I saved it as shim.min.js that has same name)
  • Line 68: update version 2.5.3 -> 3.40.0
  1. update DESCRIPTION
  • Version: 0.6.1 -> 0.6.2
  • Date: 2024-09-14 -> 2025-01-31
  • Add Authors@R: add myselt as ctb, contributors

Test

I'm not sure because this R package doesn't have tests. (at least for testthat I think) So I tested with very simple react-app in Rstudio Viewer.

below is code for that

library(reactR)
library(htmltools)

browsable(tagList(
  tags$div(id = "app"),
  tags$script(
    "
    ReactDOM.render(
      React.createElement(
        'h1',
        null,
        'Powered by React'
      ),
      document.getElementById('app')
    )
  "
  ),
  # add core-js first to work in RStudio Viewer
  html_dependency_corejs(),
  html_dependency_react()
))

and Result in viewer panel of Rstudio

Rstudio viewer

when I re-open this with chrome browser it contained core-js-3.40.0 file as expected.

elements

ETC

  • I updated version as minor 0.6.2, but you can change this.
  • I added myself in DESCRIPTION as contributor, but you can change this.
  • I didn't edit the NEWS.md file. or didn't consider this submission to CRAN. Since this may contain problem that I didn't expected.

Thanks.

jhk0530 avatar Jan 31 '25 11:01 jhk0530