[{"data":1,"prerenderedAt":643},["ShallowReactive",2],{"navigation_docs":3,"-get-started-contributing":127,"-get-started-contributing-surround":639},[4,22,51,62,73,84,99,115],{"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 Reference","/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],{"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":116,"path":117,"stem":118,"children":119,"page":21},"Storage","/storage","storage",[120,123],{"title":28,"path":121,"stem":122},"/storage/installation","storage/0.installation",{"title":124,"path":125,"stem":126},"Typescript","/storage/typescript","storage/1.typescript",{"id":128,"title":18,"body":129,"description":632,"extension":633,"links":634,"meta":635,"navigation":636,"path":19,"seo":637,"stem":20,"__hash__":638},"docs/0.get-started/2.contributing.md",{"type":130,"value":131,"toc":618},"minimark",[132,141,146,150,167,171,184,187,198,202,205,213,217,226,229,284,288,303,306,330,337,340,368,373,376,418,424,465,472,476,482,491,506,509,513,516,519,523,526,604,608,614],[133,134,136,137],"a",{"href":135},"https://github.com/aklinker1/webext-core/graphs/contributors","\n  ",[138,139],"img",{"src":140},"https://contrib.rocks/image?repo=aklinker1/webext-core",[142,143,145],"h2",{"id":144},"first-time-contributing","First Time Contributing",[147,148,149],"p",{},"It's easy! Here are some resources to get started:",[151,152,153,161],"ul",{},[154,155,156],"li",{},[133,157,158],{"href":158,"rel":159},"https://www.youtube.com/embed/dSl_qnWO104",[160],"nofollow",[154,162,163],{},[133,164,165],{"href":165,"rel":166},"https://docs.github.com/en/get-started/quickstart/contributing-to-projects",[160],[142,168,170],{"id":169},"project-goals","Project Goals",[147,172,173,174,178,179,183],{},"The goal of ",[175,176,177],"code",{},"webext-core"," is to create useful, targeted, quality utilities for creating and publishing web extensions. Not just ",[180,181,182],"em",{},"Chrome"," extensions, but web extensions that work on all browsers, for all manifest versions.",[147,185,186],{},"With that in mind, there's a couple of expectations I have around new code:",[151,188,189,192,195],{},[154,190,191],{},"Code is written in TypeScript and packages provide great TypeScript support.",[154,193,194],{},"Utilities support all browsers.",[154,196,197],{},"Well unit tested. I won't require 100% coverage, but it should be close.",[142,199,201],{"id":200},"before-you-contribute","Before You Contribute",[147,203,204],{},"If you're just fixing a bug or improving the docs, feel free to open a PR, no questions asked!",[147,206,207,208,212],{},"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 ",[133,209,211],{"href":210},"#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 😃.",[142,214,216],{"id":215},"development-setup","Development Setup",[147,218,219,220,225],{},"You'll need to install ",[133,221,224],{"href":222,"rel":223},"https://bun.sh",[160],"Bun"," before contributing.",[147,227,228],{},"Then you can fork the repo, install the dependencies, and build the packages for the first time!",[230,231,236],"pre",{"className":232,"code":233,"language":234,"meta":235,"style":235},"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","",[175,237,238,254,264,273],{"__ignoreMap":235},[239,240,243,247,251],"span",{"class":241,"line":242},"line",1,[239,244,246],{"class":245},"sBMFI","git",[239,248,250],{"class":249},"sfazB"," clone",[239,252,253],{"class":249}," {your-fork}\n",[239,255,257,261],{"class":241,"line":256},2,[239,258,260],{"class":259},"s2Zo4","cd",[239,262,263],{"class":249}," webext-core\n",[239,265,267,270],{"class":241,"line":266},3,[239,268,269],{"class":245},"bun",[239,271,272],{"class":249}," i\n",[239,274,276,278,281],{"class":241,"line":275},4,[239,277,269],{"class":245},[239,279,280],{"class":249}," run",[239,282,283],{"class":249}," build\n",[142,285,287],{"id":286},"project-layout","Project Layout",[147,289,290,291,293,294,302],{},"The ",[175,292,177],{}," repo is a monorepo containing all the packages under the ",[133,295,298,301],{"href":296,"rel":297},"https://www.npmjs.com/search?q=%40webext-core",[160],[175,299,300],{},"@webext-core"," scope",".",[147,304,305],{},"Here's an overview of the main directories:",[151,307,308,318,324],{},[154,309,310,313,314],{},[175,311,312],{},"docs",": The website for ",[133,315,316],{"href":316,"rel":317},"https://webext-core.aklinker1.io",[160],[154,319,320,323],{},[175,321,322],{},"packages/*",": Each NPM package has it's own directory",[154,325,326,329],{},[175,327,328],{},"packages/*-demo",": Some packages have a demo extension",[147,331,332,333,336],{},"Each package's README (",[175,334,335],{},"packages/*/README.md",") will have additional details for setting up or testing the package.",[147,338,339],{},"In general, all packages are the same.",[151,341,342,349,356,362,365],{},[154,343,344,345,348],{},"They all have a ",[175,346,347],{},"README.md"," with additional documentation",[154,350,351,352,355],{},"They all use ",[175,353,354],{},"src/index.ts"," as the entrypoint",[154,357,351,358,361],{},[175,359,360],{},"tsdown"," for building the final package for NPM",[154,363,364],{},"They're all written in TypeScript",[154,366,367],{},"They all share the same basic scripts for common tasks",[369,370,372],"h3",{"id":371},"scripts","Scripts",[147,374,375],{},"In the root directory, you can run the following scripts:",[230,377,379],{"className":232,"code":378,"language":234,"meta":235,"style":235},"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",[175,380,381,394,406],{"__ignoreMap":235},[239,382,383,385,387,390],{"class":241,"line":242},[239,384,269],{"class":245},[239,386,280],{"class":249},[239,388,389],{"class":249}," build:all",[239,391,393],{"class":392},"sHwdD","  # Run the build script for all packages\n",[239,395,396,398,400,403],{"class":241,"line":256},[239,397,269],{"class":245},[239,399,280],{"class":249},[239,401,402],{"class":249}," check:all",[239,404,405],{"class":392},"  # Run TS, Oxlint, Oxfmt, Publint, etc\n",[239,407,408,410,412,415],{"class":241,"line":266},[239,409,269],{"class":245},[239,411,280],{"class":249},[239,413,414],{"class":249}," test:all",[239,416,417],{"class":392},"   # Run unit tests for all packages\n",[147,419,420,421,423],{},"Or ",[175,422,260],{}," into a package's directory and run these scripts",[230,425,427],{"className":232,"code":426,"language":234,"meta":235,"style":235},"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",[175,428,429,441,453],{"__ignoreMap":235},[239,430,431,433,435,438],{"class":241,"line":242},[239,432,269],{"class":245},[239,434,280],{"class":249},[239,436,437],{"class":249}," build",[239,439,440],{"class":392},"   # Build the package and it's dependencies\n",[239,442,443,445,447,450],{"class":241,"line":256},[239,444,269],{"class":245},[239,446,280],{"class":249},[239,448,449],{"class":249}," check",[239,451,452],{"class":392},"   # Check for type errors\n",[239,454,455,457,459,462],{"class":241,"line":266},[239,456,269],{"class":245},[239,458,280],{"class":249},[239,460,461],{"class":249}," test",[239,463,464],{"class":392},"    # Run unit tests in watch mode\n",[147,466,467,468,471],{},"Each directory might have additional scripts you can run. See each ",[175,469,470],{},"package.json"," for a complete list.",[142,473,475],{"id":474},"publishing-packages","Publishing Packages",[477,478,479],"blockquote",{},[147,480,481],{},"Only owners of the repo can publish a new version of the extension.",[147,483,484,485,490],{},"Use the ",[133,486,489],{"href":487,"rel":488},"https://github.com/aklinker1/webext-core/actions/workflows/publish-packages.yml",[160],"Publish Workflow"," to publish a package. It will:",[492,493,494,497,500,503],"ol",{},[154,495,496],{},"Detect the version bump for the package",[154,498,499],{},"Bump, commit, and push new version",[154,501,502],{},"Publish to NPM",[154,504,505],{},"Create github release",[147,507,508],{},"Use the \"Dry Run\" setting and look at the logs if you're not sure what the version will be bumped to.",[369,510,512],{"id":511},"commit-style","Commit Style",[147,514,515],{},"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.",[147,517,518],{},"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.",[369,520,522],{"id":521},"publishing-a-new-package","Publishing a New Package",[147,524,525],{},"When publishing a package for the first time, publish it by hand and create a release manually.",[230,527,529],{"className":232,"code":528,"language":234,"meta":235,"style":235},"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",[175,530,531,538,546,566,576,584,595],{"__ignoreMap":235},[239,532,533,535],{"class":241,"line":242},[239,534,260],{"class":259},[239,536,537],{"class":249}," packages/package-name\n",[239,539,540,542,544],{"class":241,"line":256},[239,541,269],{"class":245},[239,543,280],{"class":249},[239,545,283],{"class":249},[239,547,548,550,553,556,560,563],{"class":241,"line":266},[239,549,246],{"class":245},[239,551,552],{"class":249}," commit",[239,554,555],{"class":249}," -am",[239,557,559],{"class":558},"sMK4o"," \"",[239,561,562],{"class":249},"chore(release): package-name-v1.0.0",[239,564,565],{"class":558},"\"\n",[239,567,568,570,573],{"class":241,"line":275},[239,569,246],{"class":245},[239,571,572],{"class":249}," tag",[239,574,575],{"class":249}," package-name-v1.0.0\n",[239,577,579,581],{"class":241,"line":578},5,[239,580,246],{"class":245},[239,582,583],{"class":249}," push\n",[239,585,587,589,592],{"class":241,"line":586},6,[239,588,246],{"class":245},[239,590,591],{"class":249}," push",[239,593,594],{"class":249}," --tags\n",[239,596,598,601],{"class":241,"line":597},7,[239,599,600],{"class":245},"npm",[239,602,603],{"class":249}," publish\n",[142,605,607],{"id":606},"updating-docs","Updating Docs",[147,609,610,611,302],{},"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 ",[175,612,613],{},"main",[615,616,617],"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":235,"searchDepth":256,"depth":256,"links":619},[620,621,622,623,624,627,631],{"id":144,"depth":256,"text":145},{"id":169,"depth":256,"text":170},{"id":200,"depth":256,"text":201},{"id":215,"depth":256,"text":216},{"id":286,"depth":256,"text":287,"children":625},[626],{"id":371,"depth":266,"text":372},{"id":474,"depth":256,"text":475,"children":628},[629,630],{"id":511,"depth":266,"text":512},{"id":521,"depth":266,"text":522},{"id":606,"depth":256,"text":607},"Special thanks to the contributors. I look forward to seeing you in the list!","md",null,{"toc":636},true,{"title":18,"description":632},"YP-PE2CYoEBNSrYHMGhw5mwBq-AGTwCM1ItKR6ifrJA",[640,642],{"title":14,"path":15,"stem":16,"description":641,"children":-1},"What browsers do WebExt Core's packages support? All of them.",{"title":28,"path":29,"stem":30,"description":235,"children":-1},1779312968972]