@brendanbank/atrium-host-bundle-utils 0.26.5 → 0.26.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AAwCA,MAAM,WAAW,uBAAuB;IACtC;mEAC+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd;;2BAEuB;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;iEAE6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;sEACkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;0EACsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAiDlC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AAwCA,MAAM,WAAW,uBAAuB;IACtC;mEAC+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd;;2BAEuB;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;iEAE6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;sEACkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;0EACsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA8DlC"}
@@ -58,6 +58,19 @@ export async function hostBundleConfig(options) {
58
58
  // dynamically-imported CSS plugin. The merged config is what Vite
59
59
  // actually consumes at build time.
60
60
  const base = {
61
+ // Force a single copy of each context-bearing singleton into the
62
+ // bundle. React and TanStack Query both key their context off the
63
+ // module instance, so two physical copies (e.g. the host's
64
+ // `@tanstack/react-query` vs the one `@brendanbank/atrium-host-bundle-utils`
65
+ // resolves from its own `node_modules` in a pnpm workspace) yield
66
+ // two distinct contexts: a `<QueryClientProvider>` from copy A and
67
+ // a `useQuery` from copy B throw "No QueryClient set" at runtime.
68
+ // `dedupe` makes Vite resolve every bare import of these to the
69
+ // copy nearest the host project root, immune to workspace version
70
+ // skew between the host and the SDK.
71
+ resolve: {
72
+ dedupe: ['react', 'react-dom', '@tanstack/react-query'],
73
+ },
61
74
  // Lib-mode builds don't auto-replace `process.env.NODE_ENV` the
62
75
  // way Vite's app-mode builds do, and several deps (React internals,
63
76
  // TanStack Query) reference it. Without these defines the bundle
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,wCAAwC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6BpC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,OAAgC;IAEhC,MAAM,EACJ,KAAK,EACL,QAAQ,GAAG,SAAS,EACpB,MAAM,GAAG,MAAM,EACf,SAAS,GAAG,IAAI,EAChB,MAAM,GAAG,QAAQ,EACjB,WAAW,GAAG,EAAE,GACjB,GAAG,OAAO,CAAC;IAEZ,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAChD,MAAM,CAAC,MAAM,CAAC;QACd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"name": "@brendanbank/atrium-host-bundle-utils",
3
- "version": "0.26.5",
3
+ "version": "0.26.7",
4
4
  "description": "Runtime helpers, Vite preset, and React hooks for atrium host bundles. Wraps the dual-tree mount pattern, the host-bundle Vite library config, and the /api/users/me/context hook so a host's main.tsx is ~10 lines of registration calls.",
5
5
  "license": "BSD-2-Clause",
6
6
  "type": "module",
@@ -25,7 +25,7 @@
25
25
  }
26
26
  },
27
27
  "dependencies": {
28
- "@brendanbank/atrium-host-types": "0.26.5"
28
+ "@brendanbank/atrium-host-types": "0.26.7"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@tanstack/react-query": "^5.0.0",