Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
CNSeniorious000 authored Sep 25, 2024
1 parent 0687808 commit cc5616d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ jobs:

- name: Build package
working-directory: src/js
run: bun build pyodide.ts --outdir=dist --sourcemap=linked
run: |
mkdir -p generated
cp ../core/*.ts ./generated/
sed -i 's@../js/@../@g' ./generated/error_handling.ts
bun build pyodide.ts --outdir=dist --sourcemap=linked
- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion src/js/compat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
IN_BROWSER_MAIN_THREAD,
IN_BROWSER_WEB_WORKER,
} from "./environments";
import { Lockfile } from "./types";
import type { Lockfile } from "./types";

declare var globalThis: {
importScripts: (url: string) => void;
Expand Down
2 changes: 1 addition & 1 deletion src/js/emscripten-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { ConfigType } from "./pyodide";
import { loadBinaryFile, getBinaryResponse } from "./compat";
import { API, PreRunFunc } from "./types";
import type { API, PreRunFunc } from "./types";

/**
* @private
Expand Down
2 changes: 1 addition & 1 deletion src/js/load-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
uriToPackageData,
base16ToBase64,
} from "./packaging-utils";
import { Lockfile } from "./types";
import type { Lockfile } from "./types";

/**
* Initialize the packages index. This is called as early as possible in
Expand Down
15 changes: 9 additions & 6 deletions src/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"access": "public"
},
"version": "0.26.2",
"type": "module",
"description": "The Pyodide JavaScript package",
"keywords": [
"python",
Expand All @@ -22,18 +23,20 @@
".": {
"import": "./dist/pyodide.js",
"types": "./pyodide.ts"
},
"./version": {
"import": "./version.ts",
"types": "./version.ts"
}
},
"files": [
"package.json",
"dist",
"pyodide.ts",
"api.ts",
"types.ts",
"emscripten-settings.ts",
"snapshot.ts"
"generated",
"*.ts"
],
"types": "./pyodide.ts",
"engines": {
"node": ">=18.0.0"
}
}
}
2 changes: 1 addition & 1 deletion src/js/pyodide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type { PyodideInterface } from "./api.js";
import type { TypedArray, Module } from "./types";
import type { EmscriptenSettings } from "./emscripten-settings";
import type { PackageData } from "./load-package";
import { SnapshotConfig } from "./snapshot";
import type { SnapshotConfig } from "./snapshot";
export type { PyodideInterface, TypedArray };

export { version, type PackageData };
Expand Down

0 comments on commit cc5616d

Please sign in to comment.