erne-universal 0.13.4 → 0.13.5
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/lib/audit.js +12 -7
- package/package.json +1 -1
package/lib/audit.js
CHANGED
|
@@ -159,8 +159,8 @@ function checkSecurity(cwd, pkg, deps, findings, strengths) {
|
|
|
159
159
|
severity: SEVERITY.warning,
|
|
160
160
|
category: CATEGORY.security,
|
|
161
161
|
title: 'AsyncStorage used without secure storage',
|
|
162
|
-
detail: 'Sensitive data like auth tokens should use
|
|
163
|
-
fix: 'npm install expo-secure-store',
|
|
162
|
+
detail: 'Sensitive data like auth tokens should use a secure storage solution, not AsyncStorage.',
|
|
163
|
+
fix: detection.framework === 'bare-rn' ? 'npm install react-native-keychain' : 'npx expo install expo-secure-store',
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
|
|
@@ -192,6 +192,7 @@ function checkPerformance(cwd, deps, detection, findings, strengths) {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
// Image optimization
|
|
195
|
+
const isExpo = detection.framework === 'expo-managed' || detection.framework === 'expo-bare';
|
|
195
196
|
if (deps['expo-image']) {
|
|
196
197
|
strengths.push({ category: CATEGORY.performance, title: 'expo-image for optimized image loading' });
|
|
197
198
|
} else if (deps['react-native-fast-image']) {
|
|
@@ -201,8 +202,10 @@ function checkPerformance(cwd, deps, detection, findings, strengths) {
|
|
|
201
202
|
severity: SEVERITY.info,
|
|
202
203
|
category: CATEGORY.performance,
|
|
203
204
|
title: 'No optimized image library detected',
|
|
204
|
-
detail:
|
|
205
|
-
|
|
205
|
+
detail: isExpo
|
|
206
|
+
? 'expo-image provides better caching and performance than the built-in Image component.'
|
|
207
|
+
: 'react-native-fast-image provides better caching and performance than the built-in Image component.',
|
|
208
|
+
fix: isExpo ? 'npx expo install expo-image' : 'npm install react-native-fast-image',
|
|
206
209
|
});
|
|
207
210
|
}
|
|
208
211
|
|
|
@@ -283,7 +286,7 @@ function checkArchitecture(cwd, deps, detection, findings, strengths) {
|
|
|
283
286
|
category: CATEGORY.codeQuality,
|
|
284
287
|
title: 'No TypeScript configuration found',
|
|
285
288
|
detail: 'TypeScript significantly reduces runtime errors in React Native apps.',
|
|
286
|
-
fix: 'npx expo install typescript @types/react',
|
|
289
|
+
fix: detection.framework === 'bare-rn' ? 'npm install --save-dev typescript @types/react' : 'npx expo install typescript @types/react',
|
|
287
290
|
});
|
|
288
291
|
}
|
|
289
292
|
|
|
@@ -354,7 +357,9 @@ function checkTesting(cwd, deps, detection, findings, strengths) {
|
|
|
354
357
|
detail: hasTestingLib ? 'Testing library installed but no tests written.' : 'No testing framework or tests found.',
|
|
355
358
|
fix: hasTestingLib
|
|
356
359
|
? 'Create __tests__/ directory and add component tests'
|
|
357
|
-
:
|
|
360
|
+
: detection.framework === 'bare-rn'
|
|
361
|
+
? 'npm install --save-dev jest @testing-library/react-native react-test-renderer'
|
|
362
|
+
: 'npx expo install jest @testing-library/react-native jest-expo',
|
|
358
363
|
});
|
|
359
364
|
}
|
|
360
365
|
|
|
@@ -493,7 +498,7 @@ function checkCodeQuality(cwd, deps, detection, findings, strengths) {
|
|
|
493
498
|
category: CATEGORY.codeQuality,
|
|
494
499
|
title: 'No ESLint configuration detected',
|
|
495
500
|
detail: 'Linting helps maintain consistent code quality.',
|
|
496
|
-
fix: 'npx expo lint',
|
|
501
|
+
fix: detection.framework === 'bare-rn' ? 'npm install --save-dev eslint @react-native/eslint-config' : 'npx expo lint',
|
|
497
502
|
});
|
|
498
503
|
}
|
|
499
504
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "erne-universal",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.5",
|
|
4
4
|
"description": "Complete AI coding agent harness for React Native and Expo \u2014 13 specialized agents, autonomous worker mode, visual debugging, smart routing",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|