Skip to content

Commit 5aca333

Browse files
Version Packages (next) (#56)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 708f25e commit 5aca333

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

.changeset/pre.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"loud-rivers-pretend",
1717
"many-spies-fix",
1818
"rude-berries-rescue",
19+
"rude-pets-hope",
1920
"shy-turkeys-count",
2021
"silly-seas-impress",
2122
"swift-planets-rescue",

CHANGELOG.md

+37
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
# @heymp/scratchpad
22

3+
## 1.0.0-next.11
4+
5+
### Minor Changes
6+
7+
- 708f25e: Support ts config files
8+
9+
`scratchpad.config.ts`
10+
11+
```ts
12+
import { Config } from "@heymp/scratchpad/src/config.js";
13+
14+
export function hi(name: string) {
15+
console.log(`Hi there ${name}`);
16+
}
17+
18+
declare global {
19+
interface Window {
20+
hi: typeof hi;
21+
}
22+
}
23+
24+
export default {
25+
playwright: async (args) => {
26+
const { context } = args;
27+
await context.exposeFunction("hi", hi);
28+
},
29+
} satisfies Config;
30+
```
31+
32+
`test.ts`
33+
34+
```.ts
35+
/// <reference path="./scratchpad.config.ts" />
36+
37+
window.hi('Bob');
38+
```
39+
340
## 1.0.0-next.10
441

542
### Patch Changes

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@heymp/scratchpad",
33
"description": "Run TS/JS snippets in a locally",
4-
"version": "1.0.0-next.10",
4+
"version": "1.0.0-next.11",
55
"main": "bin/cli.js",
66
"type": "module",
77
"bin": {

0 commit comments

Comments
 (0)