From 9e78e8e2d9b3cb3f5c28eee48286dbc35dc64023 Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Thu, 16 Sep 2021 14:41:25 -0700 Subject: [PATCH] add a bundle property to nlsmetadata uploader --- build/azure-pipelines/upload-nlsmetadata.js | 6 +++++- build/azure-pipelines/upload-nlsmetadata.ts | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/build/azure-pipelines/upload-nlsmetadata.js b/build/azure-pipelines/upload-nlsmetadata.js index 7df11448dc1..c60d36032e5 100644 --- a/build/azure-pipelines/upload-nlsmetadata.js +++ b/build/azure-pipelines/upload-nlsmetadata.js @@ -42,11 +42,15 @@ function main() { const modules = Object.keys(parsedJson); const json = { keys: {}, - messages: {} + messages: {}, + bundles: { + main: [] + } }; for (const module of modules) { json.messages[module] = parsedJson[module].messages; json.keys[module] = parsedJson[module].keys; + json.bundles.main.push(module); } parsedJson = json; break; diff --git a/build/azure-pipelines/upload-nlsmetadata.ts b/build/azure-pipelines/upload-nlsmetadata.ts index 89557b778bb..da9fe1dc59c 100644 --- a/build/azure-pipelines/upload-nlsmetadata.ts +++ b/build/azure-pipelines/upload-nlsmetadata.ts @@ -16,6 +16,12 @@ const azure = require('gulp-azure-storage'); const root = path.dirname(path.dirname(__dirname)); const commit = util.getVersion(root); +interface NlsMetadata { + keys: { [module: string]: string }, + messages: { [module: string]: string }, + bundles: { [bundle: string]: string[] }, +} + function main() { return es.merge( vfs.src('out-vscode-min/nls.metadata.json', { base: 'out-vscode-min' }), @@ -52,13 +58,17 @@ function main() { // put nls.metadata.json content in Core NlsMetadata format const modules = Object.keys(parsedJson); - const json: { keys: { [module: string]: string }, messages: { [module: string]: string } } = { + const json: NlsMetadata = { keys: {}, - messages: {} + messages: {}, + bundles: { + main: [] + } }; for (const module of modules) { json.messages[module] = parsedJson[module].messages; json.keys[module] = parsedJson[module].keys; + json.bundles.main.push(module); } parsedJson = json; break;