Here are 2,800 JavaScript files in CRAN packages:

https://github.com/search?q=org%3Acran+path%3Amin.js+-path%3ALICENSE.txt&type=code

You might have a look at those. To Duncan's point, note there are also
0 min.js files:

https://github.com/search?q=org%3Acran+path%3Amin.js+-path%3ALICENSE.txt&type=code

Mike C

On Fri, Feb 21, 2025 at 9:01 AM Duncan Murdoch <murdoch.dun...@gmail.com> wrote:
>
> On 2025-02-20 12:36 p.m., Brian Leonard wrote:
> > Hello there,
> >
> > [TLDR: I'm curious to know the degree to which including a pure javascript 
> > program (via the V8 package) in an R package affects the potential of 
> > passing CRAN review]
> >
> > I'm working on implementing an R package to support users of the Psych-DS 
> > data specification<https://github.com/psych-ds>. The package will include a 
> > shiny app with helpful functions for assembling and publishing high-quality 
> > datasets in the behavioral sciences, but one of the core functions will be 
> > to validate existing datasets (local directories) according to the rules of 
> > our schema.
> >
> > We already have this validator functionality set up as a Deno application, 
> > and we can use certain Deno tools, along with esbuild, to generate 
> > node-based and pure-javascript bundled versions of validator.
> >
> > We'd like to be able to leverage our existing code instead of having to 
> > reinvent the wheel for the R context. If we try to publish our package to 
> > CRAN with this javascript script as a core part of the package's 
> > functionality, will that severely affect our chances of passing the review 
> > process? I know that having sufficient unit tests and well documented 
> > processes is crucial to getting a package through, but the validator code 
> > in this scenario would be stringy and minified, and the bundle would not 
> > include unit tests for all the validator's internal functions. Is it the 
> > case that a dependency like this is equally subject to CRAN review 
> > scrutiny, or would it be sufficient to have all the R-based components 
> > comply with CRAN requirements?
>
> I am not a member of CRAN, so I can't give you authoritative advice on
> this.  But I think one issue is that if you are only including minified
> code, then they wouldn't see that as the original source.  My rgl
> package includes a few thousand lines of Javascript code which is
> minified when installed; the tarball contains the original source.
>
> Duncan Murdoch
>
> ______________________________________________
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to