Skip to content

Commit 984f150

Browse files
committed
feat: build scripts
1 parent e620a81 commit 984f150

File tree

19 files changed

+927
-1913
lines changed

19 files changed

+927
-1913
lines changed

.github/workflows/branch.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: oven-sh/setup-bun@v1
18+
with:
19+
bun-version: "1.3.0"
1820
- uses: actions/setup-node@v3
1921
with:
2022
node-version: 22
@@ -41,6 +43,7 @@ jobs:
4143
# Release
4244
- name: Release (Canary)
4345
run: |
44-
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
45-
bun changeset version --snapshot dev
46-
bun changeset publish --tag dev --no-git-tag --access public
46+
bun changeset version --snapshot dev && bun update
47+
bun ci:canary
48+
env:
49+
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/main.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424
- uses: oven-sh/setup-bun@v1
25+
with:
26+
bun-version: "1.3.0"
2527
- uses: actions/setup-node@v3
2628
with:
2729
node-version: 22
@@ -42,11 +44,12 @@ jobs:
4244
- name: Release
4345
uses: changesets/action@v1
4446
with:
45-
publish: bun changeset publish
47+
version: bun changeset version && bun update
48+
publish: bun ci:publish
4649
env:
4750
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4851
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
52+
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
5053

5154
# Deploy Documentation
5255
docs:

bun.lock

Lines changed: 801 additions & 1837 deletions
Large diffs are not rendered by default.

lerna.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

