Skip to content

Attempt to fix build #257

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

Merged
merged 6 commits into from
Apr 8, 2025
Merged

Conversation

kategengler
Copy link
Contributor

@kategengler kategengler commented Mar 28, 2025

Prettier is failing on app/templates/index.hbs because it has a newline at the end of the file. It is odd, because afaict prettier enforces newlines at the end of the file.

So far, I have tried editing the .editorconfig to change insert_final_newline = false under hbs to true. This had no effect (as expected because we are not using and editor to modify the files and because prettier does not respect this configuration).

I also tried the route of running yarn format after creating the index.hbs file. This is a problem because all future patches bring back the newline and also because all future diffs would need to be edited.

Update:
It appears that prettier does strip newlines in handlebars prettier/prettier#10759 so the question is why did it not do so until now? My only theory is that prettier embedded in eslint avoided this somehow.

I disabled prettier for hbs since we didn't have it previously. When we rewrite for template tag we can take that into account.

We updated the blueprint with proper config for ember-data and released an update.

@kategengler
Copy link
Contributor Author

Fails with:

  Died on test #1: The Store class extending from EmberObject is deprecated.\n' +
    '            Please remove usage of EmberObject APIs and mark your class as not requiring it.\n' +
    '            \n' +
    '            To mark the class as no longer extending from EmberObject, in ember-cli-build.js\n' +
    '            set the following config:\n' +
    '            \n' +
    '            ```js\n' +
    '            const app = new EmberApp(defaults, {\n' +
    '              emberData: {\n' +
    '                deprecations: {\n' +
    '                  DEPRECATE_STORE_EXTENDS_EMBER_OBJECT: false\n' +
    '                }\n' +
    '              }\n' +
    '            });\n' +
    '            ```\n' +
    '            \n' +
    ```

This is a newly generated app with each step of the tutorial added in turn. Should this configuration be part of the blueprint @runspired ?

@kategengler kategengler merged commit 43f1a8e into ember-learn:main Apr 8, 2025
5 checks passed
@kategengler kategengler deleted the kg-fix-build branch April 8, 2025 15:16
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

Successfully merging this pull request may close these issues.

2 participants