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.2 to 1.0.3-rc0

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

9

lib/index.js

@@ -79,2 +79,11 @@ import { PagefindService } from "./service.js";

/**
* @type {import('pagefindService').close}
*/
export const close = () => new Promise((resolve, reject) => {
persistentService?.close(null);
persistentService = null;
resolve(null);
});
/**
* @param {number} indexId

@@ -81,0 +90,0 @@ * @returns {import ('pagefindService').PagefindIndex}

13

lib/service.js

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

/**
* @param {Error} err
* @param {Error?} err
*/

@@ -57,3 +57,14 @@ close(err) {

}
this.backend?.unref?.();
this.backend?.stdout?.destroy?.()
this.backend?.stdin?.destroy?.()
this.backend?.kill?.();
this.backend = null;
for (const [, cb] of Object.entries(this.callbacks)) {
cb({
exception: new Error("Pagefind backend closed"),
err: null,
result: null
})
}
}

@@ -60,0 +71,0 @@

12

package.json
{
"name": "pagefind",
"version": "1.0.2",
"version": "1.0.3-rc0",
"type": "module",

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

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

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

@@ -6,2 +6,12 @@ /**

/**
* Close the Pagefind service and clean up, stopping the binary altogether.
*
* Service _will_ be restarted if any new calls are made to any other function.
*
* Calling functions on an existing index after calling close() is undefined behavior,
* as that index may map to a new index after the service has restarted.
*/
export function close(): Promise<null>;
export interface PagefindServiceConfig {

@@ -207,2 +217,2 @@ /**

*/
declare function deleteIndex(): Promise<null>;
declare function deleteIndex(): Promise<null>;
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