Code Monkey home page Code Monkey logo

Comments (19)

aslakhellesoy avatar aslakhellesoy commented on July 21, 2024 1

I'll make a babelised release

from common.

aslakhellesoy avatar aslakhellesoy commented on July 21, 2024

Ok, this should be fixed now. While you're developing you should be able to pull it in like this:

"dependencies": {
    "cucumber-expressions": "cucumber/cucumber-expressions-javascript"
}

(You'll probably need the same babel* devDependencies to build it)
When you confirm that works OK i can create a new release and you can pull it in like so:

"dependencies": {
    "cucumber-expressions": "1.0.2"
}

At this point, no babel* devDependencies should be required to use this lib.

from common.

charlierudolph avatar charlierudolph commented on July 21, 2024

Works as expected. Please release 1.0.2 when you can

from common.

charlierudolph avatar charlierudolph commented on July 21, 2024

@aslakhellesoy reopening until 1.0.2 is released.

from common.

charlierudolph avatar charlierudolph commented on July 21, 2024

@aslakhellesoy bump on this. This is one of the last blockers for cucumber-js 2.0

from common.

aslakhellesoy avatar aslakhellesoy commented on July 21, 2024

Thanks for the heads up, will try to do this week. Very excited to try out 2.0!!!

from common.

aslakhellesoy avatar aslakhellesoy commented on July 21, 2024

@jimmywarting what's not to like about a babelised release? What it means is that the release will be transpiled to "old" JavaScript

from common.

jimmywarting avatar jimmywarting commented on July 21, 2024

I don't need a old javascript code on my up to date node v7.0 version
It could run slower, think of how much a es6 generator needs to be converted down and take up more bytes, doing more checks then usual since it has to do hasOwnProperty checks all the time.

Also means more dependencies like Array.isArray for example is not a function so you end up including all kind of dependencies from what i don't need
if i get a stack trace error then i want to debug it

from common.

aslakhellesoy avatar aslakhellesoy commented on July 21, 2024

@jimmywarting one of the goals of Cucumber.js (and all the libraries it depends on) is to be able to run inside a browser, not just Node.

It would be impractical to release npm modules in both old JavaScript and es6.

I suppose we could release all libraries (such as cucumber-expressions) as es6 modules, and only use Babel in Cucumber.js, when building it for the browser.

Is that what you mean?

from common.

aslakhellesoy avatar aslakhellesoy commented on July 21, 2024

@charlierudolph since Cucumber.js 2.0 is ES6, it should be possible to use ES6. What about releasing cucumber-expressions as ES6, and instead, Cucumber.js could provide an alternative babelised build for Node 4 and browsers?

from common.

charlierudolph avatar charlierudolph commented on July 21, 2024

I'm fine with going extra babelification for the browser but would really like this to support node 4 out of the box. I don't like the idea of having to do version detection to serve different variants for node 4 and node 6.

With how simple this library is I don't think using babel is a problem. Looking at the compiled code the main thing that gets converted is classes and destructing (the import statements also get converted but those aren't supported by any node version yet). These are pretty minimal and they give us support more easily all the way down.

from common.

charlierudolph avatar charlierudolph commented on July 21, 2024

@aslakhellesoy bump as still need this.

from common.

aslakhellesoy avatar aslakhellesoy commented on July 21, 2024

@charlierudolph cucumber-expressions 1.0.2 is released. cucumber-js 2.0.0 Go!

from common.

charlierudolph avatar charlierudolph commented on July 21, 2024

Not sure what happened but 1.0.2 does not contain a dist directory.

from common.

aslakhellesoy avatar aslakhellesoy commented on July 21, 2024

Ah crap. I'll look into that. It's tricky to bulld a babelised module that works both as prebuilt tarball and git module

from common.

charlierudolph avatar charlierudolph commented on July 21, 2024

The prepublish script looks correct, I don't see how it got published without a dist directory

from common.

aslakhellesoy avatar aslakhellesoy commented on July 21, 2024

It's complicated... I haven't found any npm documentation describing what files are included in the package by default, if there is no files section in package.json and no .npmignore files.

In any case, I have an upcoming fix.

from common.

aslakhellesoy avatar aslakhellesoy commented on July 21, 2024

Allright - 1.0.3 is released, and I've checked it contains the dist directory

from common.

lock avatar lock commented on July 21, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from common.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.