Skip to content

Commit 439a2ac

Browse files
committed
Pretty fix
1 parent 62c76b3 commit 439a2ac

File tree

4 files changed

+49
-25
lines changed

4 files changed

+49
-25
lines changed

superglue/lib/utils/proxy.ts

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,13 @@ function createArrayProxy(
124124
return undefined
125125
}
126126

127-
return createProxy(fragmentData, fragments, dependencies, proxyCache, item.__id)
127+
return createProxy(
128+
fragmentData,
129+
fragments,
130+
dependencies,
131+
proxyCache,
132+
item.__id
133+
)
128134
}
129135

130136
if (typeof item === 'object' && item !== null) {
@@ -214,7 +220,13 @@ function createObjectProxy(
214220
return undefined
215221
}
216222

217-
return createProxy(fragmentData, fragments, dependencies, proxyCache, value.__id)
223+
return createProxy(
224+
fragmentData,
225+
fragments,
226+
dependencies,
227+
proxyCache,
228+
value.__id
229+
)
218230
}
219231
if (typeof value === 'object' && value !== null) {
220232
if ('$$typeof' in value) {
@@ -281,10 +293,22 @@ export function createProxy<T extends JSONMappable>(
281293
}
282294

283295
if (Array.isArray(content)) {
284-
return createArrayProxy(content, fragments, dependencies, proxyCache, fragmentId) as T
296+
return createArrayProxy(
297+
content,
298+
fragments,
299+
dependencies,
300+
proxyCache,
301+
fragmentId
302+
) as T
285303
}
286304

287-
return createObjectProxy(content, fragments, dependencies, proxyCache, fragmentId) as T
305+
return createObjectProxy(
306+
content,
307+
fragments,
308+
dependencies,
309+
proxyCache,
310+
fragmentId
311+
) as T
288312
}
289313

290314
export function unproxy<T>(proxy: T): Unproxy<T> {

superglue/npm/action_creators.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
'use strict';
1+
'use strict'
22

33
if (process.env.NODE_ENV === 'production') {
4-
module.exports = require('./cjs/action_creators.cjs');
4+
module.exports = require('./cjs/action_creators.cjs')
55
} else {
6-
module.exports = require('./cjs/action_creators.development.cjs');
6+
module.exports = require('./cjs/action_creators.development.cjs')
77
}

superglue/npm/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
'use strict';
1+
'use strict'
22

33
if (process.env.NODE_ENV === 'production') {
4-
module.exports = require('./cjs/superglue.cjs');
4+
module.exports = require('./cjs/superglue.cjs')
55
} else {
6-
module.exports = require('./cjs/superglue.development.cjs');
6+
module.exports = require('./cjs/superglue.development.cjs')
77
}

superglue/scripts/copy-wrappers.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
#!/usr/bin/env node
2-
'use strict';
2+
'use strict'
33

4-
const fs = require('fs');
5-
const path = require('path');
4+
const fs = require('fs')
5+
const path = require('path')
66

77
/**
88
* Copies wrapper files from npm/ to dist/
99
* Similar to React's prepareNpmPackage process
1010
*/
1111
function copyWrappers() {
12-
const npmDir = path.join(__dirname, '..', 'npm');
13-
const distDir = path.join(__dirname, '..', 'dist');
12+
const npmDir = path.join(__dirname, '..', 'npm')
13+
const distDir = path.join(__dirname, '..', 'dist')
1414

1515
if (!fs.existsSync(distDir)) {
16-
console.error('Error: dist/ folder does not exist. Run build first.');
17-
process.exit(1);
16+
console.error('Error: dist/ folder does not exist. Run build first.')
17+
process.exit(1)
1818
}
1919

2020
// Read all files from npm/ directory
21-
const files = fs.readdirSync(npmDir);
21+
const files = fs.readdirSync(npmDir)
2222

2323
files.forEach((file) => {
24-
const srcPath = path.join(npmDir, file);
25-
const destPath = path.join(distDir, file);
24+
const srcPath = path.join(npmDir, file)
25+
const destPath = path.join(distDir, file)
2626

2727
// Only copy files (not directories)
2828
if (fs.statSync(srcPath).isFile()) {
29-
fs.copyFileSync(srcPath, destPath);
30-
console.log(`Copied: npm/${file} → dist/${file}`);
29+
fs.copyFileSync(srcPath, destPath)
30+
console.log(`Copied: npm/${file} → dist/${file}`)
3131
}
32-
});
32+
})
3333

34-
console.log('✓ Wrapper files copied successfully');
34+
console.log('✓ Wrapper files copied successfully')
3535
}
3636

37-
copyWrappers();
37+
copyWrappers()

0 commit comments

Comments
 (0)