Merge pull request #12010 from meteor/fix/unibuild-prelink-watching

Fix reading packages installed before Meteor 1.2
This commit is contained in:
Denilson
2022-04-15 10:09:34 -04:00
committed by GitHub
4 changed files with 7 additions and 5 deletions

View File

@@ -1,4 +1,3 @@
// METEOR_PARENT_PID
if (process.env.METEOR_HMR_SECRET) {
__meteor_runtime_config__._hmrSecret = process.env.METEOR_HMR_SECRET;
} else if (process.env.METEOR_PARENT_PID) {

View File

@@ -1432,6 +1432,9 @@ export function readBufferWithLengthAndOffset(
if (count !== length) {
throw new Error("couldn't read entire resource");
}
} catch (err: any) {
err.message = `Error while reading ${filename}: ` + err.message;
throw err;
} finally {
close(fd);
}

View File

@@ -153,7 +153,10 @@ export class Unibuild {
usesDefaultSourceProcessor: true,
legacyPrelink: {
packageVariables: unibuildJson.packageVariables || []
}
},
// Only published packages still use prelink resources,
// so there is no need to mark this file to be watched
_dataUsed: false
};
if (resource.sourceMap) {

View File

@@ -29,9 +29,6 @@ var defaultWarehouseDir = function () {
var warehouseBase = files.inCheckout()
? files.getCurrentToolsDir() : files.getHomeDir();
// XXX This will be `.meteor` soon, once we've written the code to make the
// tropohouse and warehouse live together in harmony (eg, allowing tropohouse
// tools to springboard to warehouse tools).
return files.pathJoin(warehouseBase, ".meteor");
};