mirror of
https://github.com/lovell/sharp.git
synced 2026-02-04 05:36:18 +01:00
Revert "Package managers cannot handle nested optionalDependencies"
This partially reverts commit 51e56f994c.
Ignoring plug'n'play, it looks like yarn and pnpm do get the
filesystem layout right for this scenario, which is good news.
It also looks like npm 10 will get it right too.
This commit is contained in:
13
lib/sharp.js
13
lib/sharp.js
@@ -30,11 +30,8 @@ try {
|
|||||||
help.push('Possible solutions:');
|
help.push('Possible solutions:');
|
||||||
// Common error messages
|
// Common error messages
|
||||||
if (prebuiltPlatforms.includes(runtimePlatform)) {
|
if (prebuiltPlatforms.includes(runtimePlatform)) {
|
||||||
help.push('- Add explicit dependencies for the runtime platform:');
|
help.push('- Add an explicit dependency for the runtime platform:');
|
||||||
help.push(` npm install --force @sharpen/sharp-${runtimePlatform}`);
|
help.push(` npm install --force @sharpen/sharp-${runtimePlatform}"`);
|
||||||
if (!isWindows) {
|
|
||||||
help.push(` npm install --force @sharpen/sharp-libvips-${runtimePlatform}`);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
help.push(`- The ${runtimePlatform} platform requires manual installation of libvips >= ${minimumLibvipsVersion}`);
|
help.push(`- The ${runtimePlatform} platform requires manual installation of libvips >= ${minimumLibvipsVersion}`);
|
||||||
}
|
}
|
||||||
@@ -43,7 +40,9 @@ try {
|
|||||||
const { engines } = require(`@sharpen/sharp-libvips-${runtimePlatform}/package`);
|
const { engines } = require(`@sharpen/sharp-libvips-${runtimePlatform}/package`);
|
||||||
const libcFound = `${familySync()} ${versionSync()}`;
|
const libcFound = `${familySync()} ${versionSync()}`;
|
||||||
const libcRequires = `${engines.musl ? 'musl' : 'glibc'} ${engines.musl || engines.glibc}`;
|
const libcRequires = `${engines.musl ? 'musl' : 'glibc'} ${engines.musl || engines.glibc}`;
|
||||||
help.push(`- Update your OS: found ${libcFound}, requires ${libcRequires}`);
|
help.push('- Update your OS:');
|
||||||
|
help.push(` Found ${libcFound}`);
|
||||||
|
help.push(` Requires ${libcRequires}`);
|
||||||
} catch (errEngines) {}
|
} catch (errEngines) {}
|
||||||
}
|
}
|
||||||
if (isMacOs && /Incompatible library version/.test(errLocal.message)) {
|
if (isMacOs && /Incompatible library version/.test(errLocal.message)) {
|
||||||
@@ -54,7 +53,7 @@ try {
|
|||||||
help.push('- Run Node.js without using the --no-addons flag');
|
help.push('- Run Node.js without using the --no-addons flag');
|
||||||
}
|
}
|
||||||
if (process.versions.pnp) {
|
if (process.versions.pnp) {
|
||||||
help.push('- Use a supported yarn linker, either pnpm or node-modules');
|
help.push('- Use a supported yarn linker, either pnpm or node-modules:');
|
||||||
help.push(' yarn config set nodeLinker node-modules');
|
help.push(' yarn config set nodeLinker node-modules');
|
||||||
}
|
}
|
||||||
// Link to installation docs
|
// Link to installation docs
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@sharpen/sharp-libvips-darwin-arm64": "0.0.1-alpha.1"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@sharpen/sharp-libvips-darwin-x64": "0.0.1-alpha.1"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@sharpen/sharp-libvips-linux-arm": "0.0.1-alpha.1"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@sharpen/sharp-libvips-linux-arm64": "0.0.1-alpha.1"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@sharpen/sharp-libvips-linux-x64": "0.0.1-alpha.1"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@sharpen/sharp-libvips-linuxmusl-arm64": "0.0.1-alpha.1"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@sharpen/sharp-libvips-linuxmusl-x64": "0.0.1-alpha.1"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user