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

Fix issue while saving gjs/gts where prettier deletes the contents of the file: Downgrade prettier-plugin-ember-template-tag until we're on prettier@v3 #185

Merged
merged 2 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/__addonLocation__/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.5.1",
"prettier-plugin-ember-template-tag": "^1.0.0",
"prettier-plugin-ember-template-tag": "^0.3.2",
"rollup": "^3.21.8"<% if (!isExistingMonorepo) { %>,
"rollup-plugin-copy": "^3.4.0"<% } %><% if (typescript) { %>,
"typescript": "^5.0.4"<% } %>
Expand Down
2 changes: 1 addition & 1 deletion files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"devDependencies": {
"concurrently": "^8.2.0",
"prettier": "^2.5.1",
"prettier-plugin-ember-template-tag": "^1.0.0"
"prettier-plugin-ember-template-tag": "^0.3.2"
},
"workspaces": [
"<%= addonInfo.location %>",
Expand Down
5 changes: 5 additions & 0 deletions tests/smoke-tests/--typescript.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {
await helper.fixtures.use('./test-app/tests');
// Sync fixture with project's lint / formatting configuration
// (controlled by ember-cli)
//
// Ensure that we have no lint errors.
// It's important to keep this along with the tests,
// so that we can have confidence that the lints aren't destructively changing
// the files in a way that would break consumers
await helper.run('lint:fix');

/**
Expand Down
13 changes: 6 additions & 7 deletions tests/smoke-tests/defaults.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,18 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {
expect(exitCode).toEqual(0);
});

it('lint with fixtures pass', async () => {
it('build and test ', async () => {
// Copy over fixtures
await helper.fixtures.use('./my-addon/src/components');
await helper.fixtures.use('./test-app/tests');

// Ensure that we have no lint errors.
// It's important to keep this along with the tests,
// so that we can have confidence that the lints aren't destructively changing
// the files in a way that would break consumers
let { exitCode } = await helper.run('lint:fix');

expect(exitCode).toEqual(0);
});

it('build and test ', async () => {
// Copy over fixtures
await helper.fixtures.use('./my-addon/src/components');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-copying over the fixtures here hid this problem from us in #159

await helper.fixtures.use('./test-app/tests');

let buildResult = await helper.build();

Expand Down