Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "code-oss-dev",
"version": "1.144.11",
"version": "1.144.12",
"distro": "c842171bd42ca4aef20b0a186c94d99edd763842",
"author": {
"name": "PiCode"
Expand Down
4 changes: 2 additions & 2 deletions product.json
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@
"default": false
}
},
"version": "1.144.11",
"picodeVersion": "2.0.2",
"version": "1.144.12",
"picodeVersion": "2.0.3",
"hotfixPublicKey": "MCowBQYDK2VwAyEAZes8irGrgqOvvCEWRBn3rwOG6qxSNp+zxWOX3HqXyjo="
}
11 changes: 6 additions & 5 deletions src/vs/workbench/contrib/picode/browser/picodeWhatsNew.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import { IHostService } from '../../../services/host/browser/host.js';
import { IWorkbenchLayoutService } from '../../../services/layout/browser/layoutService.js';
import { IPaneCompositePartService } from '../../../services/panecomposite/browser/panecomposite.js';
import { ILifecycleService, LifecyclePhase } from '../../../services/lifecycle/common/lifecycle.js';
import { composeWhatsNew, sameVersionLine, extractWhatChanged, highlightsSince, readHistory, shouldShowWhatsNew, whatsNewHistoryUrl, whatsNewSince, WhatsNewEntry } from './picodeWhatsNewData.js';
import { composeWhatsNew, fixesMarkdown, inVersionLine, sameVersionLine, extractWhatChanged, highlightsSince, readHistory, shouldShowWhatsNew, whatsNewHistoryUrl, whatsNewSince, WhatsNewEntry } from './picodeWhatsNewData.js';
import { whatsNewFixes } from './picodeWhatsNewFixes.js';
import { whatsNewHighlights } from './picodeWhatsNewHighlights.js';
import { IPicodeProEntitlement } from './account/picodeProEntitlement.js';
import { IWhatsNewWindowServices, showWhatsNewWindow } from './picodeWhatsNewWindow.js';
Expand Down Expand Up @@ -50,14 +51,16 @@ const RELEASES_API = 'https://api.github.com/repos/Tomas-Platero/PiCode/releases
*/
async function showWhatsNew(version: string, last: string, accessor: { readonly requestService: IRequestService; readonly productService: IProductService; readonly services: IWhatsNewWindowServices }, manual = false): Promise<boolean> {
const { requestService, productService, services } = accessor;
const changes = (async () => {
// Inside one line of versions (2.0.0 to 2.0.2) the window keeps the line's pages and lists every fix the line brought, in the person's language.
const fixesOnly = !manual && sameVersionLine(last, version);
const changes = fixesOnly ? Promise.resolve(fixesMarkdown(whatsNewFixes(), version)) : (async () => {
const [notes, history] = await Promise.all([fetchNotes(requestService, version), fetchHistory(requestService, productService.quality)]);
// Asked for by hand (Help menu), a version without its own summary shows the newest one the
// channel has, so the window is never empty when something is on record.
const current = notes ? { version, notes } : history.find(entry => entry.version === version) ?? (manual ? history[0] : undefined);
return current ? composeWhatsNew(whatsNewSince(last, current, history)) : undefined;
})();
const highlights = highlightsSince(whatsNewHighlights(), last, version);
const highlights = fixesOnly ? inVersionLine(whatsNewHighlights(), version) : highlightsSince(whatsNewHighlights(), last, version);
// With nothing of our own to tell, the window is only worth opening if the release has something.
if (highlights.length === 0 && !(await changes)) {
return false;
Expand All @@ -66,8 +69,6 @@ async function showWhatsNew(version: string, last: string, accessor: { readonly
const subtitle = last
? localize('picodeWhatsNew.subtitleSince', "New since {0}", last)
: localize('picodeWhatsNew.subtitleAll', "Try each one right here.");
// Inside one line of versions (2.0.0 to 2.0.1) the list is the fixes that came since: the page says so.
const fixesOnly = !manual && sameVersionLine(last, version);
showWhatsNewWindow({ version, subtitle, highlights, changes, fixesOnly, releaseUrl }, services);
return true;
}
Expand Down
15 changes: 15 additions & 0 deletions src/vs/workbench/contrib/picode/browser/picodeWhatsNewData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,21 @@ export function sameVersionLine(a: string, b: string): boolean {
return left !== undefined && left === line(b);
}

/** What belongs to the line of `current` (`2.0.x`) and came by it, newest first: the news and fixes a fix release keeps showing. */
export function inVersionLine<T extends { readonly since: string }>(all: readonly T[], current: string): T[] {
return all
.filter(item => sameVersionLine(item.since, current) && compareVersions(item.since, current) <= 0)
.sort((a, b) => compareVersions(b.since, a.since));
}

/**
* The fixes of the line up to `current`, as a Markdown list. Undefined when there are none.
*/
export function fixesMarkdown(fixes: readonly { readonly since: string; readonly text: string }[], current: string): string | undefined {
const list = inVersionLine(fixes, current).map(fix => `- ${fix.text}`);
return list.length > 0 ? list.join('\n') : undefined;
}

/**
* Whether the window opens after this start.
*
Expand Down
43 changes: 43 additions & 0 deletions src/vs/workbench/contrib/picode/browser/picodeWhatsNewFixes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) PiCode. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { localize } from '../../../../nls.js';

/**
* One thing a release fixed, written for the person using PiCode. The text is Markdown (a bold
* lead, then one or two sentences) and is translated with the rest of the editor, unlike the
* release page, which is only in English.
*/
export interface IWhatsNewFix {
/** The version that first carries the fix (`2.0.1`). */
readonly since: string;
readonly text: string;
}

/**
* What each release fixed, newest first. A fix release adds its entries here with `since` set to its
* own version; the "Bugs fixed" page shows all of the current line (2.0.x), so a person who skipped
* a fix release still sees it.
*/
export function whatsNewFixes(): readonly IWhatsNewFix[] {
return [
{
since: '2.0.3',
text: localize('picodeWhatsNew.fix.language', "**What's New now speaks your language.** The list of fixes is translated, and the window keeps the news of this version line together with every fix since."),
},
{
since: '2.0.2',
text: localize('picodeWhatsNew.fix.whatsNew', "**What's New opens after every update.** Updates that only fix things now show their fixes here, and the window no longer opens blank."),
},
{
since: '2.0.2',
text: localize('picodeWhatsNew.fix.updateAccess', "**Updating no longer stops at \"Access denied\".** The memory engine that PiCode carries now closes right before the update replaces its folder."),
},
{
since: '2.0.1',
text: localize('picodeWhatsNew.fix.jira', "**Connecting Jira no longer depends on your browser.** Some browsers never opened PiCode again after you agreed on Atlassian's page. Now a PiCode page shows which account gets the connection, you confirm it there, and the editor notices by itself."),
},
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import assert from 'assert';
import { test } from 'node:test';
import { composeWhatsNew, extractWhatChanged, highlightsSince, readHistory, sameVersionLine, shouldShowWhatsNew, whatsNewHistoryUrl, whatsNewSince } from '../picodeWhatsNewData.js';
import { composeWhatsNew, extractWhatChanged, fixesMarkdown, highlightsSince, inVersionLine, readHistory, sameVersionLine, shouldShowWhatsNew, whatsNewHistoryUrl, whatsNewSince } from '../picodeWhatsNewData.js';

test('returns the grouped summary without its heading or the sections after it', () => {
const body = ['Channel text', '', '## What changed', '', '### ✨ New', '', '- A thing', '', '## What\'s Changed', '', '* raw changelog'].join('\n');
Expand Down Expand Up @@ -112,3 +112,14 @@ test('asked for by hand, everything on record, newest first', () => {
const all = [{ id: 'old', since: '1.0.0' }, { id: 'new', since: '1.0.9' }];
assert.deepStrictEqual(highlightsSince(all, '', '1.0.8').map(h => h.id), ['new', 'old']);
});

test('a fix release keeps the pages of its line and drops those of other lines', () => {
const pages = [{ since: '2.0.0' }, { since: '1.0.0' }, { since: '2.1.0' }];
assert.deepStrictEqual(inVersionLine(pages, '2.0.2'), [{ since: '2.0.0' }]);
});

test('the fixes of the whole line are listed, newest first, and nothing from later versions', () => {
const fixes = [{ since: '2.0.3', text: 'c' }, { since: '2.0.2', text: 'b' }, { since: '2.0.1', text: 'a' }, { since: '1.9.9', text: 'old' }];
assert.strictEqual(fixesMarkdown(fixes, '2.0.2'), '- b\n- a');
assert.strictEqual(fixesMarkdown(fixes, '2.2.0'), undefined);
});
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/picode/l10n/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,10 @@
"picodeWhatsNew.command": "Zobrazit novinky",
"picodeWhatsNew.connect": "Připojit GitHub nebo Jira",
"picodeWhatsNew.done": "Hotovo",
"picodeWhatsNew.fix.jira": "**Připojení k Jiře už nezávisí na prohlížeči.** Některé prohlížeče po vašem souhlasu na stránce Atlassian PiCode nikdy znovu neotevřely. Nyní stránka PiCode ukáže, ke kterému účtu se připojení provádí, potvrdíte ho tam a editor si toho všimne sám.",
"picodeWhatsNew.fix.language": "**Novinky nyní mluví vaším jazykem.** Seznam oprav je přeložen a okno uchovává novinky této řady verzí spolu se všemi opravami od té doby.",
"picodeWhatsNew.fix.updateAccess": "**Aktualizace se už nezastaví na „Přístup byl odepřen“.** Paměťový modul, který PiCode obsahuje, se zavře těsně předtím, než aktualizace nahradí jeho složku.",
"picodeWhatsNew.fix.whatsNew": "**Novinky se otevřou po každé aktualizaci.** Aktualizace, které jen opravují chyby, nyní zobrazují své opravy zde a okno se už neotevírá prázdné.",
"picodeWhatsNew.full": "Úplné poznámky k verzi",
"picodeWhatsNew.group.free": "Zdarma pro všechny",
"picodeWhatsNew.group.pro": "PiCode Pro",
Expand Down
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/picode/l10n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,10 @@
"picodeWhatsNew.command": "Neuigkeiten anzeigen",
"picodeWhatsNew.connect": "GitHub oder Jira verbinden",
"picodeWhatsNew.done": "Fertig",
"picodeWhatsNew.fix.jira": "**Die Verbindung zu Jira hängt nicht mehr von deinem Browser ab.** Manche Browser haben PiCode nach der Zustimmung auf der Atlassian-Seite nie wieder geöffnet. Jetzt zeigt eine PiCode-Seite, mit welchem Konto die Verbindung entsteht, du bestätigst sie dort, und der Editor bemerkt es selbst.",
"picodeWhatsNew.fix.language": "**„Neuigkeiten“ spricht jetzt deine Sprache.** Die Liste der Korrekturen ist übersetzt, und das Fenster behält die Neuigkeiten dieser Versionslinie zusammen mit allen seitherigen Korrekturen.",
"picodeWhatsNew.fix.updateAccess": "**Das Aktualisieren bleibt nicht mehr bei „Zugriff verweigert“ hängen.** Die Speicher-Engine von PiCode wird jetzt direkt vor dem Austausch ihres Ordners durch das Update beendet.",
"picodeWhatsNew.fix.whatsNew": "**„Neuigkeiten“ öffnet sich nach jedem Update.** Updates, die nur Fehler beheben, zeigen ihre Korrekturen jetzt hier, und das Fenster erscheint nicht mehr leer.",
"picodeWhatsNew.full": "Vollständige Versionshinweise",
"picodeWhatsNew.group.free": "Kostenlos für alle",
"picodeWhatsNew.group.pro": "PiCode Pro",
Expand Down
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/picode/l10n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,10 @@
"picodeWhatsNew.command": "Mostrar las novedades",
"picodeWhatsNew.connect": "Conectar GitHub o Jira",
"picodeWhatsNew.done": "Hecho",
"picodeWhatsNew.fix.jira": "**Conectar Jira ya no depende de tu navegador.** Algunos navegadores nunca volvían a abrir PiCode después de aceptar en la página de Atlassian. Ahora una página de PiCode te dice a qué cuenta se conecta, lo confirmas ahí y el editor se entera solo.",
"picodeWhatsNew.fix.language": "**Las novedades ya hablan tu idioma.** La lista de arreglos está traducida y la ventana conserva las novedades de esta línea de versiones junto con todos los arreglos desde entonces.",
"picodeWhatsNew.fix.updateAccess": "**Actualizar ya no se detiene en «Acceso denegado».** El motor de memoria que lleva PiCode se cierra justo antes de que la actualización reemplace su carpeta.",
"picodeWhatsNew.fix.whatsNew": "**Las novedades salen tras cada actualización.** Las actualizaciones que solo corrigen errores ahora muestran aquí sus arreglos, y la ventana ya no se abre en blanco.",
"picodeWhatsNew.full": "Notas completas de la versión",
"picodeWhatsNew.group.free": "Gratis para todos",
"picodeWhatsNew.group.pro": "PiCode Pro",
Expand Down
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/picode/l10n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,10 @@
"picodeWhatsNew.command": "Afficher les nouveautés",
"picodeWhatsNew.connect": "Connecter GitHub ou Jira",
"picodeWhatsNew.done": "Terminer",
"picodeWhatsNew.fix.jira": "**La connexion à Jira ne dépend plus de votre navigateur.** Certains navigateurs ne rouvraient jamais PiCode après votre accord sur la page d'Atlassian. Désormais, une page PiCode indique à quel compte la connexion est faite, vous la confirmez là, et l'éditeur s'en aperçoit tout seul.",
"picodeWhatsNew.fix.language": "**Les nouveautés parlent maintenant votre langue.** La liste des corrections est traduite, et la fenêtre conserve les nouveautés de cette série de versions avec toutes les corrections depuis.",
"picodeWhatsNew.fix.updateAccess": "**La mise à jour ne s'arrête plus sur « Accès refusé ».** Le moteur de mémoire livré avec PiCode se ferme juste avant que la mise à jour remplace son dossier.",
"picodeWhatsNew.fix.whatsNew": "**Les nouveautés s'affichent après chaque mise à jour.** Les mises à jour qui ne font que corriger des erreurs montrent désormais leurs corrections ici, et la fenêtre ne s'ouvre plus vide.",
"picodeWhatsNew.full": "Notes de version complètes",
"picodeWhatsNew.group.free": "Gratuit pour tous",
"picodeWhatsNew.group.pro": "PiCode Pro",
Expand Down
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/picode/l10n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,10 @@
"picodeWhatsNew.command": "Mostra le novità",
"picodeWhatsNew.connect": "Connetti GitHub o Jira",
"picodeWhatsNew.done": "Fine",
"picodeWhatsNew.fix.jira": "**Collegare Jira non dipende più dal browser.** Alcuni browser non riaprivano mai PiCode dopo il tuo consenso sulla pagina di Atlassian. Ora una pagina di PiCode mostra a quale account viene collegata la connessione, la confermi lì e l'editor se ne accorge da solo.",
"picodeWhatsNew.fix.language": "**Le novità ora parlano la tua lingua.** L'elenco delle correzioni è tradotto e la finestra conserva le novità di questa linea di versioni insieme a tutte le correzioni successive.",
"picodeWhatsNew.fix.updateAccess": "**L'aggiornamento non si ferma più su «Accesso negato».** Il motore di memoria incluso in PiCode si chiude subito prima che l'aggiornamento sostituisca la sua cartella.",
"picodeWhatsNew.fix.whatsNew": "**Le novità si aprono dopo ogni aggiornamento.** Gli aggiornamenti che correggono soltanto errori ora mostrano qui le correzioni, e la finestra non si apre più vuota.",
"picodeWhatsNew.full": "Note di rilascio complete",
"picodeWhatsNew.group.free": "Gratis per tutti",
"picodeWhatsNew.group.pro": "PiCode Pro",
Expand Down
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/picode/l10n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,10 @@
"picodeWhatsNew.command": "新着情報を表示",
"picodeWhatsNew.connect": "GitHub または Jira を接続",
"picodeWhatsNew.done": "完了",
"picodeWhatsNew.fix.jira": "**Jira への接続がブラウザーに左右されなくなりました。** 一部のブラウザーでは、Atlassian のページで許可しても PiCode が再び開かないことがありました。今は PiCode のページに接続先のアカウントが表示され、そこで確認すると、エディターが自動で検知します。",
"picodeWhatsNew.fix.language": "**「新機能」があなたの言語で表示されます。** 修正の一覧が翻訳され、このバージョンラインの新機能と、それ以降のすべての修正がまとめて残ります。",
"picodeWhatsNew.fix.updateAccess": "**更新が「アクセスが拒否されました」で止まらなくなりました。** PiCode に同梱されているメモリエンジンは、更新がそのフォルダーを置き換える直前に終了します。",
"picodeWhatsNew.fix.whatsNew": "**更新のたびに「新機能」が開きます。** 不具合の修正だけの更新でも、修正内容がここに表示されるようになり、ウィンドウが空白で開くこともなくなりました。",
"picodeWhatsNew.full": "リリースノート全文",
"picodeWhatsNew.group.free": "すべての方に無料",
"picodeWhatsNew.group.pro": "PiCode Pro",
Expand Down
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/picode/l10n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,10 @@
"picodeWhatsNew.command": "새 소식 보기",
"picodeWhatsNew.connect": "GitHub 또는 Jira 연결",
"picodeWhatsNew.done": "완료",
"picodeWhatsNew.fix.jira": "**Jira 연결이 더 이상 브라우저에 좌우되지 않습니다.** 일부 브라우저는 Atlassian 페이지에서 동의한 뒤 PiCode를 다시 열지 않았습니다. 이제 PiCode 페이지가 연결될 계정을 보여 주고, 거기서 확인하면 편집기가 스스로 알아챕니다.",
"picodeWhatsNew.fix.language": "**새 소식이 이제 사용자의 언어로 표시됩니다.** 수정 목록이 번역되었고, 창은 이 버전 계열의 새 기능과 그 이후의 모든 수정 사항을 함께 유지합니다.",
"picodeWhatsNew.fix.updateAccess": "**업데이트가 더 이상 '액세스 거부됨'에서 멈추지 않습니다.** PiCode에 포함된 메모리 엔진이 업데이트가 폴더를 교체하기 직전에 종료됩니다.",
"picodeWhatsNew.fix.whatsNew": "**업데이트할 때마다 새 소식이 열립니다.** 오류만 수정한 업데이트도 이제 수정 내용을 여기에 보여 주며, 창이 비어 있는 채로 열리지 않습니다.",
"picodeWhatsNew.full": "전체 릴리스 노트",
"picodeWhatsNew.group.free": "모두에게 무료",
"picodeWhatsNew.group.pro": "PiCode Pro",
Expand Down
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/picode/l10n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,10 @@
"picodeWhatsNew.command": "Pokaż nowości",
"picodeWhatsNew.connect": "Połącz GitHub lub Jira",
"picodeWhatsNew.done": "Gotowe",
"picodeWhatsNew.fix.jira": "**Łączenie z Jirą nie zależy już od przeglądarki.** Niektóre przeglądarki nigdy nie otwierały ponownie PiCode po wyrażeniu zgody na stronie Atlassian. Teraz strona PiCode pokazuje, z jakim kontem zostanie nawiązane połączenie, potwierdzasz to tam, a edytor sam to zauważa.",
"picodeWhatsNew.fix.language": "**Nowości mówią teraz w Twoim języku.** Lista poprawek jest przetłumaczona, a okno zachowuje nowości tej linii wersji razem ze wszystkimi poprawkami od tamtej pory.",
"picodeWhatsNew.fix.updateAccess": "**Aktualizacja nie zatrzymuje się już na «Odmowa dostępu».** Silnik pamięci dołączony do PiCode zamyka się tuż przed tym, jak aktualizacja zastąpi jego folder.",
"picodeWhatsNew.fix.whatsNew": "**Nowości otwierają się po każdej aktualizacji.** Aktualizacje, które tylko naprawiają błędy, pokazują teraz tutaj swoje poprawki, a okno nie otwiera się już puste.",
"picodeWhatsNew.full": "Pełne informacje o wydaniu",
"picodeWhatsNew.group.free": "Za darmo dla wszystkich",
"picodeWhatsNew.group.pro": "PiCode Pro",
Expand Down
4 changes: 4 additions & 0 deletions src/vs/workbench/contrib/picode/l10n/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,10 @@
"picodeWhatsNew.command": "Mostrar novidades",
"picodeWhatsNew.connect": "Conectar GitHub ou Jira",
"picodeWhatsNew.done": "Concluir",
"picodeWhatsNew.fix.jira": "**Conectar o Jira não depende mais do seu navegador.** Alguns navegadores nunca voltavam a abrir o PiCode depois que você aceitava na página da Atlassian. Agora uma página do PiCode mostra a qual conta a conexão será feita, você confirma ali e o editor percebe sozinho.",
"picodeWhatsNew.fix.language": "**As novidades agora falam o seu idioma.** A lista de correções está traduzida e a janela mantém as novidades desta linha de versões junto com todas as correções desde então.",
"picodeWhatsNew.fix.updateAccess": "**Atualizar não para mais em «Acesso negado».** O mecanismo de memória que o PiCode traz é fechado logo antes de a atualização substituir sua pasta.",
"picodeWhatsNew.fix.whatsNew": "**As novidades aparecem após cada atualização.** Atualizações que só corrigem erros agora mostram aqui as correções, e a janela não abre mais em branco.",
"picodeWhatsNew.full": "Notas de versão completas",
"picodeWhatsNew.group.free": "Grátis para todos",
"picodeWhatsNew.group.pro": "PiCode Pro",
Expand Down
Loading