DEV: Bump dependencies and fix linting (#115)
This commit is contained in:
parent
9e922f885d
commit
2f3eff4b81
|
@ -1,7 +1,7 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { emojiUrlFor } from "discourse/lib/text";
|
||||
import I18n from "I18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes";
|
||||
|
||||
export default {
|
||||
|
@ -16,7 +16,7 @@ export default {
|
|||
userNotesCount,
|
||||
emojiEnabled: component.siteSettings.enable_emoji,
|
||||
emojiUrl: emojiUrlFor("pencil"),
|
||||
userNotesTitle: I18n.t("user_notes.show", { count: userNotesCount }),
|
||||
userNotesTitle: i18n("user_notes.show", { count: userNotesCount }),
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@ import Component from "@glimmer/component";
|
|||
import { action } from "@ember/object";
|
||||
import { service } from "@ember/service";
|
||||
import DButton from "discourse/components/d-button";
|
||||
import icon from "discourse/helpers/d-icon";
|
||||
import emoji from "discourse/helpers/emoji";
|
||||
import icon from "discourse-common/helpers/d-icon";
|
||||
import I18n from "I18n";
|
||||
import I18n from "discourse-i18n";
|
||||
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes";
|
||||
|
||||
export default class extends Component {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getOwnerWithFallback } from "discourse-common/lib/get-owner";
|
||||
import { getOwnerWithFallback } from "discourse/lib/get-owner";
|
||||
import UserNotesModal from "../../discourse/components/modal/user-notes";
|
||||
|
||||
export function showUserNotes(store, userId, callback, opts) {
|
||||
|
|
|
@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
|
|||
import { action } from "@ember/object";
|
||||
import { service } from "@ember/service";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import I18n from "I18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
export default class UserNotesModal extends Component {
|
||||
@service dialog;
|
||||
|
@ -56,7 +56,7 @@ export default class UserNotesModal extends Component {
|
|||
@action
|
||||
removeNote(note) {
|
||||
this.dialog.deleteConfirm({
|
||||
message: I18n.t("user_notes.delete_confirm"),
|
||||
message: i18n("user_notes.delete_confirm"),
|
||||
didConfirm: () => {
|
||||
note
|
||||
.destroyRecord()
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import Component from "@glimmer/component";
|
||||
import I18n from "I18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
export default class ShowUserNotes extends Component {
|
||||
get label() {
|
||||
if (this.args.count > 0) {
|
||||
return I18n.t("user_notes.show", { count: this.args.count });
|
||||
return i18n("user_notes.show", { count: this.args.count });
|
||||
} else {
|
||||
return I18n.t("user_notes.title");
|
||||
return i18n("user_notes.title");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { observes, on } from "discourse/lib/decorators";
|
||||
import { iconNode } from "discourse/lib/icon-library";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { iconNode } from "discourse-common/lib/icon-library";
|
||||
import { observes, on } from "discourse-common/utils/decorators";
|
||||
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes";
|
||||
|
||||
const PLUGIN_ID = "discourse-user-notes";
|
||||
|
|
13
package.json
13
package.json
|
@ -1,15 +1,16 @@
|
|||
{
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@discourse/lint-configs": "2.2.2",
|
||||
"ember-template-lint": "6.0.0",
|
||||
"eslint": "9.15.0",
|
||||
"@discourse/lint-configs": "2.4.0",
|
||||
"ember-template-lint": "6.1.0",
|
||||
"eslint": "9.19.0",
|
||||
"prettier": "2.8.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18",
|
||||
"node": ">= 22",
|
||||
"npm": "please-use-pnpm",
|
||||
"yarn": "please-use-pnpm",
|
||||
"pnpm": ">= 9"
|
||||
}
|
||||
"pnpm": "9.x"
|
||||
},
|
||||
"packageManager": "pnpm@9.15.5"
|
||||
}
|
||||
|
|
1317
pnpm-lock.yaml
1317
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
|||
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "I18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
acceptance("User Notes", function (needs) {
|
||||
needs.user();
|
||||
|
@ -44,7 +44,7 @@ acceptance("User Notes", function (needs) {
|
|||
const modalClass = ".user-notes-modal";
|
||||
assert
|
||||
.dom(".user-controls .show-user-notes-btn")
|
||||
.hasText(I18n.t("user_notes.title"));
|
||||
.hasText(i18n("user_notes.title"));
|
||||
assert.dom(modalClass).doesNotExist();
|
||||
|
||||
await click(".user-controls .show-user-notes-btn");
|
||||
|
@ -60,6 +60,6 @@ acceptance("User Notes", function (needs) {
|
|||
|
||||
assert
|
||||
.dom(".user-controls .show-user-notes-btn")
|
||||
.hasText(I18n.t("user_notes.show", { count: 1 }));
|
||||
.hasText(i18n("user_notes.show", { count: 1 }));
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue