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
10 changes: 7 additions & 3 deletions governance/pyth_staking_sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
{
"name": "@pythnetwork/staking-sdk",
"version": "0.0.1",
"version": "0.0.2",
"description": "Pyth staking SDK",
"main": "src/index.ts",
"types": "src/index.d.ts",
"files": [
"dist/**/*"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsc && node scripts/update-package-json.mjs",
"build": "tsc",
"test": "pnpm run test:format && pnpm run test:lint && pnpm run test:integration && pnpm run test:types",
"fix": "pnpm fix:lint && pnpm fix:format",
"fix:format": "prettier --write .",
"fix:lint": "eslint --fix .",
"test:format": "prettier --check .",
"test:lint": "jest --selectProjects lint",
"test:types": "tsc",
"test:integration": "echo disabled # jest --selectProjects integration"
"test:integration": "echo disabled # jest --selectProjects integration",
"prepublishOnly": "node scripts/update-package-json.mjs"
},
"devDependencies": {
"@cprussin/eslint-config": "^3.0.0",
Expand Down
5 changes: 3 additions & 2 deletions governance/pyth_staking_sdk/scripts/update-package-json.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import { fileURLToPath } from "url";

const __dirname = path.dirname(fileURLToPath(import.meta.url));

const distPackageJsonPath = path.join(__dirname, "..", "dist", "package.json");
const distPackageJsonPath = path.join(__dirname, "..", "package.json");

const packageJson = JSON.parse(fs.readFileSync(distPackageJsonPath, "utf8"));

packageJson.main = "src/index.js";
packageJson.main = "dist/src/index.js";
packageJson.types = "dist/src/index.d.ts";

fs.writeFileSync(distPackageJsonPath, JSON.stringify(packageJson, null, 2));
Loading