[{"data":1,"prerenderedAt":649},["ShallowReactive",2],{"navigation_docs":3,"-get-started-contributing":133,"-get-started-contributing-surround":645},[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":638,"extension":639,"links":640,"meta":641,"navigation":642,"path":19,"seo":643,"stem":20,"__hash__":644},"docs/0.get-started/2.contributing.md",{"type":136,"value":137,"toc":624},"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,424,430,471,478,482,488,497,512,515,519,522,525,529,532,610,614,620],[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],{},"tsdown"," 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:all  # Run the build script for all packages\nbun run check:all  # Run TS, Oxlint, Oxfmt, Publint, etc\nbun run test:all   # Run unit tests for all packages\n",[181,386,387,400,412],{"__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:all",[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}," check:all",[245,410,411],{"class":398},"  # Run TS, Oxlint, Oxfmt, Publint, etc\n",[245,413,414,416,418,421],{"class":247,"line":272},[245,415,275],{"class":251},[245,417,286],{"class":255},[245,419,420],{"class":255}," test:all",[245,422,423],{"class":398},"   # Run unit tests for all packages\n",[153,425,426,427,429],{},"Or ",[181,428,266],{}," into a package's directory and run these scripts",[236,431,433],{"className":238,"code":432,"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,434,435,447,459],{"__ignoreMap":241},[245,436,437,439,441,444],{"class":247,"line":248},[245,438,275],{"class":251},[245,440,286],{"class":255},[245,442,443],{"class":255}," build",[245,445,446],{"class":398},"   # Build the package and it's dependencies\n",[245,448,449,451,453,456],{"class":247,"line":262},[245,450,275],{"class":251},[245,452,286],{"class":255},[245,454,455],{"class":255}," check",[245,457,458],{"class":398},"   # Check for type errors\n",[245,460,461,463,465,468],{"class":247,"line":272},[245,462,275],{"class":251},[245,464,286],{"class":255},[245,466,467],{"class":255}," test",[245,469,470],{"class":398},"    # Run unit tests in watch mode\n",[153,472,473,474,477],{},"Each directory might have additional scripts you can run. See each ",[181,475,476],{},"package.json"," for a complete list.",[148,479,481],{"id":480},"publishing-packages","Publishing Packages",[483,484,485],"blockquote",{},[153,486,487],{},"Only owners of the repo can publish a new version of the extension.",[153,489,490,491,496],{},"Use the ",[139,492,495],{"href":493,"rel":494},"https://github.com/aklinker1/webext-core/actions/workflows/publish-packages.yml",[166],"Publish Workflow"," to publish a package. It will:",[498,499,500,503,506,509],"ol",{},[160,501,502],{},"Detect the version bump for the package",[160,504,505],{},"Bump, commit, and push new version",[160,507,508],{},"Publish to NPM",[160,510,511],{},"Create github release",[153,513,514],{},"Use the \"Dry Run\" setting and look at the logs if you're not sure what the version will be bumped to.",[375,516,518],{"id":517},"commit-style","Commit Style",[153,520,521],{},"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,523,524],{},"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,526,528],{"id":527},"publishing-a-new-package","Publishing a New Package",[153,530,531],{},"When publishing a package for the first time, publish it by hand and create a release manually.",[236,533,535],{"className":238,"code":534,"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,536,537,544,552,572,582,590,601],{"__ignoreMap":241},[245,538,539,541],{"class":247,"line":248},[245,540,266],{"class":265},[245,542,543],{"class":255}," packages/package-name\n",[245,545,546,548,550],{"class":247,"line":262},[245,547,275],{"class":251},[245,549,286],{"class":255},[245,551,289],{"class":255},[245,553,554,556,559,562,566,569],{"class":247,"line":272},[245,555,252],{"class":251},[245,557,558],{"class":255}," commit",[245,560,561],{"class":255}," -am",[245,563,565],{"class":564},"sMK4o"," \"",[245,567,568],{"class":255},"chore(release): package-name-v1.0.0",[245,570,571],{"class":564},"\"\n",[245,573,574,576,579],{"class":247,"line":281},[245,575,252],{"class":251},[245,577,578],{"class":255}," tag",[245,580,581],{"class":255}," package-name-v1.0.0\n",[245,583,585,587],{"class":247,"line":584},5,[245,586,252],{"class":251},[245,588,589],{"class":255}," push\n",[245,591,593,595,598],{"class":247,"line":592},6,[245,594,252],{"class":251},[245,596,597],{"class":255}," push",[245,599,600],{"class":255}," --tags\n",[245,602,604,607],{"class":247,"line":603},7,[245,605,606],{"class":251},"npm",[245,608,609],{"class":255}," publish\n",[148,611,613],{"id":612},"updating-docs","Updating Docs",[153,615,616,617,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,618,619],{},"main",[621,622,623],"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":625},[626,627,628,629,630,633,637],{"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":631},[632],{"id":377,"depth":272,"text":378},{"id":480,"depth":262,"text":481,"children":634},[635,636],{"id":517,"depth":272,"text":518},{"id":527,"depth":272,"text":528},{"id":612,"depth":262,"text":613},"Special thanks to the contributors. I look forward to seeing you in the list!","md",null,{"toc":642},true,{"title":18,"description":638},"YP-PE2CYoEBNSrYHMGhw5mwBq-AGTwCM1ItKR6ifrJA",[646,648],{"title":14,"path":15,"stem":16,"description":647,"children":-1},"What browsers do WebExt Core's packages support? All of them.",{"title":28,"path":29,"stem":30,"description":241,"children":-1},1779310884312]