We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
unified-engine@9.0.4
No response
Run the following script:
#!/usr/bin/env node import {unified} from 'unified' import {engine} from 'unified-engine' import {VFile} from 'vfile' function plugin() { this.Parser = () => ({type: 'root'}) this.Compiler = () => '' return (ast, file) => { file.message('Oh noez!') } } const files = [ new VFile({path: new URL('file:///a.txt'), value: 'a'}), new VFile({path: new URL('file:///b.txt'), value: 'b'}) ] engine( { files, processor: unified().use(plugin) }, (error, code, context) => { console.dir(context.files, {depth: 3}) } )
For all given files the unified plugins are ran.
Unified plugins are only run for the first vfile given.
If file paths are given as strings instead of vfiles, all given paths are processed.
If a combination of vfiles and string paths is given, all string paths are processed up to the first vfile.
Node v16
npm v6
Linux
Other (please specify in steps to reproduce)
The text was updated successfully, but these errors were encountered:
Running with debugging on probably provides more insight. My hunch would be somewhere here: https://github.com/unifiedjs/unified-engine/blob/main/lib/file-pipeline/queue.js.
Sorry, something went wrong.
2387aa9
released!
No branches or pull requests
Initial checklist
Affected packages and versions
unified-engine@9.0.4
Link to runnable example
No response
Steps to reproduce
Run the following script:
Expected behavior
For all given files the unified plugins are ran.
Actual behavior
Unified plugins are only run for the first vfile given.
If file paths are given as strings instead of vfiles, all given paths are processed.
If a combination of vfiles and string paths is given, all string paths are processed up to the first vfile.
Runtime
Node v16
Package manager
npm v6
OS
Linux
Build and bundle tools
Other (please specify in steps to reproduce)
The text was updated successfully, but these errors were encountered: