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>
This commit is contained in:
10
package-lock.json
generated
10
package-lock.json
generated
@@ -33,7 +33,7 @@
|
||||
"express-timeout-handler": "^2.2.2",
|
||||
"fastest-levenshtein": "1.0.16",
|
||||
"file-type": "18.3.0",
|
||||
"flat": "^5.0.2",
|
||||
"flat": "^6.0.1",
|
||||
"github-slugger": "^2.0.0",
|
||||
"glob": "10.0.0",
|
||||
"got": "^13.0.0",
|
||||
@@ -6473,10 +6473,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/flat": {
|
||||
"version": "5.0.2",
|
||||
"license": "BSD-3-Clause",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/flat/-/flat-6.0.1.tgz",
|
||||
"integrity": "sha512-/3FfIa8mbrg3xE7+wAhWeV+bd7L2Mof+xtZb5dRDKZ+wDvYJK4WDYeIOuOhre5Yv5aQObZrlbRmk3RTSiuQBtw==",
|
||||
"bin": {
|
||||
"flat": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/flat-cache": {
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
"express-timeout-handler": "^2.2.2",
|
||||
"fastest-levenshtein": "1.0.16",
|
||||
"file-type": "18.3.0",
|
||||
"flat": "^5.0.2",
|
||||
"flat": "^6.0.1",
|
||||
"github-slugger": "^2.0.0",
|
||||
"glob": "10.0.0",
|
||||
"got": "^13.0.0",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { program } from 'commander'
|
||||
import fs from 'fs/promises'
|
||||
import flat from 'flat'
|
||||
import { flatten } from 'flat'
|
||||
import { visit } from 'unist-util-visit'
|
||||
import { fromMarkdown } from 'mdast-util-from-markdown'
|
||||
import { gfmTable } from 'micromark-extension-gfm-table'
|
||||
@@ -255,7 +255,7 @@ function getTablesFromMdast(ast, tableObj) {
|
||||
if (!tableNodes.length) return
|
||||
const firstRows = tableNodes.map((table) => {
|
||||
const firstRow = table.children[0]
|
||||
return Object.entries(flat(firstRow))
|
||||
return Object.entries(flatten(firstRow))
|
||||
.filter(([key, _val]) => key.endsWith('value'))
|
||||
.map(([_key, val]) => val)
|
||||
.join(', ')
|
||||
@@ -281,7 +281,7 @@ function filterFiles(files) {
|
||||
|
||||
function getheadingObjs(headingNodes) {
|
||||
return headingNodes.map((n) => {
|
||||
const flatNodes = flat(n)
|
||||
const flatNodes = flatten(n)
|
||||
const text = Object.entries(flatNodes)
|
||||
.filter(([key, _val]) => key.endsWith('value'))
|
||||
.map(([_key, val]) => val)
|
||||
|
||||
@@ -2,7 +2,7 @@ import { fileURLToPath } from 'url'
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
import yaml from 'js-yaml'
|
||||
import flat from 'flat'
|
||||
import { flatten } from 'flat'
|
||||
import { chain, get } from 'lodash-es'
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
const workflowsDir = path.join(__dirname, '../../.github/workflows')
|
||||
@@ -16,7 +16,7 @@ const workflows = fs
|
||||
})
|
||||
|
||||
function actionsUsedInWorkflow(workflow) {
|
||||
return Object.keys(flat(workflow))
|
||||
return Object.keys(flatten(workflow))
|
||||
.filter((key) => key.endsWith('.uses'))
|
||||
.map((key) => get(workflow, key))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user