GithubHelp home page GithubHelp logo

Comments (6)

rwjblue avatar rwjblue commented on May 16, 2024 2

@NullVoxPopuli - Ya, I reached out to @wycats to double check the spec with me also. Hopefully will have a more definite confirmation in a couple days...

from ember-decorators.

buschtoens avatar buschtoens commented on May 16, 2024 1

Apparently transform-decorators-legacy works a bit differently and does not replace the original property, but instead calls defineProperty on top. At least that's what I reckon at a quick glance.

The obvious quick fix is jumping through the codebase and replacing all offending code:

  @alias('session.data.authenticated.id') id,
  @alias('user.name') name

  // becomes

  @alias('session.data.authenticated.id') id: null,
  @alias('user.name') name: null

from ember-decorators.

rwjblue avatar rwjblue commented on May 16, 2024 1

I am going to close this for now. The version of decorators that we are currently using (with babel-plugin-transform-decorators-legacy) is from the original proposal. The babel crew are actively working on updating for the current spec and hopefully we can migrate to that soon enough. When we do, we will re-evaluate these sorts of issues...

from ember-decorators.

NullVoxPopuli avatar NullVoxPopuli commented on May 16, 2024

Here is my babel config in ember-cli-build:

    babel: {
      // ember < 2.13 / babel < 6
      // optional: ['es7.decorators'],
      // ember >= 2.13 / babel >= 6
      plugins: [
        'transform-decorators-legacy',
        'transform-decorators',
        'transform-object-rest-spread'
      ]
    },

from ember-decorators.

rwjblue avatar rwjblue commented on May 16, 2024

@buschtoens - Thank you chiming in here! That definitely seems like a reasonable solution for folks blocked by this. I'll need to read through the spec a bit more to see if the behavior babel@6 + transform-decorators-legacy is exhibiting is correct or a bug...

from ember-decorators.

NullVoxPopuli avatar NullVoxPopuli commented on May 16, 2024

oh man. that would be a hefty change for me. I use the decorators everywhere.
Thankfully, I'm not blocked, as this 2.13.1 upgrade is branched.

I know I can regex-replace all of them -- but lemme know if the non-object notation is gonna be the final one (the current notation ( @alias('property') aliasedProperty ) )

from ember-decorators.

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.