[{"data":1,"prerenderedAt":636},["ShallowReactive",2],{"navigation_docs":3,"-get-started-contributing":133,"-get-started-contributing-surround":632},[4,22,51,62,73,84,99,118],{"title":5,"path":6,"stem":7,"children":8,"page":21},"Get Started","/get-started","0.get-started",[9,13,17],{"title":10,"path":11,"stem":12},"Introduction","/get-started/introduction","0.get-started/0.introduction",{"title":14,"path":15,"stem":16},"Browser Support","/get-started/browser-support","0.get-started/1.browser-support",{"title":18,"path":19,"stem":20},"Contributing","/get-started/contributing","0.get-started/2.contributing",false,{"title":23,"path":24,"stem":25,"children":26,"page":21},"Fake Browser","/fake-browser","fake-browser",[27,31,35,39,43,47],{"title":28,"path":29,"stem":30},"Installation","/fake-browser/installation","fake-browser/0.installation",{"title":32,"path":33,"stem":34},"Testing Frameworks","/fake-browser/testing-frameworks","fake-browser/1.testing-frameworks",{"title":36,"path":37,"stem":38},"Triggering Events","/fake-browser/triggering-events","fake-browser/2.triggering-events",{"title":40,"path":41,"stem":42},"Resetting State","/fake-browser/reseting-state","fake-browser/3.reseting-state",{"title":44,"path":45,"stem":46},"Implemented Apis","/fake-browser/implemented-apis","fake-browser/4.implemented-apis",{"title":48,"path":49,"stem":50},"Api","/fake-browser/api","fake-browser/api",{"title":52,"path":53,"stem":54,"children":55,"page":21},"Isolated Element","/isolated-element","isolated-element",[56,59],{"title":28,"path":57,"stem":58},"/isolated-element/installation","isolated-element/0.installation",{"title":48,"path":60,"stem":61},"/isolated-element/api","isolated-element/api",{"title":63,"path":64,"stem":65,"children":66,"page":21},"Job Scheduler","/job-scheduler","job-scheduler",[67,70],{"title":28,"path":68,"stem":69},"/job-scheduler/installation","job-scheduler/0.installation",{"title":48,"path":71,"stem":72},"/job-scheduler/api","job-scheduler/api",{"title":74,"path":75,"stem":76,"children":77,"page":21},"Match Patterns","/match-patterns","match-patterns",[78,81],{"title":28,"path":79,"stem":80},"/match-patterns/installation","match-patterns/0.installation",{"title":48,"path":82,"stem":83},"/match-patterns/api","match-patterns/api",{"title":85,"path":86,"stem":87,"children":88,"page":21},"Messaging","/messaging","messaging",[89,92,96],{"title":28,"path":90,"stem":91},"/messaging/installation","messaging/0.installation",{"title":93,"path":94,"stem":95},"Protocol Maps","/messaging/protocol-maps","messaging/1.protocol-maps",{"title":48,"path":97,"stem":98},"/messaging/api","messaging/api",{"title":100,"path":101,"stem":102,"children":103,"page":21},"Proxy Service","/proxy-service","proxy-service",[104,107,111,115],{"title":28,"path":105,"stem":106},"/proxy-service/installation","proxy-service/0.installation",{"title":108,"path":109,"stem":110},"Defining Services","/proxy-service/defining-services","proxy-service/1.defining-services",{"title":112,"path":113,"stem":114},"Service Keys","/proxy-service/service-keys","proxy-service/2.service-keys",{"title":48,"path":116,"stem":117},"/proxy-service/api","proxy-service/api",{"title":119,"path":120,"stem":121,"children":122,"page":21},"Storage","/storage","storage",[123,126,130],{"title":28,"path":124,"stem":125},"/storage/installation","storage/0.installation",{"title":127,"path":128,"stem":129},"Typescript","/storage/typescript","storage/1.typescript",{"title":48,"path":131,"stem":132},"/storage/api","storage/api",{"id":134,"title":18,"body":135,"description":625,"extension":626,"links":627,"meta":628,"navigation":629,"path":19,"seo":630,"stem":20,"__hash__":631},"docs/0.get-started/2.contributing.md",{"type":136,"value":137,"toc":611},"minimark",[138,147,152,156,173,177,190,193,204,208,211,219,223,232,235,290,294,309,312,336,343,346,374,379,382,412,418,458,465,469,475,484,499,502,506,509,512,516,519,597,601,607],[139,140,142,143],"a",{"href":141},"https://github.com/aklinker1/webext-core/graphs/contributors","\n  ",[144,145],"img",{"src":146},"https://contrib.rocks/image?repo=aklinker1/webext-core",[148,149,151],"h2",{"id":150},"first-time-contributing","First Time Contributing",[153,154,155],"p",{},"It's easy! Here are some resources to get started:",[157,158,159,167],"ul",{},[160,161,162],"li",{},[139,163,164],{"href":164,"rel":165},"https://www.youtube.com/embed/dSl_qnWO104",[166],"nofollow",[160,168,169],{},[139,170,171],{"href":171,"rel":172},"https://docs.github.com/en/get-started/quickstart/contributing-to-projects",[166],[148,174,176],{"id":175},"project-goals","Project Goals",[153,178,179,180,184,185,189],{},"The goal of ",[181,182,183],"code",{},"webext-core"," is to create useful, targeted, quality utilities for creating and publishing web extensions. Not just ",[186,187,188],"em",{},"Chrome"," extensions, but web extensions that work on all browsers, for all manifest versions.",[153,191,192],{},"With that in mind, there's a couple of expectations I have around new code:",[157,194,195,198,201],{},[160,196,197],{},"Code is written in TypeScript and packages provide great TypeScript support.",[160,199,200],{},"Utilities support all browsers.",[160,202,203],{},"Well unit tested. I won't require 100% coverage, but it should be close.",[148,205,207],{"id":206},"before-you-contribute","Before You Contribute",[153,209,210],{},"If you're just fixing a bug or improving the docs, feel free to open a PR, no questions asked!",[153,212,213,214,218],{},"If you want to add a new package or feature, open an issue first. That way we can collaborate and make sure it fits the purpose listed in the ",[139,215,217],{"href":216},"#project-goals","project goals",". If you open a PR, but it's not something I want to maintain or it doesn't fit this project, you will have wasted your time. We both have lives to live 😃.",[148,220,222],{"id":221},"development-setup","Development Setup",[153,224,225,226,231],{},"You'll need to install ",[139,227,230],{"href":228,"rel":229},"https://bun.sh",[166],"Bun"," before contributing.",[153,233,234],{},"Then you can fork the repo, install the dependencies, and build the packages for the first time!",[236,237,242],"pre",{"className":238,"code":239,"language":240,"meta":241,"style":241},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","git clone {your-fork}\ncd webext-core\nbun i\nbun run build\n","bash","",[181,243,244,260,270,279],{"__ignoreMap":241},[245,246,249,253,257],"span",{"class":247,"line":248},"line",1,[245,250,252],{"class":251},"sBMFI","git",[245,254,256],{"class":255},"sfazB"," clone",[245,258,259],{"class":255}," {your-fork}\n",[245,261,263,267],{"class":247,"line":262},2,[245,264,266],{"class":265},"s2Zo4","cd",[245,268,269],{"class":255}," webext-core\n",[245,271,273,276],{"class":247,"line":272},3,[245,274,275],{"class":251},"bun",[245,277,278],{"class":255}," i\n",[245,280,282,284,287],{"class":247,"line":281},4,[245,283,275],{"class":251},[245,285,286],{"class":255}," run",[245,288,289],{"class":255}," build\n",[148,291,293],{"id":292},"project-layout","Project Layout",[153,295,296,297,299,300,308],{},"The ",[181,298,183],{}," repo is a monorepo containing all the packages under the ",[139,301,304,307],{"href":302,"rel":303},"https://www.npmjs.com/search?q=%40webext-core",[166],[181,305,306],{},"@webext-core"," scope",".",[153,310,311],{},"Here's an overview of the main directories:",[157,313,314,324,330],{},[160,315,316,319,320],{},[181,317,318],{},"docs",": The website for ",[139,321,322],{"href":322,"rel":323},"https://webext-core.aklinker1.io",[166],[160,325,326,329],{},[181,327,328],{},"packages/*",": Each NPM package has it's own directory",[160,331,332,335],{},[181,333,334],{},"packages/*-demo",": Some packages have a demo extension",[153,337,338,339,342],{},"Each package's README (",[181,340,341],{},"packages/*/README.md",") will have additional details for setting up or testing the package.",[153,344,345],{},"In general, all packages are the same.",[157,347,348,355,362,368,371],{},[160,349,350,351,354],{},"They all have a ",[181,352,353],{},"README.md"," with additional documentation",[160,356,357,358,361],{},"They all use ",[181,359,360],{},"src/index.ts"," as the entrypoint",[160,363,357,364,367],{},[181,365,366],{},"tsup"," for building the final package for NPM",[160,369,370],{},"They're all written in TypeScript",[160,372,373],{},"They all share the same basic scripts for common tasks",[375,376,378],"h3",{"id":377},"scripts","Scripts",[153,380,381],{},"In the root directory, you can run the following scripts:",[236,383,385],{"className":238,"code":384,"language":240,"meta":241,"style":241},"bun run build  # Run the build script for all packages\nbun run format # Run prettier to format all your files\n",[181,386,387,400],{"__ignoreMap":241},[245,388,389,391,393,396],{"class":247,"line":248},[245,390,275],{"class":251},[245,392,286],{"class":255},[245,394,395],{"class":255}," build",[245,397,399],{"class":398},"sHwdD","  # Run the build script for all packages\n",[245,401,402,404,406,409],{"class":247,"line":262},[245,403,275],{"class":251},[245,405,286],{"class":255},[245,407,408],{"class":255}," format",[245,410,411],{"class":398}," # Run prettier to format all your files\n",[153,413,414,415,417],{},"Or ",[181,416,266],{}," into a package's directory and run these scripts",[236,419,421],{"className":238,"code":420,"language":240,"meta":241,"style":241},"bun run build   # Build the package and it's dependencies\nbun run check   # Check for type errors\nbun run test    # Run unit tests in watch mode\n",[181,422,423,434,446],{"__ignoreMap":241},[245,424,425,427,429,431],{"class":247,"line":248},[245,426,275],{"class":251},[245,428,286],{"class":255},[245,430,395],{"class":255},[245,432,433],{"class":398},"   # Build the package and it's dependencies\n",[245,435,436,438,440,443],{"class":247,"line":262},[245,437,275],{"class":251},[245,439,286],{"class":255},[245,441,442],{"class":255}," check",[245,444,445],{"class":398},"   # Check for type errors\n",[245,447,448,450,452,455],{"class":247,"line":272},[245,449,275],{"class":251},[245,451,286],{"class":255},[245,453,454],{"class":255}," test",[245,456,457],{"class":398},"    # Run unit tests in watch mode\n",[153,459,460,461,464],{},"Each directory might have additional scripts you can run. See each ",[181,462,463],{},"package.json"," for a complete list.",[148,466,468],{"id":467},"publishing-packages","Publishing Packages",[470,471,472],"blockquote",{},[153,473,474],{},"Only owners of the repo can publish a new version of the extension.",[153,476,477,478,483],{},"Use the ",[139,479,482],{"href":480,"rel":481},"https://github.com/aklinker1/webext-core/actions/workflows/publish-packages.yml",[166],"Publish Workflow"," to publish a package. It will:",[485,486,487,490,493,496],"ol",{},[160,488,489],{},"Detect the version bump for the package",[160,491,492],{},"Bump, commit, and push new version",[160,494,495],{},"Publish to NPM",[160,497,498],{},"Create github release",[153,500,501],{},"Use the \"Dry Run\" setting and look at the logs if you're not sure what the version will be bumped to.",[375,503,505],{"id":504},"commit-style","Commit Style",[153,507,508],{},"If you are submitting PRs, don't worry about this! A maintainer will squash and merge your PR with a commit message in the correct style.",[153,510,511],{},"Each commit's title effects the publishing process. The style is based on conventional commits, any commits that have changes inside a package's directory will effect the version bump for that package.",[375,513,515],{"id":514},"publishing-a-new-package","Publishing a New Package",[153,517,518],{},"When publishing a package for the first time, publish it by hand and create a release manually.",[236,520,522],{"className":238,"code":521,"language":240,"meta":241,"style":241},"cd packages/package-name\nbun run build\ngit commit -am \"chore(release): package-name-v1.0.0\"\ngit tag package-name-v1.0.0\ngit push\ngit push --tags\nnpm publish\n",[181,523,524,531,539,559,569,577,588],{"__ignoreMap":241},[245,525,526,528],{"class":247,"line":248},[245,527,266],{"class":265},[245,529,530],{"class":255}," packages/package-name\n",[245,532,533,535,537],{"class":247,"line":262},[245,534,275],{"class":251},[245,536,286],{"class":255},[245,538,289],{"class":255},[245,540,541,543,546,549,553,556],{"class":247,"line":272},[245,542,252],{"class":251},[245,544,545],{"class":255}," commit",[245,547,548],{"class":255}," -am",[245,550,552],{"class":551},"sMK4o"," \"",[245,554,555],{"class":255},"chore(release): package-name-v1.0.0",[245,557,558],{"class":551},"\"\n",[245,560,561,563,566],{"class":247,"line":281},[245,562,252],{"class":251},[245,564,565],{"class":255}," tag",[245,567,568],{"class":255}," package-name-v1.0.0\n",[245,570,572,574],{"class":247,"line":571},5,[245,573,252],{"class":251},[245,575,576],{"class":255}," push\n",[245,578,580,582,585],{"class":247,"line":579},6,[245,581,252],{"class":251},[245,583,584],{"class":255}," push",[245,586,587],{"class":255}," --tags\n",[245,589,591,594],{"class":247,"line":590},7,[245,592,593],{"class":251},"npm",[245,595,596],{"class":255}," publish\n",[148,598,600],{"id":599},"updating-docs","Updating Docs",[153,602,603,604,308],{},"This documentation website is continuously deployed on Vercel. You do not need to run any actions or scripts to publish the docs. Just push changes to ",[181,605,606],{},"main",[608,609,610],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}",{"title":241,"searchDepth":262,"depth":262,"links":612},[613,614,615,616,617,620,624],{"id":150,"depth":262,"text":151},{"id":175,"depth":262,"text":176},{"id":206,"depth":262,"text":207},{"id":221,"depth":262,"text":222},{"id":292,"depth":262,"text":293,"children":618},[619],{"id":377,"depth":272,"text":378},{"id":467,"depth":262,"text":468,"children":621},[622,623],{"id":504,"depth":272,"text":505},{"id":514,"depth":272,"text":515},{"id":599,"depth":262,"text":600},"Special thanks to the contributors. I look forward to seeing you in the list!","md",null,{"toc":629},true,{"title":18,"description":625},"3GnV1rI0-JDjQepu4Duz-17FYJ9aertxie3UFoFC8rY",[633,635],{"title":14,"path":15,"stem":16,"description":634,"children":-1},"What browsers do WebExt Core's packages support? All of them.",{"title":28,"path":29,"stem":30,"description":241,"children":-1},1779299496532]