mirror of
https://github.com/davidmarkclements/0x.git
synced 2026-01-25 14:47:55 +00:00
Escape __dirname before generating regexp
This commit is contained in:
parent
04d119a7be
commit
9727c01f84
@ -4,8 +4,9 @@ const { spawnSync } = require('child_process')
|
||||
const { join } = require('path')
|
||||
const debug = require('debug')('0x: ticks-to-tree')
|
||||
const assert = require('assert')
|
||||
const escape = require('escape-string-regexp')
|
||||
|
||||
const preloadDirRx = RegExp(join(__dirname, 'preload'))
|
||||
const preloadDirRx = RegExp(join(escape(__dirname), 'preload'))
|
||||
const internalModuleRegExp = /^.?(?:\(anonymous\)|internalBinding|NativeModule[^ ]*) [^/\\][a-zA-Z0-9_/\\-]+\.js:\d+:\d+$/
|
||||
const nodeBootstrapRegExp = / internal\/bootstrap.+\.js:\d+:\d+$/
|
||||
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
"debug": "^4.0.1",
|
||||
"end-of-stream": "^1.1.0",
|
||||
"env-string": "^1.0.0",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"execspawn": "^1.0.1",
|
||||
"has-unicode": "^2.0.1",
|
||||
"hsl-to-rgb-for-reals": "^1.1.0",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user