question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Broken ES5 support in v2.3.0

See original GitHub issue

Note: for support questions, please use one of these channels: stackoverflow or slack

For bug reports and feature requests for the Swift client, please open an issue there.

For bug reports and feature requests for the Java client, please open an issue there.

You want to:

  • report a bug
  • request a feature

Current behaviour

socket.io-client now depends on debug@4.x.x which is not ES5 compatible.

After socket.io-client is built with Webpack, the resulting file contains several const declarations. As a result, the built file is not an ES5.

That sudden drop of ES5 is very surprising for a minor version release.

Steps to reproduce (if the current behaviour is a bug)

Build something with webpack importing socket.io-client as a dependency, without Babel transcompilation.

Expected behaviour

Built files are ES5.

Setup

  • OS: <any>
  • browser: <n/a>
  • socket.io version: 2.3.0

Other information (e.g. stacktraces, related issues, suggestions how to fix)

The const statement is actually in the dependency, debug@4. The 2.2.0 had debug@3 dependency.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:18
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
goto-bus-stopcommented, Sep 23, 2019

You can pin to an ES5 version using:

"socket.io-client": "~2.2.0"

https://github.com/transloadit/uppy/commit/5839b655f093edaa778d49b719f7dda063ef79cb

0reactions
darrachequesnecommented, Feb 2, 2021

This was fixed in socket.io-client@2.3.1: https://github.com/socketio/socket.io-client/releases/tag/2.3.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

es5-ext - npm
Start using es5-ext in your project by running `npm i es5-ext`. There are 275 other projects in the npm registry using es5-ext.
Read more >
Is it possible to use ES5 JavaScript with Angular 2 instead of ...
Yes, you can. Go read this guide. Pressing the ES5 tab on the code examples will show you regular ES5 JavaScript, as apposed...
Read more >
Upgrading from v2 to v3 — MathJax 3.2 documentation
Currently, automatic line breaking support is missing from version 3. This is a key feature to be included in a future release. The...
Read more >
JavaScript Versions - W3Schools
ECMAScript versions have been abbreviated to ES1, ES2, ES3, ES5, and ES6. ... Browser Support. ECMAScript 1 - 6 is fully supported in...
Read more >
Migration Guide - i18next documentation
Nothing breaking for non webpack2 users. v2.x.x to v3.0.0.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found