From acaf004120ee64bb695ce1708ff8fb761a57ecd9 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Sun, 20 Oct 2024 16:46:04 -0700 Subject: [PATCH 01/12] =?UTF-8?q?[language-hyperlink]=20Fix=20bug=20in=20`?= =?UTF-8?q?tree-sitter-hyperlink`=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …where it got flummoxed by URLs with subdomains. --- .../grammars/ts/tree-sitter-hyperlink.wasm | Bin 8303 -> 8375 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/packages/language-hyperlink/grammars/ts/tree-sitter-hyperlink.wasm b/packages/language-hyperlink/grammars/ts/tree-sitter-hyperlink.wasm index 723c2ae6bd3a9b28d935affc1194b7db7568fcb5..8387e4f22343abc05e66f0da42de60bf8485f927 100755 GIT binary patch literal 8375 zcmd5>Yiu0V6+U-n_Bk_t#!ehRc6M#YHpFot4UmKo52ZGNfKa8X0!lZFyNw}#`oTQ_Kf8yj(~%^c!!}Hz9%KisX+3+gwHhu@PdS|XG*z1{jy}7P6zT&CA_HNa)!gaVh7TvC0x<) zSqaZ-cnVOcBwm%0a}L{ioZz=Q0~c>f$%h*LQNk4s|19B48lIEzyoTo`yrkjV5?YrMFG~1CpTgUd!uI`?Um(BI|_3s$9y@WgJ8GdReC;Y8<`Q!^vRQ#8hm#t%+ z?y$ctEBtiUQZs|z;7mjEHZt&}8-(q5WQFrZ8~h72<~G{qC{}H`tCUN5mM&ncOP?a^^%^+ygNFxre}GHnH+5IbO~-f6SiKelrve^ z8uidyo^iK(tL?Y5C;#s>hIV+ycMq2_$RG3Hpc#Mr;j-&HHzObTfVWCcAhB~@rP7E% zqSt`eei-(aZG9xL84DCcYKDK!jNf$F9d&L|j^o<# za(C!Bt{lhNas0nJK2+oQkaLiia{rin6S|LR+&$o1Sm0YEcii3Y+`yxY5bX0!2ySM0 z3GgOA26%usb02RP*qI|(F5Xu^cGw+o_OR-(;(2540M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DHs1vjRdL8r$=p)d7 E0I^93$^ZZW From df15c8c0877a07ab6da4267d7755b4982cc3fafc Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Sun, 20 Oct 2024 16:47:08 -0700 Subject: [PATCH 02/12] [language-c] Highlight parameters like the "foo" in `type *& foo` --- .../language-c/grammars/tree-sitter-cpp/highlights.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/language-c/grammars/tree-sitter-cpp/highlights.scm b/packages/language-c/grammars/tree-sitter-cpp/highlights.scm index c819911905..778e294889 100644 --- a/packages/language-c/grammars/tree-sitter-cpp/highlights.scm +++ b/packages/language-c/grammars/tree-sitter-cpp/highlights.scm @@ -150,10 +150,10 @@ ; ((identifier) @variable.other.readwrite.member.cpp ; (#match? @variable.other.readwrite.member.cpp "^(f|m)[A-Z]\\w*$")) -; The "foo" in `int &foo` with in a parameter list. -(parameter_declaration - declarator: (reference_declarator - (identifier) @variable.parameter.cpp)) +; The "foo" in `const char *foo` within a parameter list. +; (Should work no matter how many pointers deep we are.) +(reference_declarator (identifier) @variable.parameter.cpp + (#is? test.descendantOfType "parameter_declaration")) ; KEYWORDS From e6398cb6565431844c399aba3f0a42d76b607397 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Sun, 20 Oct 2024 17:26:01 -0700 Subject: [PATCH 03/12] [language-hyperlink] Fix a regression in the last change --- .../grammars/ts/tree-sitter-hyperlink.wasm | Bin 8375 -> 8330 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/packages/language-hyperlink/grammars/ts/tree-sitter-hyperlink.wasm b/packages/language-hyperlink/grammars/ts/tree-sitter-hyperlink.wasm index 8387e4f22343abc05e66f0da42de60bf8485f927..21a144fb89ba0c9f1c9008a6c65ab7a4d099a596 100755 GIT binary patch literal 8330 zcmcgxZEPIH8GdK?KE1n+?Zold*|&Fgh#l;hKmsH{hUgb*QBsG<}uhkan5KXbki z!k428l@>)+l%f_|C=^8%La2&LXc29tAff(gR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- .../grammars/modern-tree-sitter-hyperlink.cson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/language-hyperlink/grammars/modern-tree-sitter-hyperlink.cson b/packages/language-hyperlink/grammars/modern-tree-sitter-hyperlink.cson index 7977a53691..ebd8738380 100644 --- a/packages/language-hyperlink/grammars/modern-tree-sitter-hyperlink.cson +++ b/packages/language-hyperlink/grammars/modern-tree-sitter-hyperlink.cson @@ -5,6 +5,6 @@ parser: 'tree-sitter-hyperlink' injectionRegex: 'hyperlink' treeSitter: - parserSource: 'github:savetheclocktower/tree-sitter-hyperlink#04c3a667ba432236578ac99bbacd0412f88d6fac' + parserSource: 'github:savetheclocktower/tree-sitter-hyperlink#0704b3e5a72892495dd13b85a5064582414cb39a' grammar: 'ts/tree-sitter-hyperlink.wasm' highlightsQuery: 'ts/highlights.scm' From fea6d4fadb5e8b3d55fefbd6dc4bca6739518932 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Sun, 27 Oct 2024 11:07:06 -0700 Subject: [PATCH 05/12] =?UTF-8?q?[language-shellscript]=20Highlight=20all?= =?UTF-8?q?=20operators=20in=20parameter=20expansions=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …not just `#`. --- .../grammars/tree-sitter/highlights.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/language-shellscript/grammars/tree-sitter/highlights.scm b/packages/language-shellscript/grammars/tree-sitter/highlights.scm index 031507a766..8c8549738f 100644 --- a/packages/language-shellscript/grammars/tree-sitter/highlights.scm +++ b/packages/language-shellscript/grammars/tree-sitter/highlights.scm @@ -134,7 +134,15 @@ (binary_expression ["&&" "||"] @keyword.operator.logical.shell) (pipeline "|" @keyword.operator.pipe.shell) -(expansion operator: "#" @keyword.operator.expansion.shell) + +; Any expansion operator, including all `#`s and `%`s in the following examples: +; +; foo="${bar#*.}" +; foo="${bar##*.}" +; foo="${bar%*.}" +; foo="${bar%%*.}" +; +(expansion operator: _ @keyword.operator.expansion.shell) ; "*" @keyword.operator.glob.shell From 54dd244ce643b28df70311d54f82cd72c58de6b5 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Sun, 10 Nov 2024 17:30:41 -0800 Subject: [PATCH 06/12] =?UTF-8?q?[symbols-view]=20Allow=20project-wide=20s?= =?UTF-8?q?ymbol=20searches=20to=20consider=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …multiple providers instead of enforcing exclusivity. --- packages/symbols-view/lib/project-view.js | 6 ++- packages/symbols-view/lib/provider-broker.js | 11 +++- .../providers/second-dummy-provider.js | 51 +++++++++++++++++++ .../symbols-view/spec/symbols-view-spec.js | 22 ++++++++ 4 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 packages/symbols-view/spec/fixtures/providers/second-dummy-provider.js diff --git a/packages/symbols-view/lib/project-view.js b/packages/symbols-view/lib/project-view.js index 7988cdb3d2..04d06894cd 100644 --- a/packages/symbols-view/lib/project-view.js +++ b/packages/symbols-view/lib/project-view.js @@ -143,7 +143,11 @@ module.exports = class ProjectView extends SymbolsView { // longer need the symbols we asked for. let signal = this.abortController.signal; - let providers = await this.broker.select(meta); + // A user would probably expect this search to return symbols from all + // files in the project, regardless of their language. Instead of picking a + // “winning” provider as we usually do, we should instead consult _all_ + // providers that consider themselves up to the task. + let providers = await this.broker.select(meta, { enforceExclusivity: false }); if (providers?.length === 0) { console.warn('No providers found!'); return null; diff --git a/packages/symbols-view/lib/provider-broker.js b/packages/symbols-view/lib/provider-broker.js index f702336272..0c28739f42 100644 --- a/packages/symbols-view/lib/provider-broker.js +++ b/packages/symbols-view/lib/provider-broker.js @@ -175,7 +175,7 @@ module.exports = class ProviderBroker { * @returns {Promise} A promise that resolves with a list * of symbol providers. */ - async select(meta) { + async select(meta, { enforceExclusivity = true } = {}) { let shouldLog = Config.get('enableDebugLogging'); let exclusivesByScore = []; let results = []; @@ -210,7 +210,14 @@ module.exports = class ProviderBroker { let { value: score } = outcome; let name = provider.name ?? 'unknown'; let packageName = provider?.packageName ?? 'unknown'; - let isExclusive = provider?.isExclusive ?? false; + + // When `enforceExclusivity` is `false`, we'll treat all providers as + // non-exclusive, even the ones that indicate otherwise. + // + // It still falls on a provider to know whether to provide symbols or + // not. Any provider is free to inspect the metadata and return an empty + // set if it thinks it's inappropriate for its results to be considered. + let isExclusive = enforceExclusivity ? (provider?.isExclusive ?? false) : false; if (shouldLog) console.debug('Score for', provider.name, 'is:', score); diff --git a/packages/symbols-view/spec/fixtures/providers/second-dummy-provider.js b/packages/symbols-view/spec/fixtures/providers/second-dummy-provider.js new file mode 100644 index 0000000000..5f5cd9e8fb --- /dev/null +++ b/packages/symbols-view/spec/fixtures/providers/second-dummy-provider.js @@ -0,0 +1,51 @@ +const { Point } = require('atom'); + +function last(arr) { + return arr[arr.length - 1]; +} + +const ICONS = [ + 'icon-package', + 'icon-key', + 'icon-gear', + 'icon-tag', + null +]; + +module.exports = { + packageName: 'symbol-provider-dummy-second', + name: 'Dummy (Second)', + isExclusive: true, + canProvideSymbols() { + return true; + }, + getSymbols(meta) { + let { editor, type } = meta; + let results = []; + if (type === 'file') { + let count = editor.getLineCount(); + // Put a symbol on every third line. + for (let i = 0; i < count; i += 3) { + results.push({ + position: new Point(i, 0), + name: `(Second) Symbol on Row ${i + 1}`, + icon: ICONS[(i / 3) % (ICONS.length + 1)] + }); + } + } else if (type === 'project') { + let root = last(atom.project.getPaths()); + let count = editor.getLineCount(); + // Put a symbol on every third line. + for (let i = 0; i < count; i += 3) { + results.push({ + position: new Point(i, 0), + name: `(Second) Symbol on Row ${i + 1}`, + directory: root, + file: 'other-file.js', + icon: ICONS[i % (ICONS.length + 1)] + }); + } + } + return results; + } +}; diff --git a/packages/symbols-view/spec/symbols-view-spec.js b/packages/symbols-view/spec/symbols-view-spec.js index ef73f3b599..9001bd62ee 100644 --- a/packages/symbols-view/spec/symbols-view-spec.js +++ b/packages/symbols-view/spec/symbols-view-spec.js @@ -7,6 +7,7 @@ const SymbolsView = require('../lib/symbols-view'); const { migrateOldConfigIfNeeded } = require('../lib/util'); const DummyProvider = require('./fixtures/providers/dummy-provider'); +const SecondDummyProvider = require('./fixtures/providers/second-dummy-provider'); const AsyncDummyProvider = require('./fixtures/providers/async-provider'); const ProgressiveProjectProvider = require('./fixtures/providers/progressive-project-provider.js'); const QuicksortProvider = require('./fixtures/providers/quicksort-provider.js'); @@ -696,6 +697,27 @@ describe('SymbolsView', () => { expect(symbolsView.element.querySelector('li:first-child .secondary-line')).toHaveText(`${relative}:13`); }); + it('includes results from all providers, even if they claim to be exclusive', async () => { + registerProvider(DummyProvider); + registerProvider(SecondDummyProvider); + + await dispatchAndWaitForChoices('symbols-view:toggle-project-symbols'); + symbolsView = atom.workspace.getModalPanels()[0].item; + + expect(symbolsView.selectListView.refs.loadingMessage).toBeUndefined(); + expect(document.body.contains(symbolsView.element)).toBe(true); + expect(symbolsView.element.querySelectorAll('li').length).toBe(10); + + let root = atom.project.getPaths()[1]; + let resolved = directory.resolve('other-file.js'); + let relative = `${path.basename(root)}${resolved.replace(root, '')}`; + + expect(symbolsView.element.querySelector('li:first-child .primary-line')).toHaveText('Symbol on Row 1'); + expect(symbolsView.element.querySelector('li:first-child .secondary-line')).toHaveText(`${relative}:1`); + expect(symbolsView.element.querySelector('li:last-child .primary-line')).toHaveText('(Second) Symbol on Row 13'); + expect(symbolsView.element.querySelector('li:last-child .secondary-line')).toHaveText(`${relative}:13`); + }); + it('does not prefill the query field if `prefillSelectedText` is `false`', async () => { atom.config.set('symbols-view.prefillSelectedText', false); registerProvider(DummyProvider); From ac18e75a32220be26c94fca0f54f8bb8066ea0bd Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Tue, 19 Nov 2024 00:42:46 -0500 Subject: [PATCH 07/12] electron-builder: Fix race condition when preparing to copy binaries There was a race condition where two separate pieces of async code would A) create the 'binaries' folder, and B) copy binaries to that folder. The problem was the lack of a guarantee they would happen in that order! If the attempt to copy files happened before the directory got created, the whole electron-builder run would error and/or stall out from unsuccessful auto-retries failing. To fix the situation: Ensure the 'binaries' dir exists *before* copying binaries to it. Do so by making the directory *first* with a *synchronous* function. (I might usually try to eliminate race conditions while still using asynchronous code, but for simple scripts, I prefer to use synchronous code, for simplicity's sake and for reliability.) In other words: Can't copy files to a destination dir that doesn't exist! This makes sure the directory exists *first*, then copy. Also: Log any error we hit while making the dir, but try to continue. (For anyone who has successfully run electorn-builder once in the repo, they already have a 'binaries' folder, so we can ignore any error when trying to "make the dir" that already exists. If it doesn't exist, the copy operation will print another relevant error message. So we don't need to error early here. But logging it should help if this issue needs any troubleshooting on anyone's machines (including CI) any time in the future.) --- script/electron-builder.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/script/electron-builder.js b/script/electron-builder.js index a49fd52f40..45d94836dd 100644 --- a/script/electron-builder.js +++ b/script/electron-builder.js @@ -1,6 +1,7 @@ const path = require('path') const normalizePackageData = require('normalize-package-data'); const fs = require("fs/promises"); +const {mkdirSync} = require("fs"); const generateMetadata = require('./generate-metadata-for-builder') const macBundleDocumentTypes = require("./mac-bundle-document-types.js"); @@ -289,7 +290,13 @@ async function main() { config: options }).then((result) => { console.log("Built binaries") - fs.mkdir('binaries').catch(() => "") + try { + mkdirSync('binaries', {recursive: true}) + } catch (err) { + console.warn("Warning: error encountered when making the 'binaries' dir.") + console.warn("(HINT: If the 'binaries' folder already exists, then this error message is probably fine to ignore!)") + console.warn(err) + } Promise.all(result.map(r => fs.copyFile(r, path.join('binaries', path.basename(r))))) }).catch((error) => { console.error("Error building binaries") From b7e3fb2864f3537185c1c01920bf4be328dd8bd9 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Wed, 20 Nov 2024 18:59:06 -0500 Subject: [PATCH 08/12] CI: Update Cirrus Rolling release upload token --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 56e125321e..58d5fff145 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -63,7 +63,7 @@ arm_linux_task: memory: 8G env: USE_SYSTEM_FPM: 'true' - ROLLING_UPLOAD_TOKEN: ENCRYPTED[50debc954fd1b46513fa44d6270491edaba4c9c0ab6fbf0a3fb8e3bdfe9e380d203bd90857ae720b5af31d8a02c6389f] + ROLLING_UPLOAD_TOKEN: ENCRYPTED[bc554e7208b73b37e2b776c70905b142a5023cea4a9b89e1370b8815adea18f8436e8b075e6cf1bcb62133d659b5d198] prepare_script: - apt-get update - export DEBIAN_FRONTEND="noninteractive" @@ -135,7 +135,7 @@ silicon_mac_task: APPLEID: ENCRYPTED[549ce052bd5666dba5245f4180bf93b74ed206fe5e6e7c8f67a8596d3767c1f682b84e347b326ac318c62a07c8844a57] APPLEID_PASSWORD: ENCRYPTED[774c3307fd3b62660ecf5beb8537a24498c76e8d90d7f28e5bc816742fd8954a34ffed13f9aa2d1faf66ce08b4496e6f] TEAM_ID: ENCRYPTED[11f3fedfbaf4aff1859bf6c105f0437ace23d84f5420a2c1cea884fbfa43b115b7834a463516d50cb276d4c4d9128b49] - ROLLING_UPLOAD_TOKEN: ENCRYPTED[50debc954fd1b46513fa44d6270491edaba4c9c0ab6fbf0a3fb8e3bdfe9e380d203bd90857ae720b5af31d8a02c6389f] + ROLLING_UPLOAD_TOKEN: ENCRYPTED[bc554e7208b73b37e2b776c70905b142a5023cea4a9b89e1370b8815adea18f8436e8b075e6cf1bcb62133d659b5d198] prepare_script: - brew update - brew uninstall node@20 From f1fdce760257c6c956f71450f2f290d7d092060d Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Wed, 20 Nov 2024 19:41:53 -0500 Subject: [PATCH 09/12] Changelog: Update for 1.123.0 --- CHANGELOG.md | 15 +++++++++++++++ packages/welcome/lib/changelog-view.js | 26 ++++---------------------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ae8ba3ad6..31232ccac5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,22 @@ ## [Unreleased] +## 1.123.0 + - Fixed SQL State Storage not loading when starting Pulsar from a self-contained binary like appImage, tar.gz, etc. +- [symbols-view] Allow project-wide symbol search to consider results from more than one provider. +- Tree-sitter fixes and enhancements for hyperlinks, C, and shell scripts. +- Restore use of `shell.moveItemToTrash` API in tree-view, for Electron 12 compatibility. + +### Pulsar + +- Tree-sitter rolling fixes, 1.123 edition [@savetheclocktower](https://github.com/pulsar-edit/pulsar/pull/1118) +- [symbols-view] Allow project-wide symbol searches to consider multiple providers [@savetheclocktower](github.com/pulsar-edit/pulsar/pull/1133) +- electron-builder: Fix race condition when preparing to copy binaries [@DeeDeeG](https://github.com/pulsar-edit/pulsar/pull/1137) +- [ci] Update GitHub Token in CirrusCI config [@confused-Techie](https://github.com/pulsar-edit/pulsar/pull/1134) +- Fixing requiring of better-sqlite3 [@mauricioszabo](github.com/pulsar-edit/pulsar/pull/1122) +- Revert removal of `shell.moveItemToTrash` [@savetheclocktower](https://github.com/pulsar-edit/pulsar/pull/1125) +- CI: Bump macOS runner images from macos-12 to macos-13 [@DeeDeeG](https://github.com/pulsar-edit/pulsar/pull/1120) ## 1.122.0 diff --git a/packages/welcome/lib/changelog-view.js b/packages/welcome/lib/changelog-view.js index 8f47460936..e932bbe404 100644 --- a/packages/welcome/lib/changelog-view.js +++ b/packages/welcome/lib/changelog-view.js @@ -50,34 +50,16 @@ export default class ChangeLogView {

