Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(js): add destroy method, close #1363 #1742

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Mister-Hope
Copy link

No description provided.

@netlify
Copy link

netlify bot commented Dec 31, 2022

Deploy Preview for docsearch canceled.

Name Link
🔨 Latest commit 6d919c2
🔍 Latest deploy log https://app.netlify.com/sites/docsearch/deploys/63afa6dae12a2c00099b8cac

@Mister-Hope
Copy link
Author

Mister-Hope commented Dec 31, 2022

I am unfamilar with react, preact so I am not sure if this is correct, maintainers should pay sepecial attention to my code, thanks.

Since preact returns void when rendering (or "mounting") a component to dom, I make a hacky way to trigger it's unmount lifecycle. And I saw that key listeners with side effects will clear effect when it's being unmounted from @docsearch/react.

BTW, when runing yarn build, I am getting:

@parcel/optimizer-image: Could not optimize image favicon.png: Invalid header 
detected; Not a PNG file
  Error: Invalid header detected; Not a PNG file
      at Object.optimize 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/optimizer-image/lib/ImageOptimizer.js:88:44)
      at process.processTicksAndRejections 
  (node:internal/process/task_queues:95:5)
      at async PackagerRunner.optimize 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/core/lib/PackagerRunner.js:364:20)
      at async PackagerRunner.getBundleResult 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/core/lib/PackagerRunner.js:255:15)
      at async PackagerRunner.getBundleInfo 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/core/lib/PackagerRunner.js:239:9)
      at async PackagerRunner.run 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/core/lib/PackagerRunner.js:160:183)
      at async Child.handleRequest 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/workers/lib/child.js:216:9)
@parcel/optimizer-terser: You must provide the URL of lib/mappings.wasm by 
calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using 
SourceMapConsumer
  Error: You must provide the URL of lib/mappings.wasm by calling 
  SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using 
  SourceMapConsumer
      at readWasm 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/optimizer-terser/node_modules/source-map/lib/read-wasm.js:8:13)
      at wasm 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/optimizer-terser/node_modules/source-map/lib/wasm.js:25:16)
      at 
  /home/mister-hope/projects/docsearch/node_modules/@parcel/optimizer-terser/node_modules/source-map/lib/source-map-consumer.js:264:14
      at process.processTicksAndRejections 
  (node:internal/process/task_queues:95:5)
      at async SourceMap 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/optimizer-terser/node_modules/terser/dist/bundle.min.js:18277:20)
      at async minify 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/optimizer-terser/node_modules/terser/dist/bundle.min.js:26612:41)
      at async Object.optimize 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/optimizer-terser/lib/TerserOptimizer.js:131:16)
      at async PackagerRunner.optimize 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/core/lib/PackagerRunner.js:364:20)
      at async PackagerRunner.getBundleResult 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/core/lib/PackagerRunner.js:255:15)
      at async PackagerRunner.getBundleInfo 
  (/home/mister-hope/projects/docsearch/node_modules/@parcel/core/lib/PackagerRunner.js:239:9)
error Command failed with exit code 1.
lerna ERR! yarn run build exited 1 in '@docsearch/react-example'
lerna WARN complete Waiting for 2 child processes to exit. CTRL-C to exit immediately.

Copy link

netlify bot commented Mar 5, 2024

👷 Deploy request for docsearch pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit f5c11e2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant