Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pagefind

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pagefind - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1-rc0

checksums/pagefind_extended-v1.0.1-rc0-aarch64-apple-darwin.tar.gz.sha256

37

lib/resolveBinary.js

@@ -7,8 +7,11 @@ import os from 'os';

/**
* @param {string} execname
* @param {string[]} execnames
* @returns {string}
*/
export function resolveBinaryPath(execname) {
const env_var = process.env[`${execname.toUpperCase()}_BINARY_PATH`];
if (env_var) return env_var;
export function resolveBinaryPath(execnames = []) {
for (const execname of execnames) {
const env_var = process.env[`${execname.toUpperCase()}_BINARY_PATH`];
if (env_var) return env_var;
}

@@ -18,16 +21,18 @@ const cpu = process.env.npm_config_arch || os.arch();

const executable = platform === 'windows' ? `${execname}.exe` : execname;
for (const execname of execnames) {
const executable = platform === 'windows' ? `${execname}.exe` : execname;
try {
return require.resolve(`@${execname}/${platform}-${cpu}/bin/${executable}`);
} catch (e) {
throw new Error(
[
`Failed to install ${execname}. Most likely the platform ${platform}-${cpu} is not yet a supported architecture.`,
`Please open an issue at https://github.com/CloudCannon/${execname} and paste this error message in full.`,
`If you believe this package should be compatible with your system,`,
`you can try downloading a release binary directly from https://github.com/CloudCannon/${execname}/releases`
].join('\n')
);
try {
return require.resolve(`@${execname}/${platform}-${cpu}/bin/${executable}`);
} catch (e) { }
}
throw new Error(
[
`Failed to install either of [${execnames.join(', ')}]. Most likely the platform ${platform}-${cpu} is not yet a supported architecture.`,
`Please open an issue at https://github.com/CloudCannon/pagefind and paste this error message in full.`,
`If you believe this package should be compatible with your system,`,
`you can try downloading a release binary directly from https://github.com/CloudCannon/pagefind/releases`
].join('\n')
);
}

@@ -22,3 +22,3 @@ import child_process from 'child_process';

*/
this.backend = child_process.spawn(resolveBinaryPath("pagefind"), [`--service`], {
this.backend = child_process.spawn(resolveBinaryPath(["pagefind_extended", "pagefind"]), [`--service`], {
windowsHide: true,

@@ -25,0 +25,0 @@ stdio: ['pipe', 'pipe', 'inherit'],

{
"name": "pagefind",
"version": "1.0.0",
"version": "1.0.1-rc0",
"type": "module",

@@ -22,7 +22,7 @@ "description": "Implement search on any static website.",

"optionalDependencies": {
"@pagefind/linux-x64": "1.0.0",
"@pagefind/linux-arm64": "1.0.0",
"@pagefind/darwin-x64": "1.0.0",
"@pagefind/darwin-arm64": "1.0.0",
"@pagefind/windows-x64": "1.0.0"
"@pagefind/linux-x64": "1.0.1-rc0",
"@pagefind/linux-arm64": "1.0.1-rc0",
"@pagefind/darwin-x64": "1.0.1-rc0",
"@pagefind/darwin-arm64": "1.0.1-rc0",
"@pagefind/windows-x64": "1.0.1-rc0"
},

@@ -29,0 +29,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc