@multiplatform.one/config 7.23.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.23.
|
|
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.23.
|
|
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",
|
|
@@ -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
|
|
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"))
|
|
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
|
+
}
|