vue-socket.io-extended

Socket.io bindings for Vue.js and Vuex (inspired by Vue-Socket.io)

MIT License

Downloads
18.7K
Stars
629
Committers
15

Bot releases are hidden (Show)

vue-socket.io-extended - v4.0.2

Published by probil over 4 years ago

Docs

  • add instructions for quasar framework (#452)
  • fix typo (#439)

Chores

  • update dependency vue to v2.6.11
  • update dependency vue-class-component to v7.2.3
  • update dependency eslint to v7
  • update dependency rollup to v2.9.1
  • update dependency jest to v26.0.1
  • update dependency babel to v7.9.6
  • update dependency @vue/test-utils to v1.0.2
vue-socket.io-extended - v4.0.1

Published by probil almost 5 years ago

Fixes

  • Fix Vue plugin export in UMD build (#419, thanks @mila76 for finding)
vue-socket.io-extended - v4.0.0

Published by probil about 5 years ago

Features

  • Reactive properties this.$socket.connected and this.$socket.disconnected support (Closes #17) Docs
  • ECMAScript / TypeScript @Socket() decorator support (Closes #357) Docs

Bug fixes

  • Proper unsubscribing from dynamic listeners and non-dynamic listeners #408 #407 #400

Breaking changes

  • socket.io-client instance moved from this.$socket to this.socket.client. Please check usages before upgrading
- this.$socket.emit('anything');
+ this.$socket.client.emit('anything');
  • Dynamic socket event listeners API change (no more relies on Proxy API)
- this.$options.sockets.event_name = (payload) => {
-  console.log(payload)
- });
+ this.$socket.$subscribe('event_name', (payload) => {
+  console.log(payload)
+ });
  • If you are using library in CommonJS environment you might need to change the usage:
- const VueSocketIOExt = require('vue-socket.io-extended');
+ const VueSocketIOExt = require('vue-socket.io-extended').default;
const io = require('socket.io-client');

const socket = io('http://socketserver.com:1923');

Vue.use(VueSocketIOExt, socket);

Other changes

  • IE 11 fully supported now
  • No more security vulnerabilities in the dev dependencies
  • Bundle now properly transpiled to ESM
  • Stop polyfilling dead browsers (e.g. IE 10)
  • Twitter feed example now lives in the repo (more examples soon)
vue-socket.io-extended - v3.2.2

Published by probil over 5 years ago

Bug Fixes

  • deps: update dependency camelcase to v5.2.0 (89ea893)
  • deps: update dependency camelcase to v5.3.0 (cefb582)
  • deps: update dependency camelcase to v5.3.1 (f6dc7a4)
  • mixin: fix issue #400, unable to unsubscribe from dynamic listener (d2ccf99) thanks to @jonakirke94

Chores

  • Rebuild with latest dependencies
vue-socket.io-extended - v3.2.1

Published by probil over 5 years ago

Bug Fixes

  • Syntax error in IE11 (closes #253 and #238), thanks to @barrymckay397

Chores

  • Rebuild with latest deps
  • Moved to babel.config.js
vue-socket.io-extended - v3.2.0

Published by probil almost 6 years ago

Bug Fixes

  • core: correct option merging strategy for sockets prop (30b728b), closes #189
  • build: fix error "Error: Farm is ended, no more calls can be done to it" (2b4e5a8)

Features

  • basic TypeScript types (a91c343), closes #52, thanks to @TotomInc
vue-socket.io-extended - v3.1.0

Published by probil about 6 years ago

Features

You can now access default plugin options if you need it (e.g. re-use default eventToActionTransformer function):

import VueSocketIOExt from 'vue-socket.io-extended';
VueSocketIOExt.defaults // -> { actionPrefix: '...', mutationPrefix: '...', ... }
  • options: make default options read-only (2d9c23e)
  • options: move default options to separate file and export it (2ddbfad)
  • options: move export to plugin field (instead of named export) (7f4960b)
vue-socket.io-extended - v3.0.0

Published by probil over 6 years ago

Options support

This release introduces options support - hooray πŸŽ‰ . That means you can tweak the library to better fit your project needs. So now you can:

  • use custom prefix for actions (instead of default socket_), closes #25
  • use custom prefix for mutations (instead of default SOCKET_), closes #25
  • use custom function to convert event to action (instead of default camelcase)
  • use custom function to convert event to mutation (instead of default uppercase)

Read more in configuration section. That's all for now

Upgrade guide

If you are using store - keep reading, if not - stop reading right here because there nothing to update for you πŸ˜„.
Previously it was possible to pass store as third argument to enable vuex integration but now third argument is an options object. So, you need to pass store as part of options to enable it.

In short:

- Vue.use(VueSocketio, io('http://socketserver.com:1923'), store);
+ Vue.use(VueSocketio, io('http://socketserver.com:1923'), { store });
vue-socket.io-extended - v2.0.3

Published by probil over 6 years ago

Bug fixes

  • prevent crash during SSR (as library no more uses window directly)

Other improvements

  • correctly detects is Proxy natively supported by browser (no more issue with polyfill)
  • potentially improves testing experience for mixin as we can mock proxy support now
  • rebuild with [email protected] & [email protected]
vue-socket.io-extended - v2.0.2

Published by probil over 6 years ago

Bug fixes

  • prevent crash when Proxy API is not supported by browser (41490fc)
vue-socket.io-extended - v2.0.1

Published by probil over 6 years ago

Features

  • Observer: unwrap data while passing to mutation/action (37430ed, fixes #47)
  • Compatibility: add String.prototype.starsWith polyfill (1839542, fixes #27)
vue-socket.io-extended - v2.0.0

Published by probil over 6 years ago

Bracking changes

  • force user to provide socket.io-client instance (87738e5), fixes #19
vue-socket.io-extended - v1.2.1

Published by probil over 6 years ago

  • chore: integrate with codecov to gather code coverage reports
  • refactor: separate EvenEmitter class from global EvenEmitter instance
  • tests: cover EventEmitter, Observer and mixin by unit tests
  • fix: correctly convert event name to camelcased vuex action name
vue-socket.io-extended - v1.2.0

Published by probil over 6 years ago

  • feat: move to babel-preset-env instead of babel-preset-es2015 (which is deprecated now)
  • chore: enable CircleCI integration to check PRs before merge
  • chore: setup success build check on CI
  • chore bootstrap eslint to enforce code style based on airbnb configuration
  • chore: bootstrap test environment using jest
  • chore: setup test run on CI
  • refactor: update code based on eslint rules (auto-fix)
  • chore: add script for release generation
  • chore: add script for release note generation
vue-socket.io-extended - v1.1.0

Published by probil over 6 years ago

  • build with rollup instead of webpack
  • add package-lock to git, better npm@5 support
  • move babel config to .babelrc file
  • expose ESM build as well as UMD
vue-socket.io-extended - v1.0.0

Published by probil over 6 years ago

  • initial fork from vue-socket.io
  • update repo and package file
  • publish on npm
Package Rankings
Top 2.02% on Npmjs.org
Top 6.67% on Proxy.golang.org
Badges
Extracted from project README
Stand With Ukraine FOSSA Status
Related Projects