From 2c281d15d06dc54c90cfa5c28b276b189ecd8f3f Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sun, 22 Oct 2023 22:25:32 -0700 Subject: [PATCH] [resolvers/webpack] [refactor] use `hasown` instead of `has` --- resolvers/webpack/index.js | 4 ++-- resolvers/webpack/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resolvers/webpack/index.js b/resolvers/webpack/index.js index ebd77af1e..3ca2874dd 100644 --- a/resolvers/webpack/index.js +++ b/resolvers/webpack/index.js @@ -9,7 +9,7 @@ const fs = require('fs'); const isCore = require('is-core-module'); const resolve = require('resolve/sync'); const semver = require('semver'); -const has = require('has'); +const hasOwn = require('hasown'); const isRegex = require('is-regex'); const log = require('debug')('eslint-plugin-import:resolver:webpack'); @@ -382,7 +382,7 @@ function findExternal(source, externals, context, resolveSync) { // else, vanilla object for (const key in externals) { - if (!has(externals, key)) { continue; } + if (!hasOwn(externals, key)) { continue; } if (source === key) { return true; } } return false; diff --git a/resolvers/webpack/package.json b/resolvers/webpack/package.json index 28a6184f7..0810ca70d 100644 --- a/resolvers/webpack/package.json +++ b/resolvers/webpack/package.json @@ -34,7 +34,7 @@ "debug": "^3.2.7", "enhanced-resolve": "^0.9.1", "find-root": "^1.1.0", - "has": "^1.0.3", + "hasown": "^2.0.0", "interpret": "^1.4.0", "is-core-module": "^2.13.0", "is-regex": "^1.1.4",