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

Adds maxBuffer option that sets buffer limit for preprocess #26

Merged
merged 1 commit into from
Dec 9, 2020

Conversation

ilyavf
Copy link
Contributor

@ilyavf ilyavf commented Dec 9, 2020

Solves #20

This allows to avoid buffer overflow when running transformer with preprocess due to Node's default maxBuffer of 1Mb.
Docs + tests updated.

Default is 10Mb. Allows to override by providing maxBuffer option to transformer

Otherwise, if the source is large (e.g. using TailwindCSS) it can throw the following error:

> jest src

 FAIL  src/App.test.js
  ● Test suite failed to run

    spawnSync /bin/sh ENOBUFS

      at Object.process (node_modules/svelte-jester/src/transformer.js:15:17)
      at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:464:35)
      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:569:40)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:607:25)

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.

None yet

2 participants