From df61a689d6977484be279d538a75f277f707939f Mon Sep 17 00:00:00 2001 From: sharon Date: Mon, 20 Jan 2025 19:31:14 -0500 Subject: [PATCH] add missing esm modules and help.html to reh-web (#6058) - addresses https://github.com/rstudio/rstudio-pro/issues/7306 - adds help.html and external ESM modules to the reh-web build ### Release Notes #### New Features - N/A #### Bug Fixes - Fix issue preventing Positron from loading in Posit Workbench ### QA Notes These files should no longer be missing, so Positron should now load in Workbench. image I also noticed that help.html was missing, which was preventing the Help Pane from working. Opening Help for R and Python from a Console should now work: R Console ```r ?iris ``` Python Console ```python ?print ``` --------- Co-authored-by: sharon wang <25834218+sharon-wang@users.noreply.github.com> --- build/gulpfile.reh.js | 12 +++++++++++- build/gulpfile.vscode.web.js | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js index 528fefb0df8..be1f1bc5372 100644 --- a/build/gulpfile.reh.js +++ b/build/gulpfile.reh.js @@ -392,7 +392,9 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa ].map(resource => gulp.src(resource, { base: '.' }).pipe(rename(resource))); } - const all = es.merge( + // --- Start Positron --- + let all = es.merge( + // --- End Positron --- packageJsonStream, productJsonStream, license, @@ -402,6 +404,14 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa ...web ); + // --- Start Positron --- + if (type === 'reh-web') { + // External modules (React, etc.) + const moduleSources = gulp.src('src/esm-package-dependencies/**').pipe(rename(function (p) { p.dirname = path.join('out', 'esm-package-dependencies', p.dirname) })); + all = es.merge(all, moduleSources); + } + // --- End Positron --- + let result = all .pipe(util.skipDirectories()) .pipe(util.fixWin32DirectoryPermissions()); diff --git a/build/gulpfile.vscode.web.js b/build/gulpfile.vscode.web.js index 94c2108ea76..683606316fa 100644 --- a/build/gulpfile.vscode.web.js +++ b/build/gulpfile.vscode.web.js @@ -40,6 +40,10 @@ const positronVersion = (quality && quality !== 'stable') ? `${product.positronV // --- End Positron --- const vscodeWebResourceIncludes = [ + // --- Start Positron --- + // Positron Help + 'out-build/vs/workbench/contrib/positronHelp/browser/resources/help.html', + // --- End Positron --- // NLS 'out-build/nls.messages.js',