DEV: Bump dependencies and fix linting (#194)
This commit is contained in:
parent
90f3f97a13
commit
ec328ed3d8
|
@ -1,6 +1,6 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { tagName } from "@ember-decorators/component";
|
import { tagName } from "@ember-decorators/component";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse/lib/decorators";
|
||||||
|
|
||||||
@tagName("")
|
@tagName("")
|
||||||
export default class DocsCategory extends Component {
|
export default class DocsCategory extends Component {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { reads } from "@ember/object/computed";
|
import { reads } from "@ember/object/computed";
|
||||||
import { classNames } from "@ember-decorators/component";
|
import { classNames } from "@ember-decorators/component";
|
||||||
import discourseDebounce from "discourse-common/lib/debounce";
|
import discourseDebounce from "discourse/lib/debounce";
|
||||||
import computed, { bind } from "discourse-common/utils/decorators";
|
import computed, { bind } from "discourse/lib/decorators";
|
||||||
|
|
||||||
@classNames("docs-topic")
|
@classNames("docs-topic")
|
||||||
export default class DocsTopic extends Component {
|
export default class DocsTopic extends Component {
|
||||||
|
|
|
@ -4,9 +4,9 @@ import { action } from "@ember/object";
|
||||||
import { alias, equal, gt, readOnly } from "@ember/object/computed";
|
import { alias, equal, gt, readOnly } from "@ember/object/computed";
|
||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
import { on } from "@ember-decorators/object";
|
import { on } from "@ember-decorators/object";
|
||||||
import getURL from "discourse-common/lib/get-url";
|
import discourseComputed from "discourse/lib/decorators";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import getURL from "discourse/lib/get-url";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
import Docs from "discourse/plugins/discourse-docs/discourse/models/docs";
|
import Docs from "discourse/plugins/discourse-docs/discourse/models/docs";
|
||||||
|
|
||||||
const SHOW_FILTER_AT = 10;
|
const SHOW_FILTER_AT = 10;
|
||||||
|
@ -246,12 +246,12 @@ export default class DocsIndexController extends Controller {
|
||||||
|
|
||||||
@discourseComputed()
|
@discourseComputed()
|
||||||
emptyState() {
|
emptyState() {
|
||||||
let body = I18n.t("docs.no_docs.body");
|
let body = i18n("docs.no_docs.body");
|
||||||
if (this.docsCategoriesAndTags.length) {
|
if (this.docsCategoriesAndTags.length) {
|
||||||
body += I18n.t("docs.no_docs.to_include_topic_in_docs");
|
body += i18n("docs.no_docs.to_include_topic_in_docs");
|
||||||
body += ` (${this.docsCategoriesAndTags.join(", ")}).`;
|
body += ` (${this.docsCategoriesAndTags.join(", ")}).`;
|
||||||
} else if (this.currentUser.staff) {
|
} else if (this.currentUser.staff) {
|
||||||
const setUpPluginMessage = I18n.t("docs.no_docs.setup_the_plugin", {
|
const setUpPluginMessage = i18n("docs.no_docs.setup_the_plugin", {
|
||||||
settingsUrl: getURL(
|
settingsUrl: getURL(
|
||||||
"/admin/site_settings/category/plugins?filter=plugin:discourse-docs"
|
"/admin/site_settings/category/plugins?filter=plugin:discourse-docs"
|
||||||
),
|
),
|
||||||
|
@ -260,7 +260,7 @@ export default class DocsIndexController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: I18n.t("docs.no_docs.title"),
|
title: i18n("docs.no_docs.title"),
|
||||||
body: htmlSafe(body),
|
body: htmlSafe(body),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
import { getDocs } from "../../lib/get-docs";
|
import { getDocs } from "../../lib/get-docs";
|
||||||
|
|
||||||
function initialize(api, container) {
|
function initialize(api, container) {
|
||||||
|
@ -13,7 +13,7 @@ function initialize(api, container) {
|
||||||
if (siteSettings.docs_add_to_top_menu) {
|
if (siteSettings.docs_add_to_top_menu) {
|
||||||
api.addNavigationBarItem({
|
api.addNavigationBarItem({
|
||||||
name: "docs",
|
name: "docs",
|
||||||
displayName: I18n.t("docs.title"),
|
displayName: i18n("docs.title"),
|
||||||
href: "/" + docsPath,
|
href: "/" + docsPath,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ export default {
|
||||||
|
|
||||||
const tip = {
|
const tip = {
|
||||||
label: "in:docs",
|
label: "in:docs",
|
||||||
description: I18n.t("docs.search.tip_description"),
|
description: i18n("docs.search.tip_description"),
|
||||||
clickable: true,
|
clickable: true,
|
||||||
searchTopics: true,
|
searchTopics: true,
|
||||||
};
|
};
|
||||||
|
@ -65,8 +65,8 @@ export default {
|
||||||
api.addCommunitySectionLink({
|
api.addCommunitySectionLink({
|
||||||
name: "docs",
|
name: "docs",
|
||||||
route: "docs.index",
|
route: "docs.index",
|
||||||
title: I18n.t("sidebar.docs_link_title"),
|
title: i18n("sidebar.docs_link_title"),
|
||||||
text: I18n.t("sidebar.docs_link_text"),
|
text: i18n("sidebar.docs_link_text"),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
import I18n from "I18n";
|
import { i18n } from "discourse-i18n";
|
||||||
import Docs from "discourse/plugins/discourse-docs/discourse/models/docs";
|
import Docs from "discourse/plugins/discourse-docs/discourse/models/docs";
|
||||||
|
|
||||||
export default class DocsIndex extends DiscourseRoute {
|
export default class DocsIndex extends DiscourseRoute {
|
||||||
|
@ -26,7 +26,7 @@ export default class DocsIndex extends DiscourseRoute {
|
||||||
|
|
||||||
titleToken() {
|
titleToken() {
|
||||||
const model = this.currentModel;
|
const model = this.currentModel;
|
||||||
const pageTitle = I18n.t("docs.title");
|
const pageTitle = i18n("docs.title");
|
||||||
if (model.topic.title && model.topic.category_id) {
|
if (model.topic.title && model.topic.category_id) {
|
||||||
const title = model.topic.unicode_title || model.topic.title;
|
const title = model.topic.unicode_title || model.topic.title;
|
||||||
const categoryName = this.site.categories.findBy(
|
const categoryName = this.site.categories.findBy(
|
||||||
|
|
13
package.json
13
package.json
|
@ -1,15 +1,16 @@
|
||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@discourse/lint-configs": "2.2.2",
|
"@discourse/lint-configs": "2.4.0",
|
||||||
"ember-template-lint": "6.0.0",
|
"ember-template-lint": "6.1.0",
|
||||||
"eslint": "9.15.0",
|
"eslint": "9.19.0",
|
||||||
"prettier": "2.8.8"
|
"prettier": "2.8.8"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18",
|
"node": ">= 22",
|
||||||
"npm": "please-use-pnpm",
|
"npm": "please-use-pnpm",
|
||||||
"yarn": "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,12 +1,12 @@
|
||||||
import { click, currentURL, visit } from "@ember/test-helpers";
|
import { click, currentURL, visit } from "@ember/test-helpers";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
|
import { cloneJSON } from "discourse/lib/object";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
exists,
|
exists,
|
||||||
query,
|
query,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { cloneJSON } from "discourse-common/lib/object";
|
import { i18n } from "discourse-i18n";
|
||||||
import I18n from "I18n";
|
|
||||||
import docsFixtures from "../fixtures/docs";
|
import docsFixtures from "../fixtures/docs";
|
||||||
|
|
||||||
let DOCS_URL_PATH = "docs";
|
let DOCS_URL_PATH = "docs";
|
||||||
|
@ -56,13 +56,13 @@ acceptance("Docs - Sidebar with docs enabled", function (needs) {
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
query(".sidebar-section-link[data-link-name='docs']").textContent.trim(),
|
query(".sidebar-section-link[data-link-name='docs']").textContent.trim(),
|
||||||
I18n.t("sidebar.docs_link_text"),
|
i18n("sidebar.docs_link_text"),
|
||||||
"displays the right text for the link"
|
"displays the right text for the link"
|
||||||
);
|
);
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
query(".sidebar-section-link[data-link-name='docs']").title,
|
query(".sidebar-section-link[data-link-name='docs']").title,
|
||||||
I18n.t("sidebar.docs_link_title"),
|
i18n("sidebar.docs_link_title"),
|
||||||
"displays the right title for the link"
|
"displays the right title for the link"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue