@ohos-ports/sharp 0.35.5-beta.2 → 0.35.5-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/libvips.cjs CHANGED
@@ -52,10 +52,10 @@ const buildPlatformArch = () => {
52
52
 
53
53
  const buildSharpLibvipsIncludeDir = () => {
54
54
  try {
55
- return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/include`);
55
+ return require(`@ohos-ports/img-sharp-libvips-dev-${buildPlatformArch()}/include`);
56
56
  } catch {
57
57
  try {
58
- return require('@img/sharp-libvips-dev/include');
58
+ return require('@ohos-ports/img-sharp-libvips-dev/include');
59
59
  } catch {}
60
60
  }
61
61
  return '';
@@ -63,17 +63,17 @@ const buildSharpLibvipsIncludeDir = () => {
63
63
 
64
64
  const buildSharpLibvipsCPlusPlusDir = () => {
65
65
  try {
66
- return require('@img/sharp-libvips-dev/cplusplus');
66
+ return require('@ohos-ports/img-sharp-libvips-dev/cplusplus');
67
67
  } catch {}
68
68
  return '';
69
69
  };
70
70
 
71
71
  const buildSharpLibvipsLibDir = () => {
72
72
  try {
73
- return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/lib`);
73
+ return require(`@ohos-ports/img-sharp-libvips-dev-${buildPlatformArch()}/lib`);
74
74
  } catch {
75
75
  try {
76
- return require(`@img/sharp-libvips-${buildPlatformArch()}/lib`);
76
+ return require(`@ohos-ports/img-sharp-libvips-${buildPlatformArch()}/lib`);
77
77
  } catch {}
78
78
  }
79
79
  return '';
@@ -107,7 +107,7 @@ const sha512 = (s) => createHash('sha512').update(s).digest('hex');
107
107
  const yarnLocator = () => {
108
108
  try {
109
109
  const identHash = sha512(`imgsharp-libvips-${buildPlatformArch()}`);
110
- const npmVersion = semver.coerce(pkg.optionalDependencies[`@img/sharp-libvips-${buildPlatformArch()}`], {
110
+ const npmVersion = semver.coerce(pkg.optionalDependencies[`@ohos-ports/img-sharp-libvips-${buildPlatformArch()}`], {
111
111
  includePrerelease: true
112
112
  }).version;
113
113
  return sha512(`${identHash}npm:${npmVersion}`).slice(0, 10);
package/dist/libvips.mjs CHANGED
@@ -52,10 +52,10 @@ const buildPlatformArch = () => {
52
52
 
53
53
  const buildSharpLibvipsIncludeDir = () => {
54
54
  try {
55
- return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/include`);
55
+ return require(`@ohos-ports/img-sharp-libvips-dev-${buildPlatformArch()}/include`);
56
56
  } catch {
57
57
  try {
58
- return require('@img/sharp-libvips-dev/include');
58
+ return require('@ohos-ports/img-sharp-libvips-dev/include');
59
59
  } catch {}
60
60
  }
61
61
  return '';
@@ -63,17 +63,17 @@ const buildSharpLibvipsIncludeDir = () => {
63
63
 
64
64
  const buildSharpLibvipsCPlusPlusDir = () => {
65
65
  try {
66
- return require('@img/sharp-libvips-dev/cplusplus');
66
+ return require('@ohos-ports/img-sharp-libvips-dev/cplusplus');
67
67
  } catch {}
68
68
  return '';
69
69
  };
70
70
 
71
71
  const buildSharpLibvipsLibDir = () => {
72
72
  try {
73
- return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/lib`);
73
+ return require(`@ohos-ports/img-sharp-libvips-dev-${buildPlatformArch()}/lib`);
74
74
  } catch {
75
75
  try {
76
- return require(`@img/sharp-libvips-${buildPlatformArch()}/lib`);
76
+ return require(`@ohos-ports/img-sharp-libvips-${buildPlatformArch()}/lib`);
77
77
  } catch {}
78
78
  }
79
79
  return '';
@@ -107,7 +107,7 @@ const sha512 = (s) => createHash('sha512').update(s).digest('hex');
107
107
  const yarnLocator = () => {
108
108
  try {
109
109
  const identHash = sha512(`imgsharp-libvips-${buildPlatformArch()}`);
110
- const npmVersion = semver.coerce(pkg.optionalDependencies[`@img/sharp-libvips-${buildPlatformArch()}`], {
110
+ const npmVersion = semver.coerce(pkg.optionalDependencies[`@ohos-ports/img-sharp-libvips-${buildPlatformArch()}`], {
111
111
  includePrerelease: true
112
112
  }).version;
113
113
  return sha512(`${identHash}npm:${npmVersion}`).slice(0, 10);
package/dist/sharp.cjs CHANGED
@@ -146,7 +146,7 @@ if (!sharp) {
146
146
  }
147
147
  if (isLinux && /(symbol not found|CXXABI_)/i.test(messages)) {
148
148
  try {
149
- const { config } = require(`@img/sharp-libvips-${runtimePlatform}/package`);
149
+ const { config } = require(`@ohos-ports/img-sharp-libvips-${runtimePlatform}/package`);
150
150
  const libcFound = `${familySync()} ${versionSync()}`;
151
151
  const libcRequires = `${config.musl ? "musl" : "glibc"} ${config.musl || config.glibc}`;
152
152
  help.push("- Update your OS:", ` Found ${libcFound}`, ` Requires ${libcRequires}`);
package/dist/sharp.mjs CHANGED
@@ -146,7 +146,7 @@ if (!sharp) {
146
146
  }
147
147
  if (isLinux && /(symbol not found|CXXABI_)/i.test(messages)) {
148
148
  try {
149
- const { config } = require(`@img/sharp-libvips-${runtimePlatform}/package`);
149
+ const { config } = require(`@ohos-ports/img-sharp-libvips-${runtimePlatform}/package`);
150
150
  const libcFound = `${familySync()} ${versionSync()}`;
151
151
  const libcRequires = `${config.musl ? "musl" : "glibc"} ${config.musl || config.glibc}`;
152
152
  help.push("- Update your OS:", ` Found ${libcFound}`, ` Requires ${libcRequires}`);
package/dist/utility.cjs CHANGED
@@ -65,11 +65,15 @@ let versions = {
65
65
  if (!libvipsVersion.isGlobal) {
66
66
  if (!libvipsVersion.isWasm) {
67
67
  try {
68
- versions = require(`@img/sharp-${runtimePlatform}/versions`);
68
+ versions = require(`@ohos-ports/img-sharp-${runtimePlatform}/versions`);
69
69
  } catch (_) {
70
70
  try {
71
- versions = require(`@img/sharp-libvips-${runtimePlatform}/versions`);
72
- } catch (_) {}
71
+ versions = require(`@img/sharp-${runtimePlatform}/versions`);
72
+ } catch (_) {
73
+ try {
74
+ versions = require(`@img/sharp-libvips-${runtimePlatform}/versions`);
75
+ } catch (_) {}
76
+ }
73
77
  }
74
78
  } else {
75
79
  try {
package/dist/utility.mjs CHANGED
@@ -65,11 +65,15 @@ let versions = {
65
65
  if (!libvipsVersion.isGlobal) {
66
66
  if (!libvipsVersion.isWasm) {
67
67
  try {
68
- versions = require(`@img/sharp-${runtimePlatform}/versions`);
68
+ versions = require(`@ohos-ports/img-sharp-${runtimePlatform}/versions`);
69
69
  } catch (_) {
70
70
  try {
71
- versions = require(`@img/sharp-libvips-${runtimePlatform}/versions`);
72
- } catch (_) {}
71
+ versions = require(`@img/sharp-${runtimePlatform}/versions`);
72
+ } catch (_) {
73
+ try {
74
+ versions = require(`@img/sharp-libvips-${runtimePlatform}/versions`);
75
+ } catch (_) {}
76
+ }
73
77
  }
74
78
  } else {
75
79
  try {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ohos-ports/sharp",
3
3
  "description": "HarmonyOS port of sharp - High performance Node.js image processing (libvips 8.18.7 full-format bundled subpackage)",
4
- "version": "0.35.5-beta.2",
4
+ "version": "0.35.5-beta.4",
5
5
  "author": "Lovell Fuller <npm@lovell.info>",
6
6
  "homepage": "https://sharp.pixelplumbing.com",
7
7
  "contributors": [
@@ -163,7 +163,7 @@
163
163
  "semver": "^7.8.5"
164
164
  },
165
165
  "optionalDependencies": {
166
- "@ohos-ports/img-sharp-openharmony-arm64": "0.35.5-beta.6"
166
+ "@ohos-ports/img-sharp-openharmony-arm64": "0.35.5-beta.8"
167
167
  },
168
168
  "peerDependenciesMeta": {
169
169
  "@types/node": {