Граф коммитов

267 Коммитов

Автор SHA1 Сообщение Дата
Sarah Schneider 634ef767bc see if downgrading sass fixes the staging failure 2021-06-08 12:43:03 -04:00
Sarah Schneider ae8e4dfa9b rewrite get-english-headings to use AST instead of regex 2021-06-08 10:03:50 -04:00
Grace Park e8c6d272d0
Merge branch 'main' into localization-grace 2021-06-07 13:19:03 -07:00
James M. Greene 3ed5bb77da
Clean up dependencies (#19633)
* Just use core Node assert module instead of the browserify one

* Get peerDeps for styled-components into lockfile

* Remove 2 unused csv-parse(r) devDeps that probably got installed during interviews LOL whoops

* Remove unused jest-silent-reporter devDep

* Remove unused mime devDep

* Remove unused postcss devDep

* Remove unused process devDep

* Update sass devDep to latest

* Reintroduce postcss devDep

Error: Cannot find module 'postcss'
Require stack:
- /home/runner/work/docs-internal/docs-internal/node_modules/cssnano-simple/src/index.js
- /home/runner/work/docs-internal/docs-internal/node_modules/next/dist/build/webpack/plugins/font-stylesheet-gathering-plugin.js
- /home/runner/work/docs-internal/docs-internal/node_modules/next/dist/build/webpack-config.js
- /home/runner/work/docs-internal/docs-internal/node_modules/next/dist/build/index.js
- /home/runner/work/docs-internal/docs-internal/node_modules/next/dist/cli/next-build.js
- /home/runner/work/docs-internal/docs-internal/node_modules/next/dist/bin/next
2021-06-02 10:43:39 -05:00
Grace Park a3e36c0d6a
Merge branch 'main' into localization-grace 2021-06-01 15:45:42 -07:00
Grace Park 8b52946af0 updating to add 2nd preference and accept-language-parser module 2021-06-01 15:45:02 -07:00
Mike Surowiec 2de358187c
Performance testing NextJS / React (#19540)
* Remove json.parse(json.stringify( usage to improve performance
* Fix missing / duplicate keys in some renders
* Fix missing react-is dependency (only seemed to cause problems from pruning on the heroku deploy)
* Add nextjs tag to datadog-connect config when nextjs is a query param
* Fix router.asPath usage to exclude query param
* Fix styling inconsistencies noticed when testing
* Add a few tests
2021-05-27 15:17:27 -07:00
James M. Greene 542a459c06
Move script-only dependencies to devDependencies (#19542)
* Move lib/search/sync.js to script/search/sync.js

* Move mdast-util-from-markdown to devDeps

* Move lib/redirects/add-redirect-to-frontmatter.js to script/helpers/

* Move mkdirp to devDeps

* Move linkinator to devDeps

* Move rimraf to devDeps

* Fix script/search/sync.js require paths

* Move lib/search/build-records.js to script/search/

* Move lib/search/find-indexable-pages to script/search/

* Fix require paths for build-records

* Fix require paths for find-indexable-pages

* Move lib/search/algolia-get-remote-index-names.js to script/search/

* Movbe lib/search/algolia-search-index.js to script/search/

* Move lib/search/lunr-search-index.js to script/search/

* Move lib/search/lunr-get-index-names.js to script/search/

* Fix Lunr search index paths

* Move lib/search/validate-records.js to script/search/

* Move is-url to devDeps

* Move lib/search/algolia-client.js to script/search/

* Move lib/search/parse-page-sections-into-records.js to script/search/

* Move lib/search/rank.js to script/search/

* Fix path to cached-index-names.json file

* Normalize require for fs.promises
2021-05-25 20:44:19 +00:00
Mike Surowiec 37f73f0bb3
Heroku dev deps (#19431)
* fix: req.csrfToken doesn't always exist (e.g. 500 page)

* feat: update dockerfile and add nextjs to build

* fix: run linter

* move @babel deps -> dev deps

* move webpack looking things from deps -> dev deps

* move pa11y-ci to optional dep

* explicitly include optional deps for pa11y

* allow heroku dev deps to be installed

* fix: update postcss module

* fix: update dockerfile build

* tmp: disable renderReact

* see if another deploy is slower/faster

* move a few more packages to devDeps

* upgrade to package-lock v2

* use dayjs instead of date-fns

* move cross-env to devDeps

* remove unused 'del' package

* commit husky precommit hooks

* add hrtime to clone-for-build.js

* Revert "add hrtime to clone-for-build.js"

This reverts commit 70ee647bacce833f4ed2f621f62c63c1d85e5413.

* update babel/eslint

* fix: remove unused plugin

* try a .slugignore

* fix: heroku-postbuild to use npm run build

* fix: i cannot spell dereferenced

* add .next/cache to heroku cacheDirectories

* test cached build

* remove aws-sdk, see what breaks

* move jest-puppeteer to optional deps

* fix: update browser-test.yml to use newer node version

* move jimp to optional dependencies

* move puppeteer to optional dependencies

* fix: ci optional include

* fix: bad copy pasta

* remove previous react experiment

* update tests/README.md with note about optional deps

* bump node test version back to 14

* convert package-lock back to v1

* fix: use node 15.x to leverage npm optional deps

* fix: optional dep install

* test: see what happens with heroku/nodejs-typescript buildpack

* back to heroku/nodejs buildpack

* move jest to optional

* revert jest move

* remove .slugignore

* cleanup dockerfile, move xlsx-population to optional, add comment about optional deps

* Update Dockerfile

Co-authored-by: James M. Greene <JamesMGreene@github.com>

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-05-24 15:40:50 -07:00
Mike Surowiec e46422de6a fix: update husky usage 2021-05-20 13:36:46 -07:00
Mike Surowiec c4166202a1 feat: upgrade to node v16, package-lock.json v2, remove aws-sdk 2021-05-20 13:32:19 -07:00
Kevin Heis afa551f2ee
Upgrade AJV (#19443)
* Upgrade AJV

* Fixes for AJV upgrade

* lint fix

* Update index.tsx
2021-05-20 17:46:04 +00:00
Kevin Heis f6acb1f08a
Update dependencies (#19408)
* Update dependencies 2

* Lint fixes

* Update graphql packages

* Update changelog-entry.json

* Update @octokit/rest

* Update commander with help from @rachmari

@rachmari

* Upgrade helmet

* Upgrade js-yaml

* Update server.js

* Update cheerio

* Revert "Update cheerio"

This reverts commit 8aa17c39fbf564ee554037d89e7a473027d16984.
2021-05-19 17:32:47 +00:00
Mike Surowiec e716172ba6
Merge branch 'main' into sponsors-react-3 2021-05-11 13:41:15 -07:00
Mike Surowiec 744051006f
Merge branch 'main' into sponsors-react-2 2021-05-11 13:34:38 -07:00
Mike Surowiec f0fe065cef feat: implement changelog feed, guide section 2021-05-10 15:17:52 -07:00
James M. Greene ed0f942cf2
Merge branch 'main' into dependabot/npm_and_yarn/lodash-4.17.21 2021-05-07 17:16:11 -05:00
Mike Surowiec e3ff452f47 feat: add primer/components, wire up SSR for styled-components 2021-05-06 15:07:15 -07:00
Mike Surowiec 8930036e67
Merge branch 'main' into sponsors-react-1 2021-05-06 13:58:54 -07:00
dependabot[bot] de7cc2db05
Bump lodash from 4.17.20 to 4.17.21
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-06 18:46:59 +00:00
Mike Surowiec e10c29b1fb feat: use eslint for dependency checks 2021-05-06 08:31:04 -07:00
Mike Surowiec f3a029b6dd feat: add SupportSection 2021-05-05 15:58:21 -07:00
Mike Surowiec 34dcba51f1 feat: add DefaultLayout, add to sponsors landing page 2021-05-05 14:54:49 -07:00
Mike Surowiec eaddbc5db7
feat: add nextjs middleware handling (#19139)
* feat: add nextjs middleware handling split

* fix: eslint errors

* fix: filter boolean from csp list

* fix: feature flag nextjs server start

* feat: add prettier rules for ts,tsx files

* fix: remove unnecessary async from next middleware

* fix: next middleware name

* Update tsconfig.json

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* Update next-env.d.ts

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* fix: add typescript linting to lint command

* add comment for unsafe-eval, update webpack to use eval in development

* fix: feature flag typo

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-05-05 15:23:46 +00:00
James M. Greene 816a7bbc4e
Follow-up for removing stale apps (#19056)
* Use existing 'github' script helper to get Octokit instance

* Move @octokit/rest to devDeps

We only use it in scripts, currently

* Removed outdated delete-unused-staging-apps script
2021-04-29 11:09:34 -04:00
dependabot[bot] 7e7f17c3f8
Bump redis from 3.0.2 to 3.1.1 (#5775) 2021-04-28 16:38:05 -07:00
Marc-Andre Giroux 2deb8275da
Accept glob patterns for source files in openapi-check script (#18965)
Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-04-26 21:56:12 +00:00
James M. Greene 919054f91c
Update npm dependencies to address Dependabot security alerts (#18992)
* npm audit fix

Addresses 1 Dependabot security alert for marked@<2.0.0, which is a dependency of linkinator

https://github.com/advisories/GHSA-4r62-v4vq-hr96

* Update jest to latest, which updates node-notifier@<8.0.1, to address 1 Dependabot security alert

https://github.com/advisories/GHSA-5fw9-fq32-wv5p

* Update rehype-highlight to latest, which updates highlight.js@<10.4.1, to address 1 Dependabot security alert

https://github.com/advisories/GHSA-7wwv-vh3v-89cq
2021-04-26 21:21:09 +00:00
Mike Surowiec 4a931237ea
Merge branch 'main' into update-webpack-dep 2021-04-13 16:55:31 -07:00
Mike Surowiec 1c5cd44a83 fix: move ajv from devDeps to deps 2021-04-13 16:49:31 -07:00
Kevin Heis 46c16001c3
Upgrade Primer with translation shim for trashcan icon (#18735)
* Revert "Revert "Upgrade Primer CSS to 16 (#18713)""

This reverts commit c01d3e302e.

* Add a hack to handle trashcan icon in translated content
2021-04-13 18:38:04 +00:00
Mike Surowiec c01d3e302e Revert "Upgrade Primer CSS to 16 (#18713)"
This reverts commit 49377f9096.
2021-04-13 09:19:28 -07:00
Kevin Heis 49377f9096
Upgrade Primer CSS to 16 (#18713)
* Upgrade primer to 16

* Upgrade colors in scss

* Get SCSS to build

* Initial dark mode support

* trashcan -> trash

* More specific search browser test

* Fix link color on homepage

* Update overrides.scss

* Upgrade some colors to primer variables

* Hide dark mode support for now

* Apply suggestions from code review

* Update overrides.scss
2021-04-13 16:00:46 +00:00
Sarah Schneider 53b7208fe9
Merge branch 'main' into update-webpack-dep 2021-04-09 12:22:18 -04:00
Vanessa Yuen bbd9f03f6e
Populate product-landing "What's new" section using GitHub Changelog (#18328)
Co-authored-by: Jason Etcovitch <jasonetco@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>
2021-04-08 20:51:37 +00:00
Sarah Schneider 62955e3843 fix browser tests for webpack 5 2021-04-07 12:05:09 -04:00
Sarah Schneider d75621aa0e update webpack plugins and remove friendly-errors-webpack-plugin abandonware 2021-04-07 11:26:39 -04:00
Sarah Schneider 583914fc8c sigh retry assert in dependencies 2021-04-07 08:27:44 -04:00
Sarah Schneider 640b9866db move assert to devdeps 2021-04-06 19:19:41 -04:00
Sarah Schneider 274ef8287a update webpack to resolve dependabot alert 2021-04-06 16:33:03 -04:00
Sarah Schneider 107b8e5bc0
Move scheduled tasks code into docs repo (#17926)
Co-authored-by: Rachael Sewell <rachmari@github.com> - https://github.com/github/docs-internal/pull/18453
2021-04-02 12:42:41 -07:00
James M. Greene d8e0b29fcd
Use node-redis for soft-purging cache on deploy (#18474)
* Use [node-]redis as a direct dependency

* Extract Redis client creation to its own module

* Attach extensive logging in the Redis client creation module

* Allow the rate limiter to pass requests when Redis is disconnected

* Update rate-limit-redis

* Default error input to empty object for formatRedisError method

* Provide a name for the rate limiter's Redis client

* Include redis-mock, exclude ioredis/ioredis-mock

* Remove unused RedisAccessor#exists method

* Switch RedisAccessor to use redis/redis-mock

* Provide a name for logging on the Redis page cache

* Remove extraneous trailing space from Redis logging prefix

Our updated use of console.* will already be adding a space after the prefix

* Replace ioredis-mock with redis-mock in tests

* Revert removal of ioredis dependency

* Bind Redis client to async promisified methods

* Extract former RedisAccessor constructor tests to new create-client tests

* Update RedisAccessor tests to work with the callback-based redis client

* Handle formatting Redis errors (or not) with more resiliency

* Remove ioredis as a dependency

* Update Redis soft-purging script to use node-redis

* Do more promisifying for less ugly code

* Add comment explaining TTL of -1

* Make the script executable
2021-03-30 20:40:28 +00:00
James M. Greene 84547e54c7
Use node-redis for page cache (#18421)
* Use [node-]redis as a direct dependency

* Extract Redis client creation to its own module

* Attach extensive logging in the Redis client creation module

* Allow the rate limiter to pass requests when Redis is disconnected

* Update rate-limit-redis

* Default error input to empty object for formatRedisError method

* Provide a name for the rate limiter's Redis client

* Include redis-mock, exclude ioredis/ioredis-mock

* Remove unused RedisAccessor#exists method

* Switch RedisAccessor to use redis/redis-mock

* Provide a name for logging on the Redis page cache

* Remove extraneous trailing space from Redis logging prefix

Our updated use of console.* will already be adding a space after the prefix

* Replace ioredis-mock with redis-mock in tests

* Revert removal of ioredis dependency

* Bind Redis client to async promisified methods

* Extract former RedisAccessor constructor tests to new create-client tests

* Update RedisAccessor tests to work with the callback-based redis client

* Handle formatting Redis errors (or not) with more resiliency
2021-03-29 17:34:22 +00:00
Vanessa Yuen a8d54c9af7
Improvements in tools to help merge crowdin PRs (#18409)
- add `script/test-render-translation.js` to render all translated content to catch malformed liquid that would cause render errors
- improve test output for `script/fix-translation-errors.js` and `tests/content/lint-files.js`
- make it so `script/reset-translated-file.js` can handle files that have been renamed
2021-03-26 19:21:45 +00:00
James M. Greene 23bcc0bb06
Use node-redis for rate limiter (#18416)
* Use [node-]redis as a direct dependency
* Extract Redis client creation to its own module
* Attach extensive logging in the Redis client creation module
* Allow the rate limiter to pass requests when Redis is disconnected
* Update rate-limit-redis
* Default error input to empty object for formatRedisError method
* Provide a name for the rate limiter's Redis client

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-03-25 23:54:25 +00:00
James M. Greene 6e20ed7927
Implement app clustering (#17752)
* Install throng for easy cluster management
* Extract the Express app construction into its own file
* Switch server.js to use app clustering for deployed environments
* Worker count is based on the lesser of process.env.WEB_CONCURRENCY and the count of CPUs
* Reading clustered output is difficult, let's prefix the std{out,err} streams

Co-authored-by: Jason Etcovitch <jasonetco@github.com>
2021-03-19 20:07:46 +00:00
Rachael Sewell e067616355
add script to read topics spreadsheet (#18175) 2021-03-11 17:20:27 -08:00
James M. Greene fd7d0eeb1a
Add timeout and abort middleware and processing halts (#18177)
* Add middleware to timeout requests after a period

* Add halt-on-dropped-connection middleware to stop the middleware processing stack if the connection was already dropped

* Add a few strategic bail-out spots for dropped connections during the render-page middleware

* Handle 404s and HEAD requests earlier in the page rendering flow

* Add a few more strategic bail-out spots for dropped connections during the render-page middleware

* Add middleware to notice aborted requests

* Add a check for aborted requests into the isConnectionDropped logic

* Reformat comment for consistency

* Handle aborted requests correctly in the error handler

* Explicit returns for consistency
2021-03-09 19:14:02 +00:00
Jason Etcovitch 7e3229e39a
Fix translated glossary links (#17734)
* npm start should be ja

* Add special handling for glossary headings

* Don't sort glossary

* Use English slug to maintain anchor, re-add sort
2021-02-12 19:23:40 +00:00
Rachael Sewell 01e52046f0
migrate away from AWS S3 (#17669) 2021-02-12 10:25:45 -08:00
Jason Etcovitch e68e6a5185
Revert "Revert "Absorb @github-docs/frontmatter (#17783)" (#17793)" (#17799)
* Revert "Revert "Absorb @github-docs/frontmatter (#17783)" (#17793)"

This reverts commit 11baf43eee.

* Move revalidator to depedencies
2021-02-11 11:15:59 -05:00
Jason Etcovitch 6e0c2319b4
Set engines.node to 14+ (#17777)
* Set engines.node

* Add setup-node to browser-test workflow

* Updoot ianwalter/puppeteer-container
2021-02-11 15:40:08 +00:00
Jason Etcovitch 11baf43eee
Revert "Absorb @github-docs/frontmatter (#17783)" (#17793)
This reverts commit 1e96c03489.
2021-02-10 20:28:41 +00:00
Jason Etcovitch 1e96c03489
Absorb @github-docs/frontmatter (#17783) 2021-02-10 15:10:46 -05:00
Jason Etcovitch 39e0e0dda1
Use Liquidjs instead of Liquid (#16743)
* Install liquidjs, uninstall liquid

* Comment a bunch of stuff out to get going

* Fix invalid includes

* Fix all includes (path => 'path')

* Get the homepage to render

* Do link-in-list kinda

* Revert "Fix all includes (path => 'path')"

This reverts commit d6fead646353aa5041d9229470a62a1d487456b9.

* Support non-dynamic partials

* Extract getTemplate helper

* Do remaining custom Liquid tags

* Fix some custom tag bugs

* Moar bugs

* Re-add link tag

* Cleaner diff

* Actually fix extended markdown tags

* Fully comment out version matchers

* Smaller diff

* Rely only on Liquid internals for conditionals

* Use new operators option in Liquid engine

* Fix link.js

* Don't need options

* Updoot to the right doot

* Fix some bugs

* Fix another bug

* Pass a test

* Fix the translate bits

* Adjust a test

* Fix another invalid Liquid bug

* Two more borked translations

* Found some more

* Don't need this change

* Revert "Don't need this change"

This reverts commit a916d619747f0492865a69c3e237c97c4d4e7fad.

* This should fix the broken links

* Missed one

* Revert "This should fix the broken links"

This reverts commit e6c2cc0d9055d958706260d57edbe293281c150e.

* Revert "Missed one"

This reverts commit bbe1f23baf16e020f6f7931589decb1afc75dfbd.

* Updoot liquidjs
2021-02-08 12:58:51 -05:00
James M. Greene f7ec320b64
npm audit fix (#17675) 2021-02-06 23:57:14 +00:00
Kevin Heis e07c603b7d
Remove html-truncate, truncate with CSS instead (#17630)
* Remove html-truncate, truncate with CSS instead

* Update search.js
2021-02-02 17:55:05 +00:00
Vanessa Yuen a1d93a7619
Lint translation files (#17561)
### Why:

A lot of content gets mistranslated, some common patterns are: frontmatter date and enums getting translated, liquid tags get translated or go missing during the translation process. These translation errors are tough to catch, especially when they often come in huge PRs. 

### What's being changed:

- Frontmatter is also getting linted against schema as part of `lint-files`
- When an environment variable `TEST_TRANSLATION` is passed,
   - `lint-files` will run its tests against all files that have been newly translated (by git-diffing between `translations` branch and `main` branch), and
   - results are outputted using a custom jest reporter. The output is formatted in a way that makes it easy to exclude the problematic translated files from being merged, and to share the errors with [localization support](https://github.com/github/localization-support/issues/489). 
- Run the implemented translation test as part of the existing `Node.js Tests - Translations` workflow
2021-02-01 17:59:33 +01:00
Jason Etcovitch 53ad15c959
Use hast-util-to-string to get heading text (#17576) 2021-01-29 21:42:35 +00:00
Jason Etcovitch bd63f47636
Remove cheerio from Page#render (#17566)
* Write our plugin

* Include it

* Move the RegEx

* Don't rewriteLocalLinks with cheerio anymore

* Process after HTML ast is generated

* Use the same logic as before, just to see if it'll pass

* Don't require languageCode/version

* Only work on local links

* Needs an href

* Only update href if there's a new one to use

* Check for node.properties

* Some links are just mean

* Move use-english-headings to be a plugin

* Bail if no englishHeadings were passed

* Install rehype-wrap

* Wrap ol > li img in div.procedural-image-wrapper

* Test for platform without cheerio

* Use a plugin for rewriteAssetPathsToS3

* Remove cheerio from page.render

* Fix require paths

* SImplify

* Fix some 🐛s

* Use our own rehype-wrap

* Move rewriteAssetPathsToS3 after HTML AST

* Remove some console logs

* Fix check for includesPlatformSpecificContent

* Rename ast => tree
2021-01-29 15:44:50 -05:00
Kevin Heis 8b86fd8fef
Reduce minified JS bundle size from 189kb to 73kb (#17552) 2021-01-28 22:12:04 +00:00
Jason Etcovitch 2572d7bb85
Remove hubdown and use our own markdown pipeline (#17551)
* Uninstall hubdown, install unified deps

* Create create-processor

* Use it

* Update a doc

* Tweak the language

* Use the same versions that hubdown used
2021-01-28 17:06:19 -05:00
Kevin Heis d9d61f42ef
Add Lunr as a site search option (#17388)
* Add Lunr as a site search option

* Use a class like the Algolia option does

* Lint

* Working on showing real content, prep for highlighting

* Move searching to their own files

* Split out ridiculous fn

* Add highlighting

* Less lunr search code

* A little more tidy

* Then chain on write too

* Mark from server too

* Write a batch of indices

* Update compress.js

* Highlighting with fewer calls

* Update lunr-search.js

* Update lunr-search.js

* Update lunr-search.js

* Update lunr-search.js

* Update lunr-search.js

* Update lunr-search.js
2021-01-28 19:38:22 +00:00
Jason Etcovitch 4a761418a9
Add a test for the WIP language banner link change (#17480)
* Add a test

* Try adding de

* Let's try all languages
2021-01-26 20:06:58 -05:00
Jason Etcovitch b4171bf0d5
Use AST parsing for lint file checking (#17471)
* Add markdown parsing dependencies

* Use it for the link test

* Use ast tests for hard-coded language

* Dedupe visiting for links

* Add new mdast utils to check-deps exclusions
2021-01-26 17:45:23 +00:00
Kevin Heis 99a85ff4ef
Push query string when searching (#17417)
* Push query string when searching

* Update search.js

* Fix browser test, remove querystring dependency (new shiny!)

* Remove language and version from visible URL

* Avoid casting event interface

* Update search.js

* Update browser.js
2021-01-25 11:52:55 -08:00
Sarah Schneider 6bbd10838d we do not need this env var anymore 2021-01-22 10:07:13 -05:00
Sarah Schneider b0677b2442 use script instead of jest, much faster 2021-01-22 09:28:06 -05:00
Sarah Schneider 0c5b78ee3b use linkinator for internal link checking 2021-01-21 16:36:22 -05:00
Kevin Heis 2fb2e962bc
Move site search to use an endpoint (#17359)
* Move site search to use an endpoint

* Update browser.js

* Update search.js

* Update lib/search/versions.js

Co-authored-by: James M. Greene <JamesMGreene@github.com>

* Fix URLs

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-01-20 15:37:42 +00:00
Sarah Schneider 03d7260abb update linkinator 2021-01-12 10:02:59 -05:00
James M. Greene 068c472084
Cache rendered pages in Redis (#17106)
* Explicitly set the Redis database number used for rate limiting

* Switch to using ioredis as the Redis client for rate limiting

* Install ioredis-mock as a primary dependency

* Create a Redis BasicAccessor class and tests

* Switch rendered page caching to use Redis for storage

* Add support for additional Redis SET options like TTLs

* Remove currently unused methods

* Rename redis-accessors/basic to redis-accessor and remove extra fluff

* Change default behavior for cache setting to throw if an error occurs

Add option allowSetFailures to facilitate graceful failures

* Allow SET failures to fail gracefully for the rendered page cache

* Remove as-yet unneeded serialization options from RedisAccessor

* Move Redis client construction into RedisAccessor constructor, just pass in databaseNumber as option

* Remove rendered-page-cache in favor of direct RedisAccessor use

* Add tests for RedisAccessor constructor param validations

* Eliminate one roundtrip to Redis for the cached HTML existence check

Are we fast yet?

* Set a rendered page cache TTL of 24 hours
2021-01-06 15:30:51 -06:00
Kevin Heis 59f375ab1d
Merge branch 'main' into default-platform 2020-12-16 14:36:46 -08:00
Kevin Heis 0f685115f7
Revert file reads from async to sync (#16979)
* Revert file reads from async to sync

* Async funness

* Fix warm server timers

Co-authored-by: Chiedo John <chiedo@chiedosbmacbook.lan>
2020-12-15 22:04:41 +00:00
Jason Etcovitch eaf2a67fa1
Use connectDatadog(e) (#16888)
* npm i connect-datadog

* Add connectDatadog middleware

* Add comments

* Use DD_API_KEY to gate

Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
2020-12-11 13:13:18 -05:00
Simran Spiller 4afc7d4035 Merge remote-tracking branch 'upstream/main' into default-platform 2020-12-11 01:13:32 +01:00
Vanessa Yuen f44d5aa648
Add VS Code debugger config (#16819)
* add config for using vscode debugger

reference: https://github.com/Microsoft/vscode-recipes/tree/master/nodemon

* some docs

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2020-12-10 18:37:06 +00:00
Kevin Heis e7406b7336
Merge branch 'main' into default-platform 2020-12-09 15:06:30 -08:00
Kevin Heis 1b424dfdc4
Bring in data-directory, let's go async file reads (#16782)
* Bring in data-directory, let's go async file reads

* Lint fixes

* Update glossary.js
2020-12-09 11:20:24 -08:00
Kevin Heis 62889986b6
Revert "Revert "Speed up warmServer by loading pages (and files) asyn… (#16837)
* Revert "Revert "Speed up warmServer by loading pages (and files) asynchronously (#16752)" (#16835)"

This reverts commit a14517115f.

* Move async to regular dependencies

* Update package-lock.json
2020-12-09 17:40:58 +00:00
Simran 2a3fdd43ac
Merge branch 'main' into default-platform 2020-12-09 02:06:46 +01:00
Simran Spiller 5522b58b4d Use cross-env for package script 'browser-test-tests'
Fixes 'npm run browser-test' for Windows
2020-12-09 01:26:18 +01:00
Meg Bird 754ceda517
[Universe] Discussions Public Beta (#16547)
* Update README

* create structure for discussions landing page

* is everything broken

* [Universe] Dark mode (#16545)

* Fix title

* Add Discussions product

* Correct title

* Correct title

* Move quickstart article

* Move quickstart back out into article

* Add and incorporate reusables

* Move information about search

* Draft conceptual information

* Draft best practices

* Draft further reading

* Draft product introduction

* Draft introduction

* Add author metadata

* Pluralize

* Fix typos

* Add introduction

* Bump Octicons

* Add some reusables

* Add images

* Revise article

* Draft article

* Change word

* 🔪 the gerund

* Add reusable

* Revise introduction

* Revise list

* Simplify

* Revise reusable

* Fix reusable; add context

* Rename reusable

* Deduplicate conceptual information

* 🔪 gerund

* Add link to further reading

* Move link and dispose of tip

* Delete space

* Add images

* Add conceptual section

* Add word

* Delete newline

* Revert package.json to state on main

* Tweak images

* Draft article

* Add product name

* Remove beta note

* Use product name for future-proofing

* Begin adding search information

* Fix copypasta

* little edits

* build out a bit more of the guides content

* Don't mention integrations for now

* Escape quote

* Remove authorship information for new defaults

* Finish drafting article

* Replace encoded character to match description

* Revise away inline link

* Accommodate 'for more information' in reusable

* Fix links

* Fix one last bit of copypasta

* Update indices

* Temporarily remove heading

* Update introduction

* Add new article 💀

* Remove commits from universe-2020-megabranch

* Add article 💀

* update with a very rough draft

* Add content about collaboration options to "About repositories"

* Add content about discussions to "About issues"

* Reorder content

* Add is:discussion query

* update with a few mmore fleshed out sections

* update with more structure

* Add reusable

* Add screenshots

* Clear way for actual procedural

* Discussions landing page "Communities" section (#16692)

* Make button Overview-able

* Make card filtering more extensible

* Guard for missing attributes

* Use arbitrary dataset attributes

* Add section with discussions-community-card

* Tweak show more button behavior

* Conditionally show "Show more"

* Add beta_product frontmatter/label

* Remove beta callout note

* Hide changelog with no items

* Finish importing community info

* Fix borked markup

* Omit search abr

* Two columns should actually be two columns

* Use org image, change card layout

* Add two more examples

* Fix title

* Escape quote

* Escape another quote

* Draft article

* Lower case

* Relocate conceptual information

* Update qualifier name

* Draft article

* Add conceptual information and links

* Remove duplicative section

* Fix copypasta

* Revise reusable

* Update link

* Add content on categories

* Lint the discussions YAML file

* Update introduction and permissions

* 

* Reusablize; fix link

* more planning content stuff

* Escape quotes

* Align prerequisites

* Soften

* Clean up prerequisites

* Fix titles; version; add screenshot

* Fix links

* Actually fix links

* Use better variable

* Mention pinning

* Update screenshots

* Add screenshot

* forgot to committ

* update with reusable

* add that screenshot

* beef up landing page a bit

* remove extra space

* messed that up

* fix hardcoded linkks weirdo

* fix tests

* update with permissions content

* update with placeholder

* filter out standalone category files from test

* update

* update @becca's  feedback

* update with more feedback

* so many updates

* fix links

* fix some more tests

* flesh some more things out

* update with further reading blah blah

* fix some things

* remove the gate-features label for beta ship only

* Add discussions video to product landing page (#16759)

* Add discussions video placeholder

* This might work maybe

* fix tests

* apply all of @becca's and @lecoursen's  feedback ❤️

* rename to fix test

* Revert "Add discussions video to product landing page (#16759)"

This reverts commit 2247e5d0881ca6b36cee421218e8341a7cc12ac7.

* update with test fix

Co-authored-by: Melanie Yarbrough <11952755+myarb@users.noreply.github.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Jason Etcovitch <jasonetco@github.com>
Co-authored-by: Sarah Schneider <sarahs@github.com>
2020-12-07 15:00:35 -07:00
Octomerger Bot 218d08f38d
Branch was updated using the 'autoupdate branch' Actions workflow. 2020-12-03 12:53:19 -08:00
Kevin Heis d8302841a9 Readd new packages 2020-12-02 14:13:08 -08:00
Kevin Heis 0c3309d66e Reset package.json and package-lock.json 2020-12-02 14:10:47 -08:00
Sarah Schneider 1258092a41 Merge branch 'main' of github.com:github/docs-internal into hidden-docs-alt 2020-12-02 14:22:10 -05:00
Robert Mosolgo a7d042a898
Merge branch 'main' into build-changelog 2020-12-02 13:56:50 -05:00
Sarah Schneider 7628caa417 Merge branch 'main' of github.com:github/docs-internal into hidden-docs-alt 2020-12-02 12:47:54 -05:00
James M. Greene 684a72077f
Fix the browser tests by using a newer version of Puppeteer (#16707)
Improve 2 async-callback-based tests by counting their assertions
2020-12-01 19:17:05 -06:00
Sarah Schneider b244d447dd Merge branch 'main' of github.com:github/docs-internal into hidden-docs-alt 2020-12-01 12:38:48 -05:00
Robert Mosolgo caf4add9a5 Move mockdate to devdependencies 2020-11-25 16:44:48 -05:00
Robert Mosolgo 9e5d72eb42 Merge branch 'main' into build-changelog 2020-11-25 16:32:10 -05:00
Jason Etcovitch 4484068e01
Move render-content code to this repo (#16544)
* Move render-content files in here

* Replace existing file with nested index.js

* Copy in tests and jest-ify

* Update docs

* Uninstall @github-docs/render-content

* Bring over README

* Add missing dependencies

* Fix require paths
2020-11-25 11:20:23 -05:00
Robert Mosolgo aeedfac37e Add graphql tests to CI, move snapshots to fixures, use mockdate 2020-11-25 11:12:13 -05:00
Sarah Schneider 8f0093c63a
OpenAPI tooling updates (#16320) 2020-11-24 12:20:10 -08:00
Sarah Schneider c14ab26e40 ran npm i @actions/core --save-dev 2020-11-24 12:10:15 -05:00
Robert Mosolgo 3ad453e28b remove needless package 2020-11-23 08:45:07 -05:00
Robert Mosolgo 2400be9528
Merge branch 'main' into build-changelog 2020-11-23 08:44:32 -05:00
Lucas Costi fa4cfe0a9f
Bump rest-api-operations (#16584) 2020-11-23 14:19:32 +10:00
Jason Etcovitch 9332c62195
Sm0ller webpack output (#16543)
* Install friendly-errors-webpack-plugin

* Use it
2020-11-19 13:06:20 -05:00
Robert Mosolgo 7e07c1c831 Add build-changelog script, load schemas and create a diff 2020-11-18 17:08:56 -05:00
James M. Greene d402a60833
Merge branch 'main' into hidden-docs-alt 2020-11-17 17:56:25 -06:00
Jason Etcovitch 8f2b4eb450
Merge branch 'main' into repo-sync 2020-11-17 18:02:58 -05:00
Nick Schonning b6de7c6887
chore: Convert Standard to eslint-config-standard (#1328)
* chore: Move standard to ESLint config

* fix: auto-fix ESLint indent issues

* fix: ESLint prefer-regex-literals

* fix: ESLint array-callback-return

- .filter must return a boolean value
- .map replaced with forEach when the value isn't used

* fix: ESLint no-extra-semi
2020-11-17 16:18:18 -05:00
Kevin Heis 890e86cc46
Merge branch 'main' into hidden-docs-alt 2020-11-17 09:58:45 -08:00
Kevin Heis 4d2e25b429
Use Redis Store for rate limiting when available (#16484) 2020-11-16 15:55:07 -08:00
Nick Schonning 92740f68d7 chore: Add Prettier for Yaml formatting
Related to #128
- Prettier to fix indenting/quoting across files
- Manually adjust list styles to "-" style
- Ignore all translated files from automated formatting
- Drop redundant CI env variable
2020-11-16 16:12:49 -05:00
Kevin Heis dd02bfa007 Merge main 2020-11-16 10:07:53 -08:00
Jason Etcovitch 0730158918
Datadoge (#16464)
* Install hot-shots

* Add statsd client

* Add some metrics

* Add a comment

* Comment typo fix

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2020-11-13 15:49:50 -05:00
Shati Patel ef9bb5556a
Code scanning: Bump API version (#16456)
Fix description (see https://github.com/github/github/pull/162415)
2020-11-13 11:25:48 +00:00
Martin Lopes 5555a01405
[Nov 4] Adds updates to Interaction Limits API (#16290)
Co-authored-by: skedwards88 <skedwards88@github.com>
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
2020-11-12 18:05:51 -08:00
James M. Greene 5b6d704db7 Rename clone-early-access script 2020-11-10 16:01:35 -06:00
Sarah Schneider ce33df1cd3
New broken link report (#16412)
* add linkinator npm package

* add new script that uses Linkinator

* reorg the excluded links file and update comments

* replace blc artifacts with linkinator artifacts in .gitignore

* update the scheduled workflow to use the new script

* dismantle BLC scripts

* add workflow_dispatch event so we can test this manually

* npm uninstall broken-link-checker

* use different exit codes depending on whether broken links are found
2020-11-10 15:28:44 -05:00
James M. Greene e1f3f6457e
Merge branch 'main' into hidden-docs-alt 2020-11-09 13:09:52 -06:00
James M. Greene f410fd175c Mostly reverting github/docs-internal#15313 2020-11-09 13:07:04 -06:00
Lucas Costi 4a24bf1a26
Bump rest-api-operations for docs#410 (#16397) 2020-11-09 11:26:30 +10:00
Lucas Costi ace6bc52a4
Bump rest-api-operations (#16373) 2020-11-06 16:13:59 +10:00
Sarah Edwards 7e6aec6582
install rest api version 3.5.1 (#16366)
Co-authored-by: Leona B. Campbell <3880403+runleonarun@users.noreply.github.com>
2020-11-06 00:51:06 +00:00
James M. Greene 4868f97aca Explicitly add 'npm run build' to the 'heroku-postbuild' script as the Heroku build pack will only run one or the other by default 2020-11-04 11:24:11 -06:00
Sarah Edwards d64f03913c
install rest api version 3.3.2 (#16326) 2020-11-04 11:37:10 +10:00
Sarah Schneider 089e99b96c
Merge branch 'main' into hidden-docs-alt 2020-11-03 20:11:41 -05:00
Martin Lopes a7b33b6449
Adds API note about Search query behaviour (#16300)
Co-authored-by: Sarah Edwards <skedwards88@github.com>
2020-11-03 23:54:57 +00:00
Kevin Heis 8b8d6d24d3
Merge branch 'main' into hidden-docs-alt 2020-11-03 10:19:14 -08:00
James M. Greene 04e96560f4 Use Heroku postbuild so the dependencies are installed before cloning early access 2020-11-02 19:03:28 -06:00
James M. Greene 521d11b6a4
Merge branch 'main' into hidden-docs-alt 2020-11-02 18:03:48 -06:00
Nick Schonning 5c30c20f06 chore: Upgrade npm-merge-driver-install to v2 2020-11-02 16:56:02 -05:00
Nick Schonning 947192daca chore: Run npm audit fix 2020-11-02 16:54:55 -05:00
Laura Coursen a3e1733aa1
GitHub AE (GHAE) (#16090) 2020-11-02 15:12:44 -06:00
Sarah Schneider 63e3f917c6 Merge branch 'main' of https://github.com/github/docs-internal into hidden-docs-alt 2020-11-02 14:21:19 -05:00
Rachael Sewell 1fe4e51eaa
update openapi schema name (#16231) 2020-10-27 11:28:33 -07:00
Sarah Edwards 5777cb8502
update rest-api-operations to 3.2.1 (#16228)
* install rest-api-operations 3.2.1
2020-10-27 09:14:52 -07:00
Rachael Sewell 13c33d4039
[Shipping 10.23.20] add webhook config REST API (#16144)
* add webhook config REST API

* add versioning for dotcom/2.23+

* check for empty parameters with request bodies

* add latest rest-api-operation module

* Apply suggestions from code review

Co-authored-by: jmarlena <6732600+jmarlena@users.noreply.github.com>
2020-10-26 17:25:09 -07:00
Jason Etcovitch 73e445de55
Updoot liquid and render-content (#16215) 2020-10-26 15:04:57 -04:00
Sarah Schneider 129641c359 add separate clone script to be run as heroku-prebuild script or locally by docs writers 2020-10-22 11:20:09 -04:00
Sarah Schneider 4341a92e7f Merge branch 'main' of https://github.com/github/docs-internal into hidden-docs-alt 2020-10-22 10:07:56 -04:00
Lucas Costi b3d62c0d47
Update rest-api-operations dependency for docs#590 (#16164) 2020-10-22 11:39:33 +10:00
Sarah Schneider 07d090ec19 use early-access-test 2020-10-21 16:41:30 -04:00
Sarah Schneider 0304ff3846 testing testing 2020-10-21 16:32:06 -04:00
Sarah Schneider 1a0c41bfca testing testing 2020-10-21 16:29:04 -04:00
Sarah Schneider 71bfc0d45e go back to old access key for testing 2020-10-21 16:24:15 -04:00
Sarah Schneider f355a2ee96 use GITHUB_TOKEN for clone 2020-10-21 15:47:20 -04:00
Sarah Schneider 3170d8c98c try heroku prebuild script 2020-10-21 15:41:02 -04:00
Kevin Heis 380c4dcc82
Hydro exit event (#16067)
* Start a basic exit event

* Combine to one performance function

* Lint

* Fancy operators

* Update events.js

* Update events.js

* Update cookie-settings.js

* Add scroll tracking

* Tell "standard" to use babel-eslint

* Throttle scroll tracking

* Lint

* Use sendBeacon

* Update index.js
2020-10-21 09:42:02 -07:00
Chiedo 89d745b164 Remove uneeded code 2020-10-20 09:03:32 -04:00
Kevin Heis 8982d200cc
Migrate experiments and helpfulness to Hydro (#16059)
* Migrate experiments and helpfulness to Hydro

* Clean out old tests

* ...and more old tests to delete
2020-10-19 14:31:54 -07:00
Chiedo b1fa93f5dc Move object hash to dependencies 2020-10-19 09:27:58 -04:00
Chiedo 35c38e5781 Add CodeEditor example 2020-10-19 09:24:09 -04:00
Chiedo d51688b281 Everything working but CodeEditor 2020-10-19 09:04:03 -04:00
Chiedo c5a34e49e3 Set up foundations for code switcher 2020-10-18 22:03:44 -04:00