Skip to content

[Bug] Broken with prettier 3.7.x #406

@evoactivity

Description

@evoactivity

🐞 Describe the Bug

Breaks with prettier 3.7.x releases

🔬 Minimal Reproduction

Create a project using prettier 3.7.1, try to format files.

Broken tests #407

😕 Actual Behavior

Example error from the addon blueprint

[error] demo-app/app.gts: TypeError: Cannot read properties of undefined (reading 'value')
[error]     at or2 (file:///Users/liam/Work/GitHub/ember-local-storage-decorator/node_modules/.pnpm/prettier-plugin-ember-template-tag@2.1.0_prettier@3.7.1/node_modules/prettier-plugin-ember-template-tag/dist/prettier-plugin-ember-template-tag.js:63266:18)
[error]     at Wu2 (file:///Users/liam/Work/GitHub/ember-local-storage-decorator/node_modules/.pnpm/prettier-plugin-ember-template-tag@2.1.0_prettier@3.7.1/node_modules/prettier-plugin-ember-template-tag/dist/prettier-plugin-ember-template-tag.js:63776:13)
[error]     at file:///Users/liam/Work/GitHub/ember-local-storage-decorator/node_modules/.pnpm/prettier-plugin-ember-template-tag@2.1.0_prettier@3.7.1/node_modules/prettier-plugin-ember-template-tag/dist/prettier-plugin-ember-template-tag.js:63651:117
[error]     at Array.some (<anonymous>)
[error]     at Qo (file:///Users/liam/Work/GitHub/ember-local-storage-decorator/node_modules/.pnpm/prettier-plugin-ember-template-tag@2.1.0_prettier@3.7.1/node_modules/prettier-plugin-ember-template-tag/dist/prettier-plugin-ember-template-tag.js:63651:105)
[error]     at attachComments (file:///Users/liam/Work/GitHub/ember-local-storage-decorator/node_modules/.pnpm/prettier@3.7.1/node_modules/prettier/index.mjs:16526:11)
[error]     at prepareToPrint (file:///Users/liam/Work/GitHub/ember-local-storage-decorator/node_modules/.pnpm/prettier@3.7.1/node_modules/prettier/index.mjs:17865:3)
[error]     at printAstToDoc (file:///Users/liam/Work/GitHub/ember-local-storage-decorator/node_modules/.pnpm/prettier@3.7.1/node_modules/prettier/index.mjs:17787:13)
[error]     at coreFormat (file:///Users/liam/Work/GitHub/ember-local-storage-decorator/node_modules/.pnpm/prettier@3.7.1/node_modules/prettier/index.mjs:18171:20)
[error]     at async formatWithCursor (file:///Users/liam/Work/GitHub/ember-local-storage-decorator/node_modules/.pnpm/prettier@3.7.1/node_modules/prettier/index.mjs:18384:14)

🤔 Expected Behavior

Formats without error.

🌍 Environment

  • prettier-plugin-ember-template-tag version: 2.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions