@reticlehq/babel-plugin 2.4.0 → 2.5.0

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -25,13 +25,13 @@ function reticleSourcePlugin({ types: t }) {
25
25
  const first = node.name.name[0];
26
26
  if (first === undefined || first !== first.toLowerCase())
27
27
  return;
28
- const alreadyStamped = node.attributes.some((attr) => attr.type === 'JSXAttribute' &&
29
- attr.name.type === 'JSXIdentifier' &&
28
+ const alreadyStamped = node.attributes.some((attr) => 'JSXAttribute' === attr.type &&
29
+ 'JSXIdentifier' === attr.name.type &&
30
30
  attr.name.name === SOURCE_ATTR);
31
31
  if (alreadyStamped)
32
32
  return;
33
33
  const loc = node.loc;
34
- if (loc === null || loc === undefined)
34
+ if (null === loc || loc === undefined)
35
35
  return;
36
36
  const filename = state.filename ?? 'unknown';
37
37
  // Forward slashes always. `relative` returns the PLATFORM separator, so on Windows this
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reticlehq/babel-plugin",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Babel plugin that stamps data-reticle-source=\"file:line:col\" on JSX host elements so @reticlehq/react can map a DOM node to its source (works on React 19, which dropped _debugSource).",
5
5
  "type": "commonjs",
6
6
  "license": "Apache-2.0",