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

Version constraint #14

Open
laurentvd opened this issue Sep 12, 2017 · 2 comments
Open

Version constraint #14

laurentvd opened this issue Sep 12, 2017 · 2 comments

Comments

@laurentvd
Copy link

Question; is there a reason why this package has a <3.0 handlebars dependency? I mean, 3.0 and 4.0 are out yet. Is there a known incompatibility?

@jenseng
Copy link
Collaborator

jenseng commented Sep 12, 2017

Hi @laurentvd, no incompatibility that I'm aware of. That constraint was set before version 3 came out. I'd be happy to merge a PR that loosens the contraint if the tests all pass 👍

@laurentvd
Copy link
Author

Unfortunately the tests fail 👎 with a <5 constraint. I dug a little deeper and it seems the AST signature that is returned from Handlebars.parse is different in newer versions. I'm sorry to say I'm not familiair with handlebars so it's pretty hard for me to fix the issue. If anyone wants to take a stab at this, here's the different formats:

Pre 3.0 (the statements array is the relevant part here)

ProgramNode {
    firstLine: 1,
    firstColumn: 0,
    lastColumn: 26,
    lastLine: 1,
    type: 'program',
    statements: [],
    strip: {}
}

4.0 (and maybe also 3.0)

{
    type: 'Program',
    body: [],
    strip: {},
    loc: {
        source: undefined,
        start: {},
        end: {}
    }
}

I'm not sure what the equivalent of statements would be in the new format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants