@lotics/cli 0.50.0 → 0.51.0

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/src/cli.js CHANGED
@@ -30434,7 +30434,23 @@ export default defineConfig({
30434
30434
  optimizer: {
30435
30435
  web: {
30436
30436
  enabled: true,
30437
- include: ["react-native", "react-native-web", "react-native-svg", "@react-native-picker/picker"],
30437
+ // react + react-dom + the @testing-library renderer must ride in the
30438
+ // SAME optimized chunk as react-native-web, so a rendered tree and the
30439
+ // renderer share ONE react instance. Without this, a test that renders a
30440
+ // non-trivial App tree hits a null hooks dispatcher ("Cannot read
30441
+ // properties of null (reading 'useState')") the moment it mounts.
30442
+ include: [
30443
+ "react",
30444
+ "react-dom",
30445
+ "react-dom/client",
30446
+ "react-dom/test-utils",
30447
+ "react-native",
30448
+ "react-native-web",
30449
+ "react-native-svg",
30450
+ "@react-native-picker/picker",
30451
+ "@testing-library/react",
30452
+ "@testing-library/dom",
30453
+ ],
30438
30454
  esbuildOptions: {
30439
30455
  resolveExtensions: [".web.tsx", ".web.ts", ".web.js", ".tsx", ".ts", ".jsx", ".js", ".json"],
30440
30456
  },
@@ -253,7 +253,23 @@ export default defineConfig({
253
253
  optimizer: {
254
254
  web: {
255
255
  enabled: true,
256
- include: ["react-native", "react-native-web", "react-native-svg", "@react-native-picker/picker"],
256
+ // react + react-dom + the @testing-library renderer must ride in the
257
+ // SAME optimized chunk as react-native-web, so a rendered tree and the
258
+ // renderer share ONE react instance. Without this, a test that renders a
259
+ // non-trivial App tree hits a null hooks dispatcher ("Cannot read
260
+ // properties of null (reading 'useState')") the moment it mounts.
261
+ include: [
262
+ "react",
263
+ "react-dom",
264
+ "react-dom/client",
265
+ "react-dom/test-utils",
266
+ "react-native",
267
+ "react-native-web",
268
+ "react-native-svg",
269
+ "@react-native-picker/picker",
270
+ "@testing-library/react",
271
+ "@testing-library/dom",
272
+ ],
257
273
  esbuildOptions: {
258
274
  resolveExtensions: [".web.tsx", ".web.ts", ".web.js", ".tsx", ".ts", ".jsx", ".js", ".json"],
259
275
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/cli",
3
- "version": "0.50.0",
3
+ "version": "0.51.0",
4
4
  "description": "Lotics SDK and CLI for AI agents",
5
5
  "type": "module",
6
6
  "bin": {