@vttforge/testing 0.3.2 → 0.3.3
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @vttforge/testing
|
|
2
2
|
|
|
3
|
+
## 0.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8a7ade5: Declare the Foundry globals with `var` so a consumer's own declarations can coexist. A package that adds `@vttforge/testing` to a typechecked project already declares `foundry`, `game`, `CONFIG`, `Hooks` and `ui` for its own source, and two `declare global` blocks only merge when both use `var`. With `const` on either side `tsc` stopped with `TS2451: Cannot redeclare block-scoped variable`, which is what a real consumer hit the first time it tried to typecheck its tests. The scaffolding templates are corrected the same way.
|
|
8
|
+
|
|
3
9
|
## 0.3.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -138,14 +138,25 @@ interface MockFoundryOptions {
|
|
|
138
138
|
declare function withMockFoundry(options?: MockFoundryOptions): MockFoundry;
|
|
139
139
|
//#endregion
|
|
140
140
|
//#region src/vitest/index.d.ts
|
|
141
|
+
/**
|
|
142
|
+
* `var`, not `const`, and that is the whole point.
|
|
143
|
+
*
|
|
144
|
+
* A package that consumes this already declares these globals for its own
|
|
145
|
+
* source, because the SDK does not ship a Foundry runtime type. Two
|
|
146
|
+
* `declare global` blocks naming the same thing have to merge, and only
|
|
147
|
+
* `var` merges: `const` is block-scoped, so a second one is a redeclaration
|
|
148
|
+
* and `tsc` stops with TS2451. Consumers hit that the moment they add the
|
|
149
|
+
* test helpers to a typechecked project, which is the moment they most want
|
|
150
|
+
* them.
|
|
151
|
+
*/
|
|
141
152
|
declare global {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
153
|
+
var foundry: any;
|
|
154
|
+
var game: any;
|
|
155
|
+
var CONFIG: any;
|
|
156
|
+
var Hooks: any;
|
|
157
|
+
var ui: any;
|
|
158
|
+
var CONST: any;
|
|
148
159
|
}
|
|
149
160
|
//#endregion
|
|
150
161
|
export { RecordedSetting as a, MockDocument as c, createMockItem as d, RecordedHook as i, MockDocumentOptions as l, MockFoundryOptions as n, RecordedSheet as o, RecordedEnricher as r, withMockFoundry as s, MockFoundry as t, createMockActor as u };
|
|
151
|
-
//# sourceMappingURL=index-
|
|
162
|
+
//# sourceMappingURL=index-DB9kK9Rn.d.mts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as QuenchContext, r as registerBatch, t as BatchOptions } from "./index-G_T1z-KX.mjs";
|
|
2
|
-
import { a as RecordedSetting, c as MockDocument, d as createMockItem, i as RecordedHook, l as MockDocumentOptions, n as MockFoundryOptions, o as RecordedSheet, r as RecordedEnricher, s as withMockFoundry, t as MockFoundry, u as createMockActor } from "./index-
|
|
2
|
+
import { a as RecordedSetting, c as MockDocument, d as createMockItem, i as RecordedHook, l as MockDocumentOptions, n as MockFoundryOptions, o as RecordedSheet, r as RecordedEnricher, s as withMockFoundry, t as MockFoundry, u as createMockActor } from "./index-DB9kK9Rn.mjs";
|
|
3
3
|
export { type BatchOptions, type MockDocument, type MockDocumentOptions, type MockFoundry, type MockFoundryOptions, type QuenchContext, type RecordedEnricher, type RecordedHook, type RecordedSetting, type RecordedSheet, createMockActor, createMockItem, registerBatch, withMockFoundry };
|
package/dist/vitest/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RecordedSetting, c as MockDocument, d as createMockItem, i as RecordedHook, l as MockDocumentOptions, n as MockFoundryOptions, o as RecordedSheet, r as RecordedEnricher, s as withMockFoundry, t as MockFoundry, u as createMockActor } from "../index-
|
|
1
|
+
import { a as RecordedSetting, c as MockDocument, d as createMockItem, i as RecordedHook, l as MockDocumentOptions, n as MockFoundryOptions, o as RecordedSheet, r as RecordedEnricher, s as withMockFoundry, t as MockFoundry, u as createMockActor } from "../index-DB9kK9Rn.mjs";
|
|
2
2
|
export { type MockDocument, type MockDocumentOptions, type MockFoundry, type MockFoundryOptions, type RecordedEnricher, type RecordedHook, type RecordedSetting, type RecordedSheet, createMockActor, createMockItem, withMockFoundry };
|