Skip to content

Commit 7b9b78d

Browse files
Bump flat from 5.0.2 to 6.0.1 (#42906)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Hector Alfaro <hectorsector@github.com>
1 parent c36c0b1 commit 7b9b78d

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

package-lock.json

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"express-timeout-handler": "^2.2.2",
8383
"fastest-levenshtein": "1.0.16",
8484
"file-type": "18.3.0",
85-
"flat": "^5.0.2",
85+
"flat": "^6.0.1",
8686
"github-slugger": "^2.0.0",
8787
"glob": "10.0.0",
8888
"got": "^13.0.0",

script/accessibility-checks.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { program } from 'commander'
44
import fs from 'fs/promises'
5-
import flat from 'flat'
5+
import { flatten } from 'flat'
66
import { visit } from 'unist-util-visit'
77
import { fromMarkdown } from 'mdast-util-from-markdown'
88
import { gfmTable } from 'micromark-extension-gfm-table'
@@ -255,7 +255,7 @@ function getTablesFromMdast(ast, tableObj) {
255255
if (!tableNodes.length) return
256256
const firstRows = tableNodes.map((table) => {
257257
const firstRow = table.children[0]
258-
return Object.entries(flat(firstRow))
258+
return Object.entries(flatten(firstRow))
259259
.filter(([key, _val]) => key.endsWith('value'))
260260
.map(([_key, val]) => val)
261261
.join(', ')
@@ -281,7 +281,7 @@ function filterFiles(files) {
281281

282282
function getheadingObjs(headingNodes) {
283283
return headingNodes.map((n) => {
284-
const flatNodes = flat(n)
284+
const flatNodes = flatten(n)
285285
const text = Object.entries(flatNodes)
286286
.filter(([key, _val]) => key.endsWith('value'))
287287
.map(([_key, val]) => val)

tests/unit/actions-workflows.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { fileURLToPath } from 'url'
22
import path from 'path'
33
import fs from 'fs'
44
import yaml from 'js-yaml'
5-
import flat from 'flat'
5+
import { flatten } from 'flat'
66
import { chain, get } from 'lodash-es'
77
const __dirname = path.dirname(fileURLToPath(import.meta.url))
88
const workflowsDir = path.join(__dirname, '../../.github/workflows')
@@ -16,7 +16,7 @@ const workflows = fs
1616
})
1717

1818
function actionsUsedInWorkflow(workflow) {
19-
return Object.keys(flat(workflow))
19+
return Object.keys(flatten(workflow))
2020
.filter((key) => key.endsWith('.uses'))
2121
.map((key) => get(workflow, key))
2222
}

0 commit comments

Comments
 (0)