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

449 Коммитов

Автор SHA1 Сообщение Дата
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
Peter Bengtsson cd1d86abf2
remove 'async' dependency (#27327) 2022-04-28 18:29:06 +00:00
dependabot[bot] f909900afc
Bump glob from 7.2.0 to 8.0.1 (#26864)
Bumps [glob](https://github.com/isaacs/node-glob) from 7.2.0 to 8.0.1.
- [Release notes](https://github.com/isaacs/node-glob/releases)
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v7.2.0...v8.0.1)

---
updated-dependencies:
- dependency-name: glob
  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>
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
2022-04-15 11:31:01 -05:00
Mike Surowiec 9a829c0094
fix(package.json): update engines to allow >= 16.x (#26858)
* fix(package.json): update engines to allow >= 16.x

* fix: new npm includes engine in lockfile

* fix(package-lock): run with npm v8.5.0 to match CI
2022-04-11 23:54:06 +00:00
dependabot[bot] eb115b253e
Bump @types/react-dom from 17.0.11 to 18.0.0
Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 17.0.11 to 18.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 16:12:59 +00:00
Peter Bengtsson a4def10b2c
remove rate limiter and slow-down middleware (#26709)
* remove rate limiter and slow-down middleware

* update package-lock.json after node-fetch removal in main
2022-04-05 19:38:25 +00:00
Peter Bengtsson 3bda075aa2
remove node-fetch override (#26677) 2022-04-05 16:28:24 +00:00
Peter Bengtsson 74b0fcfeff
upgrade typescript-eslint combo 5.16.0 (#26502)
Co-authored-by: Grace Park <gracepark@github.com>
2022-03-29 18:47:46 +00:00
Grace Park de0c1cb5e9 upgrade react syntax highlighter and prism 2022-03-28 10:45:33 -07:00
Siddharth Kshetrapal 6e039efe70
Fix flash of incorrect theme for @primer/components (#24123)
* Pass color mode from server to ThemeProvider

* Add preventSSRMismatch

* Fix bad merge, my bad.

* use release candidate for csrf safe approach

* upgrade primer/react to 34.7.1

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
2022-03-21 22:10:06 +00:00
Peter Bengtsson 4fcd3ae25f
automatically start server for jest (#26206)
* reinstate

* start server manually

* routing tests too

* skip more

* sleep more and fail if not 200

* use e2etest for content/ too

* automatically start server for jest

* does this work?

* feedbacked

* rename things

* getting it to work

* add dev dependency

* install the right version

* don't need to start that

* fix package lock

* update readme about it

* feedbacked
2022-03-18 21:46:07 +00:00
Peter Bengtsson 379897a985
upgrade eslint plus cousins (#26316) 2022-03-18 11:39:10 -04:00
Mike Surowiec 31acea648d
feat: add slow down middleware (#26207)
* feat: add slow down middleware

Co-authored-by: Peter Bengtsson <mail@peterbe.com>
2022-03-15 13:31:12 -05:00
Peter Bengtsson c99afd0a57
Merge pull request #15975 from github/peterbe-reduce-max_old_space_size-for-jest-tests
reduce max_old_space_size for jest tests
2022-03-10 13:25:53 -08:00
Peter Bengtsson e18396c7fd
avoid mocking in robots.txt testing (#26018)
* avoid mocking in robots.txt testing

* remove package
2022-03-09 01:08:49 +00:00
Peter Bengtsson a14134090d
highlight.js 11.4.0 (#25870) 2022-03-07 18:18:49 +00:00