@cssxjs/babel-plugin-rn-stylename-to-style 0.2.12 → 0.2.13
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.
- package/CHANGELOG.md +12 -0
- package/index.js +3 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# v0.2.13 (Sat Nov 08 2025)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- fix(babel-plugin-rn-stylename-to-style): more strict check for compilers used in the file ([@cray0000](https://github.com/cray0000))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Pavel Zhukov ([@cray0000](https://github.com/cray0000))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# v0.2.11 (Fri Nov 07 2025)
|
|
2
14
|
|
|
3
15
|
#### 🐛 Bug Fix
|
package/index.js
CHANGED
|
@@ -362,7 +362,7 @@ module.exports = function (babel) {
|
|
|
362
362
|
CallExpression ($this, state) {
|
|
363
363
|
const $callee = $this.get('callee')
|
|
364
364
|
if (!$callee.isIdentifier()) return
|
|
365
|
-
if (!usedCompilers
|
|
365
|
+
if (!usedCompilers.has($callee.node.name)) return
|
|
366
366
|
// Create a `process` function call
|
|
367
367
|
state.hasTransformedClassName = true
|
|
368
368
|
const processCall = t.callExpression(
|
|
@@ -537,7 +537,7 @@ function findReactFnComponent ($jsxAttribute) {
|
|
|
537
537
|
|
|
538
538
|
// Get compilers from the magic import
|
|
539
539
|
function getUsedCompilers ($program, state) {
|
|
540
|
-
const res =
|
|
540
|
+
const res = new Map()
|
|
541
541
|
const magicImports = state.opts.magicImports || DEFAULT_MAGIC_IMPORTS
|
|
542
542
|
for (const $import of $program.get('body')) {
|
|
543
543
|
if (!$import.isImportDeclaration()) continue
|
|
@@ -546,7 +546,7 @@ function getUsedCompilers ($program, state) {
|
|
|
546
546
|
if (!$specifier.isImportSpecifier()) continue
|
|
547
547
|
const { local, imported } = $specifier.node
|
|
548
548
|
if (COMPILERS.includes(imported.name)) {
|
|
549
|
-
res
|
|
549
|
+
res.set(local.name, true)
|
|
550
550
|
$specifier.remove()
|
|
551
551
|
}
|
|
552
552
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cssxjs/babel-plugin-rn-stylename-to-style",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/template": "^7.4.0",
|
|
27
27
|
"@babel/types": "^7.0.0",
|
|
28
|
-
"@cssxjs/runtime": "^0.2.
|
|
28
|
+
"@cssxjs/runtime": "^0.2.13"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/plugin-syntax-jsx": "^7.0.0",
|
|
32
|
-
"@cssxjs/babel-plugin-react-pug": "^0.2.
|
|
32
|
+
"@cssxjs/babel-plugin-react-pug": "^0.2.13",
|
|
33
33
|
"babel-plugin-tester": "^9.1.0",
|
|
34
34
|
"jest": "^30.0.4"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"teamplay": "*"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "a560e6b7ed6c0c1725b8b9c2bf241d28a6ce2617"
|
|
40
40
|
}
|