codingpixel-expo-app 0.1.5 → 0.1.6

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/dist/scaffold.js CHANGED
@@ -31,13 +31,25 @@ export async function runCreateExpoApp(dir, _name) {
31
31
  ], { stdio: "inherit" });
32
32
  }
33
33
  /**
34
- * Delete `App.tsx` shipped by blank-typescript collides with expo-router's
35
- * auto-detection of `src/app/`. Idempotent (no-op if already absent).
34
+ * Delete blank-typescript leftovers that conflict with our expo-router setup:
35
+ *
36
+ * - `App.tsx` — root component for non-expo-router apps; collides with
37
+ * expo-router's auto-detection of `src/app/`.
38
+ * - `index.ts` — root entry shipped by blank-typescript: imports `./App`
39
+ * and calls `registerRootComponent`. We set `package.json#main` to
40
+ * `expo-router/entry` so this file is unused at runtime, but TypeScript
41
+ * still type-checks it and errors with `Cannot find module './App'`
42
+ * after we delete the file above.
43
+ *
44
+ * Idempotent (no-op if already absent).
36
45
  */
37
46
  export function cleanupBlankTemplate(target) {
38
- const appTsx = path.join(target, "App.tsx");
39
- if (fileExists(appTsx)) {
40
- fs.rmSync(appTsx);
41
- log.step("Removed blank-typescript App.tsx (replaced by expo-router src/app/).");
47
+ const removable = ["App.tsx", "index.ts"];
48
+ for (const rel of removable) {
49
+ const p = path.join(target, rel);
50
+ if (fileExists(p)) {
51
+ fs.rmSync(p);
52
+ log.step(`Removed blank-typescript ${rel} (replaced by expo-router src/app/).`);
53
+ }
42
54
  }
43
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codingpixel-expo-app",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Opinionated Expo app scaffolder mirroring MyRoster conventions.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,8 +1,8 @@
1
- // react-native-mmkv 3.x+ exports `MMKV` as a class (was `createMMKV()` factory
2
- // in older versions). MyRoster's source predates the API change.
3
- import { MMKV } from "react-native-mmkv";
1
+ // react-native-mmkv 4.x exports `createMMKV()` factory + `MMKV` as a TYPE only.
2
+ // (Earlier 3.x exported `MMKV` as a class; the API was reverted in 4.x.)
3
+ import { createMMKV } from "react-native-mmkv";
4
4
 
5
- const storage = new MMKV();
5
+ const storage = createMMKV();
6
6
 
7
7
  export const reduxStorage = {
8
8
  setItem: (key: string, value: string) => {
@@ -14,7 +14,7 @@ export const reduxStorage = {
14
14
  return Promise.resolve(value);
15
15
  },
16
16
  removeItem: (key: string) => {
17
- storage.delete(key);
17
+ storage.remove(key);
18
18
  return Promise.resolve();
19
19
  },
20
20
  };