@multiplatform.one/config 7.22.0 → 7.23.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/config",
3
- "version": "7.22.0",
3
+ "version": "7.23.1",
4
4
  "description": "Shared build and test configuration presets for multiplatform.one",
5
5
  "keywords": [
6
6
  "config",
@@ -99,7 +99,7 @@
99
99
  "access": "public"
100
100
  },
101
101
  "dependencies": {
102
- "@multiplatform.one/utils": "7.22.0",
102
+ "@multiplatform.one/utils": "7.23.1",
103
103
  "@tamagui/vite-plugin": "2.7.6",
104
104
  "@vitejs/plugin-react": "^6.0.1",
105
105
  "dotenv": "^17.4.2",
@@ -114,7 +114,9 @@
114
114
  },
115
115
  "peerDependencies": {
116
116
  "@playwright/test": ">=1.20.0",
117
- "one": "^1.4.10"
117
+ "one": "^1.4.10",
118
+ "react-native": ">=0.83.0",
119
+ "vxrn": "^1.4.10"
118
120
  },
119
121
  "peerDependenciesMeta": {
120
122
  "@playwright/test": {
@@ -122,6 +124,12 @@
122
124
  },
123
125
  "one": {
124
126
  "optional": true
127
+ },
128
+ "react-native": {
129
+ "optional": true
130
+ },
131
+ "vxrn": {
132
+ "optional": true
125
133
  }
126
134
  },
127
135
  "engines": {
@@ -235,9 +235,10 @@ function declares(dir: string, pkgName: string): boolean {
235
235
  }
236
236
 
237
237
  /**
238
- * Whether an installed package references `useSyncExternalStore` in anything
238
+ * Whether an installed package references `useSyncExternalStore` in the code
239
239
  * it ships. The cheap half of the membership rule, re-run against the tree so
240
- * the next tanstack upgrade is checked rather than assumed.
240
+ * the next tanstack upgrade is checked rather than assumed. Comments do not
241
+ * count: @tanstack/db 0.8 names the hook in doc comments and calls it nowhere.
241
242
  */
242
243
  function subscribesExternalStore(pkgName: string): boolean {
243
244
  const dir = path.join(workspaceRoot, "node_modules", ...pkgName.split("/"));
@@ -253,7 +254,13 @@ function referencesHook(dir: string): boolean {
253
254
  continue;
254
255
  }
255
256
  if (!/\.(?:js|cjs|mjs|ts|tsx)$/.test(entry.name)) continue;
256
- if (fs.readFileSync(full, "utf8").includes("useSyncExternalStore")) return true;
257
+ if (withoutComments(fs.readFileSync(full, "utf8")).includes("useSyncExternalStore")) {
258
+ return true;
259
+ }
257
260
  }
258
261
  return false;
259
262
  }
263
+
264
+ function withoutComments(source: string): string {
265
+ return source.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|[^:\\])\/\/.*$/gm, "$1");
266
+ }