1
0
mirror of synced 2025-12-30 03:01:36 -05:00
Commit Graph

464 Commits

Author SHA1 Message Date
Kevin Heis
688a274f1f Remove CSRF check (#29910)
* Use color_mode for gating "sign up" button

* Remove csrf check

* Add `res.removeHeader('set-cookie')` to cache-control

* Update static-assets.js

* Remove package

* Remove tough-cookie

* Update cache-control.js

* Update cache-control.js

* Update cache-control.js
2022-08-15 19:28:42 +00:00
Peter Bengtsson
ce42aa2dfd upgrade eslint dev packages (#29818) 2022-08-11 11:14:03 +00:00
Peter Bengtsson
16fcaa7869 next@12.2.4 (#29731)
* next@12.2.4

* suppress 'Large Page Data'

* Update next.config.js

Co-authored-by: Rachael Sewell <rachmari@github.com>

Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-08-09 10:58:08 +00:00
Peter Bengtsson
f8f20605f4 search api with elasticsearch (#29053)
* indexing records into Elasticsearch

* @elastic/elasticsearch@8.2.0

* mv

* fix the code

* pipe

* lfs

* use sha

* change how index names work

* search api with Elasticsearch

* works

* refactor client

* better snowballing

* remove dbg

* wip

* highlights and fuzzy search

* improvements and upgrade

* also upgrade

* wip

* index more explicitly

* better validation

* change max size

* popularity by ordinal ranking instead

* playing

* fix package-lock

* rearranging

* catchMiddlewareError

* fix indexing

* match_phrase_prefix on wrapped search

* refactorings

* escape html in content

* wip

* search by URL

* update lock file

* v1 api

* inroads on jest testing the search

* valid yaml hopefully

* index fixtures into local elasticsearch

* specific versions to index only

* small fixes

* feedbacked

* fix tests

* use the npm script
2022-08-05 19:40:38 +00:00
Peter Bengtsson
7c98f65c57 Remove all mention of DISABLE_RENDERING_CACHE (#29658) 2022-08-05 19:19:02 +00:00
Peter Bengtsson
67c1ff3441 Remove overload protection (#29659) 2022-08-05 15:04:33 +00:00
Kevin Heis
56aa9ea094 Move use session to its own hook file (#29641)
* Move use session to its own hook file

* Trying useSWR

* Try one hour html cache

* blah blah lint

* Update to include loading state

* Update components/hooks/useSession.ts

Co-authored-by: Peter Bengtsson <peterbe@github.com>

Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-08-05 14:47:10 +00:00
Kevin Heis
bb1f30a39b Update HTML cache control to 10 minutes (#29586)
* Update HTML cache control to 10 minutes

* A little clean up

* Remove quick-lru
2022-08-03 20:39:54 +00:00
Peter Bengtsson
de23a080f5 always DISABLE_RENDERING_CACHE=true when doing npm run dev (#29279)
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
2022-07-27 12:34:34 -05:00
Kevin Heis
2182ff28f3 Next12 now supports ESM (#29295)
* Next12 now supports ESM

* No more michael jackson script extensions

* Fix test running

* Update jest-puppeteer.config.cjs

* Update package.json
2022-07-26 17:53:23 +00:00
Peter Bengtsson
ac2cce4aef upgrade all eslint related dev dependencies (#29277) 2022-07-22 12:12:13 -04:00
Peter Bengtsson
7b5e6f102d upgrade jest@28.1.3 (#29275) 2022-07-22 11:31:09 -04:00
Peter Bengtsson
46d9cddff0 upgrade nodemon@2.0.19 (#29244) 2022-07-21 19:19:27 +00:00
dependabot[bot]
570be6dcaa Bump @primer/css from 19.8.2 to 20.2.4 (#29175)
Bumps [@primer/css](https://github.com/primer/css) from 19.8.2 to 20.2.4.
- [Release notes](https://github.com/primer/css/releases)
- [Changelog](https://github.com/primer/css/blob/main/CHANGELOG.md)
- [Commits](https://github.com/primer/css/compare/v19.8.2...v20.2.4)

---
updated-dependencies:
- dependency-name: "@primer/css"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2022-07-21 08:12:53 -07:00
Peter Bengtsson
44a91fdec5 refactor sync-search-indices (#29152)
* refactor sync-search-indices

* tidying
2022-07-19 15:13:34 +00:00
Peter Bengtsson
88f0b1686f delete script/content-migrations/deduplicate-enterprise-assets.js (#29011)
* delete script/content-migrations/deduplicate-enterprise-assets.js

* update package-lock
2022-07-13 20:48:09 +00:00
Peter Bengtsson
721e68f4ab Index records into Elasticsearch (#27819)
* indexing records into Elasticsearch

* @elastic/elasticsearch@8.2.0

* mv

* fix the code

* pipe

* lfs

* use sha

* change how index names work

* better snowballing

* improvements and upgrade

* index more explicitly

* wip

* no need to save space with elasticsearch

* update package-lock

* Revert "no need to save space with elasticsearch"

This reverts commit 9cdd4d8f4fa7be822bdef3976091c3c640519dec.

* adding a comment

* better comment

* a better comment

* feedbacked

* more comment
2022-07-13 20:32:22 +00:00
Grace Park
822fe2926b Megabranch: Upgrade primer/react (#28458)
* upgrade primer/react

* upgrade

* using deprecated

* remove lib"

* Upgrade primer/react: Upgrade Label (#28502)

update Label to primer/react 35.2.2

* fix merge conflicts

* primer/react v35: update ActionList (#28467)

* Update to v35 ActionList for LearningTrack

* Update to v35 ActionList for ArticleList

* Update to v35 ActionList for ProductArticleList

* Update to v35 ActionList for TableOfContents

* Update to v35 ActionList for ProductCollapsibleSection

* Update to v35 ActionList for RestCollapsibleSection

* Update to v35 ActionList for SidebarHomepage

* Update to v35 ActionList for MiniTocs

* Update to v35 ActionList for Search

* Extra div for rendering test

* One less div for rendering test

* All the style updates for v35 ActionList

* Works without setting as an li which is already the default (didn't before for some reason)

* Use deprecated ItemInput for now

* Picker update for primer/react (#28485)

* update picker

* inline picker for mobile

* set width to auto

* Update components/ui/Picker/Picker.tsx

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

* update

* Update Picker.tsx

* update onselect

* checking language code

* move language cookie setting to language picker

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

* Resolve package merge conflicts

* fresh npm install

* Primer update UnderlineNav (#28582)

* update underlinenav for primer/react update

* update tests

* update switches test

* update one last label

* update header test"

* remove href in underlinenav

* update rendering tests

* update cursor

* primer/react v35: update DropDownMenu to ActionMenu (#28576)

* Update to v35 ActionMenu for ArticleCards

* Update to v35 ActionMenu for Search

* Set button to inline-block

* Put the props on the overlay

* Update test for ActionMenu markup

* update package

* update package lock

* primer/react v35: CodeLanguagePicker update from SelectMenu to ActionMenu (#28625)

* Use octicon for menu down arrow

* Update to v35 ActionMenu for CodeLanguagePicker

* update to SubNav

Co-authored-by: Grace Park <gracepark@github.com>

* update package-lock

Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2022-07-11 11:51:18 -07:00
Peter Bengtsson
5b0e38817d upgrade all eslint related libs (#28819) 2022-06-29 19:35:39 +00:00
Peter Bengtsson
ee1f20f4fb jest 28.1.1 (#28797)
* got 28.1.1

* wip

* force upgrade nth-check

* legacyFakeTimers
2022-06-29 11:55:03 +00:00
Peter Bengtsson
703f158662 nodemon@2.0.18 (#28796) 2022-06-29 11:44:33 +00:00
Peter Bengtsson
74c324df46 remove 'styled-jsx' dependency (#28787) 2022-06-28 11:37:22 -04:00
Peter Bengtsson
c1f0030e3a NextJS 12.1.6 (#26102)
* nextjs 12.1.0

* no idea what's going on

* desperate attempts

* wip

* lots of data is necessary for 'npm run build' now

* tidying up

* update package lock
2022-06-28 12:57:38 +00:00
Kevin Heis
f948c81038 Upgrade got (#28617)
* Upgrade got

* Update e2etest.js

* Skip following redirects on redirect tests

* Update deprecated-enterprise-versions.js
2022-06-21 16:23:51 +00:00
Kevin Heis
05fe4c60cb Upgrade commander (#28613)
* Upgrade commander

* Change import
2022-06-17 16:43:02 +00:00
Kevin Heis
03e2cf22e6 Upgrade cheerio (#28614) 2022-06-17 16:34:56 +00:00
Peter Bengtsson
a39614fdcf remove supertest dependency (#28572)
* remove supertest dependency

* remove bad test
2022-06-16 15:56:41 +00:00
Peter Bengtsson
0186424847 use SSRProvider from @primer/react to avoid warnings (#28546) 2022-06-15 16:51:58 -05:00
Kevin Heis
8f83f60766 Remove pa11y (#28532)
* Remove pa11y

* Lock types/react
2022-06-15 20:55:27 +00:00
Kevin Heis
c2e9d34b7c Upgrade all minor/patch versions (#28500)
* Upgrade all minor/patch versions

* Revert liquid change

* Revert highlightjs

* Force highlightjs version

* force liquidjs version

* Revert all

* Smaller set of upgrades

* Update package-lock.json

* Update package-lock.json

* Lock cheerio version

* Remaining minors except liquid and cheerio

* A few majors I suspect are harmless

* And run npm install again :)

* Lock liquidjs version

* Step back on got

* A few hidden minor/patches

* Update package-lock.json

* Lock react types
2022-06-15 11:10:09 -07:00
Kevin Heis
71fedb1f31 Update to helmet 5 (#28488)
* Update to helmet 5

* Disable cross-origin-embedder-policy

* Update helmet.js

* Update helmet.js

* Add CORS on get / options

* Update helmet.js

* Update helmet.js

* Update helmet.js

* Update helmet.js

* Revert "Update helmet.js"

This reverts commit 61ad2fb641ca16a31bf148164c395f2ba91e1734.

* Open up github domains

* Include self

* Update helmet.js

* Update helmet.js
2022-06-14 21:43:25 +00:00
Peter Bengtsson
0504d968c6 stop mocking hydro calls with supertest (#28179)
* stop mocking hydro calls with supertest

* wip

* fix the tests

* nock.cleanAll()
2022-06-03 15:17:12 +00:00
Mike Surowiec
97398544d6 feat: add script to show action dependencies (#26505) 2022-05-31 19:09:29 +00:00
Peter Bengtsson
0340760554 remove spotContentFlaws middleware (#28068) 2022-05-31 18:19:16 +00:00
Peter Bengtsson
2eee72f257 parse5@7.0.0 with full ESM support (#28014) 2022-05-26 16:49:58 +00:00
Peter Bengtsson
75c0ec5cab /en/ permanent redirects to /en should be CDN cacheable (#27976) 2022-05-25 13:51:16 +00:00
Peter Bengtsson
35248ed2b2 quick-lru@6.1.1 (#27962) 2022-05-25 11:23:43 +00:00
Peter Bengtsson
18504871b9 cache full rendering (#25424)
* cache full rendering

* still not working with gzip

* progress progress progress

* smaller

* hacky progress

* small fixes

* wip

* lock file

* wip

* wip

* package-lock updates

* wip

* search DOM in lowercase

* simplify

* with instrument

* improve test coverage

* mutateCheeriobodyByRequest

* fix

* remove renderContentCacheByContex

* disable render caching in sync-search

* diables things in github/github link checker

* gzip lru

* tidying up

* updated

* correct tests

* fix: move userLanguage to LanguagesContext

* Revert "fix: move userLanguage to LanguagesContext"

This reverts commit d7c05d958c71eaad496eb46764eb845d80b866ca.

* contexts ftw

* fixed rendering tests

* oops for got new file

* nits addressed

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
2022-05-23 12:12:09 +00:00
Peter Bengtsson
ba31a77cef swr 1.3.0 (#27880) 2022-05-20 17:11:41 -04:00
dependabot[bot]
5f211a9f9e Bump eslint-config-standard from 16.0.3 to 17.0.0 (#27258)
Bumps [eslint-config-standard](https://github.com/standard/eslint-config-standard) from 16.0.3 to 17.0.0.
- [Release notes](https://github.com/standard/eslint-config-standard/releases)
- [Changelog](https://github.com/standard/eslint-config-standard/blob/master/CHANGELOG.md)
- [Commits](https://github.com/standard/eslint-config-standard/compare/v16.0.3...v17.0.0)

---
updated-dependencies:
- dependency-name: eslint-config-standard
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Robert Sese <rsese@github.com>
Co-authored-by: Peter Bengtsson <mail@peterbe.com>
2022-05-19 22:00:42 +00:00
Peter Bengtsson
fe10c2eb45 nodemon 2.0.16 (#27845) 2022-05-19 21:50:03 +00:00
dependabot[bot]
4d263eb13b Bump @jest/globals from 27.4.6 to 28.1.0 (#27601)
Bumps [@jest/globals](https://github.com/facebook/jest/tree/HEAD/packages/jest-globals) from 27.4.6 to 28.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v28.1.0/packages/jest-globals)

---
updated-dependencies:
- dependency-name: "@jest/globals"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2022-05-19 14:00:15 +00:00
dependabot[bot]
21362499a8 Bump kill-port from 1.6.1 to 2.0.0 (#27770)
Bumps [kill-port](https://github.com/tiaanduplessis/kill-port) from 1.6.1 to 2.0.0.
- [Release notes](https://github.com/tiaanduplessis/kill-port/releases)
- [Commits](https://github.com/tiaanduplessis/kill-port/commits/v2.0.0)

---
updated-dependencies:
- dependency-name: kill-port
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2022-05-19 13:36:53 +00:00
dependabot[bot]
60e162b483 Bump @types/react-syntax-highlighter from 13.5.2 to 15.5.1 (#27603)
Bumps [@types/react-syntax-highlighter](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-syntax-highlighter) from 13.5.2 to 15.5.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-syntax-highlighter)

---
updated-dependencies:
- dependency-name: "@types/react-syntax-highlighter"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Grace Park <gracepark@github.com>
2022-05-16 12:49:56 -07:00
Mike Surowiec
b93a3ec387 feat: add overload-protection (#27612)
* feat: add overload-protection

* Update middleware/overload-protection.js

Co-authored-by: Peter Bengtsson <mail@peterbe.com>

* fix: tests

Co-authored-by: Peter Bengtsson <mail@peterbe.com>
2022-05-12 16:34:25 +00:00
Mike Surowiec
ed8eda1f60 feat: add signal sciences (#27640)
* tmp: add sigsci

* add sigsci.js

* add sigsci.js

* feat: add sigsci to middleware

* convert sigsci to esmodule

* add sigsci-agent to docker-compose.tmpl
2022-05-12 16:15:17 +00:00
Peter Bengtsson
5733237c00 remove add-tags-to-articles script (#27639) 2022-05-12 10:51:40 -04:00
Peter Bengtsson
6605154221 Revert "Fastly Signal Science agent and module (#27529)" (#27624)
This reverts commit aae78966ef.
2022-05-11 14:39:47 -07:00
Peter Bengtsson
aae78966ef Fastly Signal Science agent and module (#27529)
* Fastly Signal Science agent and module

* create an assets/build.txt

* try that

* don't experiment with build-args

* do it not just for public builds

* fix comment

* remove experimentation

* actually try using it

* bit louder

* correction

* remove debug logging
2022-05-11 21:18:01 +00:00
Peter Bengtsson
66d7f98bdb upgrade @typescript-eslint/eslint-plugin and @typescript-eslint/parser (#27588) 2022-05-11 14:38:14 +00:00