Skip to content

Commit

Permalink
Fix fuzzer
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jun 20, 2023
1 parent 910dbf0 commit 038995d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@
"build": "tsc --build --clean && tsc && type-coverage && npm run build --workspaces --if-present && rollup -c --silent && gzip-size micromark.min.js && gzip-size --raw micromark.min.js",
"#format": "remark . -qfo -- temporarily off while releasing a major :)",
"format": "prettier . -w --loglevel warn && xo --fix",
"pretest-fuzz": "esbuild micromark --format=cjs --platform=node --bundle > test/fuzz-bundle.cjs && node script/generate-fixtures.js",
"test-fuzz": "jazzer test/fuzz.cjs test/fixtures -- -max_total_time=1800",
"test-fuzz": "esbuild micromark --bundle --conditions=development --format=cjs --platform=node --target=es2022 > test/fuzz-bundle.cjs && node script/generate-fixtures.js && jazzer test/fuzz.cjs test/fixtures -- -max_total_time=1800",
"test-api-dev": "node --conditions development test/index.js",
"test-api-prod": "node --conditions production test/index.js",
"test-api": "npm run test-api-dev && npm run test-api-prod",
Expand Down
4 changes: 4 additions & 0 deletions script/generate-fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ await fs.writeFile(
new URL('../packages/micromark/index.js', import.meta.url),
[
'export {micromark}',
'export {compile} from "./lib/compile.js"',
'export {parse} from "./lib/parse.js"',
'export {postprocess} from "./lib/postprocess.js"',
'export {preprocess} from "./lib/preprocess.js"',
'import fs from "fs"',
'import path from "path"',
'import {micromark as core} from "./index.bak.js"',
Expand Down

0 comments on commit 038995d

Please sign in to comment.