From fc8d5b9f9d6db929432ca436c95912a408564b87 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 10:57:26 +0800 Subject: [PATCH] chore(deps): update dependency ignore to v7 (#16973) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: fisker --- package.json | 2 +- src/utils/ignore.js | 4 ++-- yarn.lock | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index afc119d15..12f1cdbb7 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "html-element-attributes": "3.4.0", "html-tag-names": "2.1.0", "html-ua-styles": "0.0.8", - "ignore": "6.0.2", + "ignore": "7.0.0", "import-meta-resolve": "4.1.0", "iterate-directory-up": "1.1.1", "jest-docblock": "30.0.0-alpha.6", diff --git a/src/utils/ignore.js b/src/utils/ignore.js index 4e1dc023d..6b9ea4001 100644 --- a/src/utils/ignore.js +++ b/src/utils/ignore.js @@ -1,10 +1,9 @@ import path from "node:path"; import url from "node:url"; -import ignoreModule from "ignore"; +import createIgnore from "ignore"; import { isUrl, toPath } from "url-or-path"; import readFile from "../utils/read-file.js"; -const createIgnore = ignoreModule.default; /** @type {(filePath: string) => string} */ const slash = path.sep === "\\" @@ -48,6 +47,7 @@ async function createSingleIsIgnoredFunction(ignoreFile, withNodeModules) { return; } + // @ts-expect-error -- bug? const ignore = createIgnore({ allowRelativePaths: true }).add(content); return (file) => ignore.ignores(slash(getRelativePath(file, ignoreFile))); diff --git a/yarn.lock b/yarn.lock index 10f0008b8..d303c3bb3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4816,10 +4816,10 @@ __metadata: languageName: node linkType: hard -"ignore@npm:6.0.2": - version: 6.0.2 - resolution: "ignore@npm:6.0.2" - checksum: 10/af39e49996cd989763920e445eff897d0ae1e36b5f27b0e09e14a4fd2df89b362f92e720ecf06ef729056842366527db8561d310e904718810b92ffbcd23056d +"ignore@npm:7.0.0": + version: 7.0.0 + resolution: "ignore@npm:7.0.0" + checksum: 10/4033102404784e8f8e53e737021996d25d8d41b0abf021645ad50699c531cc176e91addf703231f43583b00cfa8b87bec363ea8e2f21602d75909c5b957b3acd languageName: node linkType: hard @@ -7322,7 +7322,7 @@ __metadata: html-element-attributes: "npm:3.4.0" html-tag-names: "npm:2.1.0" html-ua-styles: "npm:0.0.8" - ignore: "npm:6.0.2" + ignore: "npm:7.0.0" import-meta-resolve: "npm:4.1.0" iterate-directory-up: "npm:1.1.1" jest: "npm:30.0.0-alpha.6"