jason-rails 0.7.5 → 0.7.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b901c6b15b2b4f00d307c0e86811d660a68be05ac8c43f3d48c41412a020b4e8
4
- data.tar.gz: 3fbed93cb66f5acffe86a8254f0be3ed67979bf93d72ab8faed77a0ae552fff3
3
+ metadata.gz: c0ca4e6c931fdf041e8bd13a516e11d89699396691ff6328c73a0241f5672cc9
4
+ data.tar.gz: a0a6680af3dc06b0a5f96ee4f96513c172e12cf84cccc70339c0d46f7f0b742a
5
5
  SHA512:
6
- metadata.gz: 6959b8b6e2b97547a9c596d4efe5332339deb240c31c3951eb10e017e54932e529c851303e38bdc347c8ed89b4a209974fe790f3377128b0fb4229d14c490f66
7
- data.tar.gz: a9a17d52153d5580efcd2940437b1f5eac249f7611d38a152a4a043ea35803f1de6d2ce9e53ecd0e8dee923efd47df1be3c1b1d73e515095a4356875e25f0438
6
+ metadata.gz: f39c46227135319c3c9bfe81fce8cbda84769bd9de3d14103604c95cb4106dc0ff00a362a340c2f9a981f412947116848b569d64d33c879b094c2bdd8a24a990
7
+ data.tar.gz: c9cd5cf85a36769697b50f7d68c4204b6d61db2169a3378000bab6b8f1a6c05f3ecc42322c6480ea22a3dced1cbcd4625c8b64eb554ed21b3611a92f203c92fc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## v0.7.5.1
2
+ - Fix bug where axios errors get swallowed
3
+
4
+ ## v0.7.5
5
+ - Fixed JS errors when payloads arrive on websockets after the subscription has been unmounted
6
+ - Fixed errors during initialization due to calling `cache_all` on a Rails model before it had fully initialized.
7
+
1
8
  ## v0.7.3
2
9
  - Added: Add JasonContext to exports, for use in scenarios where you need to forward the context into some other React reconciler (e.g. `react-three-fiber`)
3
10
  - Fixed: Unneeded `reload` in Publisher resulting in extra database calls
data/README.md CHANGED
@@ -180,6 +180,7 @@ Development is primarily driven by the needs of projects we're using Jason in. I
180
180
 
181
181
  ## Publishing a new version
182
182
  - Update `version.rb`
183
+ - Update CHANGELOG
183
184
  - `gem build`
184
185
  - `gem push`
185
186
  - `npm version [major/minor/patch]`
@@ -29,6 +29,7 @@ function createOptDis(schema, dispatch, restClient, serverActionQueue) {
29
29
  .catch(error => {
30
30
  dispatch({ type: 'jason/upsert', payload: { error } });
31
31
  serverActionQueue.itemFailed(id, error);
32
+ Promise.reject(error);
32
33
  });
33
34
  }
34
35
  setInterval(dispatchServerAction, 10);
@@ -34,7 +34,10 @@ function actionCableAdapter(jasonConfig, handlePayload, dispatch, onConnected, t
34
34
  }
35
35
  function removeSubscription(config) {
36
36
  restClient_1.default.post('/jason/api/remove_subscription', { config, consumerId })
37
- .catch(e => console.error(e));
37
+ .catch(e => {
38
+ console.error(e);
39
+ Promise.reject(e);
40
+ });
38
41
  }
39
42
  function getPayload(config, options) {
40
43
  restClient_1.default.post('/jason/api/get_payload', {
@@ -46,7 +49,10 @@ function actionCableAdapter(jasonConfig, handlePayload, dispatch, onConnected, t
46
49
  handlePayload(payload);
47
50
  });
48
51
  })
49
- .catch(e => console.error(e));
52
+ .catch(e => {
53
+ console.error(e);
54
+ Promise.reject(e);
55
+ });
50
56
  }
51
57
  function fullChannelName(channelName) {
52
58
  return channelName;
@@ -33,13 +33,19 @@ function pusherAdapter(jasonConfig, handlePayload, dispatch) {
33
33
  configToChannel[JSON.stringify(config)] = channelName;
34
34
  subscribeToChannel(channelName);
35
35
  })
