mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-09 13:15:37 +03:00
Remove "incompatible native module" cache
This commit is contained in:
parent
72a40dfc93
commit
806191315e
@ -1267,10 +1267,6 @@ module.exports = class Package {
|
||||
result.stderr
|
||||
);
|
||||
}
|
||||
global.localStorage.setItem(
|
||||
this.getIncompatibleNativeModulesStorageKey(),
|
||||
'[]'
|
||||
);
|
||||
resolve(result);
|
||||
})
|
||||
);
|
||||
@ -1308,13 +1304,6 @@ module.exports = class Package {
|
||||
}:build-error`;
|
||||
}
|
||||
|
||||
getIncompatibleNativeModulesStorageKey() {
|
||||
const electronVersion = process.versions.electron;
|
||||
return `installed-packages:${this.name}:${
|
||||
this.metadata.version
|
||||
}:electron-${electronVersion}:incompatible-native-modules`;
|
||||
}
|
||||
|
||||
getCanDeferMainModuleRequireStorageKey() {
|
||||
return `installed-packages:${this.name}:${
|
||||
this.metadata.version
|
||||
@ -1327,15 +1316,6 @@ module.exports = class Package {
|
||||
// This information is cached in local storage on a per package/version basis
|
||||
// to minimize the impact on startup time.
|
||||
getIncompatibleNativeModules() {
|
||||
if (!this.packageManager.devMode) {
|
||||
try {
|
||||
const arrayAsString = global.localStorage.getItem(
|
||||
this.getIncompatibleNativeModulesStorageKey()
|
||||
);
|
||||
if (arrayAsString) return JSON.parse(arrayAsString);
|
||||
} catch (error1) {}
|
||||
}
|
||||
|
||||
const incompatibleNativeModules = [];
|
||||
const nativeModulePaths = this.getNativeModuleDependencyPathsMap();
|
||||
for (const [nativeModulePath, nodeFilesPaths] of nativeModulePaths) {
|
||||
@ -1358,11 +1338,6 @@ module.exports = class Package {
|
||||
}
|
||||
}
|
||||
|
||||
global.localStorage.setItem(
|
||||
this.getIncompatibleNativeModulesStorageKey(),
|
||||
JSON.stringify(incompatibleNativeModules)
|
||||
);
|
||||
|
||||
return incompatibleNativeModules;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user