houdini 0.16.2 → 0.16.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # houdini
2
2
 
3
+ ## 0.16.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#548](https://github.com/HoudiniGraphql/houdini/pull/548) [`cd00b5f`](https://github.com/HoudiniGraphql/houdini/commit/cd00b5f436412ecc3ac2225d2ee8a9201b172da0) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - Fix bug when unsubscribing between load and render
8
+
9
+ ## 0.16.3
10
+
11
+ ### 🐛 Fixes
12
+
13
+ - [#545](https://github.com/HoudiniGraphql/houdini/pull/545) [`6cc6765`](https://github.com/HoudiniGraphql/houdini/commit/6cc6765771f57a51711725f3bed458a2ab338278) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - fix a bug hiding +layout.server data from client
14
+
3
15
  ## 0.16.2
4
16
 
5
17
  ### ✨ Features
package/README.md CHANGED
@@ -31,8 +31,6 @@
31
31
  {/each}
32
32
  ```
33
33
 
34
- > If you are trying out the latest kit version, please use `houdini@next` and let us know how it goes here: https://github.com/HoudiniGraphql/houdini/discussions/475
35
-
36
34
  ## ✨  Features
37
35
 
38
36
  - Composable and colocated data requirements for your components
package/build/cmd.js CHANGED
@@ -159326,7 +159326,7 @@ async function runPipeline(config, docs) {
159326
159326
  // if we detected a version change, we're nuking everything so don't bother with a summary
159327
159327
  if (newTimestamp) {
159328
159328
  console.log('💣 Detected new version of Houdini. Regenerating all documents...');
159329
- console.log('🎉 Welcome to 0.16.2!');
159329
+ console.log('🎉 Welcome to 0.16.4!');
159330
159330
  // if the user is coming from a version pre-15, point them to the migration guide
159331
159331
  const major = parseInt(previousVersion.split('.')[1]);
159332
159332
  if (major < 16) {
@@ -166269,7 +166269,7 @@ async function updatePackageJSON(targetPath) {
166269
166269
  // houdini & graphql should be a dev dependencies
166270
166270
  packageJSON.devDependencies = {
166271
166271
  ...packageJSON.devDependencies,
166272
- houdini: '^0.16.2',
166272
+ houdini: '^0.16.4',
166273
166273
  graphql: '^15.5.0',
166274
166274
  };
166275
166275
  await writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
@@ -153017,7 +153017,7 @@ function process_root_layout_server(page) {
153017
153017
  // threading the value through the return
153018
153018
  function process_root_layout_script(page) {
153019
153019
  add_load_return(page, (event_id) => [
153020
- AST$1.objectProperty(AST$1.identifier('__houdini__session__'), AST$1.optionalMemberExpression(AST$1.memberExpression(event_id, AST$1.identifier('data')), AST$1.identifier('__houdini__session__'))),
153020
+ AST$1.spreadElement(AST$1.memberExpression(event_id, AST$1.identifier('data'))),
153021
153021
  ]);
153022
153022
  }
153023
153023
  function add_load_return(page, properties) {
@@ -152979,7 +152979,7 @@ function process_root_layout_server(page) {
152979
152979
  // threading the value through the return
152980
152980
  function process_root_layout_script(page) {
152981
152981
  add_load_return(page, (event_id) => [
152982
- AST$1.objectProperty(AST$1.identifier('__houdini__session__'), AST$1.optionalMemberExpression(AST$1.memberExpression(event_id, AST$1.identifier('data')), AST$1.identifier('__houdini__session__'))),
152982
+ AST$1.spreadElement(AST$1.memberExpression(event_id, AST$1.identifier('data'))),
152983
152983
  ]);
152984
152984
  }
152985
152985
  function add_load_return(page, properties) {
@@ -140,6 +140,10 @@ If this is leftovers from old versions of houdini, you can safely remove this \`
140
140
  const bubbleUp = this.store.subscribe(...args);
141
141
  // we have a new subscriber
142
142
  this.subscriberCount = (this.subscriberCount ?? 0) + 1;
143
+ // make sure that the store is always listening to the cache (on the browser)
144
+ if (adapter_1.isBrowser && !this.subscriptionSpec) {
145
+ this.refreshSubscription(this.lastVariables ?? {});
146
+ }
143
147
  // Handle unsubscribe
144
148
  return () => {
145
149
  // we lost a subscriber
@@ -1 +1 @@
1
- {"version":"0.16.2","timestamp":1663220100251}
1
+ {"version":"0.16.4","timestamp":1663432436002}
@@ -140,6 +140,10 @@ If this is leftovers from old versions of houdini, you can safely remove this \`
140
140
  const bubbleUp = this.store.subscribe(...args);
141
141
  // we have a new subscriber
142
142
  this.subscriberCount = (this.subscriberCount ?? 0) + 1;
143
+ // make sure that the store is always listening to the cache (on the browser)
144
+ if (adapter_1.isBrowser && !this.subscriptionSpec) {
145
+ this.refreshSubscription(this.lastVariables ?? {});
146
+ }
143
147
  // Handle unsubscribe
144
148
  return () => {
145
149
  // we lost a subscriber
@@ -1 +1 @@
1
- {"version":"0.16.2","timestamp":1663220099252}
1
+ {"version":"0.16.4","timestamp":1663432435190}
@@ -108,10 +108,14 @@ If this is leftovers from old versions of houdini, you can safely remove this \`
108
108
  return get(this.store).variables;
109
109
  }
110
110
  subscribe(...args) {
111
- var _a;
111
+ var _a, _b;
112
112
  const bubbleUp = this.store.subscribe(...args);
113
113
  // we have a new subscriber
114
114
  this.subscriberCount = ((_a = this.subscriberCount) !== null && _a !== void 0 ? _a : 0) + 1;
115
+ // make sure that the store is always listening to the cache (on the browser)
116
+ if (isBrowser && !this.subscriptionSpec) {
117
+ this.refreshSubscription((_b = this.lastVariables) !== null && _b !== void 0 ? _b : {});
118
+ }
115
119
  // Handle unsubscribe
116
120
  return () => {
117
121
  // we lost a subscriber
@@ -56,7 +56,7 @@ function process_root_layout_server(page) {
56
56
  // threading the value through the return
57
57
  function process_root_layout_script(page) {
58
58
  add_load_return(page, (event_id) => [
59
- AST.objectProperty(AST.identifier('__houdini__session__'), AST.optionalMemberExpression(AST.memberExpression(event_id, AST.identifier('data')), AST.identifier('__houdini__session__'))),
59
+ AST.spreadElement(AST.memberExpression(event_id, AST.identifier('data'))),
60
60
  ]);
61
61
  }
62
62
  function add_load_return(page, properties) {
@@ -161456,7 +161456,7 @@ async function runPipeline(config, docs) {
161456
161456
  // if we detected a version change, we're nuking everything so don't bother with a summary
161457
161457
  if (newTimestamp) {
161458
161458
  console.log('💣 Detected new version of Houdini. Regenerating all documents...');
161459
- console.log('🎉 Welcome to 0.16.2!');
161459
+ console.log('🎉 Welcome to 0.16.4!');
161460
161460
  // if the user is coming from a version pre-15, point them to the migration guide
161461
161461
  const major = parseInt(previousVersion.split('.')[1]);
161462
161462
  if (major < 16) {
@@ -162461,7 +162461,7 @@ function process_root_layout_server(page) {
162461
162461
  // threading the value through the return
162462
162462
  function process_root_layout_script(page) {
162463
162463
  add_load_return(page, (event_id) => [
162464
- AST$1.objectProperty(AST$1.identifier('__houdini__session__'), AST$1.optionalMemberExpression(AST$1.memberExpression(event_id, AST$1.identifier('data')), AST$1.identifier('__houdini__session__'))),
162464
+ AST$1.spreadElement(AST$1.memberExpression(event_id, AST$1.identifier('data'))),
162465
162465
  ]);
162466
162466
  }
162467
162467
  function add_load_return(page, properties) {
@@ -161417,7 +161417,7 @@ async function runPipeline(config, docs) {
161417
161417
  // if we detected a version change, we're nuking everything so don't bother with a summary
161418
161418
  if (newTimestamp) {
161419
161419
  console.log('💣 Detected new version of Houdini. Regenerating all documents...');
161420
- console.log('🎉 Welcome to 0.16.2!');
161420
+ console.log('🎉 Welcome to 0.16.4!');
161421
161421
  // if the user is coming from a version pre-15, point them to the migration guide
161422
161422
  const major = parseInt(previousVersion.split('.')[1]);
161423
161423
  if (major < 16) {
@@ -162422,7 +162422,7 @@ function process_root_layout_server(page) {
162422
162422
  // threading the value through the return
162423
162423
  function process_root_layout_script(page) {
162424
162424
  add_load_return(page, (event_id) => [
162425
- AST$1.objectProperty(AST$1.identifier('__houdini__session__'), AST$1.optionalMemberExpression(AST$1.memberExpression(event_id, AST$1.identifier('data')), AST$1.identifier('__houdini__session__'))),
162425
+ AST$1.spreadElement(AST$1.memberExpression(event_id, AST$1.identifier('data'))),
162426
162426
  ]);
162427
162427
  }
162428
162428
  function add_load_return(page, properties) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini",
3
- "version": "0.16.2",
3
+ "version": "0.16.4",
4
4
  "description": "The disappearing graphql client for SvelteKit",
5
5
  "type": "module",
6
6
  "bin": "./build/cmd.js",
@@ -166,6 +166,11 @@ If this is leftovers from old versions of houdini, you can safely remove this \`
166
166
  // we have a new subscriber
167
167
  this.subscriberCount = (this.subscriberCount ?? 0) + 1
168
168
 
169
+ // make sure that the store is always listening to the cache (on the browser)
170
+ if (isBrowser && !this.subscriptionSpec) {
171
+ this.refreshSubscription(this.lastVariables ?? ({} as _Input))
172
+ }
173
+
169
174
  // Handle unsubscribe
170
175
  return () => {
171
176
  // we lost a subscriber
@@ -44,13 +44,7 @@ function process_root_layout_server(page: TransformPage) {
44
44
  // threading the value through the return
45
45
  function process_root_layout_script(page: TransformPage) {
46
46
  add_load_return(page, (event_id) => [
47
- AST.objectProperty(
48
- AST.identifier('__houdini__session__'),
49
- AST.optionalMemberExpression(
50
- AST.memberExpression(event_id, AST.identifier('data')),
51
- AST.identifier('__houdini__session__')
52
- )
53
- ),
47
+ AST.spreadElement(AST.memberExpression(event_id, AST.identifier('data'))),
54
48
  ])
55
49
  }
56
50