Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async / await requirement details #518

Open
Donov4n opened this issue Jul 4, 2020 · 5 comments
Open

async / await requirement details #518

Donov4n opened this issue Jul 4, 2020 · 5 comments
Labels
CI-CD Test, build and packaging infra docs enhancement

Comments

@Donov4n
Copy link

Donov4n commented Jul 4, 2020

Hello and thanks for this super useful project !

I don't know if it's the right place to open an issue about the browser build repository (crossbario/autobahn-js-browser) but since issues aren't enabled on the project, I figured it had to be here.

--

The browser build embed number of polyfills, but it seems that it also have references to async / await that are not polyfilled and the browser support for this feature is relatively new and does not include IE at all.

I doubt it was done on purpose (= the async / await in the distributed build), especially when we consider that the code contains polyfill for IE 9.

But if that's the case, if it's meant to be, this should probably have been included in a major version (because it's a breaking change) and not a minor version as it was the case (20.2.2 => 20.4.1) (at least if the project follow semver).


EDIT: This seems to concerns the unminified version only, the minified version does not seem to contain any reference to async / await.

@om26er
Copy link
Contributor

om26er commented Jul 6, 2020

I doubt it was done on purpose (= the async / await in the distributed build), especially when we consider that the code contains polyfill for IE 9.

We made the change intentionally, see https://forum.crossbar.io/t/whats-the-minimal-version-of-ecmascript-supported/1588 -- We kind of consider IE9 "ancient" software.

But if that's the case, if it's meant to be, this should probably have been included in a major version (because it's a breaking change) and not a minor version as it was the case (20.2.2 => 20.4.1) (at least if the project follow semver).

Actually, we don't follow semver ;-) our versioning is somewhat inspired by Twisted's release cycle. YY.MM.mm, where YY is the last two digits of the year of the release, MM is the month, and mm is the number of release of that month.

@Donov4n
Copy link
Author

Donov4n commented Jul 6, 2020

We made the change intentionally, see https://forum.crossbar.io/t/whats-the-minimal-version-of-ecmascript-supported/1588

The linked forum post does not seem to be specifically related to the browser build (crossbario/autobahn-js-browser) but rather to crossbario/autobahn-js.

For the browser distribution, there is a kind of transpilation + polyfill, etc. except for this, that's what struck me as odd.
But okay ... if it's intentional ... :)

Maybe the README should contains a compatibility paragraph, since the lib doesn't support IE at all (including IE 11) and only recent browser version (?)

For the SemVer part, good to know (and redhibitory to me, if each dependency follow a specific convention for the versionning, and we have to hold them all back, it really gets too complicated)

I'm closing, thank for the answer.

@Donov4n Donov4n closed this as completed Jul 6, 2020
@Donov4n
Copy link
Author

Donov4n commented Jul 6, 2020

Note: If this project use ES+ features like async / await without transpilling, the engines.node in package.json should probably be updated according to the version of node that supports these features.

As the time i'm writing, the package.json contain 4.2.6, but Node support Async / Await since Node ... 7.10.1.

@om26er
Copy link
Contributor

om26er commented Jul 6, 2020

As the time i'm writing, the package.json contain 4.2.6, but Node support Async / Await since Node ... 7.10.1.

You are right https://node.green/, I will take care of that

@oberstet
Copy link
Contributor

oberstet commented Jul 6, 2020

yeah, AutobahnJS is using calver, not semver. but yes, we probably should:

@oberstet oberstet reopened this Jul 6, 2020
@oberstet oberstet changed the title Browser build : async / await references in the distributed code async / await requirement details Jul 6, 2020
@oberstet oberstet added CI-CD Test, build and packaging infra docs enhancement labels Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-CD Test, build and packaging infra docs enhancement
Projects
None yet
Development

No branches or pull requests

3 participants