package.json

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,33 @@
33
"version": "0.1.0",
44
"type": "module",
55
"private": true,
6-
"workspaces": [
7-
"packages/*"
8-
],
6+
"workspaces": {
7+
"packages": [
8+
"./packages/*"
9+
],
10+
"catalog": {
11+
"@blaze-cardano/core": "0.7.0",
12+
"@blaze-cardano/sdk": "0.2.43",
13+
"@blaze-cardano/data": "0.6.4",
14+
"@sundaeswap/asset": "1.0.11",
15+
"@sundaeswap/bigint-math": "0.6.3",
16+
"@sundaeswap/fraction": "1.0.8",
17+
"@blaze-cardano/emulator": "0.3.34",
18+
"@types/jest": "^30",
19+
"@types/node": "^20",
20+
"@types/bun": "1.3.0",
21+
"typescript": "^5.7.2"
22+
}
23+
},
924
"scripts": {
1025
"lint": "eslint --ignore-pattern '**/dist/**'",
1126
"lint:fix": "bun run lint --fix",
1227
"prepare": "husky",
13-
"typecheck": "lerna run typecheck",
14-
"build": "lerna run build",
15-
"version:ci": "lerna version -y --ignore-scripts",
16-
"publish:ci": "lerna publish from-package -y",
17-
"docs": "lerna run docs:ci",
28+
"typecheck": "sh ./scripts/typecheck.sh",
29+
"build": "sh ./scripts/build.sh",
30+
"ci:publish": "sh ./scripts/publish.sh",
31+
"ci:canary": "sh ./scripts/canary.sh",
32+
"docs": "sh ./scripts/docs.sh",
1833
"scan-deps": "depcruise packages --progress"
1934
},
2035
"engines": {
@@ -40,7 +55,6 @@
4055
"globals": "^15.15.0",
4156
"husky": "^9.1.7",
4257
"jest-fetch-mock": "^3.0.3",
43-
"lerna": "^8.2.2",
4458
"lint-staged": "^15.5.1",
4559
"log-update": "^6.1.0",
4660
"prettier": "^3.5.3",

packages/cli/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
"dependencies": {
3333
"@sundaeswap/core": "workspace:*",
3434
"@inquirer/prompts": "^7.5.0",
35-
"@sundaeswap/asset": "^1.0.11",
35+
"@sundaeswap/asset": "catalog:",
3636
"asciify-image": "^0.1.10",
3737
"clipboardy": "^4.0.0",
38-
"@blaze-cardano/sdk": "0.2.43"
38+
"@blaze-cardano/sdk": "catalog:"
3939
},
4040
"devDependencies": {
41-
"@types/bun": "latest",
42-
"typescript": "^5.7.2"
41+
"@types/bun": "catalog:",
42+
"typescript": "catalog:"
4343
},
4444
"bin": "./dist/cli/index.js",
4545
"files": [

packages/cli/src/menus/shared.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable no-console */
2-
import { Core } from "@blaze-cardano/sdk";
2+
import { Core, makeValue } from "@blaze-cardano/sdk";
33
import { input, search, select } from "@inquirer/prompts";
44
import { AssetAmount, type IAssetAmountMetadata } from "@sundaeswap/asset";
55
import {
@@ -10,10 +10,10 @@ import {
1010
} from "@sundaeswap/core";
1111
import path from "path";
1212
import { fileURLToPath } from "url";
13-
import packageJson from "../../package.json" assert { type: "json" };
13+
14+
import corePackageJson from "../../../core/package.json" assert { type: "json" };
1415
import type { State } from "../types.js";
1516
import { getPoolData, prettyAssetId } from "../utils.js";
16-
import { makeValue } from "@blaze-cardano/sdk";
1717

1818
const asciify = (await import("asciify-image")).default;
1919

@@ -63,7 +63,7 @@ export async function setAsciiLogo(size: number): Promise<void> {
6363

6464
export async function printHeader(state: State): Promise<void> {
6565
console.clear();
66-
const version = packageJson.devDependencies["@sundaeswap/core"];
66+
const version = corePackageJson.version;
6767
const headerText: string[] = [
6868
"",
6969
"----------------------",

packages/core/package.json

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
"publishConfig": {
1818
"access": "public"
1919
},
20+
"engines": {
21+
"node": "^20"
22+
},
2023
"files": [
2124
"dist",
2225
"src",
@@ -66,19 +69,26 @@
6669
"docs": "docgen generate --typedoc-options ./typedoc.json",
6770
"docs:ci": "bun docs --unsafe"
6871
},
69-
"dependencies": {
70-
"@blaze-cardano/core": "0.7.0",
71-
"@blaze-cardano/sdk": "0.2.43",
72-
"@blaze-cardano/data": "0.6.4",
73-
"@sundaeswap/asset": "1.0.11",
74-
"@sundaeswap/bigint-math": "0.6.3",
72+
"peerDependencies": {
73+
"@blaze-cardano/core": "catalog:",
74+
"@blaze-cardano/sdk": "catalog:",
75+
"@blaze-cardano/data": "catalog:",
76+
"@sundaeswap/asset": "catalog:",
77+
"@sundaeswap/bigint-math": "catalog:",
7578
"@sundaeswap/math": "workspace:*",
76-
"@sundaeswap/fraction": "1.0.8"
79+
"@sundaeswap/fraction": "catalog:"
7780
},
7881
"devDependencies": {
79-
"@blaze-cardano/emulator": "0.3.34",
80-
"@types/jest": "^28.1.3",
81-
"@types/node": "^18.11.18"
82+
"@blaze-cardano/emulator": "catalog:",
83+
"@types/jest": "catalog:",
84+
"@types/node": "catalog:",
85+
"@blaze-cardano/core": "catalog:",
86+
"@blaze-cardano/sdk": "catalog:",
87+
"@blaze-cardano/data": "catalog:",
88+
"@sundaeswap/asset": "catalog:",
89+
"@sundaeswap/bigint-math": "catalog:",
90+
"@sundaeswap/math": "workspace:*",
91+
"@sundaeswap/fraction": "catalog:"
8292
},
8393
"gitHead": "ddc937102065a5a581fe7affe02474c0e68ad9a0"
8494
}

packages/demo/package.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@
3838
"css-minimizer-webpack-plugin": "^4.2.2",
3939
"fork-ts-checker-webpack-plugin": "^7.2.13",
4040
"html-webpack-plugin": "^5.5.0",
41-
"jest": "^29.4.0",
42-
"jest-dom": "^4.0.0",
43-
"jest-environment-jsdom": "^29.4.0",
4441
"lerna": "^5.6.2",
4542
"mini-css-extract-plugin": "^2.7.0",
4643
"path-browserify": "^1.0.1",
@@ -58,13 +55,13 @@
5855
"webpack-filter-warnings-plugin": "^1.2.1"
5956
},
6057
"dependencies": {
61-
"@blaze-cardano/sdk": "^0.2.34",
62-
"@sundaeswap/asset": "^1.0.11",
63-
"@sundaeswap/bigint-math": "^0.6.3",
64-
"@sundaeswap/core": "latest",
58+
"@blaze-cardano/sdk": "catalog:",
59+
"@sundaeswap/asset": "catalog:",
60+
"@sundaeswap/bigint-math": "catalog:",
61+
"@sundaeswap/core": "workspace:*",
6562
"@sundaeswap/math": "workspace:*",
66-
"@sundaeswap/fraction": "^1.0.3",
67-
"@sundaeswap/taste-test": "^3.0.4",
63+
"@sundaeswap/fraction": "catalog:",
64+
"@sundaeswap/taste-test": "workspace:*",
6865
"@tailwindcss/forms": "^0.5.2",
6966
"autoprefixer": "^9",
7067
"buffer": "^6.0.3",

packages/gummiworm/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
"dependencies": {
4747
"graphql": "^16.8.1",
4848
"graphql-request": "^6.1.0",
49-
"@sundaeswap/asset": "^1.0.11",
49+
"@sundaeswap/asset": "catalog:",
5050
"@sundaeswap/core": "workspace:*",
51-
"@blaze-cardano/sdk": "^0.2.43"
51+
"@blaze-cardano/sdk": "catalog:"
5252
}
5353
}

0 commit comments

Comments
 (0)