[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6K0DMK5CR92QJCVZHAV418Y":3,"skill-same:01M6K0DMK5CR92QJCVZHAV418Y":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":27,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":13,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":47,"install":48,"resources":61},"01M6K0DMK5CR92QJCVZHAV418Y","writing-bundler-tests",null,"Guides writing bundler tests using itBundled\u002FexpectBundled in test\u002Fbundler\u002F. Use when creating or modifying bundler, transpiler, or code transformation tests.","sigitpoerwo\u002Frepoworkspace_zahra","sigitpoerwo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F260207224?v=4","01M6K000PB6NA0N6SQ7VFMEAFZ","01M6K000V4N0CEHNPPQA9TNQNX",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F03-BELUM-DICOBA\u002Fdari-clawhub\u002Fwriting-bundler-tests\u002FSKILL.md",[17,22],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000018","写作与文案","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[28,29,30,31,32,33,34,35,36],"writing","tests","bundler","writing bundler tests","test","code","use","transformation","guides","2026-11-10 10:12:30",false,"---\nname: writing-bundler-tests\ndescription: Guides writing bundler tests using itBundled\u002FexpectBundled in test\u002Fbundler\u002F. Use when creating or modifying bundler, transpiler, or code transformation tests.\n---\n\n# Writing Bundler Tests\n\nBundler tests use `itBundled()` from `test\u002Fbundler\u002FexpectBundled.ts` to test Bun's bundler.\n\n## Basic Usage\n\n```typescript\nimport { describe } from \"bun:test\";\nimport { itBundled, dedent } from \".\u002FexpectBundled\";\n\ndescribe(\"bundler\", () => {\n  itBundled(\"category\u002FTestName\", {\n    files: {\n      \"index.js\": `console.log(\"hello\");`,\n    },\n    run: {\n      stdout: \"hello\",\n    },\n  });\n});\n```\n\nTest ID format: `category\u002FTestName` (e.g., `banner\u002FCommentBanner`, `minify\u002FEmpty`)\n\n## File Setup\n\n```typescript\n{\n  files: {\n    \"index.js\": `console.log(\"test\");`,\n    \"lib.ts\": `export const foo = 123;`,\n    \"nested\u002Ffile.js\": `export default {};`,\n  },\n  entryPoints: [\"index.js\"],  \u002F\u002F defaults to first file\n  runtimeFiles: {             \u002F\u002F written AFTER bundling\n    \"extra.js\": `console.log(\"added later\");`,\n  },\n}\n```\n\n## Bundler Options\n\n```typescript\n{\n  outfile: \"\u002Fout.js\",\n  outdir: \"\u002Fout\",\n  format: \"esm\" | \"cjs\" | \"iife\",\n  target: \"bun\" | \"browser\" | \"node\",\n\n  \u002F\u002F Minification\n  minifyWhitespace: true,\n  minifyIdentifiers: true,\n  minifySyntax: true,\n\n  \u002F\u002F Code manipulation\n  banner: \"\u002F\u002F copyright\",\n  footer: \"\u002F\u002F end\",\n  define: { \"PROD\": \"true\" },\n  external: [\"lodash\"],\n\n  \u002F\u002F Advanced\n  sourceMap: \"inline\" | \"external\",\n  splitting: true,\n  treeShaking: true,\n  drop: [\"console\"],\n}\n```\n\n## Runtime Verification\n\n```typescript\n{\n  run: {\n    stdout: \"expected output\",      \u002F\u002F exact match\n    stdout: \u002Fregex\u002F,                \u002F\u002F pattern match\n    partialStdout: \"contains this\", \u002F\u002F substring\n    stderr: \"error output\",\n    exitCode: 1,\n    env: { NODE_ENV: \"production\" },\n    runtime: \"bun\" | \"node\",\n\n    \u002F\u002F Runtime errors\n    error: \"ReferenceError: x is not defined\",\n  },\n}\n```\n\n## Bundle Errors\u002FWarnings\n\n```typescript\n{\n  bundleErrors: {\n    \"\u002Ffile.js\": [\"error message 1\", \"error message 2\"],\n  },\n  bundleWarnings: {\n    \"\u002Ffile.js\": [\"warning message\"],\n  },\n}\n```\n\n## Dead Code Elimination (DCE)\n\nAdd markers in source code:\n\n```javascript\n\u002F\u002F KEEP - this should survive\nconst used = 1;\n\n\u002F\u002F REMOVE - this should be eliminated\nconst unused = 2;\n```\n\n```typescript\n{\n  dce: true,\n  dceKeepMarkerCount: 5,  \u002F\u002F expected KEEP markers\n}\n```\n\n## Capture Pattern\n\nVerify exact transpilation with `capture()`:\n\n```typescript\nitBundled(\"string\u002FFolding\", {\n  files: {\n    \"index.ts\": `capture(\\`\\${1 + 1}\\`);`,\n  },\n  capture: ['\"2\"'], \u002F\u002F expected captured value\n  minifySyntax: true,\n});\n```\n\n## Post-Bundle Assertions\n\n```typescript\n{\n  onAfterBundle(api) {\n    api.expectFile(\"out.js\").toContain(\"console.log\");\n    api.assertFileExists(\"out.js\");\n\n    const content = api.readFile(\"out.js\");\n    expect(content).toMatchSnapshot();\n\n    const values = api.captureFile(\"out.js\");\n    expect(values).toEqual([\"2\"]);\n  },\n}\n```\n\n## Common Patterns\n\n**Simple output verification:**\n\n```typescript\nitBundled(\"banner\u002FComment\", {\n  banner: \"\u002F\u002F copyright\",\n  files: { \"a.js\": `console.log(\"Hello\")` },\n  onAfterBundle(api) {\n    api.expectFile(\"out.js\").toContain(\"\u002F\u002F copyright\");\n  },\n});\n```\n\n**Multi-file CJS\u002FESM interop:**\n\n```typescript\nitBundled(\"cjs\u002FImportSyntax\", {\n  files: {\n    \"entry.js\": `import lib from '.\u002Flib.cjs'; console.log(lib);`,\n    \"lib.cjs\": `exports.foo = 'bar';`,\n  },\n  run: { stdout: '{\"foo\":\"bar\"}' },\n});\n```\n\n**Error handling:**\n\n```typescript\nitBundled(\"edgecase\u002FInvalidLoader\", {\n  files: { \"index.js\": `...` },\n  bundleErrors: {\n    \"index.js\": [\"Unsupported loader type\"],\n  },\n});\n```\n\n## Test Organization\n\n```text\ntest\u002Fbundler\u002F\n├── bundler_banner.test.ts\n├── bundler_string.test.ts\n├── bundler_minify.test.ts\n├── bundler_cjs.test.ts\n├── bundler_edgecase.test.ts\n├── bundler_splitting.test.ts\n├── css\u002F\n├── transpiler\u002F\n└── expectBundled.ts\n```\n\n## Running Tests\n\n```bash\nbun bd test test\u002Fbundler\u002Fbundler_banner.test.ts\nBUN_BUNDLER_TEST_FILTER=\"banner\u002FComment\" bun bd test bundler_banner.test.ts\nBUN_BUNDLER_TEST_DEBUG=1 bun bd test bundler_minify.test.ts\n```\n\n## Key Points\n\n- Use `dedent` for readable multi-line code\n- File paths are relative (e.g., `\u002Findex.js`)\n- Use `capture()` to verify exact transpilation results\n- Use `.toMatchSnapshot()` for complex outputs\n- Pass array to `run` for multiple test scenarios\n","# Writing Bundler Tests\n\nBundler tests use `itBundled()` from `test\u002Fbundler\u002FexpectBundled.ts` to test Bun's bundler.\n\n## Basic Usage\n\n```typescript\nimport { describe } from \"bun:test\";\nimport { itBundled, dedent } from \".\u002FexpectBundled\";\n\ndescribe(\"bundler\", () => {\n  itBundled(\"category\u002FTestName\", {\n    files: {\n      \"index.js\": `console.log(\"hello\");`,\n    },\n    run: {\n      stdout: \"hello\",\n    },\n  });\n});\n```\n\nTest ID format: `category\u002FTestName` (e.g., `banner\u002FCommentBanner`, `minify\u002FEmpty`)\n\n## File Setup\n\n```typescript\n{\n  files: {\n    \"index.js\": `console.log(\"test\");`,\n    \"lib.ts\": `export const foo = 123;`,\n    \"nested\u002Ffile.js\": `export default {};`,\n  },\n  entryPoints: [\"index.js\"],  \u002F\u002F defaults to first file\n  runtimeFiles: {             \u002F\u002F written AFTER bundling\n    \"extra.js\": `console.log(\"added later\");`,\n  },\n}\n```\n\n## Bundler Options\n\n```typescript\n{\n  outfile: \"\u002Fout.js\",\n  outdir: \"\u002Fout\",\n  format: \"esm\" | \"cjs\" | \"iife\",\n  target: \"bun\" | \"browser\" | \"node\",\n\n  \u002F\u002F Minification\n  minifyWhitespace: true,\n  minifyIdentifiers: true,\n  minifySyntax: true,\n\n  \u002F\u002F Code manipulation\n  banner: \"\u002F\u002F copyright\",\n  footer: \"\u002F\u002F end\",\n  define: { \"PROD\": \"true\" },\n  external: [\"lodash\"],\n\n  \u002F\u002F Advanced\n  sourceMap: \"inline\" | \"external\",\n  splitting: true,\n  treeShaking: true,\n  drop: [\"console\"],\n}\n```\n\n## Runtime Verification\n\n```typescript\n{\n  run: {\n    stdout: \"expected output\",      \u002F\u002F exact match\n    stdout: \u002Fregex\u002F,                \u002F\u002F pattern match\n    partialStdout: \"contains this\", \u002F\u002F substring\n    stderr: \"error output\",\n    exitCode: 1,\n    env: { NODE_ENV: \"production\" },\n    runtime: \"bun\" | \"node\",\n\n    \u002F\u002F Runtime errors\n    error: \"ReferenceError: x is not defined\",\n  },\n}\n```\n\n## Bundle Errors\u002FWarnings\n\n```typescript\n{\n  bundleErrors: {\n    \"\u002Ffile.js\": [\"error message 1\", \"error message 2\"],\n  },\n  bundleWarnings: {\n    \"\u002Ffile.js\": [\"warning message\"],\n  },\n}\n```\n\n## Dead Code Elimination (DCE)\n\nAdd markers in source code:\n\n```javascript\n\u002F\u002F KEEP - this should survive\nconst used = 1;\n\n\u002F\u002F REMOVE - this should be eliminated\nconst unused = 2;\n```\n\n```typescript\n{\n  dce: true,\n  dceKeepMarkerCount: 5,  \u002F\u002F expected KEEP markers\n}\n```\n\n## Capture Pattern\n\nVerify exact transpilation with `capture()`:\n\n```typescript\nitBundled(\"string\u002FFolding\", {\n  files: {\n    \"index.ts\": `capture(\\`\\${1 + 1}\\`);`,\n  },\n  capture: ['\"2\"'], \u002F\u002F expected captured value\n  minifySyntax: true,\n});\n```\n\n## Post-Bundle Assertions\n\n```typescript\n{\n  onAfterBundle(api) {\n    api.expectFile(\"out.js\").toContain(\"console.log\");\n    api.assertFileExists(\"out.js\");\n\n    const content = api.readFile(\"out.js\");\n    expect(content).toMatchSnapshot();\n\n    const values = api.captureFile(\"out.js\");\n    expect(values).toEqual([\"2\"]);\n  },\n}\n```\n\n## Common Patterns\n\n**Simple output verification:**\n\n```typescript\nitBundled(\"banner\u002FComment\", {\n  banner: \"\u002F\u002F copyright\",\n  files: { \"a.js\": `console.log(\"Hello\")` },\n  onAfterBundle(api) {\n    api.expectFile(\"out.js\").toContain(\"\u002F\u002F copyright\");\n  },\n});\n```\n\n**Multi-file CJS\u002FESM interop:**\n\n```typescript\nitBundled(\"cjs\u002FImportSyntax\", {\n  files: {\n    \"entry.js\": `import lib from '.\u002Flib.cjs'; console.log(lib);`,\n    \"lib.cjs\": `exports.foo = 'bar';`,\n  },\n  run: { stdout: '{\"foo\":\"bar\"}' },\n});\n```\n\n**Error handling:**\n\n```typescript\nitBundled(\"edgecase\u002FInvalidLoader\", {\n  files: { \"index.js\": `...` },\n  bundleErrors: {\n    \"index.js\": [\"Unsupported loader type\"],\n  },\n});\n```\n\n## Test Organization\n\n```text\ntest\u002Fbundler\u002F\n├── bundler_banner.test.ts\n├── bundler_string.test.ts\n├── bundler_minify.test.ts\n├── bundler_cjs.test.ts\n├── bundler_edgecase.test.ts\n├── bundler_splitting.test.ts\n├── css\u002F\n├── transpiler\u002F\n└── expectBundled.ts\n```\n\n## Running Tests\n\n```bash\nbun bd test test\u002Fbundler\u002Fbundler_banner.test.ts\nBUN_BUNDLER_TEST_FILTER=\"banner\u002FComment\" bun bd test bundler_banner.test.ts\nBUN_BUNDLER_TEST_DEBUG=1 bun bd test bundler_minify.test.ts\n```\n\n## Key Points\n\n- Use `dedent` for readable multi-line code\n- File paths are relative (e.g., `\u002Findex.js`)\n- Use `capture()` to verify exact transpilation results\n- Use `.toMatchSnapshot()` for complex outputs\n- Pass array to `run` for multiple test scenarios\n",{"name":5,"description":7},"main","000d804ba753926ec0eca35be68bdb42da72c672","skills\u002F03-BELUM-DICOBA\u002Fdari-clawhub\u002Fwriting-bundler-tests","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo","2026-04-05 09:27:05",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add sigitpoerwo\u002Frepoworkspace_zahra --skill writing-bundler-tests",{"tool":54,"command":55},"bunx","bunx skills add sigitpoerwo\u002Frepoworkspace_zahra --skill writing-bundler-tests",{"tool":57,"command":58},"pnpm","pnpm dlx skills add sigitpoerwo\u002Frepoworkspace_zahra --skill writing-bundler-tests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F03-BELUM-DICOBA\u002Fdari-clawhub\u002Fwriting-bundler-tests\u002FSKILL.md",true,[],[63,102,127,145,156,162],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":81,"publishedAt":37},"01M6K0FJ41XMDT72PK0E3ZJF9P","zahra-workspace-manager","Comprehensive workspace management skill for Zahra Maurita's development environment. Use when managing projects across 8 divisions (Web, App, AI Agent, Bot, Content, Marketing, Research, Business), organizing files, tracking progress, managing memory, or coordinating multi-domain work. Triggers on mentions of workspace organization, project management, division-specific tasks, memory updates, or cross-domain coordination.","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002Fzahra-workspace-manager\u002FSKILL.md",[69,72,75,78],{"categoryNo":70,"categoryName":71,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000019","营销推广",{"categoryNo":73,"categoryName":74,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":76,"categoryName":77,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":79,"categoryName":80,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000035","市场营销",[82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101],"workspace","workspace manager","manager","zahra workspace manager","work","updates","progress","app","project","across","multi-domain","files","command","coordination","projects","search","tasks","ai agent","memory","bot",{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":109,"publishedAt":37},"01M6K0FBZYXG5M8VBW5R6TPKEP","tinyfish","AI-powered web automation using TinyFish Web Agent. Use when you need to scrape data from websites, automate form filling, extract structured information, or perform any web-based task using natural language instructions. Works with any website including those with JavaScript, dynamic content, and bot protection.","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Ftinyfish\u002FSKILL.md",[108],{"categoryNo":76,"categoryName":77,"taxonomyType":20,"taxonomyTypeDesc":21},[104,110,111,112,113,114,115,116,117,118,34,119,120,101,121,122,123,124,125,126],"with","natural language","web automation","form","information","scrape","task","language","protection","instructions","automate","you","website","web","javascript","automation","data",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":134,"publishedAt":37},"01M6K0F57WDT62QNXTTC6YS34D","tinyfish-openclaw","TinyFish Web Agent integration for OpenClaw. Use this skill to scrape websites, automate web tasks, extract structured data, and perform browser automation using natural language. Works seamlessly with OpenClaw's MCP protocol.","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Ftinyfish-openclaw\u002FSKILL.md",[133],{"categoryNo":76,"categoryName":77,"taxonomyType":20,"taxonomyTypeDesc":21},[104,135,136,125,137,138,139,123,120,140,110,111,34,115,126,141,142,143,144,98],"openclaw","tinyfish openclaw","structured data","browser automation","MCP","for","integration","mcp protocol","browser","protocol",{"skillNo":146,"name":147,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":155,"publishedAt":37},"01M6K0E9ZWFTG44SK6G2ARS39Z","autoresearchclaw","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Fautoresearchclaw\u002FSKILL.md",[150,153,154],{"categoryNo":151,"categoryName":152,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":73,"categoryName":74,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":76,"categoryName":77,"taxonomyType":20,"taxonomyTypeDesc":21},[147],{"skillNo":157,"name":158,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":37},"01M6K0E6ZAEJFYDXM4GANCKZY0","researchclaw","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Fautoresearchclaw\u002F.claude\u002Fskills\u002Fresearchclaw\u002FSKILL.md",[],[158],{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":169,"publishedAt":37},"01M6K0E1B6RZ8T2S7RMWQ6BVWW","academic-research-assistant","Research assistant for management & digital business academics - literature review, paper analysis, citation management, research methodology","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Facademic-research-assistant\u002FSKILL.md",[168],{"categoryNo":73,"categoryName":74,"taxonomyType":20,"taxonomyTypeDesc":21},[170,171,172,173,174,175,140,176,177,178,179,180,181,182,183,184,185,186],"research assistant","academic research assistant","Academic","assistant","research","paper analysis","literature","paper","Citation","research methodology","business","management","literature review","analysis","citation management","methodology","review"]