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

Create yarnBuildHook and yarnConfigHook #318015

Merged
merged 19 commits into from
Jul 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1151b39
fetch-yarn-deps: format with nixfmt (RFC166)
doronbehar Jul 3, 2024
a84f3ca
yarnConfigHook: init
doronbehar Jun 7, 2024
296556a
yarnBuildHook: init
doronbehar Jun 7, 2024
ee7cfec
doc/javascript: document yarn{Config,Build}Hook
doronbehar Jul 3, 2024
64facc4
vim-language-server: use to yarn{Build,Config}Hook
doronbehar Jun 7, 2024
9fbd21c
xplorer: use yarn{Build,Config}Hook for frontend-build
doronbehar Jun 7, 2024
48030a2
kuro: use yarn{Build,Config}Hook
doronbehar Jun 7, 2024
6b55dfe
codefresh: use yarnConfigHook
doronbehar Jun 7, 2024
98794c2
powerdns-admin: use yarnConfigHook in assets derivation
doronbehar Jun 7, 2024
deace1d
element-call: use yarn{Config,Build}Hook instead of mkYarnPackage
doronbehar Jun 13, 2024
5403387
koodo-reader: 1.6.6 -> 1.6.7; use yarn{Config,Build}Hook
doronbehar Jun 13, 2024
ef845dd
micropad: reformat using yarn{Config,Build}Hooks
doronbehar Jun 13, 2024
e5cb34b
listmonk: build frontend using yarn{Config,Build}Hook
doronbehar Jun 13, 2024
b0437f7
postlight-parser: use yarn{Config,Build}Hook instead of mkYarnPackage
doronbehar Jun 13, 2024
f04b63b
spectral-language-server: use yarnConfigHook instead of mkYarnPackage
doronbehar Jun 13, 2024
fdcf1d1
your_spotify: use yarn{Config,Build}Hook instead of mkYarnPackage
doronbehar Jun 13, 2024
d544d8d
treedome: use yarn{Config,Build}Hook for ui
doronbehar Jun 22, 2024
2400268
fetch-yarn-deps: handle yarn.lock deps without a resolved url
doronbehar Jun 7, 2024
238d267
doc: mention yarn hooks in release notes
doronbehar Jul 3, 2024
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
9 changes: 9 additions & 0 deletions pkgs/build-support/node/fetch-yarn-deps/fixup.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ const fixupYarnLock = async (lockContents, verbose) => {
const fixedData = Object.fromEntries(
Object.entries(lockData.object)
.map(([dep, pkg]) => {
if (pkg.resolved === undefined) {
console.warn(`no resolved URL for package ${dep}`)
var maybeFile = dep.split("@", 2)[1]
if (maybeFile.startsWith("file:")) {
console.log(`Rewriting URL for local file dependency ${dep}`)
pkg.resolved = maybeFile
}
return [dep, pkg]
}
doronbehar marked this conversation as resolved.
Show resolved Hide resolved
const [ url, hash ] = pkg.resolved.split("#", 2)

if (hash || url.startsWith("https://codeload.github.com")) {
Expand Down