native-document 1.0.273 → 1.0.274
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.
|
@@ -55,13 +55,17 @@ export default function transformForHrm(code, id, options = {}) {
|
|
|
55
55
|
|
|
56
56
|
// Cas — export default function HomePage() {}
|
|
57
57
|
if(path.parent.type === 'ExportDefaultDeclaration') {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
const varDeclaration = t.variableDeclaration('const', [
|
|
59
|
+
t.variableDeclarator(t.identifier(fnName), wrappedCall),
|
|
60
|
+
]);
|
|
61
|
+
|
|
62
|
+
path.parentPath.replaceWithMultiple([
|
|
63
|
+
varDeclaration,
|
|
64
|
+
t.exportDefaultDeclaration(t.identifier(fnName)),
|
|
65
|
+
]);
|
|
61
66
|
return;
|
|
62
67
|
}
|
|
63
68
|
|
|
64
|
-
// Cas — function HomePage() {}
|
|
65
69
|
const varDeclaration = t.variableDeclaration('const', [
|
|
66
70
|
t.variableDeclarator(t.identifier(fnName), wrappedCall),
|
|
67
71
|
]);
|
package/devtools/src/utils.js
CHANGED
|
@@ -47,7 +47,7 @@ export function transformObservableDeclarations(code, id) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export function isFileMustBeModified(file) {
|
|
50
|
-
if(
|
|
50
|
+
if(!file.includes('/src/') || file.includes('node_modules') || /\.test\.js$/.test(file)) {
|
|
51
51
|
return false;
|
|
52
52
|
}
|
|
53
53
|
const content = fs.readFileSync(file, 'utf-8');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "native-document",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.274",
|
|
4
4
|
"description": "A reactive JavaScript framework that preserves native DOM simplicity without sacrificing modern features",
|
|
5
5
|
"author": "AfroCodeur <https://github.com/afrocodeur>",
|
|
6
6
|
"license": "MIT",
|