Skip to content

Commit

Permalink
1.0.3 Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TfT Hacker committed Sep 15, 2024
1 parent cccbb21 commit e1a1140
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 37 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 1.0.3

### fix

- modified main.ts to better conform to obdisidan.dt.ts
- chore: update all dependencies.

# 1.0.2

### Fix
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian42-brat",
"name": "BRAT",
"version": "1.0.2",
"version": "1.0.3",
"minAppVersion": "1.4.16",
"description": "Easily install a beta version of a plugin for testing.",
"author": "TfTHacker",
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "obsidian42-brat",
"version": "1.0.2",
"version": "1.0.3",
"description": "Obsidian42 - Beta Reviewer's Autoupdate Tool.",
"main": "main.js",
"scripts": {
"dev": "node esbuild.config.mjs",
"build": "node esbuild.config.mjs production ",
"dev": "node --no-warnings esbuild.config.mjs",
"build": "node esbuild.config.mjs production",
"version": "node version-bump.mjs",
"githubaction": "node version-github-action.mjs",
"lint:check": "eslint --ext .ts,.tsx .",
Expand All @@ -20,20 +20,20 @@
"url": "git://github.com/TfTHacker/obsidian42-brat.git"
},
"devDependencies": {
"typescript": "5.5.4",
"typescript": "5.6.2",
"tslib": "^2.7.0",
"@types/node": "^22.5.1",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"@typescript-eslint/utils": "^8.3.0",
"@types/node": "^22.5.5",
"@typescript-eslint/eslint-plugin": "^8.5.0",
"@typescript-eslint/parser": "^8.5.0",
"@typescript-eslint/utils": "^8.5.0",
"builtin-modules": "4.0.0",
"esbuild": "0.23.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-css": "^0.10.0",
"eslint-plugin-css": "^0.11.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-jsonc": "^2.16.0",
"eslint-plugin-mdx": "^3.1.5",
"eslint-plugin-only-warn": "^1.1.0",
Expand All @@ -42,16 +42,16 @@
"eslint-plugin-yml": "^1.14.0",
"@html-eslint/eslint-plugin": "^0.26.0",
"@html-eslint/parser": "^0.26.0",
"husky": "^9.1.5",
"husky": "^9.1.6",
"jsdom": "^25.0.0",
"lint-staged": "^15.2.9",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"remark-preset-lint-consistent": "^6.0.0",
"remark-preset-lint-markdown-style-guide": "^6.0.0",
"remark-preset-lint-recommended": "^7.0.0",
"remark-preset-prettier": "^2.0.1",
"ts-node": "^10.9.2",
"typedoc": "^0.26.6",
"typedoc": "^0.26.7",
"@types/obsidian-typings": "github:Fevol/obsidian-typings",
"obsidian": "1.6.6"
},
Expand Down
50 changes: 28 additions & 22 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,39 @@ export default class ThePlugin extends Plugin {
commands: PluginCommands = new PluginCommands(this);
bratApi: BratAPI = new BratAPI(this);

async onload(): Promise<void> {
onload() {
console.log('loading ' + this.APP_NAME);

await this.loadSettings();
this.addSettingTab(new BratSettingsTab(this.app, this));
this.loadSettings()
.then(() => {
this.addSettingTab(new BratSettingsTab(this.app, this));

addIcons();
this.showRibbonButton();
this.registerObsidianProtocolHandler('brat', this.obsidianProtocolHandler);
addIcons();
this.showRibbonButton();
this.registerObsidianProtocolHandler('brat', this.obsidianProtocolHandler);

this.app.workspace.onLayoutReady(() => {
// let obsidian load and calm down before checking for updates
if (this.settings.updateAtStartup) {
setTimeout(() => {
void this.betaPlugins.checkForPluginUpdatesAndInstallUpdates(false);
}, 60000);
}
if (this.settings.updateThemesAtStartup) {
setTimeout(() => {
void themesCheckAndUpdates(this, false);
}, 120000);
}
setTimeout(() => {
window.bratAPI = this.bratApi;
}, 500);
});
this.app.workspace.onLayoutReady(() => {
// let obsidian load and calm down before checking for updates
if (this.settings.updateAtStartup) {
setTimeout(() => {
void this.betaPlugins.checkForPluginUpdatesAndInstallUpdates(false);
}, 60000);
}
if (this.settings.updateThemesAtStartup) {
setTimeout(() => {
void themesCheckAndUpdates(this, false);
}, 120000);
}
setTimeout(() => {
window.bratAPI = this.bratApi;
}, 500);
});
})
.catch((error: unknown) => {
console.error('Failed to load settings:', error);
});
}

showRibbonButton(): void {
this.addRibbonIcon('BratIcon', 'BRAT', () => {
this.commands.ribbonDisplayCommands();
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"0.8.0": "1.4.16",
"1.0.0": "1.4.16",
"1.0.1": "1.4.16",
"1.0.2": "1.4.16"
"1.0.2": "1.4.16",
"1.0.3": "1.4.16"
}

0 comments on commit e1a1140

Please sign in to comment.