Skip to content

Commit 760dda5

Browse files
authored
Inline scripts in packages (#842)
1 parent b96d42b commit 760dda5

File tree

110 files changed

+470
-416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+470
-416
lines changed

.changeset/config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
]
1717
],
1818
"linked": [],
19-
"ignore": ["@codama/internals"],
2019
"access": "public",
2120
"baseBranch": "main",
2221
"privatePackages": {

eslint.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ import tseslint from 'typescript-eslint';
33

44
export default tseslint.config([
55
{
6-
files: ['**/*.ts', '**/*.(c|m)?js'],
76
ignores: ['**/dist/**', '**/e2e/**'],
7+
},
8+
{
9+
files: ['**/*.ts', '**/*.(c|m)?js'],
810
extends: [solanaConfig],
911
},
1012
{

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
"scripts": {
55
"build": "turbo run build --log-order grouped",
66
"lint": "turbo run lint --log-order grouped",
7-
"lint:fix": "turbo lint:fix --log-order grouped && pnpm prettier --log-level warn --ignore-unknown --write '{.,!packages}/*'",
7+
"lint:fix": "turbo lint:fix --log-order grouped && pnpm prettier --ignore-unknown --write '{.,!packages}/*'",
88
"test": "turbo run test --log-order grouped",
99
"publish-packages": "pnpm build && changeset publish"
1010
},
1111
"devDependencies": {
1212
"@changesets/changelog-github": "^0.5.1",
1313
"@changesets/cli": "^2.29.7",
14-
"@codama/internals": "workspace:*",
1514
"@eslint/js": "^9.35.0",
1615
"@eslint/json": "^0.13.2",
1716
"@solana/eslint-config-solana": "^5.0.0",
@@ -20,6 +19,7 @@
2019
"@typescript-eslint/eslint-plugin": "^8.43.0",
2120
"@typescript-eslint/parser": "^8.43.0",
2221
"agadoo": "^3.0.0",
22+
"browserslist-to-esbuild": "^2.1.1",
2323
"eslint": "^9.35.0",
2424
"eslint-plugin-simple-import-sort": "^12.1.1",
2525
"eslint-plugin-sort-keys-fix": "^1.1.2",
@@ -30,8 +30,7 @@
3030
"turbo": "^2.5.6",
3131
"tsup": "^8.5.0",
3232
"typescript": "^5.9.2",
33-
"vitest": "^3.2.4",
34-
"zx": "^8.8.1"
33+
"vitest": "^3.2.4"
3534
},
3635
"engines": {
3736
"node": ">=20.0.0"

packages/cli/.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dist/
2-
e2e/
2+
test/e2e/
33
test-ledger/
44
target/
55
CHANGELOG.md

packages/cli/package.json

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,15 @@
2929
"cli"
3030
],
3131
"scripts": {
32-
"build": "rimraf dist && pnpm build:src && pnpm build:cli && pnpm build:types",
33-
"build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs node",
34-
"build:cli": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs cli",
35-
"build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
36-
"dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
37-
"lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
38-
"lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
39-
"test": "pnpm test:types && pnpm test:treeshakability && pnpm test:node && pnpm test:exports",
32+
"build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
33+
"dev": "vitest --project node",
34+
"lint": "eslint . && prettier --check .",
35+
"lint:fix": "eslint --fix . && prettier --write .",
36+
"test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit && pnpm test:exports",
4037
"test:exports": "node test/exports/module.mjs && node test/exports/commonjs.cjs",
41-
"test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
42-
"test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
43-
"test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
38+
"test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
39+
"test:types": "tsc --noEmit",
40+
"test:unit": "vitest run"
4441
},
4542
"dependencies": {
4643
"@codama/nodes": "workspace:*",

packages/cli/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"module": "ESNext"
55
},
66
"display": "codama",
7-
"extends": "../internals/tsconfig.base.json",
7+
"extends": "../../tsconfig.json",
88
"include": ["src", "test"]
99
}

packages/cli/tsup.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { defineConfig } from 'tsup';
2+
3+
import { getBuildConfig, getCliBuildConfig } from '../../tsup.config.base';
4+
5+
export default defineConfig([
6+
getBuildConfig({ format: 'cjs', platform: 'node' }),
7+
getBuildConfig({ format: 'esm', platform: 'node' }),
8+
getCliBuildConfig(),
9+
]);

packages/cli/vitest.config.mts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from 'vitest/config';
2+
import { getVitestConfig } from '../../vitest.config.base.mjs';
3+
4+
export default defineConfig({
5+
test: {
6+
projects: [getVitestConfig('node')],
7+
},
8+
});
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dist/
2-
e2e/
2+
test/e2e/
33
test-ledger/
44
target/
55
CHANGELOG.md

packages/dynamic-codecs/package.json

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,14 @@
3636
"codecs"
3737
],
3838
"scripts": {
39-
"build": "rimraf dist && pnpm build:src && pnpm build:types",
40-
"build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs package",
41-
"build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
42-
"dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
43-
"lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
44-
"lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
45-
"test": "pnpm test:types && pnpm test:treeshakability && pnpm test:browser && pnpm test:node && pnpm test:react-native",
46-
"test:browser": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs browser",
47-
"test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
48-
"test:react-native": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs react-native",
49-
"test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
50-
"test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
39+
"build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
40+
"dev": "vitest --project node",
41+
"lint": "eslint . && prettier --check .",
42+
"lint:fix": "eslint --fix . && prettier --write .",
43+
"test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit",
44+
"test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
45+
"test:types": "tsc --noEmit",
46+
"test:unit": "vitest run"
5147
},
5248
"dependencies": {
5349
"@codama/errors": "workspace:*",

0 commit comments

Comments
 (0)