mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
07b486e4c3
* fix(yarnpkg-berry): Include all build and runtime files, patch package for system installation) * fix: What happened to noarch
22 lines
908 B
Diff
22 lines
908 B
Diff
# Quick and dirty patch to make Yarn Berry's build cache system work when installed as a system package.
|
|
# This patch is created for and maintained solely for Terra.
|
|
--- a/scripts/setup-ts-cache.js 2025-11-22 00:36:54.889317752 -0600
|
|
+++ b/scripts/setup-ts-cache.js 2025-11-22 00:44:29.823498920 -0600
|
|
@@ -1,6 +1,7 @@
|
|
const crypto = require(`crypto`);
|
|
const esbuild = require(`esbuild`);
|
|
const fs = require(`fs`);
|
|
+const os = require('os');
|
|
const path = require(`path`);
|
|
const v8 = require(`v8`);
|
|
const zlib = require(`zlib`);
|
|
@@ -25,7 +26,7 @@
|
|
isDirty: false,
|
|
};
|
|
|
|
-const cachePath = path.join(__dirname, `../node_modules/.cache/yarn/esbuild-transpile-cache.bin`);
|
|
+const cachePath = path.join(os.homedir(), `.cache/yarn/esbuild-transpile-cache.bin`);
|
|
try {
|
|
const cacheData = v8.deserialize(zlib.brotliDecompressSync(fs.readFileSync(cachePath)));
|
|
if (cacheData.version === cache.version) {
|