import OptionsSyncPerDomain from 'webext-options-sync-per-domain'; import {importedFeatures} from '../readme.md'; export type RGHOptions = typeof defaults; // eslint-disable-next-line prefer-object-spread -- TypeScript doesn't merge the definitions so `...` is not equivalent. const defaults = Object.assign({ actionUrl: '', customCSS: '', personalToken: '', logging: false, logHTTP: false, }, Object.fromEntries(importedFeatures.map(id => [`feature:${id}`, true]))); export const renamedFeatures = new Map([ ['separate-draft-pr-button', 'one-click-pr-or-gist'], ['prevent-pr-commit-link-loss', 'prevent-link-loss'], ['remove-projects-tab', 'remove-unused-repo-tabs'], ['remove-unused-repo-tabs', 'clean-repo-tabs'], ['more-dropdown', 'clean-repo-tabs'], ['remove-diff-signs', 'hide-diff-signs'], ['remove-label-faster', 'quick-label-hiding'], ['edit-files-faster', 'quick-file-edit'], ['edit-comments-faster', 'quick-comment-edit'], ['delete-review-comments-faster', 'quick-review-comment-deletion'], ['hide-comments-faster', 'quick-comment-hiding'], ['faster-reviews', 'quick-review'], ['faster-pr-diff-options', 'quick-pr-diff-options'], ['hide-useless-comments', 'hide-low-quality-comments'], ['hide-useless-newsfeed-events', 'hide-newsfeed-noise'], ['hide-noisy-newsfeed-events', 'hide-newsfeed-noise'], ['no-useless-split-diff-view', 'no-unnecessary-split-diff-view'], ['unwrap-useless-dropdowns', 'unwrap-unnecessary-dropdowns'], ['tag-changelog-link', 'tag-changes-link'], ['navigate-pages-with-arrow-keys', 'pagination-hotkey'], ['list-pr-for-branch', 'list-prs-for-branch'], ['quick-label-hiding', 'quick-label-removal'], ['next-scheduled-github-action', 'github-actions-indicators'], ['raw-file-link', 'more-file-links'], ['conversation-filters', 'more-conversation-filters'], ['quick-pr-diff-options', 'one-click-diff-options'], ['quick-review-buttons', 'one-click-review-submission'], ['wait-for-build', 'wait-for-checks'], ['pull-request-hotkey', 'pull-request-hotkeys'], ['first-published-tag-for-merged-pr', 'closing-remarks'], ['scheduled-and-manual-workflow-indicators', 'github-actions-indicators'], ['useful-forks', 'fork-notice'], ['set-default-repositories-type-to-sources', 'hide-user-forks'], ['highlight-deleted-and-added-files-in-diffs', 'new-or-deleted-file'], ['enable-file-links-in-compare-view', 'actionable-pr-view-file'], ]); export function isFeatureDisabled(options: RGHOptions, id: string): boolean { // Must check if it's specifically `false`: It could be undefined if not yet in the readme or if misread from the entry point #6606 // eslint-disable-next-line @typescript-eslint/no-unnecessary-boolean-literal-compare return options[`feature:${id}`] === false; } export function getNewFeatureName(possibleFeatureName: string): FeatureID | undefined { let newFeatureName = possibleFeatureName; while (renamedFeatures.has(newFeatureName)) { newFeatureName = renamedFeatures.get(newFeatureName)!; } return importedFeatures.includes(newFeatureName as FeatureID) ? newFeatureName as FeatureID : undefined; } // TODO [2022-05-01]: Remove obsolete color classes & variables https://primer.style/css/support/v18-migration #4970 #4982 const migrations = [ function (options: RGHOptions): void { for (const [from, to] of renamedFeatures) { if (typeof options[`feature:${from}`] === 'boolean') { options[`feature:${to}`] = options[`feature:${from}`]; } } }, // Removed features will be automatically removed from the options as well OptionsSyncPerDomain.migrations.removeUnused, ]; export const perDomainOptions = new OptionsSyncPerDomain({defaults, migrations}); export default perDomainOptions.getOptionsForOrigin(); framework-alpine Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/.npmrc (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2023-01-06Remove proload for config loading (#5778)Gravatar Bjorn Lu 8-128/+65
* Refactor resolve and load config * Add changeset * Update name * Remove unnecessary node_env handling * Fix test * Update comment
2023-01-06Update `.nvmrc` to match new CI baseline (#5784)Gravatar Chris Swithinbank 1-1/+1
2023-01-06Drop Node 14 in CI for Node 16 and add Node 18 to the matrix (#5768)Gravatar Erika 6-32/+138
* ci(node): Move CI to Node 16 and add Node 18 to the matrix * fix(netlify): Fix set-cookie not working on Node 18 * fix(netlify): Handle if `set-cookie` is already somehow an array (apparently it can?) * test(node): Fix `toPromise` to match Astro's * fix(tests): Use the actual underlying ArrayBuffer instance to create the buffer in toPromise * chore: changeset
2023-01-06[ci] update lockfile (#5775)Gravatar Fred K. Bot 1-84/+52
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2023-01-06[ci] formatGravatar bholmesdev 1-1/+1
2023-01-06Add SmartyPants flag (#5769)Gravatar Ben Holmes 14-16/+155
* feat: add smartypants flag * test: smartypants in markdown and mdx * docs: Smartypants -> SmartyPants * chore: changeset * chore: update changeset with 1.0 -> 2.0 in mind * chore: bump to minor change
2023-01-05[ci] formatGravatar matthewp 1-4/+1
2023-01-05Remove legacy.astroFlavoredMarkdown (#5771)Gravatar Matthew Phillips 109-1870/+15
* Remove legacy.astroFlavoredMarkdown * update vue mdx test * Add a changeset
2023-01-05Update compiler (#5656)Gravatar Nate Moore 2-2/+2
* chore: update compiler * chore: pin compiler * update compiler * update changeset * chore: test prerelease * chore: update compiler * chore: update lockfile * chore: do not pin compiler * Delete fresh-kids-serve.md Co-authored-by: Nate Moore <nate@astro.build>
2023-01-05[ci] formatGravatar natemoo-re 1-1/+1
2023-01-05feat: change path into assets (#5584)Gravatar wulinsheng123 8-10/+19
* feat: change path * feat: fix bug #5502 * fix: astro fix to patch * feat: change to major * chore: update changelog * fix: change entryFileNames into assets folder * fix: fix error message in test Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2023-01-05Fix MDX integration error message not being compatible with docs (#5767)Gravatar Erika 3-8/+16
* fix(errors): Fix MDX Integration missing error message so docs generation work properly * docs(errors): Add more information regarding authoring error messages
2023-01-05[ci] update lockfile (#5764)Gravatar Fred K. Bot 1-420/+477
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2023-01-05Refactor tailwind integration setup (#5717)Gravatar Bjorn Lu 5-35/+32
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-01-04[ci] formatGravatar bholmesdev 1-1/+1
2023-01-04Log pretty error when MDX integration is missing (#5761)Gravatar Ben Holmes 4-7/+57
* feat: add MDX integration error handling * chore: changeset * docs: applied -> installed Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-01-04fix broken link in tailwind example docs (#5762)Gravatar Christopher Christofi 1-1/+1
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-01-04Fix legacy branch name in the release action (#5760)Gravatar Matthew Phillips 1-1/+1
2023-01-04chore(ci): skip OG images in smoke test (#5757)Gravatar Nate Moore 1-0/+1
Co-authored-by: Nate Moore <nate@astro.build>
2023-01-04Setup changesets to backport to 1.0 legacy branch (#5758)Gravatar Matthew Phillips 1-0/+1
* Setup changesets to backport to 1.0 legacy branch * Only make the workflow change * Both main and legacy branches
2023-01-04[ci] formatGravatar sarah11918 1-3/+3
2023-01-04[docs] Document base (#5693)Gravatar Sarah Rainsberger 1-2/+9
2023-01-04[ci] formatGravatar matthewp 1-1/+1
2023-01-04Fix for hoisted scripts in project with spaces in the file path (#5756)Gravatar Matthew Phillips 6-1/+66
* Fix for hoisted scripts in project with spaces in the file path * Adding a changeset * Use viteID instead
2023-01-04[ci] formatGravatar natemoo-re 1-1/+0
2023-01-04Handle `getStaticPaths` with prerendered pages (#5734)Gravatar Nate Moore 18-5/+408
* fix(#5661): ensure getStaticPaths is correctly handled for prerendered pages * test: add prerender getStaticPaths cases * chore: add changeset * test: add props to test suite * chore: update lockfile Co-authored-by: Nate Moore <nate@astro.build>
2023-01-04[ci] update lockfile (#5744)Gravatar Fred K. Bot 1-1438/+1092
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2023-01-04[ci] formatGravatar Princesseuh 1-1/+1
2023-01-04Update telemetry to use new errors information (#5547)Gravatar Erika 13-24/+130
* Properly get information from AstroError in telemetry * Record telemetry for dev errors * Fix tests * ci(telemetry): Make sure we don't hit telemetry in tests * fix(build): Fix types * test: Remove unnecessary flag * test(errors): Add test to make sure we don't have stacktraces inside error messages * refactor(types): Type cast `getErrorDataByCode`'s return type so we don't have to cast to any later
2023-01-04Add file location to errors in build (#5743)Gravatar Erika 9-4/+78
* feat(errors): Add file location where error happened during build for user-generated errors * chore: changeset * fix(errors): Only add information if the error is in a compatible shape * feat(errors): Add hint to throw Error objects instead of other types for better information * test(errors): Add test to make sure errors in build have the error location * chore(lockfile): Update lockfile * chore: misc text fixes
2023-01-04Fix docs links in MDX README (#5741)Gravatar Chris Swithinbank 2-3/+8
2023-01-04update frontmatter injection link to match docs changes (#5736)Gravatar Sarah Rainsberger 1-2/+2
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2023-01-03[ci] release (beta) (#5732)astro@2.0.0-beta.0@astrojs/vue@2.0.0-beta.0@astrojs/vercel@3.0.0-beta.0@astrojs/svelte@2.0.0-beta.0@astrojs/node@5.0.0-beta.0@astrojs/netlify@2.0.0-beta.0@astrojs/mdx@0.15.0-beta.0@astrojs/markdown-remark@2.0.0-beta.0@astrojs/image@0.13.0-beta.0@astrojs/deno@4.0.0-beta.0@astrojs/cloudflare@6.0.0-beta.0Gravatar Fred K. Bot 51-656/+1159
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-03[ci] formatGravatar matthewp 2-2/+2
2023-01-03Markdown and MDX configuration rework (#5684)Gravatar Ben Holmes 14-1665/+2188
* feat: change extendDefaults -> gfm * deps: remove smartypants from md/remark * tests: update markdown plugin tests * fix: borked lockfile * feat: allow all Markdown options in MDX config, with extend * deps: remove smartypants from MDX * chore: remove unused `mode` property * chore: remark rehype types * chore: dead code * fix: order of default config properties * refactor: move md defaults to remark * fix: RemarkRehype type * fix: apply defaults based on MD defaults * chore: update plugin tests * chore: add syntaxHighlight test * refactor: remove drafts from config defaults * docs: new MDX config options * chore: add changeset * edit: test both extends for syntax highlight * refactor: remove MDX config deep merge * docs: update README and changeset * edit: avoid -> disable Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * edit: `drafts` clarification Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * edit: remove "scare quotes" Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * docs: MDX config options redraft * docs: add migration * chore: changeset heading levels * refactor: githubFlavoredMarkdown -> gfm * chore: remove unused imports Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-01-03[ci] formatGravatar bholmesdev 4-46/+45
2023-01-03Change frontmatter injection ordering (#5687)Gravatar Ben Holmes 29-204/+234
* feat: make user frontmatter accessible in md * test: new frontmatter injection * refactor: move injection utils to remark pkg * fix: add dist/internal to remark exports * feat: update frontmater injection in mdx * tests: new mdx injection * chore: changeset * chore: simplify frontmatter destructuring * fix: remove old _internal references * refactor: injectedFrontmatter -> remarkPluginFrontmatter * docs: add content collections change * chore: changeset heading levels
2023-01-03Cleanup internal breaking changes (#5724)Gravatar Bjorn Lu 4-33/+7
* Remove Astro.glob template literal trick * Remove RenderTemplateResult toString * Remove astro add volar warning * Add changeset
2023-01-03Fix astro-embed peerDep issue (#5731)Gravatar Matthew Phillips 2-2/+2
* Fix astro-embed peerDep issue * Update lockfile
2023-01-03Fix missing ts flag on main (#5730)Gravatar Matthew Phillips 1-0/+1
2023-01-03[ci] formatGravatar matthewp 3-10/+2
2023-01-03Remove MDX Fragment hack (#5716)Gravatar Bjorn Lu 2-9/+6
* Remove MDX Fragment hack * Update .changeset/lovely-terms-drive.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2023-01-03Remove deprecated APIs (#5707)Gravatar Bjorn Lu 18-217/+87
* Remove deprecated Astro globals * Remove deprecated hook param * Fix test * Add changeset * Add TODO
2023-01-03Unflag experimental features (#5728)Gravatar Nate Moore 13-122/+26
* feat: unflag `--experimental-error-overlay` * feat: unflag `--experimental-prerender` * chore: add changeset * Update chilled-geese-worry.md * test: update test to use `mjs` * Update .changeset/chilled-geese-worry.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Update chilled-geese-worry.md Co-authored-by: Nate Moore <nate@astro.build> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2023-01-03Upgrade to Vite 4 (#5685)Gravatar Bjorn Lu 21-3459/+337
* Upgrade Vite 4 * Simplify Svelte preprocess setup * Upgrade rollup * Fix tests * Fix wrong changeset target * Fix error tests * Set NODE_ENV default
2023-01-03[ci] update lockfile (#5686)Gravatar Fred K. Bot 4-3215/+2864
* [ci] update lockfile * Fix build errors from new TypeScript version * Updated lockfile Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com> Co-authored-by: Matthew Phillips <matthew@skypack.dev>