36
- .catch(e => console.error(e));
36
+ .catch(e => {
37
+ console.error(e);
38
+ Promise.reject(e);
39
+ });
37
40
  }
38
41
  function removeSubscription(config) {
39
42
  const channelName = configToChannel[JSON.stringify(config)];
40
43
  unsubscribeFromChannel(fullChannelName(channelName));
41
44
  restClient_1.default.post('/jason/api/remove_subscription', { config, consumerId })
42
- .catch(e => console.error(e));
45
+ .catch(e => {
46
+ console.error(e);
47
+ Promise.reject(e);
48
+ });
43
49
  }
44
50
  function getPayload(config, options) {
45
51
  restClient_1.default.post('/jason/api/get_payload', {
@@ -51,7 +57,10 @@ function pusherAdapter(jasonConfig, handlePayload, dispatch) {
51
57
  handlePayload(payload);
52
58
  });
53
59
  })
54
- .catch(e => console.error(e));
60
+ .catch(e => {
61
+ console.error(e);
62
+ Promise.reject(e);
63
+ });
55
64
  }
56
65
  function subscribeToChannel(channelName) {
57
66
  const channel = pusher.subscribe(fullChannelName(channelName));
data/client/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jamesr2323/jason",
3
- "version": "0.7.4",
3
+ "version": "0.7.5.1",
4
4
  "module": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "scripts": {
@@ -29,6 +29,8 @@ export default function createOptDis(schema, dispatch, restClient, serverActionQ
29
29
  .catch(error => {
30
30
  dispatch({ type: 'jason/upsert', payload: { error } })
31
31
  serverActionQueue.itemFailed(id, error)
32
+
33
+ Promise.reject(error)
32
34
  })
33
35
  }
34
36
 
@@ -35,7 +35,10 @@ export default function actionCableAdapter(jasonConfig, handlePayload, dispatch,
35
35
 
36
36
  function removeSubscription(config) {
37
37
  restClient.post('/jason/api/remove_subscription', { config, consumerId })
38
- .catch(e => console.error(e))
38
+ .catch(e => {
39
+ console.error(e)
40
+ Promise.reject(e)
41
+ })
39
42
  }
40
43
 
41
44
  function getPayload(config, options) {
@@ -48,7 +51,10 @@ export default function actionCableAdapter(jasonConfig, handlePayload, dispatch,
48
51
  handlePayload(payload)
49
52
  })
50
53
  })
51
- .catch(e => console.error(e))
54
+ .catch(e => {
55
+ console.error(e)
56
+ Promise.reject(e)
57
+ })
52
58
  }
53
59
 
54
60
  function fullChannelName(channelName) {
@@ -31,14 +31,20 @@ export default function pusherAdapter(jasonConfig, handlePayload, dispatch) {
31
31
  configToChannel[JSON.stringify(config)] = channelName
32
32
  subscribeToChannel(channelName)
33
33
  })
34
- .catch(e => console.error(e))
34
+ .catch(e => {
35
+ console.error(e)
36
+ Promise.reject(e)
37
+ })
35
38
  }
36
39
 
37
40
  function removeSubscription(config) {
38
41
  const channelName = configToChannel[JSON.stringify(config)]
39
42
  unsubscribeFromChannel(fullChannelName(channelName))
40
43
  restClient.post('/jason/api/remove_subscription', { config, consumerId })
41
- .catch(e => console.error(e))
44
+ .catch(e => {
45
+ console.error(e)
46
+ Promise.reject(e)
47
+ })
42
48
  }
43
49
 
44
50
  function getPayload(config, options) {
@@ -51,7 +57,10 @@ export default function pusherAdapter(jasonConfig, handlePayload, dispatch) {
51
57
  handlePayload(payload)
52
58
  })
53
59
  })
54
- .catch(e => console.error(e))
60
+ .catch(e => {
61
+ console.error(e)
62
+ Promise.reject(e)
63
+ })
55
64
  }
56
65
 
57
66
  function subscribeToChannel(channelName) {
data/lib/jason/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jason
2
- VERSION = "0.7.5"
2
+ VERSION = "0.7.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jason-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Rees
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-23 00:00:00.000000000 Z
11
+ date: 2022-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails