@murky-web/typebuddy 1.4.0 → 1.5.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 +13 -0
- package/jsr.json +2 -2
- package/package.json +4 -6
- package/src/index.ts +1 -1
- package/dist/globals.js +0 -0
- /package/{globals.ts → globals.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -93,6 +93,19 @@ modules.
|
|
|
93
93
|
|
|
94
94
|
If you want the `typebuddy` utility types globally, opt in once in your project:
|
|
95
95
|
|
|
96
|
+
```jsonc
|
|
97
|
+
// tsconfig.json
|
|
98
|
+
{
|
|
99
|
+
"compilerOptions": {
|
|
100
|
+
"types": ["@murky-web/typebuddy/globals"]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
`types` is replaced, not merged, when a tsconfig `extends` another one, so a
|
|
106
|
+
config that sets its own `types` has to list the entry again. A side-effect
|
|
107
|
+
import in any `.d.ts` file the program includes works as well:
|
|
108
|
+
|
|
96
109
|
```typescript
|
|
97
110
|
import type {} from "@murky-web/typebuddy/globals";
|
|
98
111
|
```
|
package/jsr.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://jsr.io/schema/config-file.v1.json",
|
|
3
3
|
"name": "@murky-web/typebuddy",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.5.0",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./src/index.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"exclude": [
|
|
22
22
|
"tests/**",
|
|
23
23
|
"smoke/**",
|
|
24
|
-
"globals.ts",
|
|
24
|
+
"globals.d.ts",
|
|
25
25
|
"dist/**",
|
|
26
26
|
"node_modules/**"
|
|
27
27
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@murky-web/typebuddy",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Your new best friend for simple typescript guards every project needs.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,9 +43,7 @@
|
|
|
43
43
|
"default": "./dist/collections.js"
|
|
44
44
|
},
|
|
45
45
|
"./globals": {
|
|
46
|
-
"types": "./globals.ts"
|
|
47
|
-
"import": "./dist/globals.js",
|
|
48
|
-
"default": "./dist/globals.js"
|
|
46
|
+
"types": "./globals.d.ts"
|
|
49
47
|
},
|
|
50
48
|
"./oxlint": {
|
|
51
49
|
"types": "./oxlint/index.ts",
|
|
@@ -68,7 +66,7 @@
|
|
|
68
66
|
"lint:fix": "oxlint -c ./.oxlintrc.jsonc --tsconfig ./tsconfig.lint.json --type-aware --fix src biome tsdown.config.ts vitest.config.ts",
|
|
69
67
|
"format": "oxfmt -c ../config/oxc/.oxfmtrc.jsonc src rules biome tests tsdown.config.ts vitest.config.ts",
|
|
70
68
|
"format:check": "oxfmt -c ../config/oxc/.oxfmtrc.jsonc --check src rules biome tests tsdown.config.ts vitest.config.ts",
|
|
71
|
-
"smoke:globals": "bun run build && tsc --project ./smoke/globals/tsconfig.json --noEmit",
|
|
69
|
+
"smoke:globals": "bun run build && tsc --project ./smoke/globals/tsconfig.json --noEmit && mkdir -p ./smoke/globals/node_modules/@murky-web && ln -sfn ../../../.. ./smoke/globals/node_modules/@murky-web/typebuddy && tsc --project ./smoke/globals/tsconfig.types.json --noEmit",
|
|
72
70
|
"smoke:oxlint": "bun run build && bun ./smoke/oxlint/run-smoke.ts",
|
|
73
71
|
"smoke:oxlint:fix": "bun run build && bun ./smoke/oxlint/run-fix-smoke.ts",
|
|
74
72
|
"smoke:subpath": "bun run build && bun ./smoke/subpath/run.ts",
|
|
@@ -78,7 +76,7 @@
|
|
|
78
76
|
"files": [
|
|
79
77
|
"biome",
|
|
80
78
|
"dist",
|
|
81
|
-
"globals.ts",
|
|
79
|
+
"globals.d.ts",
|
|
82
80
|
"jsr.json",
|
|
83
81
|
"oxlint/index.ts",
|
|
84
82
|
"rules",
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// program that imports this package, so the global helpers need no
|
|
3
3
|
// tsconfig entry of their own. The empty brace form is the only way to say
|
|
4
4
|
// "load this module for its ambient declarations" without importing a value,
|
|
5
|
-
// and `globals.ts` sits at the package root because it is a published entry
|
|
5
|
+
// and `globals.d.ts` sits at the package root because it is a published entry
|
|
6
6
|
// point (`@murky-web/typebuddy/globals`).
|
|
7
7
|
// oxlint-disable-next-line no-empty-named-blocks, no-relative-parent-imports, require-module-specifiers
|
|
8
8
|
import type {} from "../globals.js";
|
package/dist/globals.js
DELETED
|
File without changes
|
|
File without changes
|