From 4397a2da2ffffa30d145c0f5c50f1c0815b56a4d Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 16 Aug 2023 13:00:12 -0700 Subject: [PATCH] remove esmockDummy.js --- CHANGELOG.md | 2 ++ src/esmockDummy.js | 3 --- src/esmockLoader.js | 4 +++- 3 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 src/esmockDummy.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a339467..e4250e9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # changelog + * 2.3.9 _pending_ + * [remove esmockDummy](https://github.com/iambumblehead/esmock/pull/233) * 2.3.8 _Aug.15.2023_ * [reuse moduleid regexp](https://github.com/iambumblehead/esmock/pull/231) replacing separately created regexps * [remove esmockIsLoader.js](https://github.com/iambumblehead/esmock/pull/231) export from esmockLoader.js instead diff --git a/src/esmockDummy.js b/src/esmockDummy.js deleted file mode 100644 index 7b2d7c82..00000000 --- a/src/esmockDummy.js +++ /dev/null @@ -1,3 +0,0 @@ -// ex, file:///path/to/esmockDummy.js, -// file:///c:/path/to/esmockDummy.js -export default import.meta.url diff --git a/src/esmockLoader.js b/src/esmockLoader.js index 117f523c..05075c18 100644 --- a/src/esmockLoader.js +++ b/src/esmockLoader.js @@ -1,10 +1,12 @@ import process from 'process' -import urlDummy from './esmockDummy.js' import esmockErr from './esmockErr.js' const [major, minor] = process.versions.node.split('.').map(it => +it) const isLT1612 = major < 16 || (major === 16 && minor < 12) +// ex, file:///path/to/esmockLoader.js, +// file:///c:/path/to/esmockLoader.js +const urlDummy = import.meta.url const esmkgdefsAndAfterRe = /\?esmkgdefs=.*/ const esmkgdefsAndBeforeRe = /.*\?esmkgdefs=/ const esmkdefsRe = /#-#esmkdefs/