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/