Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 1.93 from upstream #4655

Merged
merged 20 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/darwin/create-universal-app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions build/gulpfile.reh.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,12 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
const marketplaceExtensions = JSON.parse(fs.readFileSync(path.join(REPO_ROOT, 'product.json'), 'utf8')).builtInExtensions
.filter(entry => !entry.platforms || new Set(entry.platforms).has(platform))
.filter(entry => !entry.clientOnly)
// --- Start PWB ---
// If an entry specifies a type, ensure that the type specified
// matches the type we're building. We use this to prevent the
// Workbench extension from being bundled in non-web releases.
.filter(entry => !entry.type || entry.type === type)
// --- End PWB ---
.map(entry => entry.name);
const extensionPaths = [...localWorkspaceExtensions, ...marketplaceExtensions]
.map(name => `.build/extensions/${name}/**`);
Expand Down
7 changes: 7 additions & 0 deletions build/gulpfile.vscode.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,13 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
.pipe(util.setExecutableBit(['**/*.sh']));

const platformSpecificBuiltInExtensionsExclusions = product.builtInExtensions.filter(ext => {
// --- Start PWB ---
// Don't bundle reh-web extensions here. We bundle them for the
// remote web gulp build targets (see gulpfile.reh.js)
if (ext.type === 'reh-web') {
return true;
}
// --- End PWB ---
if (!ext.platforms) {
return false;
}
Expand Down
7 changes: 7 additions & 0 deletions build/lib/builtInExtensions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions build/lib/builtInExtensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export interface IExtensionDefinition {
sha256: string;
repo: string;
platforms?: string[];
// --- Start PWB: Bundle PWB extension ---
s3Bucket?: string;
// --- End PWB: Bundle PWB extension ---
metadata: {
id: string;
publisherId: {
Expand Down Expand Up @@ -73,6 +76,13 @@ function isUpToDate(extension: IExtensionDefinition): boolean {
}

function getExtensionDownloadStream(extension: IExtensionDefinition) {
// --- Start PWB: Bundle PWB extension ---
// the PWB extension is a special case because it's not availble from the marketplace or github
if (extension.name === 'rstudio.rstudio-workbench') {
return ext.fromS3Bucket(extension)
.pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`));
}
// --- End PWB: Bundle PWB extension ---
// --- Start Positron ---
const url = extension.metadata.multiPlatformServiceUrl || productjson.extensionsGallery?.serviceUrl;
return (url ? ext.fromMarketplace(url, extension) : ext.fromGithub(extension))
Expand Down
24 changes: 24 additions & 0 deletions build/lib/extensions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions build/lib/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,33 @@ export function fromMarketplace(serviceUrl: string, { name: extensionName, versi
.pipe(packageJsonFilter.restore);
}

// --- Start PWB: Bundle PWB extension ---
export function fromS3Bucket({ name: extensionName, version, sha256, s3Bucket, metadata }: IExtensionDefinition): Stream {
const json = require('gulp-json-editor') as typeof import('gulp-json-editor');

const [, name] = extensionName.split('.');
const url = `https://${s3Bucket}.s3.amazonaws.com/${name}-${version}.vsix`;

fancyLog('Downloading extension from S3:', ansiColors.yellow(`${extensionName}@${version}`), '...');

const packageJsonFilter = filter('package.json', { restore: true });

return fetchUrls('', {
base: url,
nodeFetchOptions: {
headers: baseHeaders
},
checksumSha256: sha256
})
.pipe(vzip.src())
.pipe(filter('extension/**'))
.pipe(rename(p => p.dirname = p.dirname!.replace(/^extension\/?/, '')))
.pipe(packageJsonFilter)
.pipe(buffer())
.pipe(json({ __metadata: metadata }))
.pipe(packageJsonFilter.restore);
}
// --- End PWB: Bundle PWB extension ---

export function fromGithub({ name, version, repo, sha256, metadata }: IExtensionDefinition): Stream {
const json = require('gulp-json-editor') as typeof import('gulp-json-editor');
Expand Down
2 changes: 1 addition & 1 deletion build/linux/dependencies-generator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 62 additions & 24 deletions build/secrets/.secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@
"path": "detect_secrets.filters.common.is_baseline_file",
"filename": "build/secrets/.secrets.baseline"
},
{
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
"min_level": 2
},
{
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
},
Expand Down Expand Up @@ -199,7 +203,7 @@
"filename": "build/azure-pipelines/darwin/product-build-darwin.yml",
"hashed_secret": "d8368fc8fec27a14a70083cc2cd6d959085086a9",
"is_verified": false,
"line_number": 33,
"line_number": 36,
"is_secret": false
}
],
Expand All @@ -219,7 +223,7 @@
"filename": "build/azure-pipelines/linux/product-build-linux-legacy-server.yml",
"hashed_secret": "6bca595fb7e6690f8bacc9e0c1e056cd60e4b7cb",
"is_verified": false,
"line_number": 23,
"line_number": 26,
"is_secret": false
}
],
Expand All @@ -229,7 +233,7 @@
"filename": "build/azure-pipelines/linux/product-build-linux.yml",
"hashed_secret": "256e334e9cc8b59bb08501110e1c729c9b2edec4",
"is_verified": false,
"line_number": 35,
"line_number": 38,
"is_secret": false
}
],
Expand All @@ -239,7 +243,7 @@
"filename": "build/azure-pipelines/product-compile.yml",
"hashed_secret": "6bca595fb7e6690f8bacc9e0c1e056cd60e4b7cb",
"is_verified": false,
"line_number": 20,
"line_number": 23,
"is_secret": false
}
],
Expand All @@ -253,16 +257,6 @@
"is_secret": false
}
],
"build/azure-pipelines/sdl-scan.yml": [
{
"type": "Secret Keyword",
"filename": "build/azure-pipelines/sdl-scan.yml",
"hashed_secret": "6bca595fb7e6690f8bacc9e0c1e056cd60e4b7cb",
"is_verified": false,
"line_number": 27,
"is_secret": false
}
],
"build/azure-pipelines/web/product-build-web.yml": [
{
"type": "Secret Keyword",
Expand All @@ -279,7 +273,17 @@
"filename": "build/azure-pipelines/win32/product-build-win32.yml",
"hashed_secret": "256e334e9cc8b59bb08501110e1c729c9b2edec4",
"is_verified": false,
"line_number": 40,
"line_number": 43,
"is_secret": false
}
],
"build/azure-pipelines/win32/sdl-scan-win32.yml": [
{
"type": "Secret Keyword",
"filename": "build/azure-pipelines/win32/sdl-scan-win32.yml",
"hashed_secret": "6bca595fb7e6690f8bacc9e0c1e056cd60e4b7cb",
"is_verified": false,
"line_number": 26,
"is_secret": false
}
],
Expand Down Expand Up @@ -543,7 +547,7 @@
{
"type": "Hex High Entropy String",
"filename": "package.json",
"hashed_secret": "328c19cf09eea1574843068faa2eefb00330fd9a",
"hashed_secret": "c635602d4b9175ddc1638f98082d7703c4b80f2b",
"is_verified": false,
"line_number": 4,
"is_secret": false
Expand All @@ -561,7 +565,7 @@
{
"type": "Hex High Entropy String",
"filename": "product.json",
"hashed_secret": "097ac5d8527520960630a51a453626dd781609cc",
"hashed_secret": "1b012f829c16ba44801ba646cd54b79048d53ae9",
"is_verified": false,
"line_number": 59,
"is_secret": false
Expand All @@ -573,6 +577,14 @@
"is_verified": false,
"line_number": 75,
"is_secret": false
},
{
"type": "Hex High Entropy String",
"filename": "product.json",
"hashed_secret": "0570cc883d4d190824469556cde84c3f48169c94",
"is_verified": false,
"line_number": 229,
"is_secret": false
}
],
"scripts/playground-server.ts": [
Expand All @@ -591,7 +603,7 @@
"filename": "src/bootstrap-window.js",
"hashed_secret": "b6cb3f02e20180320687f4905a9c795d72e0ad3a",
"is_verified": false,
"line_number": 151,
"line_number": 133,
"is_secret": false
}
],
Expand Down Expand Up @@ -888,12 +900,28 @@
}
],
"src/vs/server/node/webClientServer.ts": [
{
"type": "Base64 High Entropy String",
"filename": "src/vs/server/node/webClientServer.ts",
"hashed_secret": "66e26ed510af41f1d322d1ebda4389302f4a03c7",
"is_verified": false,
"line_number": 445,
"is_secret": false
},
{
"type": "Base64 High Entropy String",
"filename": "src/vs/server/node/webClientServer.ts",
"hashed_secret": "f769de45d1747b634dfe3d7eb842f6967c4c5e98",
"is_verified": false,
"line_number": 386,
"line_number": 445,
"is_secret": false
},
{
"type": "Base64 High Entropy String",
"filename": "src/vs/server/node/webClientServer.ts",
"hashed_secret": "93f2efffc36c6e096cdb21d6aadb7087dc0d7478",
"is_verified": false,
"line_number": 452,
"is_secret": false
}
],
Expand Down Expand Up @@ -1819,7 +1847,7 @@
{
"type": "Base64 High Entropy String",
"filename": "src/vs/workbench/contrib/webview/browser/pre/index.html",
"hashed_secret": "d2ca05efa3869fb799c6229cc3c55a3505bb9c1c",
"hashed_secret": "18e28cb104e16a9281ba04f02b3d657de3110053",
"is_verified": false,
"line_number": 9,
"is_secret": false
Expand All @@ -1831,17 +1859,27 @@
"filename": "src/vs/workbench/services/environment/browser/environmentService.ts",
"hashed_secret": "3a8f125da17a2c187d430daf0045e0fdfa707bdd",
"is_verified": false,
"line_number": 234,
"line_number": 273,
"is_secret": false
}
],
"src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.esm.html": [
{
"type": "Base64 High Entropy String",
"filename": "src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.esm.html",
"hashed_secret": "b6d602bc7fc2b53ca2a176860f06c731ff0dfaf4",
"is_verified": false,
"line_number": 7,
"is_secret": false
}
],
"src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html": [
{
"type": "Base64 High Entropy String",
"filename": "src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html",
"hashed_secret": "f769de45d1747b634dfe3d7eb842f6967c4c5e98",
"hashed_secret": "9d2f1684b9408fdc43d928422965a743ef0f2e9e",
"is_verified": false,
"line_number": 7,
"line_number": 8,
"is_secret": false
}
],
Expand Down Expand Up @@ -1874,5 +1912,5 @@
}
]
},
"generated_at": "2024-08-08T06:50:45Z"
"generated_at": "2024-09-11T23:58:52Z"
}
8 changes: 8 additions & 0 deletions extensions/npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
"@types/node": "20.x",
"@types/which": "^3.0.0"
},
"overrides": {
"micromatch": "^4.0.6",
"braces": "^3.0.3"
},
"resolutions": {
"micromatch": "^4.0.6",
"braces": "^3.0.3"
},
"main": "./out/npmMain",
"browser": "./dist/browser/npmBrowserMain",
"activationEvents": [
Expand Down
8 changes: 4 additions & 4 deletions extensions/npm/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ locate-path@^6.0.0:
dependencies:
p-locate "^5.0.0"

micromatch@^4.0.2:
version "4.0.8"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
micromatch@^4.0.2, micromatch@^4.0.6:
version "4.0.7"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5"
integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==
dependencies:
braces "^3.0.3"
picomatch "^2.3.1"
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"@xterm/headless": "5.6.0-beta.52",
"@xterm/xterm": "5.6.0-beta.52",
"he": "^1.2.0",
"http-proxy": "^1.18.1",
"http-proxy-agent": "^7.0.0",
"https-proxy-agent": "^7.0.2",
"jschardet": "3.1.3",
Expand Down Expand Up @@ -131,6 +132,7 @@
"@types/debug": "^4.1.5",
"@types/gulp-svgmin": "^1.2.1",
"@types/he": "^1.2.0",
"@types/http-proxy": "^1.17.9",
"@types/http-proxy-agent": "^2.0.1",
"@types/js-yaml": "^4.0.5",
"@types/kerberos": "^1.1.2",
Expand Down
Loading