Feel free to read our Full Change Log.

  • - Added a SQL State Storage alternative to IndexedDB (opt-in, off by default). + Fixed SQL State Storage not loading when starting Pulsar from a self-contained binary like appImage, tar.gz, etc.
  • - Repackaged the AppImage so it uses our launcher script internally (supports more CLI/launch flags). + [symbols-view] Allow project-wide symbol search to consider results from more than one provider.
  • - [language-php] Highlighted “null-safe” property access correctly. + Tree-sitter fixes and enhancements for hyperlinks, C, and shell scripts.
  • - [language-c] Scoped template delimiters properly in C++. -
  • -
  • - [language-c] Consolidated common highlighting queries between the C and C++ grammars for more consistency in syntax highlighting. -
  • -
  • - Fixed incorrect behavior in certain scenarios for “Fold at Indent Level X” commands. -
  • -
  • - Fixed exception when resolving divided folds (e.g., #ifdefs in C/C++). -
  • -
  • - Avoided "length of null" error in autocomplete-plus for the PHP Tree-sitter grammar. -
  • -
  • - Preserved /usr/bin/pulsar and /usr/bin/ppm on RPM updates. -
  • -
  • - [tree-view] Moved to a more modern API for file removal in preparation for an Electron upgrade. + Restore use of shell.moveItemToTrash API in tree-view, for Electron 12 compatibility.
From 2e6f61fd134009f2f11040595c8f6c5c1f81cb9e Mon Sep 17 00:00:00 2001 From: confused-Techie Date: Wed, 20 Nov 2024 18:16:57 -0800 Subject: [PATCH 10/12] Bump version in `package.json` --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 956b3fd49d..b3aabe0fc3 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "pulsar", "author": "Pulsar-Edit ", "productName": "Pulsar", - "version": "1.122.0-dev", + "version": "1.123.0", "description": "A Community-led Hyper-Hackable Text Editor", "branding": { "id": "pulsar", From c87a9f95cf21f86654cd346da32a7413afc746e0 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Thu, 21 Nov 2024 16:14:02 -0500 Subject: [PATCH 11/12] Add back '-dev' to the version string --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b3aabe0fc3..904a45ea33 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "pulsar", "author": "Pulsar-Edit ", "productName": "Pulsar", - "version": "1.123.0", + "version": "1.123.0-dev", "description": "A Community-led Hyper-Hackable Text Editor", "branding": { "id": "pulsar", From ae3d51f479e0a539fce798a8b6568e6950c6a471 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Sun, 1 Dec 2024 16:41:22 -0500 Subject: [PATCH 12/12] electron-builder: Don't create differential update blockmaps (#1139) They are *extremely* computationally intensive to make, and we don't even use them. Use these undocumented config options to skip making them entirely. Source (where I learned about these config options): github[dot]com/electron-userland/electron-builder/issues/2900#issuecomment-730571696 By the way, the impetus for disabling these is that macOS 13 CI keeps failing at the blockmap creation step. We want successful binary builds in CI! Note: There apparently is no way to disable blockmaps for the .zip target on macOS. Only for the macOS .dmg and the Windows NSIS targets. --- script/electron-builder.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script/electron-builder.js b/script/electron-builder.js index 45d94836dd..9a15598285 100644 --- a/script/electron-builder.js +++ b/script/electron-builder.js @@ -199,7 +199,8 @@ let options = { }, }, "dmg": { - "sign": false + "sign": false, + "writeUpdateInfo": false }, "win": { "icon": icoIcon, @@ -236,7 +237,8 @@ let options = { // the AppID 'dev.pulsar-edit.pulsar'. If this value ever changes, // A PR to GitHub Desktop must be made with the updated value "include": "resources/win/installer.nsh", - "warningsAsErrors": false + "warningsAsErrors": false, + "differentialPackage": false }, "extraMetadata": { },