obsidian-typings 4.67.0 → 4.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -69,7 +69,7 @@ To make it easier to adapt to these differences, this package provides typings f
69
69
 
70
70
  Typings for each `Obsidian` version can be found in their own git branches: namely `release/obsidian-public/*` and `release/obsidian-catalyst/*`:
71
71
 
72
- - Latest `public` release: [`release/obsidian-public/1.10.3`](https://github.com/Fevol/obsidian-typings/tree/release/obsidian-public/1.10.3)
72
+ - Latest `public` release: [`release/obsidian-public/1.10.6`](https://github.com/Fevol/obsidian-typings/tree/release/obsidian-public/1.10.6)
73
73
  - Latest `catalyst` release: [`release/obsidian-catalyst/1.10.5`](https://github.com/Fevol/obsidian-typings/tree/release/obsidian-catalyst/1.10.5)
74
74
 
75
75
  Older versions of the package are available, but support for them is limited.
@@ -141,7 +141,9 @@ To access types from the `obsidian` module, the import syntax does not change:
141
141
  ```ts
142
142
  import type { App } from 'obsidian';
143
143
 
144
- console.log(this.app.internalPlugins);
144
+ function printInternalPlugins(app: App): void {
145
+ console.log(app.internalPlugins);
146
+ }
145
147
  ```
146
148
 
147
149
  ### `obsidian-typings` additional interfaces
@@ -151,7 +153,9 @@ Additional interfaces added by this package (which do not exist in the official
151
153
  ```ts
152
154
  import type { InternalPlugins } from 'obsidian-typings';
153
155
 
154
- const internalPlugins: InternalPlugins = this.app.internalPlugins;
156
+ function getInternalPlugins(app: App): InternalPlugins {
157
+ return app.internalPlugins;
158
+ }
155
159
  ```
156
160
 
157
161
  ### `obsidian-typings/implementations`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obsidian-typings",
3
- "version": "4.67.0",
3
+ "version": "4.69.0",
4
4
  "description": "Extended type definitions for the Obsidian API (https://obsidian.md)",
5
5
  "main": "",
6
6
  "module": "",
@@ -87,6 +87,7 @@
87
87
  "@microsoft/api-extractor": "^7.55.1",
88
88
  "@tsconfig/strictest": "^2.0.6",
89
89
  "builtin-modules": "^5.0.0",
90
+ "bun": "^1.3.4",
90
91
  "commitizen": "^4.3.1",
91
92
  "cspell": "^9.2.1",
92
93
  "cz-conventional-changelog": "^3.3.0",
@@ -124,7 +125,7 @@
124
125
  "build:extract-api": "api-extractor run --local",
125
126
  "commit": "cz",
126
127
  "format": "bun run scripts/sort-interfaces.ts ./src/ && bun dprint fmt",
127
- "postinstall": "npx bun run scripts/postinstall.ts",
128
+ "postinstall": "node scripts/postinstall.mjs",
128
129
  "prepare": "husky",
129
130
  "release": "git show origin/main:workflow-scripts/release.ts | bun -",
130
131
  "release:beta": "git show origin/main:workflow-scripts/release-beta.ts | bun -",
@@ -1,19 +0,0 @@
1
- import { spawnSync } from 'node:child_process';
2
- import {
3
- join,
4
- relative
5
- } from 'node:path/posix';
6
- import { cwd } from 'node:process';
7
-
8
- let pkgDir = cwd().replace(/\\/g, '/');
9
- const patchDir = join(pkgDir, 'patches');
10
- const relativePath = '/node_modules/obsidian-typings';
11
- if (pkgDir.endsWith(relativePath)) {
12
- pkgDir = pkgDir.slice(0, -relativePath.length);
13
- }
14
-
15
- spawnSync('npx', ['patch-package', '--patch-dir', relative(pkgDir, patchDir)], {
16
- shell: true,
17
- stdio: 'inherit',
18
- cwd: pkgDir
19
- });