Skip to content

Commit f6acb1f

Browse files
authored
Update dependencies (github#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.
1 parent dcd72d1 commit f6acb1f

29 files changed

+3540
-4368
lines changed

Diff for: lib/data-directory.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module.exports = function dataDirectory (dir, opts = {}) {
5757
break
5858
case '.yaml':
5959
case '.yml':
60-
set(data, key, yaml.safeLoad(fileContent, { filename }))
60+
set(data, key, yaml.load(fileContent, { filename }))
6161
break
6262
case '.md':
6363
case '.markdown':

Diff for: lib/redis-accessor.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ class RedisAccessor {
1717
} = {}) {
1818
const redisClient = useRealRedis
1919
? createRedisClient({
20-
url: REDIS_URL,
21-
db: databaseNumber,
22-
name: name || 'redis-accessor'
23-
})
20+
url: REDIS_URL,
21+
db: databaseNumber,
22+
name: name || 'redis-accessor'
23+
})
2424
: InMemoryRedis.createClient()
2525

2626
this._client = redisClient

Diff for: middleware/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ module.exports = function (app) {
3636

3737
// *** Security ***
3838
app.use(require('./cors'))
39-
app.use(require('./csp')) // Must come before helmet
4039
app.use(require('helmet')())
40+
app.use(require('./csp')) // Must come after helmet
4141
app.use(require('./cookie-parser')) // Must come before csrf
4242
app.use(express.json()) // Must come before csrf
4343
app.use(require('./csrf'))

Diff for: package-lock.json

+3,380-4,212
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+87-87
Original file line numberDiff line numberDiff line change
@@ -9,80 +9,80 @@
99
},
1010
"license": "(MIT AND CC-BY-4.0)",
1111
"dependencies": {
12-
"@babel/core": "^7.12.9",
13-
"@babel/plugin-proposal-class-properties": "^7.12.1",
12+
"@babel/core": "^7.14.3",
13+
"@babel/plugin-proposal-class-properties": "^7.13.0",
1414
"@babel/plugin-syntax-class-properties": "^7.12.1",
15-
"@babel/plugin-transform-modules-amd": "^7.12.1",
16-
"@babel/plugin-transform-modules-commonjs": "^7.12.1",
17-
"@babel/plugin-transform-react-jsx": "^7.12.7",
18-
"@babel/plugin-transform-runtime": "^7.11.0",
19-
"@babel/preset-env": "^7.12.7",
20-
"@babel/preset-react": "^7.12.7",
21-
"@babel/runtime": "^7.11.2",
22-
"@graphql-inspector/core": "^2.3.0",
23-
"@graphql-tools/load": "^6.2.5",
24-
"@primer/components": "^28.0.1",
15+
"@babel/plugin-transform-modules-amd": "^7.14.2",
16+
"@babel/plugin-transform-modules-commonjs": "^7.14.0",
17+
"@babel/plugin-transform-react-jsx": "^7.14.3",
18+
"@babel/plugin-transform-runtime": "^7.14.3",
19+
"@babel/preset-env": "^7.14.2",
20+
"@babel/preset-react": "^7.13.13",
21+
"@babel/runtime": "^7.14.0",
22+
"@graphql-inspector/core": "^2.5.0",
23+
"@graphql-tools/load": "^6.2.8",
24+
"@primer/components": "^28.0.4",
2525
"@primer/css": "^16.2.0",
26-
"@primer/octicons": "^13.0.0",
27-
"@primer/octicons-react": "^13.0.0",
26+
"@primer/octicons": "^14.1.0",
27+
"@primer/octicons-react": "^14.1.0",
2828
"ajv": "^6.11.0",
29-
"algoliasearch": "^3.35.1",
29+
"algoliasearch": "^4.9.1",
3030
"assert": "^2.0.0",
31-
"babel-loader": "^8.1.0",
31+
"babel-loader": "^8.2.2",
3232
"babel-preset-env": "^1.7.0",
3333
"browser-date-formatter": "^3.0.3",
34-
"change-case": "^3.1.0",
34+
"change-case": "^4.1.2",
3535
"cheerio": "^1.0.0-rc.3",
3636
"classnames": "^2.3.1",
3737
"compression": "^1.7.4",
3838
"connect-datadog": "0.0.9",
3939
"connect-slashes": "^1.4.0",
4040
"cookie-parser": "^1.4.5",
41-
"copy-webpack-plugin": "^6.0.3",
41+
"copy-webpack-plugin": "^8.1.1",
4242
"cors": "^2.8.5",
43-
"cross-env": "^7.0.2",
44-
"css-loader": "^4.3.0",
43+
"cross-env": "^7.0.3",
44+
"css-loader": "^5.2.4",
4545
"csurf": "^1.11.0",
4646
"date-fns": "^2.21.3",
47-
"directory-tree": "^2.2.5",
48-
"dotenv": "^8.2.0",
47+
"directory-tree": "^2.2.9",
48+
"dotenv": "^9.0.2",
4949
"express": "^4.17.1",
50-
"express-rate-limit": "^5.1.3",
50+
"express-rate-limit": "^5.2.6",
5151
"express-timeout-handler": "^2.2.0",
52-
"flat": "^5.0.0",
53-
"github-slugger": "^1.2.1",
54-
"got": "^9.6.0",
55-
"gray-matter": "^4.0.2",
52+
"flat": "^5.0.2",
53+
"github-slugger": "^1.3.0",
54+
"got": "^11.8.2",
55+
"gray-matter": "^4.0.3",
5656
"hast-util-from-parse5": "^6.0.1",
5757
"hast-util-parse-selector": "^2.2.5",
5858
"hast-util-select": "^4.0.2",
5959
"hast-util-to-string": "^1.0.4",
6060
"hastscript": "^6.0.0",
61-
"helmet": "^3.21.2",
61+
"helmet": "^4.6.0",
6262
"highlightjs-graphql": "^1.0.2",
63-
"hot-shots": "^8.2.0",
63+
"hot-shots": "^8.3.1",
6464
"html-entities": "^1.2.1",
6565
"imurmurhash": "^0.1.4",
6666
"is-url": "^1.2.4",
6767
"js-cookie": "^2.2.1",
68-
"js-yaml": "^3.14.0",
68+
"js-yaml": "^4.1.0",
6969
"linkinator": "^2.13.6",
7070
"liquidjs": "^9.22.1",
7171
"lodash": "^4.17.21",
7272
"lunr": "^2.3.9",
7373
"lunr-languages": "^1.4.0",
7474
"mdast-util-from-markdown": "^0.8.4",
75-
"mini-css-extract-plugin": "^1.4.1",
76-
"mkdirp": "^1.0.3",
77-
"morgan": "^1.9.1",
75+
"mini-css-extract-plugin": "^1.6.0",
76+
"mkdirp": "^1.0.4",
77+
"morgan": "^1.10.0",
7878
"next": "^10.2.0",
7979
"node-fetch": "^2.6.1",
8080
"parse5": "^6.0.1",
8181
"port-used": "^2.0.8",
8282
"rate-limit-redis": "^2.1.0",
83-
"react": "^17.0.1",
84-
"react-dom": "^17.0.1",
85-
"redis": "^3.1.1",
83+
"react": "^17.0.2",
84+
"react-dom": "^17.0.2",
85+
"redis": "^3.1.2",
8686
"redis-mock": "^0.56.3",
8787
"rehype-autolink-headings": "^2.0.5",
8888
"rehype-highlight": "^4.1.0",
@@ -93,89 +93,89 @@
9393
"remark-gemoji-to-emoji": "^1.1.0",
9494
"remark-parse": "^7.0.2",
9595
"remark-rehype": "^5.0.0",
96-
"resolve-url-loader": "^3.1.2",
96+
"resolve-url-loader": "^4.0.0",
9797
"revalidator": "^0.3.1",
98-
"rimraf": "^3.0.0",
98+
"rimraf": "^3.0.2",
9999
"rss-parser": "^3.12.0",
100-
"sass": "^1.26.3",
101-
"sass-loader": "^9.0.2",
100+
"sass": "^1.32.13",
101+
"sass-loader": "^11.1.1",
102102
"search-with-your-keyboard": "1.1.0",
103-
"semver": "^5.7.1",
103+
"semver": "^7.3.5",
104104
"slash": "^3.0.0",
105105
"strip-html-comments": "^1.0.0",
106-
"style-loader": "^1.2.1",
106+
"style-loader": "^2.0.0",
107107
"styled-components": "^5.3.0",
108108
"throng": "^5.0.0",
109109
"unified": "^8.4.2",
110110
"unist-util-visit": "^2.0.3",
111-
"uuid": "^8.3.0",
112-
"walk-sync": "^1.1.4",
113-
"webpack": "^5.30.0",
114-
"webpack-cli": "^4.6.0"
111+
"uuid": "^8.3.2",
112+
"walk-sync": "^2.2.0",
113+
"webpack": "^5.37.0",
114+
"webpack-cli": "^4.7.0"
115115
},
116116
"devDependencies": {
117-
"@actions/core": "^1.2.6",
118-
"@actions/github": "^4.0.0",
119-
"@octokit/rest": "^16.43.2",
120-
"@types/lodash": "^4.14.168",
121-
"@types/react": "^17.0.4",
122-
"@types/react-dom": "^17.0.3",
117+
"@actions/core": "^1.2.7",
118+
"@actions/github": "^5.0.0",
119+
"@octokit/rest": "^18.5.3",
120+
"@types/lodash": "^4.14.169",
121+
"@types/react": "^17.0.6",
122+
"@types/react-dom": "^17.0.5",
123123
"async": "^3.2.0",
124124
"await-sleep": "0.0.1",
125-
"aws-sdk": "^2.610.0",
125+
"aws-sdk": "^2.909.0",
126126
"babel-eslint": "^10.1.0",
127127
"babel-plugin-styled-components": "^1.12.0",
128-
"chalk": "^4.0.0",
129-
"commander": "^6.2.0",
128+
"chalk": "^4.1.1",
129+
"commander": "^7.2.0",
130130
"count-array-values": "^1.2.1",
131131
"csp-parse": "0.0.2",
132-
"csv-parse": "^4.8.8",
133-
"csv-parser": "^2.3.3",
132+
"csv-parse": "^4.15.4",
133+
"csv-parser": "^3.0.0",
134134
"dedent": "^0.7.0",
135-
"del": "^4.1.1",
136-
"domwaiter": "^1.1.0",
137-
"eslint": "^7.13.0",
138-
"eslint-config-standard": "^16.0.1",
139-
"eslint-plugin-import": "^2.22.1",
135+
"del": "^6.0.0",
136+
"domwaiter": "^1.3.0",
137+
"eslint": "^7.26.0",
138+
"eslint-config-standard": "^16.0.2",
139+
"eslint-plugin-import": "^2.23.2",
140140
"eslint-plugin-node": "^11.1.0",
141-
"eslint-plugin-promise": "^4.2.1",
141+
"eslint-plugin-promise": "^5.1.0",
142142
"event-to-promise": "^0.8.0",
143-
"glob": "^7.1.6",
144-
"graphql": "^14.5.8",
143+
"glob": "^7.1.7",
144+
"graphql": "^15.5.0",
145145
"heroku-client": "^3.1.0",
146146
"http-status-code": "^2.1.0",
147-
"husky": "^4.2.1",
148-
"image-size": "^0.7.4",
147+
"husky": "^6.0.0",
148+
"image-size": "^1.0.0",
149149
"japanese-characters": "^1.1.0",
150-
"javascript-stringify": "^2.0.1",
150+
"javascript-stringify": "^2.1.0",
151151
"jest": "^26.6.3",
152152
"jest-expect-message": "^1.0.2",
153-
"jest-github-actions-reporter": "^1.0.2",
154-
"jest-puppeteer": "^4.4.0",
155-
"jest-silent-reporter": "^0.2.1",
153+
"jest-github-actions-reporter": "^1.0.3",
154+
"jest-puppeteer": "^5.0.3",
155+
"jest-silent-reporter": "^0.5.0",
156156
"jest-slow-test-reporter": "^1.0.0",
157157
"jimp": "^0.16.1",
158158
"make-promises-safe": "^5.1.0",
159159
"mime": "^2.4.4",
160-
"mock-express-response": "^0.2.2",
161-
"mockdate": "^3.0.2",
162-
"nock": "^13.0.4",
163-
"nodemon": "^2.0.4",
164-
"npm-merge-driver-install": "^2.0.0",
165-
"object-hash": "^2.0.1",
166-
"pa11y-ci": "^2.4.0",
167-
"prettier": "^2.1.2",
160+
"mock-express-response": "^0.3.0",
161+
"mockdate": "^3.0.5",
162+
"nock": "^13.0.11",
163+
"nodemon": "^2.0.7",
164+
"npm-merge-driver-install": "^2.0.1",
165+
"object-hash": "^2.1.1",
166+
"pa11y-ci": "^2.4.1",
167+
"prettier": "^2.3.0",
168168
"process": "^0.11.10",
169-
"puppeteer": "^5.5.0",
170-
"replace": "^1.2.0",
171-
"robots-parser": "^2.1.1",
172-
"start-server-and-test": "^1.12.0",
173-
"strip-ansi": "^6.0.0",
174-
"supertest": "^4.0.2",
169+
"puppeteer": "^9.1.1",
170+
"replace": "^1.2.1",
171+
"robots-parser": "^2.3.0",
172+
"start-server-and-test": "^1.12.2",
173+
"strip-ansi": "^7.0.0",
174+
"supertest": "^6.1.3",
175175
"typescript": "^4.2.4",
176176
"url-template": "^2.0.8",
177-
"webpack-dev-middleware": "^4.1.0",
178-
"website-scraper": "^4.2.0",
177+
"webpack-dev-middleware": "^4.2.0",
178+
"website-scraper": "^4.2.3",
179179
"xlsx-populate": "^1.21.0"
180180
},
181181
"scripts": {

Diff for: script/check-english-links.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ const languagesToSkip = Object.keys(require('../lib/languages'))
4747
const enterpriseReleasesToSkip = new RegExp(`${root}.+?[/@](${deprecated.join('|')})(/|$)`)
4848

4949
const config = {
50-
path: program.path || englishRoot,
50+
path: program.opts().path || englishRoot,
5151
concurrency: 300,
5252
// If this is a dry run, turn off recursion.
53-
recurse: !program.dryRun,
53+
recurse: !program.opts().dryRun,
5454
silent: true,
5555
// The values in this array are treated as regexes.
5656
linksToSkip: [
@@ -86,7 +86,7 @@ async function main () {
8686
// Without this, undefined codes get JSON.stringified as `0`, which is not useful output.
8787
.map(link => { link.status = link.status || 'Invalid'; return link })
8888

89-
if (!program.doNotRetry) {
89+
if (!program.opts().doNotRetry) {
9090
// Links to retry individually.
9191
const linksToRetry = brokenLinks
9292
.filter(link => retryStatusCodes.includes(link.status))

Diff for: script/create-glossary-from-spreadsheet.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const path = require('path')
1111
const yaml = require('js-yaml')
1212
const inputFile = path.join(__dirname, '../data/glossary.yml')
1313

14-
const glossary = yaml.safeLoad(fs.readFileSync(inputFile, 'utf8'))
14+
const glossary = yaml.load(fs.readFileSync(inputFile, 'utf8'))
1515

1616
console.log(glossary)
1717
const external = []

Diff for: script/early-access/symlink-from-local-repo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ program
2424
.option('-u, --unlink', 'remove the symlinks')
2525
.parse(process.argv)
2626

27-
const { pathToEarlyAccessRepo, unlink } = program
27+
const { pathToEarlyAccessRepo, unlink } = program.opts()
2828

2929
if (!pathToEarlyAccessRepo && !unlink) {
3030
throw new Error('Must provide either `--path-to-early-access-repo <PATH>` or `--unlink`')

Diff for: script/early-access/update-data-and-image-paths.js

+9-7
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,19 @@ program
2525
.option('-r, --remove', 'Remove "early-access" from data and image paths.')
2626
.parse(process.argv)
2727

28-
if (!(program.add || program.remove)) {
28+
const { add, remove, pathToEarlyAccessContentFile } = program.opts()
29+
30+
if (!(add || remove)) {
2931
console.error('Error! Must specify either `--add` or `--remove`.')
3032
process.exit(1)
3133
}
3234

3335
let earlyAccessContentAndDataFiles
34-
if (program.pathToEarlyAccessContentFile) {
35-
earlyAccessContentAndDataFiles = path.posix.join(process.cwd(), program.pathToEarlyAccessContentFile)
36+
if (pathToEarlyAccessContentFile) {
37+
earlyAccessContentAndDataFiles = path.posix.join(process.cwd(), pathToEarlyAccessContentFile)
3638

3739
if (!fs.existsSync(earlyAccessContentAndDataFiles)) {
38-
console.error(`Error! ${program.pathToEarlyAccessContentFile} can't be found. Make sure the path starts with 'content/early-access'.`)
40+
console.error(`Error! ${pathToEarlyAccessContentFile} can't be found. Make sure the path starts with 'content/early-access'.`)
3941
process.exit(1)
4042
}
4143
earlyAccessContentAndDataFiles = [earlyAccessContentAndDataFiles]
@@ -60,7 +62,7 @@ earlyAccessContentAndDataFiles
6062

6163
const replacements = {}
6264

63-
if (program.add) {
65+
if (add) {
6466
dataRefs
6567
// Since we're adding early-access to the path, filter for those that do not already include it
6668
.filter(dataRef => !dataRef.includes('data early-access.'))
@@ -78,7 +80,7 @@ earlyAccessContentAndDataFiles
7880
})
7981
}
8082

81-
if (program.remove) {
83+
if (remove) {
8284
dataRefs
8385
// Since we're removing early-access from the path, filter for those that include it
8486
.filter(dataRef => dataRef.includes('{% data early-access.'))
@@ -131,7 +133,7 @@ function checkVariable (dataRef) {
131133
if (!fs.existsSync(variablePath)) return false
132134

133135
// If the variable file exists but doesn't have the referenced key, exclude it
134-
const variableFileContent = yaml.safeLoad(fs.readFileSync(variablePath, 'utf8'))
136+
const variableFileContent = yaml.load(fs.readFileSync(variablePath, 'utf8'))
135137
return variableFileContent[variableKey]
136138
}
137139

Diff for: script/enterprise-server-deprecations/archive-version.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ program
3030
.option('-d, --dry-run', 'only scrape the first 10 pages for testing purposes')
3131
.parse(process.argv)
3232

33-
const pathToArchivalRepo = program.pathToArchivalRepo
34-
const dryRun = program.dryRun
33+
const pathToArchivalRepo = program.opts().pathToArchivalRepo
34+
const dryRun = program.opts().dryRun
3535

3636
main()
3737

0 commit comments

Comments
 (0)