Skip to content

Commit 330aa1e

Browse files
committedJan 23, 2023
fix(src): use cross-realm symbols
1 parent 6fd7fe9 commit 330aa1e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
 

‎src/plugin-tester.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ const { debug: debug1, verbose: verbose1 } = getDebuggers(
6666
*
6767
* @see https://npm.im/babel-plugin-tester#custom-plugin-and-preset-run-order
6868
*/
69-
const runPluginUnderTestHere: unique symbol = Symbol('run-plugin-under-test-here');
69+
const runPluginUnderTestHere: unique symbol = Symbol.for(
70+
'@xunnamius/run-plugin-under-test-here'
71+
);
7072

7173
/**
7274
* A unique symbol that, when included in `babelOptions.presets`, will be
@@ -75,7 +77,9 @@ const runPluginUnderTestHere: unique symbol = Symbol('run-plugin-under-test-here
7577
*
7678
* @see https://npm.im/babel-plugin-tester#custom-plugin-and-preset-run-order
7779
*/
78-
const runPresetUnderTestHere: unique symbol = Symbol('run-preset-under-test-here');
80+
const runPresetUnderTestHere: unique symbol = Symbol.for(
81+
'@xunnamius/run-preset-under-test-here'
82+
);
7983

8084
/**
8185
* Valid choices for the `titleNumbering` babel-plugin-tester option.

‎src/symbols.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
*
44
* @internal
55
*/
6-
export const $type = Symbol('test-object-type');
6+
export const $type = Symbol.for('@xunnamius/test-object-type');

0 commit comments

Comments
 (0)
Please sign in to comment.