Repository navigation
build: pin obsidian to 1.14.4 and drop the stale electron build-script allowance - #54
Merged
Merged
Conversation
…t allowance The obsidian devDependency was declared as "latest", the only unpinned entry in package.json. Pin it to the version the lockfile already resolves (1.14.4); the lockfile changes only in the importer specifier. electron dropped its postinstall in v42 and now downloads its binary on first use, so allow-listing it in onlyBuiltDependencies was a no-op and the comment claiming a postinstall download was wrong. Remove the entry and document the actual path.
Owner
Author
|
CI on head
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release/deploy: Not required (
no-release). Built locally,main.js(sha256a1c0cbd9…) andmanifest.json(07a565f7…) are byte-identical to the build ofmainatcd131c6.Summary
obsidiandevDependency from"latest"to1.14.4, the version the lockfile already resolves.electronfromonlyBuiltDependenciesinpnpm-workspace.yaml, and replace the comment saying electron "Downloads the Electron binary in its postinstall" with a description of how the binary is actually fetched now.Why
1.
obsidian: "latest"It was the only unpinned entry in
package.json; every other dependency is exact (save-exact=truein.npmrc). Withlatest, the declared range says nothing about what is installed, and any re-resolution of the lockfile can move it.pnpm installon this branch changespnpm-lock.yamlin exactly one line: the importerspecifier: latest→specifier: 1.14.4.version: 1.14.4(@codemirror/state@6.7.6)(@codemirror/view@6.43.13)and everypackages:/snapshots:entry stay as they are. Thepnpm install --frozen-lockfilestep in CI passes on this head.electron,@playwright/test), and Dependabot bumps those (e.g. build(deps-dev): bump the npm-minor-patch group across 1 directory with 4 updates #53 bumpedelectron,@playwright/testand@types/node).obsidianis a development dependency, so it stays in thenpm-minor-patch/npm-majorgroups. Noignorerule in.github/dependabot.ymlnames it.2. electron and
onlyBuiltDependenciesSince Electron 42, the
electronnpm package no longer has apostinstallscript. (breaking changes: "electronno longer downloads itself viapostinstallscript".)npm view electron@<v> scriptsreturnspostinstall: node install.jsfor 37–41 and nothing for 42.0.0, 43.0.0, 43.7.7 or 43.7.9, which is what this repo uses. Allow-listing it was therefore a no-op, and the comment was wrong.How the binary is actually obtained in e2e:
pnpm installdoes not download it. After a cleanpnpm install --frozen-lockfile,node_modules/electron/distdoes not exist, with or without electron inonlyBuiltDependencies._electron.launch()(noexecutablePath) doesrequire("electron/index.js")(playwright-core/lib/coreBundle.js). On first use,electron/index.jsspawnsinstall.js, which downloads through@electron/getand verifies the download against thechecksums.jsonshipped in the package. I checked earlier that this file matches the v43.7.9 GitHub releaseSHASUMS256.txt.node -e "require('electron')"printedDownloading Electron binary...and produceddist/Electron.appwithdist/version=43.7.9.pnpm e2e:setupstep (see Verification).esbuildstays inignoredBuiltDependencies, and its comment is unchanged.Verification
pnpm check(toolchain, pinned actions, config schema, lint, typecheck, build, bundled-deps) passes locally on this branch.main, as noted at the top.