import-in-the-middle 1.14.1 → 1.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "1.14.1"
2
+ ".": "1.14.2"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.14.2](https://github.com/nodejs/import-in-the-middle/compare/import-in-the-middle-v1.14.1...import-in-the-middle-v1.14.2) (2025-06-13)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * do not replace dollar sign in shim variable name ([#200](https://github.com/nodejs/import-in-the-middle/issues/200)) ([20bf0e5](https://github.com/nodejs/import-in-the-middle/commit/20bf0e5c5f6f44f42a8618ad45d08622a63d4d45))
9
+
3
10
  ## [1.14.1](https://github.com/nodejs/import-in-the-middle/compare/import-in-the-middle-v1.14.0...import-in-the-middle-v1.14.1) (2025-06-12)
4
11
 
5
12
 
package/hook.js CHANGED
@@ -254,7 +254,7 @@ async function processModule ({ srcUrl, context, parentGetSource, parentResolve,
254
254
  addSetter(name, setter, true)
255
255
  }
256
256
  } else {
257
- const variableName = `$${n.replace(/[^a-zA-Z0-9_]/g, '_')}`
257
+ const variableName = `$${n.replace(/[^a-zA-Z0-9_$]/g, '_')}`
258
258
  const objectKey = JSON.stringify(n)
259
259
  const reExportedName = n === 'default' || NODE_MAJOR < 16 ? n : objectKey
260
260
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "import-in-the-middle",
3
- "version": "1.14.1",
3
+ "version": "1.14.2",
4
4
  "description": "Intercept imports in Node.js",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -3,3 +3,6 @@ exports['one.two'] = () => console.log('b')
3
3
 
4
4
  // See: https://github.com/nodejs/import-in-the-middle/issues/94
5
5
  exports['unsigned short'] = 'something'
6
+
7
+ exports._ = 'foo'
8
+ exports.$ = 'bar'