Skip to content

Commit

Permalink
build: update package.json to be consistent (#141)
Browse files Browse the repository at this point in the history
* chore: update exports to properly pick esm and cjs exports, as the default type is cjs (#1)

* chore: missing tsconfig.json changes on blueprint
  • Loading branch information
pocesar authored Sep 7, 2024
1 parent eca8ab9 commit 690d580
Show file tree
Hide file tree
Showing 27 changed files with 81 additions and 51 deletions.
15 changes: 15 additions & 0 deletions .changeset/serious-wasps-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@blaze-cardano/blueprint": patch
"@blaze-cardano/emulator": patch
"@blaze-cardano/tsconfig": patch
"@blaze-cardano/ogmios": patch
"@blaze-cardano/wallet": patch
"@blaze-cardano/query": patch
"@blaze-cardano/core": patch
"@blaze-cardano/uplc": patch
"@blaze-cardano/sdk": patch
"@blaze-cardano/tx": patch
"@blaze-cardano/vm": patch
---

use package.json exports consistently
2 changes: 2 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:

- name: 🎁 Run build
run: pnpm build
env:
NODE_ENV: production

- name: 🧪 Run test
run: pnpm test
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_ENV: production
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"workspaces": [
"sites/*",
"packages/*"
"packages/*",
"sites/*"
],
"scripts": {
"build": "turbo run build",
Expand All @@ -24,5 +24,6 @@
"turbo": "^1.13.4",
"typedoc": "^0.25.13",
"typescript": "^5.5.4"
}
},
"packageManager": "pnpm@9.9.0+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1"
}
10 changes: 7 additions & 3 deletions packages/blaze-blueprint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
"name": "@blaze-cardano/blueprint",
"version": "0.4.1",
"description": "CIP-57 implementation and generator",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"types": "./dist/index.d.ts",
"bin": "./dist/cli.js",
"files": [
"dist/**"
"dist"
],
"scripts": {
"build": "tsup src/index.ts src/cli.ts --format esm,cjs --dts",
Expand Down
3 changes: 1 addition & 2 deletions packages/blaze-blueprint/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "@blaze-cardano/tsconfig/base.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
"exclude": ["dist", ".turbo", "node_modules"]
}
3 changes: 3 additions & 0 deletions packages/blaze-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
}
},
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts",
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
Expand Down
3 changes: 1 addition & 2 deletions packages/blaze-core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "@blaze-cardano/tsconfig/base.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
"exclude": ["dist", ".turbo", "node_modules"]
}
3 changes: 3 additions & 0 deletions packages/blaze-emulator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
}
},
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external rxjs",
"dev": "tsup src/index.ts --format esm,cjs --watch --dts --external rxjs",
Expand Down
3 changes: 1 addition & 2 deletions packages/blaze-emulator/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "@blaze-cardano/tsconfig/base.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
"exclude": ["dist", ".turbo", "node_modules"]
}
10 changes: 7 additions & 3 deletions packages/blaze-ogmios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
"name": "@blaze-cardano/ogmios",
"version": "0.0.4",
"description": "Blaze cardano ogmios library",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"types": "./dist/index.d.ts",
"files": [
"dist/**"
"dist"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external rxjs",
Expand Down
3 changes: 1 addition & 2 deletions packages/blaze-ogmios/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "@blaze-cardano/tsconfig/base.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
"exclude": ["dist", ".turbo", "node_modules"]
}
10 changes: 7 additions & 3 deletions packages/blaze-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
"name": "@blaze-cardano/query",
"version": "0.2.12",
"description": "Blaze cardano emulator library",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"types": "./dist/index.d.ts",
"files": [
"dist/**"
"dist"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external rxjs",
Expand Down
3 changes: 1 addition & 2 deletions packages/blaze-query/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "@blaze-cardano/tsconfig/base.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
"exclude": ["dist", ".turbo", "node_modules"]
}
10 changes: 7 additions & 3 deletions packages/blaze-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
"name": "@blaze-cardano/sdk",
"version": "0.1.23",
"description": "Blaze cardano sdk library",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"types": "./dist/index.d.ts",
"files": [
"dist/**"
"dist"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external rxjs",
Expand Down
3 changes: 1 addition & 2 deletions packages/blaze-sdk/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "@blaze-cardano/tsconfig/base.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
"exclude": ["dist", ".turbo", "node_modules"]
}
3 changes: 1 addition & 2 deletions packages/blaze-tsconfig/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true
},
"exclude": ["node_modules"]
}
}
3 changes: 1 addition & 2 deletions packages/blaze-tx/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@blaze-cardano/tx",
"version": "0.5.6",
"description": "Blaze cardano transaction building library",
Expand All @@ -15,7 +14,7 @@
},
"types": "./dist/index.d.ts",
"files": [
"dist/**"
"dist"
],
"scripts": {
"build": "tsup src/index.ts src/value.ts --format esm,cjs --dts --external rxjs",
Expand Down
3 changes: 1 addition & 2 deletions packages/blaze-tx/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "@blaze-cardano/tsconfig/base.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
"exclude": ["dist", ".turbo", "node_modules"]
}
4 changes: 3 additions & 1 deletion packages/blaze-uplc/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@blaze-cardano/uplc",
"version": "0.1.17",
"description": "Blaze untyped plutus core library",
Expand All @@ -10,6 +9,9 @@
}
},
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external rxjs",
"dev": "tsup src/index.ts --format esm,cjs --watch --dts --external rxjs",
Expand Down
3 changes: 1 addition & 2 deletions packages/blaze-uplc/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "@blaze-cardano/tsconfig/base.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
"exclude": ["dist", ".turbo", "node_modules"]
}
7 changes: 1 addition & 6 deletions packages/blaze-vm/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@blaze-cardano/vm",
"version": "0.0.35",
"description": "Blaze cardano plutus virtual machine",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./value": {
"import": "./dist/value.mjs",
"require": "./dist/value.js"
}
},
"types": "./dist/index.d.ts",
"files": [
"dist/**"
"dist"
],
"scripts": {
"build": "tsup src/index.ts src/value.ts --format esm,cjs --dts --external rxjs",
Expand Down
3 changes: 1 addition & 2 deletions packages/blaze-vm/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "@blaze-cardano/tsconfig/base.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
"exclude": ["dist", ".turbo", "node_modules"]
}
10 changes: 7 additions & 3 deletions packages/blaze-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
"name": "@blaze-cardano/wallet",
"version": "0.1.42",
"description": "Blaze cardano wallet library",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"types": "./dist/index.d.ts",
"files": [
"dist/**"
"dist"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external rxjs",
Expand Down
3 changes: 1 addition & 2 deletions packages/blaze-wallet/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "@blaze-cardano/tsconfig/base.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
"exclude": ["dist", ".turbo", "node_modules"]
}
2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
packages:
- "sites/*"
- "packages/*"
- "sites/*"
- "!**/examples/**"
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://turbo.build/schema.json",
"$schema": "https://turbo.build/schema.v1.json",
"pipeline": {
"build": {
"dependsOn": ["^build"],
Expand Down

0 comments on commit 690d580

Please sign in to comment.