@rollup/pluginutils
Advanced tools
Comparing version
@@ -104,3 +104,3 @@ 'use strict'; | ||
// create new function scope | ||
if (/Function/.test(node.type)) { | ||
if (node.type.includes('Function')) { | ||
const func = node; | ||
@@ -126,3 +126,3 @@ newScope = new Scope({ | ||
// create new block scope | ||
if (node.type === 'BlockStatement' && !/Function/.test(parent.type)) { | ||
if (node.type === 'BlockStatement' && !parent.type.includes('Function')) { | ||
newScope = new Scope({ | ||
@@ -214,2 +214,5 @@ parent: scope, | ||
const matcher = excludeMatchers[i]; | ||
if (matcher instanceof RegExp) { | ||
matcher.lastIndex = 0; | ||
} | ||
if (matcher.test(pathId)) | ||
@@ -220,2 +223,5 @@ return false; | ||
const matcher = includeMatchers[i]; | ||
if (matcher instanceof RegExp) { | ||
matcher.lastIndex = 0; | ||
} | ||
if (matcher.test(pathId)) | ||
@@ -222,0 +228,0 @@ return true; |
@@ -104,3 +104,3 @@ 'use strict'; | ||
// create new function scope | ||
if (/Function/.test(node.type)) { | ||
if (node.type.includes('Function')) { | ||
const func = node; | ||
@@ -126,3 +126,3 @@ newScope = new Scope({ | ||
// create new block scope | ||
if (node.type === 'BlockStatement' && !/Function/.test(parent.type)) { | ||
if (node.type === 'BlockStatement' && !parent.type.includes('Function')) { | ||
newScope = new Scope({ | ||
@@ -214,2 +214,5 @@ parent: scope, | ||
const matcher = excludeMatchers[i]; | ||
if (matcher instanceof RegExp) { | ||
matcher.lastIndex = 0; | ||
} | ||
if (matcher.test(pathId)) | ||
@@ -220,2 +223,5 @@ return false; | ||
const matcher = includeMatchers[i]; | ||
if (matcher instanceof RegExp) { | ||
matcher.lastIndex = 0; | ||
} | ||
if (matcher.test(pathId)) | ||
@@ -222,0 +228,0 @@ return true; |
@@ -100,3 +100,3 @@ import { extname, win32, posix, isAbsolute, resolve } from 'path'; | ||
// create new function scope | ||
if (/Function/.test(node.type)) { | ||
if (node.type.includes('Function')) { | ||
const func = node; | ||
@@ -122,3 +122,3 @@ newScope = new Scope({ | ||
// create new block scope | ||
if (node.type === 'BlockStatement' && !/Function/.test(parent.type)) { | ||
if (node.type === 'BlockStatement' && !parent.type.includes('Function')) { | ||
newScope = new Scope({ | ||
@@ -210,2 +210,5 @@ parent: scope, | ||
const matcher = excludeMatchers[i]; | ||
if (matcher instanceof RegExp) { | ||
matcher.lastIndex = 0; | ||
} | ||
if (matcher.test(pathId)) | ||
@@ -216,2 +219,5 @@ return false; | ||
const matcher = includeMatchers[i]; | ||
if (matcher instanceof RegExp) { | ||
matcher.lastIndex = 0; | ||
} | ||
if (matcher.test(pathId)) | ||
@@ -218,0 +224,0 @@ return true; |
{ | ||
"name": "@rollup/pluginutils", | ||
"version": "5.1.3", | ||
"version": "5.1.4", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
58354
1.06%1177
1.55%