Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "27.2.0",
"bin": "./bin/browsertime.js",
"type": "module",
"types": "./types/scripting.d.ts",
"types": "./scripting.d.ts",
"dependencies": {
"@devicefarmer/adbkit": "3.3.8",
"@sitespeed.io/chromedriver": "148.0.7778",
Expand Down Expand Up @@ -55,13 +55,14 @@
"index.js",
"lib",
"package.json",
"scripting.d.ts",
"vendor",
"types"
],
"exports": {
".": {
"import": "./index.js",
"types": "./types/scripting.d.ts"
"types": "./scripting.d.ts",
"import": "./index.js"
}
},
"scripts": {
Expand All @@ -72,7 +73,7 @@
"lint:fix": "eslint . --fix",
"tsc": "tsc",
"jsdoc": "jsdoc --configure jsdoc/jsdoc.json",
"prepublishOnly": "npm run lint && npm run tsc"
"prepublishOnly": "npm run lint && npm run tsc && npx -y publint"
},
"author": "Peter Hedenskog",
"contributors": [
Expand Down
12 changes: 6 additions & 6 deletions types/scripting.d.ts → scripting.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export { Context as BrowsertimeContext } from './core/engine/context';
export { Commands as BrowsertimeCommands } from './core/engine/commands';
import type { Context } from './types/core/engine/context.js';
import type { Commands } from './types/core/engine/commands.js';

import { Context as BrowsertimeContext } from './core/engine/context';
import { Commands as BrowsertimeCommands } from './core/engine/commands';
export { Context as BrowsertimeContext } from './types/core/engine/context.js';
export { Commands as BrowsertimeCommands } from './types/core/engine/commands.js';

/**
* Signature of a Browsertime user script. Annotate the default export of
Expand All @@ -16,6 +16,6 @@ import { Commands as BrowsertimeCommands } from './core/engine/commands';
* }
*/
export type BrowsertimeScript = (
context: BrowsertimeContext,
commands: BrowsertimeCommands
context: Context,
commands: Commands
) => Promise<unknown>;
Loading